/* ==========================================================================
   Kickout marketing site
   Brand is provisional: every color and font lives in the tokens below,
   so a rebrand should only need edits in this first block.
   ========================================================================== */

:root {
  /* --- Type --- */
  --font-rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* --- Scene skies (from the app) --- */
  --sky-morning-top: #8CB3DB;
  --sky-morning-bottom: #D6E6F2;
  --sky-alarm-top: #E0856B;
  --sky-alarm-bottom: #F5CC9E;
  --sky-out-top: #7ABCDB;
  --sky-out-bottom: #DBF2E6;

  /* --- Hills --- */
  --hill: #8CB38C;
  --hill-far: #A8C6A2;

  /* --- House --- */
  --house-wall: #F5EDE0;
  --house-trim: #524D4D;
  --house-roof: #9E6154;
  --house-roof-alarm: #B34D45;
  --house-eave-shadow: rgba(0, 0, 0, 0.08);
  --window-calm: #FADB8F;
  --window-alarm-on: #FF594D;
  --window-alarm-off: #8C4040;
  --window-alarm-glow: rgba(255, 89, 77, 0.75);
  --window-out: #BFE0F2;
  --door-knob: #E6BF66;
  --door-light: #FFDB8C;

  /* --- Page --- */
  --bg: #F7F4EE;
  --bg-alt: #EEF3F7;
  --surface: #FFFFFF;
  --border: #E3DED4;
  --text: #1F2A37;
  --text-muted: #556274;
  --text-on-hero: #2A1E1A;
  --accent: #B5523A;          /* buttons, links (white text passes AA) */
  --accent-hover: #9C4430;
  --accent-text: #FFFFFF;
  --link: #9C4430;
  --focus: #2F6FB0;
  --draft-bg: #FFF1C2;
  --draft-text: #5A4200;
  --draft-border: #E8C65A;
  --success: #2F7A4B;
  --stars: transparent;

  /* --- Hero (light mode: the alarm sunset) --- */
  --hero-top: var(--sky-alarm-top);
  --hero-bottom: var(--sky-alarm-bottom);
  --hero-hill: var(--hill);
  --hero-hill-far: var(--hill-far);

  /* --- Shape --- */
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(31, 42, 55, 0.08);
  --wrap: 1080px;
  --gutter: 16px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1525;
    --bg-alt: #121B30;
    --surface: #18223A;
    --border: #26324D;
    --text: #E9EEF5;
    --text-muted: #A3AFC2;
    --text-on-hero: #F3F0EA;
    --accent: #F2A58E;
    --accent-hover: #F7BBA8;
    --accent-text: #1A1310;
    --link: #F2A58E;
    --focus: #8CC0F2;
    --draft-bg: #3A3016;
    --draft-text: #F5DE9A;
    --draft-border: #6B5A26;
    --success: #8FD3A7;
    --stars: rgba(255, 255, 255, 0.7);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

    /* Night sky hero */
    --hero-top: #141D36;
    --hero-bottom: #33406B;
    --hero-hill: #3E5A49;
    --hero-hill-far: #2E4438;
    --house-wall: #DCD3C4;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-rounded);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 800;
}
h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Header / footer
   ========================================================================== */

.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--font-rounded); font-weight: 800; font-size: 1.25rem; }
.brand svg { width: 32px; height: 32px; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { color: inherit; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { text-decoration: underline; }
.site-nav .nav-hide-sm { display: none; }
@media (min-width: 640px) { .site-nav .nav-hide-sm { display: inline; } }

.hero-page .site-header { color: var(--text-on-hero); }

.site-footer { padding: 40px 0 56px; color: var(--text-muted); font-size: 0.95rem; border-top: 1px solid var(--border); margin-top: 24px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: inherit; }

/* ==========================================================================
   Buttons & forms
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-text);
  font: 700 1rem/1 var(--font-rounded); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }

.waitlist { display: grid; gap: 10px; max-width: 460px; }
.waitlist-row { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 520px) { .waitlist-row { flex-direction: row; } }
.waitlist input[type="email"] {
  flex: 1; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
  font: 500 1rem var(--font-body); min-width: 0;
}
.waitlist input[type="email"]::placeholder { color: var(--text-muted); opacity: 1; }
.waitlist-note { font-size: 0.9rem; margin: 0; }
.waitlist-status { font-weight: 700; margin: 0; min-height: 1.6em; }
.waitlist-status.is-ok { color: var(--success); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
  color: var(--text-on-hero);
  position: relative;
  overflow: hidden;
}
.hero::before { /* stars, visible only in dark mode */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--stars), transparent),
    radial-gradient(1px 1px at 28% 42%, var(--stars), transparent),
    radial-gradient(1.5px 1.5px at 47% 12%, var(--stars), transparent),
    radial-gradient(1px 1px at 63% 30%, var(--stars), transparent),
    radial-gradient(1.5px 1.5px at 78% 9%, var(--stars), transparent),
    radial-gradient(1px 1px at 88% 36%, var(--stars), transparent),
    radial-gradient(1px 1px at 6% 52%, var(--stars), transparent),
    radial-gradient(1.5px 1.5px at 92% 58%, var(--stars), transparent);
}
.hero-inner { display: grid; gap: 8px; padding-top: 24px; position: relative; }
@media (min-width: 880px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; align-items: end; gap: 40px; padding-top: 48px; }
}
.hero-copy { padding-bottom: 8px; }
@media (min-width: 880px) { .hero-copy { padding-bottom: 72px; } }
.eyebrow { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; opacity: 0.85; }
.hero .lede { font-size: 1.15rem; max-width: 34em; }
.hero .waitlist input[type="email"] { border-color: transparent; }
.hero-art { display: block; width: 100%; max-width: 520px; margin: 0 auto; }

