/* Untangle website — shared styles for every page.
   Colours match the app: the near-black surface, the coral accent and the category tints
   (Untangle/Models/TodoCategory.swift). Dark first, like the app; light follows the device. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url("fonts/bricolage-grotesque-700.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap; src: url("fonts/figtree-variable.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-500.woff") format("woff"); }

:root {
  --bg: #05060f; --surface: #0e1022; --surface-2: #151834; --line: #23263d;
  --fg: #f2f3f8; --muted: #9a9db6; --accent: #ff5a6b; --accent-hover: #ff7584; --on-accent: #12030a;
  --blue: #85baff; --amber: #f2a618; --pink: #f08fe8; --teal: #00d2ca; --green: #7cd06a; --coral: #ff9970; --lilac: #cc9fff;
  --wash: 22%;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 28px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6fa; --surface: #ffffff; --surface-2: #eef0f7; --line: #dfe0ea;
    --fg: #0b0c18; --muted: #565970; --accent: #c8243a; --accent-hover: #a81c30; --on-accent: #ffffff;
    --blue: #2474cf; --amber: #9c6900; --pink: #a64ba0; --teal: #008681; --green: #378a21; --coral: #be4b13; --lilac: #8b57be;
    --wash: 16%; color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--body); }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img, svg, canvas { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 20px; }
.mark { font: 700 21px var(--display); display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark img { width: 26px; height: 26px; }
.pillbtn { font: 600 14px var(--body); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px; white-space: nowrap; }
.pillbtn:hover { border-color: var(--fg); }

/* ---------- Buttons, fine print ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px var(--body); background: var(--accent); color: var(--on-accent); text-decoration: none; border: 0; border-radius: 999px; padding: 15px 24px; cursor: pointer; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--fg); background: transparent; }
.fine { font: 500 13px/1.5 var(--mono); color: var(--muted); }
.eyebrow { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.textlink { color: var(--fg); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--accent); }

/* ---------- Sign-up form ---------- */
.signup { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; max-width: 480px; }
.signup:focus-within { border-color: var(--accent); }
.signup input { flex: 1; min-width: 0; font: 400 17px var(--body); color: var(--fg); background: transparent; border: 0; padding: 10px 14px; outline: none; }
.signup input::placeholder { color: var(--muted); }
.signup-wrap { display: grid; gap: 12px; }
.signup-note { font-size: 14px; color: var(--muted); max-width: 46ch; }
.signup-error { font-size: 14px; color: var(--accent); }
@media (max-width: 460px) {
  .signup { flex-direction: column; border-radius: 22px; padding: 8px; }
  .signup input { padding: 12px 12px; }
  .signup .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-block: 28px 80px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 74px); line-height: 1.0; }
.hero .sub { font-size: 20px; color: var(--muted); margin: 20px 0 30px; max-width: 34ch; }
.hero .alt { margin-top: 18px; font-size: 15px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; margin-bottom: 22px; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ---------- The example: spoken words → Today ---------- */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 18px; min-width: 0; box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--lilac) 45%, transparent); }
.demo-h { display: flex; justify-content: space-between; font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.rec { display: inline-flex; align-items: center; gap: 7px; }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.demo[data-phase="listening"] .rec i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
#wave { width: 100%; height: 60px; display: block; }
.said { font-size: 16px; line-height: 1.7; min-height: 6.8em; }
.said mark { color: inherit; background: transparent; padding: 1px 2px; border-radius: 3px; text-decoration: underline transparent; text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: background .5s, text-decoration-color .5s; }
.said.lit .work { background: color-mix(in srgb, var(--blue) var(--wash), transparent); text-decoration-color: var(--blue); }
.said.lit .family { background: color-mix(in srgb, var(--green) var(--wash), transparent); text-decoration-color: var(--green); }
.said.lit .personal { background: color-mix(in srgb, var(--amber) var(--wash), transparent); text-decoration-color: var(--amber); }
.said .w { transition: opacity .25s; }
.said .w.hide { opacity: 0; }
.arrow { display: flex; align-items: center; gap: 10px; font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.arrow::before, .arrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.today h3 { font-size: 22px; }
.spine { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.spine li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: center; transition: opacity .4s, transform .4s; }
.spine li.hide { opacity: 0; transform: translateY(6px); }
.spine b { font-weight: 600; display: block; }
.spine small { color: var(--muted); font-size: 13px; }
/* Lozenge height shows size, like the app's Today: small, medium, large; an errand is a dot. */
.loz { width: 20px; border-radius: 999px; justify-self: center; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); }
.loz.s { height: 20px; } .loz.m { height: 30px; } .loz.l { height: 40px; }
.loz.e { width: 9px; height: 9px; background: var(--c); }
.c-blue { --c: var(--blue); } .c-green { --c: var(--green); } .c-amber { --c: var(--amber); } .c-pink { --c: var(--pink); } .c-teal { --c: var(--teal); }
.later { margin-top: 12px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; transition: opacity .4s; }
.later.hide { opacity: 0; }

/* ---------- Sections ---------- */
.band .wrap { padding-block: 88px; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.06; max-width: 18ch; }
.band .lede { font-size: 19px; color: var(--muted); margin-top: 18px; max-width: 52ch; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin-top: 48px; }
.cols h3 { font-size: 21px; margin-bottom: 8px; }
.cols p { color: var(--muted); }
.steps { counter-reset: s; }
.steps > div::before { counter-increment: s; content: counter(s); font: 700 15px var(--display); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--fg); margin-bottom: 16px; }
.quote { font-family: var(--mono); font-size: 14px; color: var(--fg); background: var(--surface-2); border-radius: 8px; padding: 2px 8px; white-space: nowrap; }

