/* ---------- Färger och grunder ---------- */
:root {
  --forest: #12352b;
  --forest-2: #1d4a3d;
  --apricot: #f2a65a;
  --apricot-dark: #d9853a;
  --cream: #faf6ef;
  --sand: #f1e9dc;
  --ink: #1b1f1d;
  --muted: #5c6661;
  --line: #e2d9ca;
  --white: #fff;

  --radius: 14px;
  --heading: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.6 var(--body);
}
h1, h2, h3 { font-family: var(--heading); font-weight: 650; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1em; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: .85em 1.5em;
  background: var(--apricot);
  color: var(--forest);
  font: 600 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--apricot-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--forest-2); outline-offset: 2px; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--forest); }
.btn-ghost:hover { background: var(--sand); }
.btn-small { padding: .55em 1.1em; font-size: .9rem; }

/* ---------- Navigering ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-family: var(--heading); font-weight: 650; font-size: 1.3rem; color: var(--forest); text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links { display: none; } .nav-inner .btn { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--forest-2); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.fineprint { font-size: .9rem; color: var(--muted); }

.rotator { display: inline-block; color: var(--forest-2); position: relative; }
.rotator::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: .18em;
  background: var(--apricot); opacity: .55; z-index: -1; border-radius: 4px;
}
#rotating-word { display: inline-block; transition: opacity .3s, transform .3s; }
#rotating-word.out { opacity: 0; transform: translateY(-.25em); }

/* Samtalskortet */
.call-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 50px -24px rgba(18, 53, 43, .35);
}
.call-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.call-head div { display: flex; flex-direction: column; line-height: 1.3; }
.call-head .muted { font-size: .85rem; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: #3fae6a; box-shadow: 0 0 0 0 rgba(63, 174, 106, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(63, 174, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 174, 106, 0); } }
.transcript { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: .95rem; }
.transcript li { padding: 10px 14px; border-radius: 14px; max-width: 88%; }
.transcript .ai { background: var(--sand); align-self: flex-start; border-bottom-left-radius: 4px; }
.transcript .caller { background: var(--forest); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.transcript .system { align-self: center; color: var(--muted); font-size: .85rem; font-style: italic; }

/* ---------- Logotyper ---------- */
.logos { padding: 24px 0 48px; }
.logo-row { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; }
.logo-row li { font-family: var(--heading); font-size: 1.2rem; color: #9aa39e; }

/* ---------- Sektioner ---------- */
.section { padding: 88px 0; }
.section-lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; }
.section-tint { background: var(--sand); }
.section-dark { background: var(--forest); color: var(--cream); }
.section-dark p { color: #c9d6cf; }
.section-dark h3 { color: var(--white); }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.step-no {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--forest); color: var(--cream); font-weight: 600;
}
.steps p { color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px; margin-top: 36px; }
.features article { border-top: 2px solid var(--apricot); padding-top: 18px; }

/* ---------- Onboarding ---------- */
.onboarding { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .onboarding { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }

.progress { list-style: none; padding: 0; margin: 0 0 26px; display: flex; gap: 6px; counter-reset: step; }
.progress li {
  flex: 1; counter-increment: step;
  font-size: .8rem; font-weight: 600; color: var(--muted);
  padding-top: 10px; border-top: 4px solid var(--line);
}
.progress li::before { content: counter(step) ". "; }
.progress li.active, .progress li.completed { color: var(--forest); border-top-color: var(--apricot); }

fieldset { border: 0; padding: 0; margin: 0; }
.step { display: none; }
.step.active { display: block; }
label { display: block; font-family: var(--heading); font-size: 1.35rem; margin-bottom: 12px; }
input {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px;
  font: 1.05rem var(--body); background: var(--cream);
}
input:focus { border-color: var(--forest-2); background: var(--white); }
.hint { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.form-error { color: #b3261e; font-size: .92rem; min-height: 1.4em; margin: 10px 0 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

/* ---------- Frågor ---------- */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--forest-2); }
details[open] summary::after { content: "–"; }
summary::-webkit-details-marker { display: none; }
details p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Sidfot ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- Byggrutan ---------- */
.build-dialog {
  width: min(560px, calc(100% - 32px));
  border: 0; border-radius: 20px; padding: 32px;
  background: var(--white); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(18, 53, 43, .5);
}
.build-dialog::backdrop { background: rgba(18, 53, 43, .55); backdrop-filter: blur(3px); }
.build-dialog h2 { font-size: 1.6rem; margin-bottom: .2em; }
.build-steps { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.build-steps li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--muted); }
.build-steps li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); box-sizing: border-box;
}
.build-steps li[data-state="active"] { color: var(--ink); }
.build-steps li[data-state="active"]::before { border-color: var(--apricot); border-top-color: transparent; animation: spin .8s linear infinite; }
.build-steps li[data-state="done"] { color: var(--ink); }
.build-steps li[data-state="done"]::before { content: "✓"; display: grid; place-items: center; background: var(--forest); border-color: var(--forest); color: var(--cream); font-size: .8rem; }
.build-steps li[data-state="error"] { color: #b3261e; }
.build-steps li[data-state="error"]::before { content: "!"; display: grid; place-items: center; background: #b3261e; border-color: #b3261e; color: #fff; font-size: .8rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.build-log {
  list-style: none; margin: 0; padding: 14px 16px; max-height: 160px; overflow-y: auto;
  background: var(--cream); border-radius: 10px;
  font: .85rem/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--muted);
}
.build-log:empty { display: none; }
.build-log li::before { content: "› "; color: var(--apricot-dark); }

