/* The landing page (static/welcome.html). Its own small sheet: the app's app.css assumes the top bar and tabs.
   Colours come from the logo: navy ink and the sunrise orange, on a warm paper background; dark mode is the same
   morning an hour earlier. No external fonts (the CSP is self only, plans/26). */

:root {
  color-scheme: light;
  --bg: #fbf7f0; --bg-2: #f4ede1; --surface: #ffffff; --ink: #10233a; --ink-2: #3b4d63; --muted: #5d6b7c;
  --line: #e6dccb; --navy: #13385c; --sun: #f5a11f; --sun-deep: #c26f00; --sun-soft: #fdebc8; --on-sun: #10233a;
  --good: #1d7a46; --good-soft: #e3f3e8; --warn: #a15c00; --warn-soft: #fbecd2; --focus: #13385c;
  --shadow: 0 1px 2px rgba(16,35,58,.06), 0 8px 24px -12px rgba(16,35,58,.18);
  --radius: 16px;
  --sun-glow: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 50%, transparent) 0%, color-mix(in srgb, var(--sun) 22%, transparent) 55%, transparent 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1726; --bg-2: #0f1e31; --surface: #13253b; --ink: #f3ede3; --ink-2: #c9d2dd; --muted: #9aa8b8;
    --line: #22364f; --navy: #8fb8e4; --sun: #f7ac35; --sun-deep: #f7ac35; --sun-soft: #33280f; --on-sun: #10233a;
    --good: #5fd08f; --good-soft: #12301f; --warn: #f6b759; --warn-soft: #382711; --focus: #f7ac35; --tab-on: #23405f;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
  --sun-blend: screen;
  --sun-glow: radial-gradient(closest-side at 50% 56%, rgba(255, 214, 140, .55) 0%, rgba(250, 172, 62, .40) 16%, rgba(236, 120, 60, .22) 38%, rgba(190, 80, 100, .11) 60%, transparent 82%),
    radial-gradient(closest-side, rgba(120, 110, 200, .10) 50%, transparent 100%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1726; --bg-2: #0f1e31; --surface: #13253b; --ink: #f3ede3; --ink-2: #c9d2dd; --muted: #9aa8b8;
  --line: #22364f; --navy: #8fb8e4; --sun: #f7ac35; --sun-deep: #f7ac35; --sun-soft: #33280f; --on-sun: #10233a;
  --good: #5fd08f; --good-soft: #12301f; --warn: #f6b759; --warn-soft: #382711; --focus: #f7ac35; --tab-on: #23405f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
  --sun-blend: screen;
  --sun-glow: radial-gradient(closest-side at 50% 56%, rgba(255, 214, 140, .55) 0%, rgba(250, 172, 62, .40) 16%, rgba(236, 120, 60, .22) 38%, rgba(190, 80, 100, .11) 60%, transparent 82%),
    radial-gradient(closest-side, rgba(120, 110, 200, .10) 50%, transparent 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }   /* the sticky top bar never covers an anchor or the form's answer */
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right)); }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 12px; }

