/* ==========================================================================
   nastan.io — one stylesheet, no build step.

   The palette is the app's own (web/app/src/app.css): near-black #070a10,
   panel #0e131c, cyan accent in Race mode, amber accent in Test mode. Dark is
   the default because the product is dark; light is a deliberate second look,
   not an inversion. No web fonts: Nunito is named first so a machine that has
   it (the app's overlay face) matches the app, and everyone else gets their
   system UI font at zero cost.
   ========================================================================== */

:root {
  color-scheme: dark light;

  --bg: #070a10;
  --bg-2: #0b1019;
  --panel: #0e131c;
  --line: #1d2735;
  --text: #dbe3ef;
  --muted: #8a99b1;
  --accent: #00e5ff;        /* the app's Race-mode accent */
  --accent-ink: #04141a;    /* text on an accent-filled button */
  --amber: #ffb020;         /* the app's Test-mode accent, used sparingly */
  --focus: #ffb020;
  --glow: 0 0 40px rgba(0, 229, 255, 0.18);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --font: Nunito, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --max: 1080px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5f9;
    --bg-2: #ffffff;
    --panel: #ffffff;
    --line: #d8dfea;
    --text: #0e131c;
    --muted: #55657c;
    --accent: #06707c;      /* cyan darkened until it passes 4.5:1 on the off-white bg */
    --accent-ink: #ffffff;
    --amber: #995a00;       /* 5.0:1 on white */
    --focus: #995a00;
    --glow: 0 0 40px rgba(6, 112, 124, 0.16);
    --shadow: 0 18px 50px rgba(14, 19, 28, 0.14);
  }
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;               /* belt: nothing may scroll sideways */
}

img, video, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.1rem, 6.2vw, 3.4rem); font-weight: 800; text-wrap: balance; max-width: 13em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 800; }
p  { margin: 0; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

section { scroll-margin-top: 84px; }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; font-weight: 800; z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 0.7em 1.4em;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--glow);
}
.btn-primary:hover { box-shadow: var(--glow), 0 6px 18px rgba(0, 0, 0, 0.25); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { font-size: 1.1rem; padding: 0.85em 1.7em; }
.btn-sm { font-size: 0.92rem; padding: 0.55em 1.1em; }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text); text-decoration: none;
  font-weight: 900; font-size: 1.25rem; letter-spacing: -0.01em;
  margin-right: auto;
}
.brand-mark { width: 22px; height: 22px; filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.55)); }

.top-nav { display: none; gap: 22px; }
.top-nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.top-nav a:hover { color: var(--text); }

@media (min-width: 720px) {
  .top { padding: 14px 32px; }
  .top-nav { display: flex; }
}

/* ---------- layout ---------- */

main { display: block; }

.hero, .how, .pricing, .faq, .cta-end, .foot, .doc {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 720px) {
  .hero, .how, .pricing, .faq, .cta-end, .foot, .doc { padding-inline: 32px; }
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: 36px;
  padding-top: 44px;
  padding-bottom: 56px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  margin-top: 18px;
  max-width: 34em;
}

.cta { margin-top: 28px; }
.fineprint { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

.hero-media { margin: 0; justify-self: center; text-align: center; }
.hero-media figcaption {
  color: var(--muted); font-size: 0.85rem; margin-top: 14px;
  max-width: 300px; margin-inline: auto; text-wrap: balance;
}

/* Original generic video marks: destination labels, never service logos. */
.publish-path { margin-top: 8px; }
.publish-arrow { width: 40px; height: 42px; margin: 0 auto 10px; color: var(--accent); }
.publish-path svg, .reels-mark { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.publish-destinations { display: flex; justify-content: center; gap: 24px; list-style: none; padding: 0; margin: 0; }
.publish-destinations li { display: grid; justify-items: center; gap: 6px; color: var(--text); font-size: 0.9rem; font-weight: 700; }
.publish-destinations svg { width: 36px; height: 36px; color: var(--accent); }
.publish-note { color: var(--muted); font-size: 0.8rem; margin-top: 14px; }

/* A readable, neutral-grey announcement, with no inactive controls. */
.reels-preview { width: 100%; max-width: var(--max); margin: 0 auto; padding: 12px 20px; }
.reels-card { display: flex; align-items: center; gap: 24px; padding: 26px; border: 1px dashed var(--muted); border-radius: var(--radius); background: var(--panel); color: var(--muted); }
.reels-mark { width: 48px; height: 48px; flex: 0 0 48px; }
.reels-status { font-size: 0.8rem; font-weight: 800; margin-bottom: 10px; }
.reels-card h2 { font-size: 1.5rem; }
.reels-description { margin-top: 10px; max-width: 44em; }
@media (max-width: 479px) {
  .reels-card { align-items: flex-start; gap: 16px; padding: 22px 18px; }
  .reels-mark { width: 32px; height: 40px; flex-basis: 32px; }
}
@media (min-width: 720px) {
  .reels-preview { padding-inline: 32px; }
}

/* The slot. 9:16, sized like a phone, not like a billboard. */
.phone {
  position: relative;
  width: min(260px, 72vw);
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow), var(--glow);
  margin-inline: auto;
}

/* The placeholder lives UNDER the video. When hero.mp4 and hero-poster.jpg
   exist they cover it completely; when they are missing it shows through.
   That is the whole mechanism — no JavaScript needed for it to fail loudly. */
.slot-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 20px; text-align: center;
  color: var(--amber);
  background:
    repeating-linear-gradient(135deg,
      rgba(255, 176, 32, 0.16) 0 14px,
      transparent 14px 28px),
    var(--panel);
  font-size: 0.8rem; line-height: 1.4;
}
.slot-placeholder strong { font-size: 1.15rem; letter-spacing: 0.12em; }
.slot-placeholder code { background: rgba(0, 0, 0, 0.35); color: inherit; }
.slot-ratio { font-family: var(--mono); opacity: 0.8; }

