/* Inter (SIL Open Font License), self-hosted so visitors' IPs aren't sent to Google. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbfaf8;
  --bg-alt: #f2f0ec;
  --surface: #ffffff;
  --text: #1b1a1f;
  --muted: #5d5a66;
  --border: #e3e0da;
  --accent: #5b3df5;
  --accent-hover: #4a2ee0;
  --accent-soft: #ece8ff;
  --success: #0f7b4f;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 16, 40, .04), 0 8px 24px rgba(20, 16, 40, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121116;
    --bg-alt: #1a1920;
    --surface: #201f27;
    --text: #f1eff6;
    --muted: #a7a3b3;
    --border: #2f2d38;
    --accent: #8b74ff;
    --accent-hover: #9d89ff;
    --accent-soft: #2a2442;
    --success: #4ade9b;
    --danger: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
/* `hidden` always wins over a class's display (e.g. the grid on .waitlist-form). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 560px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }

.accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn-small { padding: 9px 16px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .6; cursor: progress; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-mark { color: var(--accent); font-size: 1.4rem; }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 2em; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 2em; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }

.service-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
/* The "Which ones?" row stays hidden until the "Other services" tile is ticked. */
.service-list > li[hidden] { display: none; }
.service {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color .15s, background .15s;
}
.service.is-on { border-color: var(--accent); background: var(--accent-soft); }
.service input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; cursor: pointer; }
.service-name { flex: 1; font-weight: 500; cursor: pointer; }
.price-wrap { display: flex; align-items: center; color: var(--muted); font-size: .9rem; }
.price-input {
  width: 62px; font: inherit; font-size: .9rem; text-align: right;
  background: transparent; color: var(--text);
  border: 1px solid transparent; border-radius: 6px; padding: 3px 4px;
}
.price-input:hover, .price-input:focus { border-color: var(--border); background: var(--surface); }
.service-other { grid-column: 1 / -1; flex-wrap: wrap; }
.service-other .service-name { flex: none; cursor: default; }
.other-input {
  flex: 1 1 200px; min-width: 0; font: inherit; font-size: .9rem;
  padding: 6px 10px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}

/* Padding is always there, so the highlight below doesn't move anything. It lines the text up with the tiles' contents. */
.concurrent { margin-top: 10px; padding: 14px 16px; }
.concurrent label { display: block; font-weight: 500; margin-bottom: 10px; }
.segmented { display: inline-flex; background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; padding: 4px; }
.segmented button {
  font: inherit; font-weight: 600; min-width: 52px; padding: 8px 14px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
}
.segmented button[aria-checked="true"] { background: var(--accent); color: #fff; }

/* Services ticked but "how many" not answered yet: draw the eye there, without an error state. */
.concurrent { border-radius: var(--radius); transition: background-color .3s, box-shadow .3s; }
.concurrent.needs-answer { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent); }
.concurrent.needs-answer .segmented { border-color: var(--accent); animation: nudge 1.6s ease-in-out 2; }
.concurrent.needs-answer .segmented button { color: var(--text); }
.concurrent-hint { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
@keyframes nudge {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .concurrent, .concurrent.needs-answer .segmented { transition: none; animation: none; }
}

.calc-result {
  position: sticky; top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.result-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; color: var(--muted); }
.result-row strong { color: var(--text); font-size: 1.1rem; }
.result-row small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.calc-result hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.result-label { margin: 0; color: var(--muted); font-weight: 500; }
.result-big { font-size: 3.2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--success); margin: 0; line-height: 1.1; }
.result-caption { color: var(--muted); margin-bottom: 20px; }
/* A range ("$1,291–$1,722") is twice as long as one number, so it gets a smaller size. */
.result-big.is-range { font-size: 2.2rem; }
.range-up-to { display: none; }
.result-compare { display: none; }
.fineprint { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.steps p { color: var(--muted); margin: 0; }
.step-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700;
}

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 720px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Waitlist */
.waitlist-form { display: grid; gap: 12px; }
.waitlist-form label { font-weight: 500; font-size: .95rem; margin-top: 4px; }
.optional { color: var(--muted); font-weight: 400; }
.waitlist-form input[type="email"], .waitlist-form select {
  font: inherit; width: 100%; padding: 14px 16px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 12px;
}
.waitlist-form input[aria-invalid="true"] { border-color: var(--danger); }