/* Pains: the sentences people say about their own heads */
.pains { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 14px; }
.pains li { font: 700 clamp(22px, 3vw, 32px)/1.2 var(--display); letter-spacing: -0.015em; color: var(--muted); padding-left: 28px; position: relative; text-wrap: balance; }
.pains li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.answer { margin-top: 40px; font-size: 21px; max-width: 46ch; }
.answer strong { font-weight: 700; }

/* Today showcase */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.focus { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 18px; }
.focus-card { background: var(--surface-2); border-radius: 18px; padding: 18px; }
.focus-card .k { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.focus-card h4 { font: 700 20px/1.25 var(--display); margin: 8px 0 6px; letter-spacing: -0.01em; }
.focus-card p { color: var(--muted); font-size: 15px; }
.focus .stillopen { font-size: 14px; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; min-width: 0; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); margin-bottom: 16px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; }

/* Beta */
.beta { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.rounds { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.round { flex: 1; min-width: 90px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.round b { font: 700 30px var(--display); display: block; }
.round span { font-size: 13px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 20px; }
.panel h3 { font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 14px; height: 8px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }

/* Maker */
.maker { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; max-width: 760px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 700 26px var(--display); color: var(--on-accent); background: linear-gradient(135deg, var(--blue), var(--pink) 55%, var(--amber)); }
.maker p { color: var(--muted); }
.maker p strong { color: var(--fg); }

/* FAQ */
.faq { margin-top: 40px; display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 18px; padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 22px/1 var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 20px; max-width: 64ch; }

/* Closing call */
.closing .wrap { text-align: center; }
.closing h2 { margin-inline: auto; max-width: 16ch; }
.closing .lede { margin-inline: auto; }
.closing .signup-wrap { justify-items: center; margin-top: 32px; }
.closing .signup { width: 100%; }
.share { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Plain text pages (support, thanks, 404) */
.prose .wrap { max-width: 720px; padding-block: 24px 80px; }
.prose h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; margin-bottom: 16px; }
.prose h2 { font-size: 22px; margin: 40px 0 8px; }
.prose p { color: var(--muted); margin-bottom: 12px; }
.prose p strong { color: var(--fg); font-weight: 600; }
.copyrow { display: flex; gap: 8px; margin: 18px 0; max-width: 520px; }
.copyrow input { flex: 1; min-width: 0; font: 500 14px var(--mono); color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }

/* Sticky sign-up bar on phones */
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px max(18px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: none; align-items: center; justify-content: space-between; gap: 12px; transform: translateY(110%); transition: transform .3s ease; }
.stickybar.show { transform: none; }
.stickybar span { font-weight: 600; font-size: 15px; }
@media (max-width: 820px) { .stickybar { display: flex; } }
@media (prefers-reduced-motion: reduce) { .stickybar { transition: none; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; background: var(--fg); color: var(--bg); font-weight: 600; font-size: 15px; padding: 12px 18px; border-radius: 999px; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 30; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 32px 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 820px) { footer .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); } }

@media (max-width: 900px) {
  .hero .wrap, .showcase, .beta { grid-template-columns: 1fr; gap: 40px; }
  .cols, .features { grid-template-columns: 1fr; gap: 28px; }
  .features { gap: 12px; }
  .band .wrap { padding-block: 64px; }
}
@media (min-width: 560px) and (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .maker { grid-template-columns: 1fr; } }

/* Clincher above the closing sign-up */
.clincher { display: inline-flex; align-items: center; gap: 8px; font: 600 14px var(--body); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 999px; padding: 8px 14px; margin-bottom: 20px; }
.clincher::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.cols + .features, .steps + .features { margin-top: 40px; }

/* "Paul to supply" placeholders: loud on purpose. Remove each one as its content arrives; none may ship. */
.todos { display: grid; gap: 10px; margin-top: 28px; }
.todo { border: 2px dashed var(--amber); background: color-mix(in srgb, var(--amber) 9%, transparent); border-radius: 14px; padding: 14px 16px; font-size: 15px; color: var(--fg); }
.todo b { display: block; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--amber); margin-bottom: 4px; }

/* Long legal text (privacy policy) */
.legal ul { color: var(--muted); padding-left: 22px; margin: 0 0 12px; display: grid; gap: 6px; }
.legal .fine { margin-bottom: 32px; }
.legal a { color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: 3px; }