.slot-video {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  background: transparent;
}

/* site.js adds these. Loaded → placeholder gone for good. Missing → it shouts. */
.phone.is-loaded .slot-placeholder { display: none; }
.phone.is-missing { border-color: var(--amber); }
.phone.is-missing .slot-placeholder { background-color: rgba(255, 176, 32, 0.12); }

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    padding-top: 72px;
    padding-bottom: 88px;
  }
  .phone { width: min(300px, 100%); }
}

/* ---------- how ---------- */

.how, .pricing, .faq { padding-top: 56px; padding-bottom: 56px; }

.section-lede { color: var(--muted); margin-top: 12px; max-width: 40em; font-size: 1.05rem; }

.steps {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; gap: 16px;
}

.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 22px 68px;
}
.step p { color: var(--muted); margin-top: 8px; }

.step-n {
  position: absolute; left: 20px; top: 20px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-weight: 900; font-size: 0.95rem;
}

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .step { padding: 64px 22px 26px 22px; }
  .step-n { top: 20px; left: 22px; }
}

/* ---------- pricing ---------- */

.plans {
  display: grid; gap: 18px; margin-top: 32px;
}

.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex; flex-direction: column;
}

.plan-pro {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--glow);
}

.price { margin-top: 14px; display: flex; align-items: baseline; gap: 4px; }
.amount { font-size: 2.4rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.per { color: var(--muted); font-weight: 700; }
.price-alt { color: var(--muted); margin-top: 6px; font-size: 0.95rem; }
.price-derived { opacity: 0.85; }
.plan-note { margin-top: 16px; font-weight: 700; }

.plan-list { margin: 12px 0 0; padding: 0; list-style: none; }
.plan-list li {
  position: relative; padding-left: 26px; margin-top: 8px; color: var(--muted);
}
.plan-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 14px; height: 14px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.plan-list strong { color: var(--text); }

.plan-foot { color: var(--muted); font-size: 0.88rem; margin-top: 16px; flex: 1; }
.plan .btn { margin-top: 20px; align-self: flex-start; }

.pricing-fine { color: var(--muted); font-size: 0.88rem; margin-top: 18px; }

@media (min-width: 720px) {
  .plans { grid-template-columns: 1fr 1fr; gap: 22px; }
}

/* ---------- faq ---------- */

.qa {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.qa:last-of-type { border-bottom: 1px solid var(--line); }
.faq h2 + .qa { margin-top: 28px; }

.qa summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 16px 36px 16px 0;
  list-style: none;
  position: relative;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  color: var(--accent); font-weight: 900; font-size: 1.4rem; line-height: 1;
}
.qa[open] summary::after { content: "–"; }
.qa p { color: var(--muted); padding: 0 0 18px; max-width: 60em; }

/* ---------- closing cta ---------- */

.cta-end {
  text-align: center;
  padding-top: 64px; padding-bottom: 80px;
}
.cta-end p { margin-top: 24px; }

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding-top: 28px; padding-bottom: 40px;
  display: grid; gap: 14px;
  color: var(--muted); font-size: 0.92rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { color: var(--muted); text-decoration: none; font-weight: 700; }
.foot nav a:hover { color: var(--text); }
.foot-brand { font-weight: 800; color: var(--text); }

/* LOT I18N-1 — the language switcher is ORDINARY LINKS between real URLs.
   Not a <select>, not JavaScript: a page that swaps text on one URL cannot
   rank in four languages, and the whole point of /fr/, /es/ and /sv/ is that
   they ARE pages. `aria-current="page"` marks the language you are reading;
   it is the one that is not a link, so the set can never link to itself. */
.lang-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lang-nav a,
.lang-nav span[aria-current] {
  color: var(--muted); text-decoration: none; font-weight: 700;
  font-size: 0.9rem; line-height: 1;
  padding: 0.45em 0.8em;
  border: 1px solid var(--line); border-radius: 999px;
}
.lang-nav a:hover { color: var(--text); border-color: var(--text); }
.lang-nav span[aria-current] { color: var(--text); border-color: var(--accent); }

@media (min-width: 720px) {
  .foot { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .foot-copy { text-align: right; }
  /* Four children now: brand · legal nav · copyright on one row, then the
     languages spanning the row beneath. Without the span the 1fr auto 1fr
     track list would drop the switcher into column 1 of a second row and
     leave two thirds of the footer empty. */
  .lang-nav { grid-column: 1 / -1; justify-content: center; margin-top: 6px; }
}

/* ---------- document pages (privacy, terms, contact, 404) ---------- */

.doc {
  max-width: 760px;
  padding-top: 44px; padding-bottom: 80px;
}
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.doc .doc-meta { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.doc h2 { font-size: 1.35rem; margin-top: 40px; }
.doc h3 { font-size: 1.05rem; margin-top: 24px; }
.doc p, .doc li { color: var(--text); margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0; }
.doc li { margin-top: 8px; }
.doc .lede { color: var(--muted); }

/* A block the OWNER must fill before launch. Loud on purpose. */
.owner-fill {
  margin-top: 16px;
  border: 2px dashed var(--amber);
  border-radius: 10px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--amber) 10%, transparent);
}
.owner-fill strong { color: var(--amber); }
.owner-fill p { margin-top: 6px; }

.center { text-align: center; }