/* Short answers to the worries that stop people cancelling, next to the savings and the signup. */
.reassure { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: .9rem; color: var(--muted); }
.reassure li { position: relative; padding-left: 26px; }
.reassure li::before { content: "✓"; position: absolute; left: 4px; color: var(--success); font-weight: 700; }
.reassure strong { color: var(--text); font-weight: 600; }
.waitlist-form .reassure { margin: 0 0 4px; }

/* After signup: the confirmation stays in the page, and the optional price questions open over it. */
.done-title { margin: 0 0 8px; font-weight: 600; font-size: 1.1rem; color: var(--success); }
.done-title:focus { outline: none; }

.price-dialog {
  width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.price-dialog::backdrop { background: rgb(0 0 0 / .55); }
/* The page behind doesn't scroll while the dialog is open. */
body:has(.price-dialog[open]) { overflow: hidden; }
.price-form { padding: 20px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.dialog-head h2:focus { outline: none; }
.dialog-close {
  flex: none; width: 36px; height: 36px; margin: -6px -6px 0 0;
  font: inherit; font-size: 1.5rem; line-height: 1; color: var(--muted);
  background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.dialog-close:hover { background: var(--bg-alt); color: var(--text); }
.price-actions { display: flex; gap: 10px; margin-top: 12px; }
.price-form .form-status { margin-top: 8px; }
.pricing-intro { color: var(--muted); font-size: .9rem; margin: 12px 0 4px; }
.price-question { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.price-question:first-of-type { border-top: 0; }
.price-form .price-question label { margin: 0; font-weight: 400; font-size: .9rem; }
.money-input { display: flex; align-items: center; gap: 4px; color: var(--muted); flex: none; }
.money-input input {
  font: inherit; width: 84px; padding: 8px 10px; text-align: right;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 8px;
}
.form-status { margin: 0; min-height: 1.5em; font-weight: 500; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }
.privacy-note { font-size: .8rem; color: var(--muted); margin: 0; }
.hidden-field { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Footer */
.footer { padding: 32px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.footer p { margin: 0; }

/* Responsive */
@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
}

/* Phones: the whole calculator (services, how many you watch, savings, CTA) fits on the first screen. */
@media (max-width: 640px) {
  .hide-mobile { display: none; }

  #calculator { padding-top: 16px; scroll-margin-top: 64px; }
  #calculator h2 { font-size: 1.45rem; margin-bottom: .2em; }
  #calculator .section-sub { font-size: .95rem; margin-bottom: 12px; }
  .calc { gap: 12px; }

  /* "How many do you watch" goes above the list, on one row. */
  .calc-services { display: flex; flex-direction: column; }
  .concurrent { order: -1; margin: 0 0 8px; padding: 8px 10px; display: flex; align-items: center; gap: 12px; }
  /* The hint would push the service tiles down mid-tap; the sticky savings bar says what's missing instead. */
  .concurrent-hint { display: none; }
  .concurrent label { flex: 1; margin: 0; font-size: .9rem; line-height: 1.3; }
  .segmented { flex: none; }
  .segmented button { min-width: 36px; padding: 6px 8px; }

  /* Two columns of compact service tiles: name on top, price below. */
  .service-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .service {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px; align-items: center; padding: 8px 10px;
  }
  .service input[type="checkbox"] { grid-row: 1 / 3; }
  .service-name { font-size: .95rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .price-wrap { font-size: .85rem; line-height: 1.2; }
  /* 16px stops iOS zooming in when a field gets focus. */
  .price-input { font-size: 16px; line-height: 1.2; width: 64px; padding: 0 2px; text-align: left; }
  .service-other { display: flex; }
  .other-input { font-size: 16px; }

  /* Savings + CTA pinned to the bottom of the screen on every part of the page. */
  body { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .calc-result {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 20;
    margin: 0; padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
    border-width: 1px 0 0; border-radius: 16px 16px 0 0;
    display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center;
  }
  .calc-result .result-row, .calc-result hr, .result-caption, .calc-result .fineprint { display: none; }
  .result-label { grid-column: 1; font-size: .8rem; line-height: 1.2; }
  .result-big { grid-column: 1; font-size: 1.9rem; }
  .result-big.is-range { font-size: 1.5rem; }
  .range-low { display: none; }
  .range-up-to { display: inline; }
  .result-big::after { content: "/yr"; font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
  .result-compare { display: block; grid-column: 1; margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.3; }
  #calc-cta { grid-column: 2; grid-row: 1 / 4; width: auto; padding: 12px 18px; white-space: nowrap; }
}