/* ---------- Demosidan och beställningssidan ---------- */
.page { padding-block: 56px 88px; }
.demo-hero {
  background: var(--forest); color: var(--cream); border-radius: 24px;
  padding: clamp(28px, 5vw, 56px); text-align: center;
}
.demo-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.demo-hero p { color: #c9d6cf; max-width: 36em; margin-inline: auto; }
.call-button {
  width: 132px; height: 132px; margin: 28px auto 14px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--apricot); color: var(--forest);
  box-shadow: 0 0 0 0 rgba(242, 166, 90, .6);
  transition: background .15s, transform .15s;
}
.call-button:hover { background: var(--apricot-dark); }
.call-button:disabled { opacity: .6; cursor: wait; }
.call-button svg { width: 52px; height: 52px; }
.call-button.live { background: #e0614f; color: #fff; animation: ring 1.6s infinite; }
@keyframes ring { 70% { box-shadow: 0 0 0 22px rgba(224, 97, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 97, 79, 0); } }
.call-status { font-family: var(--heading); font-size: 1.35rem; color: var(--white); margin: 0; }
.call-timer { font: 600 1rem ui-monospace, Consolas, monospace; color: #c9d6cf; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
@media (max-width: 800px) { .demo-grid { grid-template-columns: 1fr; } }
.learned dt { font-weight: 600; margin-top: 12px; }
.learned dd { margin: 2px 0 0; color: var(--muted); }

.order-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } }
.order-grid h2 { font-size: 1.4rem; margin-top: 1.6em; }
.order-grid h2:first-child { margin-top: 0; }
select {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px;
  font: 1.05rem var(--body); background: var(--cream); color: var(--ink);
}
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .choice-row { grid-template-columns: 1fr; } }
.choice {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin: 0;
  border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer;
  font: 500 1rem var(--body);
}
.choice input { width: auto; accent-color: var(--forest); }
.choice:has(input:checked) { border-color: var(--forest); background: var(--sand); }
.choice .price { margin-left: auto; font-weight: 600; }
.choice small { display: block; color: var(--forest-2); font-weight: 600; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .fields { grid-template-columns: 1fr; } }
.fields label { font: 600 .85rem var(--body); margin-bottom: 6px; }
.terms { display: flex; gap: 10px; align-items: flex-start; font: 400 .95rem var(--body); margin-top: 20px; }
.terms input { width: auto; margin-top: 4px; accent-color: var(--forest); }

.summary { background: var(--forest); color: var(--cream); border-radius: 20px; padding: 28px; position: sticky; top: 88px; }
.summary .big { font-family: var(--heading); font-size: 3.4rem; line-height: 1; margin: 8px 0 4px; color: var(--white); }
.summary .muted { color: #c9d6cf; }
.summary table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.summary td { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.summary td:last-child { text-align: right; }
.summary tr.total td { font-weight: 600; color: var(--white); border-bottom: 0; }
.summary .btn { width: 100%; }
.summary ul { padding-left: 1.1em; color: #c9d6cf; }
.notice { background: #fff4e5; border: 1px solid var(--apricot); border-radius: 12px; padding: 12px 16px; margin-bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, #rotating-word { animation: none; transition: none; }
}
