/* Ask Unc — shared stylesheet. Colors from docs/wireframes/palette.md */
:root {
  --burnt-orange: #D9622B;
  --burnt-orange-pressed: #B24E1F;
  --mustard: #E3A82B;
  --unc-green: #4E9A3F;
  --denim-blue: #3E7CC9;
  --espresso: #2A1D15;
  --weathered-brown: #7A6354;
  --clay: #A68D78;
  --linen: #E6D6C1;
  --cream: #FFFAF1;
  --card-cream: #FBF0DD;
  --parchment: #F4E9D7;
  --brick-red: #B8392B;

  /* Semantic tokens (light) */
  --bg: var(--parchment);
  --surface: var(--cream);
  --card: var(--card-cream);
  --border: var(--linen);
  --text: var(--espresso);
  --text-muted: var(--weathered-brown);
  --accent: var(--burnt-orange);
  --accent-pressed: var(--burnt-orange-pressed);
  --on-accent: #ffffff;
  --shadow: 0 10px 30px rgba(42, 29, 21, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Palette note: "Start from Espresso backgrounds with Cream text and the same accents." */
    --bg: #1E140E;
    --surface: #271A12;
    --card: #2F2017;
    --border: #463427;
    --text: #FFFAF1;
    --text-muted: #C9B49F;
    --accent: #E7733C;
    --accent-pressed: #D9622B;
    --on-accent: #1E140E;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-pressed); }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand strong { font-size: 1.15rem; letter-spacing: -0.01em; }
.brand span { color: var(--text-muted); font-size: 0.85rem; }
.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-left: 18px;
}
.nav a:hover { color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
}
.btn:hover { background: var(--accent-pressed); color: var(--on-accent); }
.btn.disabled {
  background: var(--card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: default;
  font-weight: 700;
}
.btn.disabled small { display: block; font-weight: 400; font-size: 0.72rem; opacity: 0.8; }

/* ---- Hero ---- */
.hero { padding: 56px 0 24px; }
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.hero .subtitle {
  font-size: 1.25rem;
  color: var(--unc-green);
  font-weight: 700;
  margin: 0 0 18px;
}
.hero p.lead { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 26px; }
.hero-art {
  display: flex;
  justify-content: center;
}
.hero-art img {
  max-width: 360px;
  width: 100%;
  filter: drop-shadow(0 20px 30px rgba(42, 29, 21, 0.22));
}

/* ---- Sections ---- */
.section { padding: 40px 0; }
.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.section .section-intro { color: var(--text-muted); max-width: 640px; font-size: 1.08rem; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card .emoji { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }

.cta-band {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px 24px;
  margin: 8px 0 8px;
  box-shadow: var(--shadow);
}
.cta-band h2 { margin-top: 0; }
.cta-band .quote {
  font-style: italic;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 20px;
}

/* ---- Waitlist form ---- */
.waitlist {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 460px;
  margin: 0 auto;
}
.waitlist input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 13px 18px;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.waitlist input::placeholder { color: var(--text-muted); }
.waitlist input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.waitlist button {
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.waitlist button:hover { background: var(--accent-pressed); }
.waitlist button:disabled { opacity: 0.6; cursor: default; }
.waitlist-note {
  margin: 14px auto 0;
  max-width: 460px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.waitlist-note.ok { color: var(--unc-green); font-weight: 600; }
.waitlist-note.err { color: var(--brick-red); font-weight: 600; }

/* Hero form sits left-aligned under the hero copy (centered on mobile). */
.hero .waitlist { margin-left: 0; margin-right: 0; justify-content: flex-start; max-width: 440px; }
.hero .waitlist-note { margin-left: 0; margin-right: 0; text-align: left; }

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

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0;
  background: var(--surface);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-footer .links a { margin-right: 18px; text-decoration: none; }
.site-footer small { color: var(--text-muted); }

/* ---- Legal pages ---- */
.legal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  margin: 36px auto;
  box-shadow: var(--shadow);
}
.legal h1 { margin-top: 0; letter-spacing: -0.02em; }
.legal h2 {
  margin-top: 1.8em;
  padding-top: 0.4em;
  border-top: 1px solid var(--border);
  font-size: 1.35rem;
}
.legal h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal p, .legal li { font-size: 1rem; }
.legal .updated { color: var(--text-muted); font-weight: 600; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95rem;
}
.legal th, .legal td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal th { background: var(--card); }
.legal .note {
  background: var(--card);
  border-left: 4px solid var(--mustard);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 1.2em 0;
  font-size: 0.95rem;
}
.legal a.back { display: inline-block; margin-bottom: 8px; font-weight: 600; text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 260px; }
  .features { grid-template-columns: 1fr; }
  .nav a:first-child { display: none; }
  .legal { padding: 24px 18px; }
  .waitlist input, .waitlist button { flex: 1 1 100%; }
  .hero .waitlist { margin: 0 auto; justify-content: center; }
  .hero .waitlist-note { margin: 14px auto 0; text-align: center; }
}
