/* ==========================================================================
   LearnQuiet Colorado — design tokens
   Palette born from the product itself: a warm "paper" classroom canvas,
   a deep pine ink for quiet authority, and the amber/ember pair that
   mirrors the device's own indicator lights (lit = amber, spent = ember).
   ========================================================================== */

:root {
  --paper: #efeae0;
  --paper-deep: #e3dcc9;
  --paper-card: #f6f3ea;
  --ink: #232922;
  --ink-soft: #4b544a;
  --pine: #2f4e45;
  --pine-light: #46685d;
  --pine-pale: #d9e3dd;
  --amber: #d6a24a;
  --amber-soft: #efd9ac;
  --ember: #af5039;
  --line: #d3cab4;

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --measure: 68ch;
  --radius: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--pine);
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; letter-spacing: 0.02em; }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: var(--measure); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pine-light);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

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

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--pine); color: var(--paper); }
.btn-primary:hover { background: var(--pine-light); }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--pine); }
.btn-ghost:hover { background: var(--pine); color: var(--paper); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #c6913e; }

/* ---------- light-bar signature element ---------- */
/* Mirrors the device: a row of lights that "spend" as noise rises. */
.lightbar {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.lightbar .lamp {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 1px var(--pine-pale) inset;
  transition: background 0.4s ease, opacity 0.4s ease, transform 0.3s ease;
}
.lightbar .lamp.off {
  background: var(--line);
  opacity: 0.55;
}
.lightbar-mark { /* used as the nav / footer logo mark */
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.lightbar-mark .lamp { width: 8px; height: 8px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 234, 224, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65em;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--pine);
}
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.3em 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--pine);
  border-color: var(--amber);
}
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--pine);
  border-radius: var(--radius);
  padding: 0.5em 0.7em;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--pine);
  position: relative; transition: transform 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-actions .btn-primary { display: none; }
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 3.5rem);
}

.hero h1 {
  max-width: 18ch;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.hero .lede { max-width: 52ch; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; justify-content: center; }

.hero-copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
}
.hero-copy .eyebrow {
  font-size: 0.7rem;
  color: var(--ink-soft);
}
.hero-copy .eyebrow::before,
.hero-copy .eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}
.hero-copy .lede {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.hero-copy h1,
.hero-copy .lede { margin-left: auto; margin-right: auto; }

.hero-device-photo {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}
.hero-device-photo img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(35, 41, 34, 0.14);
}
.hero-device-photo figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

.hero-device { width: 100%; max-width: 480px; margin: 0 auto; }

.hero-device {
  background: var(--pine);
  color: var(--paper);
  border-radius: 6px;
  padding: 2.1rem;
  position: relative;
  overflow: hidden;
}
.hero-device::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% -10%, rgba(214,162,74,0.28), transparent 55%);
  pointer-events: none;
}
.hero-device .device-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin-bottom: 1.4rem;
}
.hero-device .lightbar { gap: 0.85em; margin-bottom: 1.2rem; }
.hero-device .lightbar .lamp { width: 22px; height: 22px; }
.hero-device figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--paper-deep);
  line-height: 1.6;
}
.hero-device .threshold-line {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber-soft);
  border-top: 1px solid rgba(239,234,224,0.2);
  padding-top: 0.9rem;
  margin-top: 1.1rem;
}

/* ---------- sections ---------- */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-divide { border-top: 1px solid var(--line); }

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; } }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem;
}
.card .eyebrow { margin-bottom: 0.7em; }
.card h3 { margin-bottom: 0.5em; }
.card p { font-size: 0.96rem; margin-bottom: 1.1em; }
.card a.card-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--pine);
  border-bottom: 1px solid var(--amber);
  padding-bottom: 2px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.split img {
  border-radius: 6px;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- CTA band ---------- */
.band {
  background: var(--pine);
  color: var(--paper);
}
.band h2, .band h3 { color: var(--paper); }
.band p { color: var(--pine-pale); }
.band .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 820px) { .band .grid-2 { grid-template-columns: 1fr; } }
.band .cta-cell { border-top: 1px solid rgba(239,234,224,0.18); padding-top: 1.5rem; }

/* ---------- founder / profile ---------- */
.founder {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 700px) { .founder { grid-template-columns: 1fr; } }
.founder-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  object-fit: cover;
  background: var(--paper-card);
  border: 1px solid var(--line);
}

/* ---------- badges (tax exempt / patent pending) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--amber-soft);
  color: #6b4c1c;
  border-radius: 999px;
  padding: 0.4em 0.9em;
  margin-bottom: 0.9em;
}

/* ---------- stat ---------- */
.stat-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  color: var(--amber);
  font-weight: 600;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  max-width: 22ch;
}

/* ---------- forms ---------- */
.form-grid {
  display: grid;
  gap: 1.1rem;
  max-width: 480px;
}
label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pine);
  display: block;
  margin-bottom: 0.4em;
}
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.75em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-card);
  color: var(--ink);
}
input:focus, textarea:focus { border-color: var(--pine-light); }
.file-drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.1em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--paper-card);
}
.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  max-width: 40ch;
}
.form-note a { color: var(--pine); }

.inline-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-width: 460px;
}
.inline-form input { flex: 1 1 220px; }

ul.reasons { padding-left: 1.1em; color: var(--ink-soft); }
ul.reasons li { margin-bottom: 0.6em; }

/* ---------- donate ---------- */
.donate-panel {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2.5rem;
  max-width: 520px;
  text-align: center;
}
.donate-panel .lightbar { justify-content: center; margin-bottom: 1.4rem; }
.paypal-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-row small {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.footer-row .powered { font-size: 0.72rem; color: var(--ink-soft); }
.footer-row .powered a { color: var(--pine); text-decoration: none; border-bottom: 1px solid var(--line); }

/* ---------- cookie notice ---------- */
.cookie-bar {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 560px;
  margin: 0 auto;
  background: var(--pine);
  color: var(--paper);
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  box-shadow: 0 12px 30px rgba(35,41,34,0.25);
  z-index: 80;
}
.cookie-bar p { color: var(--pine-pale); font-size: 0.85rem; margin: 0; flex: 1 1 260px; }
.cookie-bar[hidden] { display: none; }

/* ---------- innovation demo ---------- */
.demo-panel {
  background: var(--pine);
  color: var(--paper);
  border-radius: 6px;
  padding: 2.25rem;
  display: grid;
  gap: 1.5rem;
}
.demo-panel .lightbar .lamp { width: 26px; height: 26px; }
.demo-controls { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.demo-readout {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--amber-soft);
  min-height: 1.4em;
}

/* ---------- tall product photo (Innovation page) ---------- */
.tall-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper-card);
  border: 1px solid var(--line);
}
.tall-photo-wrap { max-width: 380px; margin: 0 auto; }