/* ---------- top ---------- */
.top { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand img { border-radius: 50%; }
.top-nav { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang button { min-width: 44px; min-height: 36px; border: 0; background: none; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 13px; line-height: 1; letter-spacing: .04em; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.lang button.active { background: var(--navy); color: var(--bg); }
/* Light / dark: follows the computer until clicked (the choice is the app's own "theme" key, so both agree). The icon
   shows where a click takes you: the moon in light, the sun in dark. */
.theme { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s; }
.theme:hover { color: var(--ink); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun-i { display: none; }
:root[data-theme="dark"] .theme .sun-i { display: block; } :root[data-theme="dark"] .theme .moon-i { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .sun-i { display: block; } :root:not([data-theme="light"]) .theme .moon-i { display: none; } }
.top-signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
.top-signin:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; overflow-x: clip; padding: 56px 0 72px; }
/* The sunrise from the logo: a soft disc rising behind the app's card. The hero is its own layer above the sections that
   follow (z-index 1) and clips only sideways, so the disc spills down over "how it works" and fades there instead of
   being cut flat at the hero's edge; inside the hero it sits at -1, under the hero's own text and cards. */
.sun { position: absolute; z-index: -1; right: -14vw; top: 90px; width: min(880px, 95vw); aspect-ratio: 1; border-radius: 50%;
  background: var(--sun-glow); mix-blend-mode: var(--sun-blend, normal); pointer-events: none; }
/* Dark: the sun an hour before it is up, so it glows instead of lying flat on the navy: a bright warm core set a
   little low, a halo cooling from amber through coral to a trace of violet, and a wide faint dawn around it, all
   added to the background (screen) rather than painted over it. Light keeps the plain disc. */
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sun-deep); margin-bottom: 14px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 750; margin-bottom: 18px; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.hero .lede { margin-bottom: 28px; }

/* ---------- the form ---------- */
.join, .signed-in { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); max-width: 480px; display: grid; gap: 14px; }
.signed-in { justify-items: start; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg-2); border-radius: 12px; padding: 4px; }
.modes button { min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.modes button[aria-selected="true"] { background: var(--tab-on, var(--surface)); color: var(--ink); box-shadow: 0 1px 2px rgba(16,35,58,.12), inset 0 0 0 1px var(--line); }
.field { display: grid; gap: 6px; }
.lbl { font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type="email"], input[type="password"], input.code { width: 100%; min-height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font-family: inherit; font-size: 17px; line-height: 1.2; transition: border-color .2s, box-shadow .2s; }
input[type="email"]:focus, input[type="password"]:focus, input.code:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px color-mix(in srgb, var(--navy) 18%, transparent); }
input[aria-invalid="true"] { border-color: #c2410c; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--ink-2); line-height: 1.5; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
.err { font-size: 14px; color: #c2410c; min-height: 0; }
.err:empty { display: none; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--sun); color: var(--on-sun); font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 6px 16px -8px color-mix(in srgb, var(--sun) 80%, transparent); transition: transform .15s, background .2s, box-shadow .2s; }
.cta:hover { background: color-mix(in srgb, var(--sun) 88%, #fff); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta[aria-busy="true"] { opacity: .7; cursor: progress; }
.cta[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.join .cta { width: 100%; }
.fine { font-size: 13px; color: var(--muted); text-align: center; }
.fine a { color: inherit; }
/* Closed to new users (TILPAS_SIGNUP=closed): what the form does instead, above the email field. */
.closed-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--sun-soft); color: var(--ink); font-size: 15px; line-height: 1.5; }
.closed-note strong { display: block; font-size: 16px; }
.linkish { justify-self: center; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--ink); }
.code-form { display: grid; gap: 8px; padding-top: 4px; }
.code-form .lbl { font-weight: 600; }
.code-row { display: flex; gap: 8px; }
input.code { flex: 1; min-width: 0; font-size: 22px; letter-spacing: .2em; font-variant-numeric: tabular-nums; text-align: center; }
.code-row .cta { flex: none; width: auto; min-height: 50px; padding: 0 20px; }
.result { border-radius: 12px; padding: 14px 16px; background: var(--good-soft); color: var(--ink); font-size: 15px; display: grid; gap: 10px; }
.result.wait { background: var(--sun-soft); }
.result.bad { background: #fde7dc; color: #7c2d12; }
:root[data-theme="dark"] .result.bad { background: #3a1a0e; color: #fcd2bf; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .result.bad { background: #3a1a0e; color: #fcd2bf; } }
.result strong { font-size: 16px; }
.result .cta { justify-self: start; min-height: 44px; font-size: 15px; }

/* ---------- the real app, photographed (scripts/landing_shots.py) ---------- */
/* One picture per theme; the other stays display:none, and lazy, so it is not fetched until the theme flips. */
.for-dark { display: none; }
:root[data-theme="dark"] .for-dark { display: block; } :root[data-theme="dark"] .for-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .for-dark { display: block; } :root:not([data-theme="light"]) .for-light { display: none; } }
/* The app's cards are 12px round; the frame clips the screenshot's corners to match, and the shadow is a filter so a
   picture that fades out (.cut) casts a shadow that fades with it. */
.shot { width: 100%; max-width: 380px; border-radius: 12px; overflow: hidden;
  filter: drop-shadow(0 1px 1px rgba(16,35,58,.06)) drop-shadow(0 18px 30px rgba(16,35,58,.16)); }
.shot img { vertical-align: top; width: 100%; height: auto; }
.shot.cut img { -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
:root[data-theme="dark"] .shot { filter: drop-shadow(0 18px 34px rgba(0,0,0,.55)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot { filter: drop-shadow(0 18px 34px rgba(0,0,0,.55)); } }
.hero-shot { margin: 0; justify-self: end; width: 100%; max-width: 380px; display: grid; gap: 14px; }
.hero-shot figcaption { font-size: 14px; color: var(--muted); text-align: center; text-wrap: balance; }

/* ---------- the nuance behind the answer ---------- */
.nuance .lede { margin-bottom: 8px; }
.rows { display: grid; gap: 88px; margin-top: 56px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 72px; align-items: center; }
.row:nth-child(even) .row-copy { order: 2; }
.row-copy h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; margin-bottom: 12px; }
.row-copy p { font-size: 18px; color: var(--ink-2); max-width: 30em; }
.row .shot { justify-self: center; }

/* ---------- bands ---------- */
.band { padding: 80px 0; }
.band.alt { background: var(--bg-2); }
.band h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 750; margin-bottom: 36px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { display: grid; gap: 10px; align-content: start; }
.steps .n { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--bg); font-weight: 750; font-size: 17px; }
.steps h3, .feat h3 { font-size: 20px; font-weight: 700; }
.steps p, .feat p { color: var(--ink-2); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.feat .ic { width: 28px; height: 28px; stroke: var(--sun-deep); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nots { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.nots li { position: relative; padding-left: 36px; color: var(--ink-2); font-size: 18px; }
.nots li::before { content: ""; position: absolute; left: 4px; top: .75em; width: 16px; height: 2px; background: var(--muted); border-radius: 2px; }
.privacy { margin: 0; display: grid; gap: 22px; }
.privacy dt { font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.privacy dd { margin: 0; color: var(--ink-2); }
.band.end { padding: 96px 0; }
.band.end h2 { margin-bottom: 16px; }
.band.end .lede { margin: 0 auto 28px; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.foot a { color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { padding: 32px 0 56px; }
  .hero-in { grid-template-columns: 1fr; gap: 40px; }
  .hero-shot { justify-self: center; }
  .rows { gap: 64px; margin-top: 40px; }
  .row { grid-template-columns: 1fr; gap: 24px; }
  .row:nth-child(even) .row-copy { order: 0; }
  .sun { right: -40vw; top: -10vw; width: 120vw; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .grid { grid-template-columns: 1fr; }
  .band { padding: 56px 0; }
  .band h2 { margin-bottom: 24px; }
}
@media (max-width: 420px) {
  .top-nav { gap: 6px; } .lang button { min-width: 40px; } .brand span { font-size: 17px; }
  .top-signin { font-size: 14px; }
}
/* ---------- the home-screen app signed out (html.in-app, set in welcome.html's head) ----------
   Not the sales page: the brand, one heading, the form, the sun behind it, filling the screen like an app's own
   sign-in. The language and theme buttons stay; everything that sells is gone. */
.in-app body { min-height: 100svh; display: flex; flex-direction: column; }
.in-app main { flex: 1; display: flex; }
.in-app main > section:not(.hero), .in-app .foot, .in-app .hero-shot, .in-app .eyebrow, .in-app .top-signin, .in-app .skip { display: none; }
.in-app .top { position: relative; background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.in-app .hero { flex: 1; display: flex; align-items: center; padding: 8px 0 calc(28px + env(safe-area-inset-bottom)); }
.in-app .hero-in { grid-template-columns: minmax(0, 1fr); max-width: 460px; gap: 0; }
.in-app h1 { font-size: clamp(30px, 8vw, 40px); margin-bottom: 10px; }
.in-app .hero .lede { font-size: 17px; margin-bottom: 22px; }
.in-app .join.awaiting-code > :not(.result) { display: none; }
.in-app .join.awaiting-code .result { background: none; padding: 0; gap: 14px; }
.in-app .join.awaiting-code .result .linkish { justify-self: center; }
.in-app .sun { top: auto; bottom: -30vw; right: -45vw; }

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

/* The link from the privacy summary to the whole policy (/privatliv, /privacy-policy). */
.privacy-more { margin: 18px 0 0; font-weight: 600; }