/* ==========================================================================
   Sections
   ========================================================================== */

section { padding: 64px 0; }
@media (min-width: 880px) { section { padding: 88px 0; } }
.section-alt { background: var(--bg-alt); }
.section-intro { max-width: 40em; margin-bottom: 32px; }
.section-intro p { color: var(--text-muted); font-size: 1.1rem; }

.positioning { text-align: left; }
.positioning .big { font-family: var(--font-rounded); font-weight: 800; font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.2; max-width: 22em; }
.positioning p { max-width: 38em; color: var(--text-muted); font-size: 1.1rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.steps li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; counter-increment: step; box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font: 800 1rem var(--font-rounded);
  margin-bottom: 14px;
}
.steps p { color: var(--text-muted); margin: 0; }

.states { display: grid; gap: 20px; }
@media (min-width: 760px) { .states { grid-template-columns: repeat(3, 1fr); } }
.state-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); margin: 0;
}
.state-card figcaption { padding: 18px 22px 22px; }
.state-card .state-time { font-weight: 700; color: var(--text-muted); font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 4px; }
.state-card h3 { margin-bottom: 6px; }
.state-card p { color: var(--text-muted); margin: 0; }

.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature p { color: var(--text-muted); margin: 0; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative;
  font: 700 1.05rem/1.35 var(--font-rounded);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--text-muted);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding-bottom: 18px; color: var(--text-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

.cta-band { text-align: left; }
.cta-band .waitlist { margin-top: 20px; }

/* ==========================================================================
   Legal / support pages
   ========================================================================== */

.page { padding: 32px 0 24px; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 6vw, 2.75rem); }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { color: var(--text-muted); }
.draft-banner {
  background: var(--draft-bg); color: var(--draft-text); border: 2px solid var(--draft-border);
  border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 800; margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.draft-banner span { font-weight: 500; display: block; letter-spacing: 0; }
.placeholder { background: var(--draft-bg); color: var(--draft-text); padding: 0 4px; border-radius: 4px; }

/* ==========================================================================
   Scenes & the house illustration
   ========================================================================== */

.scene { display: block; width: 100%; height: auto; }
.scene--waiting { background: linear-gradient(180deg, var(--sky-morning-top), var(--sky-morning-bottom)); }
.scene--alarm   { background: linear-gradient(180deg, var(--sky-alarm-top), var(--sky-alarm-bottom)); }
.scene--out     { background: linear-gradient(180deg, var(--sky-out-top), var(--sky-out-bottom)); }
.scene--hero    { background: none; }

.hill      { fill: var(--hill); }
.hill-far  { fill: var(--hill-far); }
.scene--hero .hill     { fill: var(--hero-hill); }
.scene--hero .hill-far { fill: var(--hero-hill-far); }

.h-wall    { fill: var(--house-wall); }
.h-eave    { fill: var(--house-eave-shadow); }
.h-roof, .h-chimney { fill: var(--house-roof); stroke: var(--house-roof); stroke-width: 6; stroke-linejoin: round; }
.h-chimney { stroke-width: 0; }
.h-pane    { fill: var(--window-calm); }
.h-mullion { stroke: var(--house-trim); stroke-width: 3; fill: none; }
.h-frame   { stroke: var(--house-trim); stroke-width: 3; fill: none; }
.h-door    { fill: var(--house-trim); }
.h-knob    { fill: var(--door-knob); }
.h-open, .h-spill { display: none; }
.h-doorway { fill: var(--door-light); }
.h-spill   { fill: var(--door-light); opacity: 0.55; }

.house { transform-box: fill-box; transform-origin: 50% 100%; }

/* Time's up: red windows, slight shake */
.is-alarm .h-roof, .is-alarm .h-chimney { fill: var(--house-roof-alarm); stroke: var(--house-roof-alarm); }
.is-alarm .h-chimney { stroke-width: 0; }
.is-alarm .h-pane { fill: var(--window-alarm-on); filter: drop-shadow(0 0 6px var(--window-alarm-glow)); }

@media (prefers-reduced-motion: no-preference) {
  .is-alarm .h-pane { animation: window-flash 1s ease-in-out infinite; }
  .is-alarm.house { animation: house-shake 0.2s ease-in-out infinite alternate; }
}
@keyframes window-flash {
  0%, 100% { fill: var(--window-alarm-off); }
  50% { fill: var(--window-alarm-on); }
}
@keyframes house-shake {
  from { transform: rotate(-1.6deg); }
  to   { transform: rotate(1.6deg); }
}

/* You got out: door open, warm light, clear windows */
.is-out .h-pane { fill: var(--window-out); }
.is-out .h-closed { display: none; }
.is-out .h-open, .scene--out .h-spill { display: inline; }

/* Logo mark */
.mark .h-pane { fill: var(--window-calm); }

/* Hero hills run past the illustration to both edges of the screen (the hero clips them). */
.scene--hero { overflow: visible; }
@media (min-width: 880px) { .hero-copy { padding-bottom: 120px; } }
.site-nav a.btn { color: var(--accent-text); }
.site-nav a.btn:hover { text-decoration: none; }
@media (max-width: 879px) { .hero-art { margin-top: -40px; } }
