/*
  BrightTrace site theme.
  Palette: KidTheme.swift neutral/sage/module tokens; page-only surfaces and composition
  are derived from the approved 98a4a9c apps/ios/brighttrace/bright-trace.css.
  The hero uses the source app icon; no interface mockup or unverified capture is used.
*/
:root {
  --paper: #F5F7F2;
  --ink: #18231D;
  --ink-2: #435048;
  --ink-3: #667269;
  --line: #D9E0D8;
  --line-strong: #C7D1C7;
  --accent: #316645;
  --accent-dark: #244B36;
  --font-display: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  --font-body: 'IBM Plex Sans', 'Noto Sans SC', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Noto Sans SC', monospace;
}

.brighttrace-page {
  --bt-surface: #FFFEFA;
  --bt-surface-2: #EEF2EC;
  --bt-sage-soft: #DCEADF;
  --bt-sage-on-deep: #F8FFF9;
  --bt-clay-soft: #F4E6E1;
  --bt-amber-soft: #F4EAD8;
  --bt-sky-soft: #E1EBF7;
  --bt-violet-soft: #ECEAF2;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

.brighttrace-page .navbar.scrolled {
  background: rgba(245, 247, 242, 0.92);
  border-bottom-color: var(--line);
}

.bt-container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.bt-hero {
  display: grid;
  min-height: 680px;
  place-items: center;
  padding: 144px 0 88px;
  background:
    radial-gradient(circle at 82% 14%, rgba(220, 234, 223, 0.9), transparent 31%),
    radial-gradient(circle at 9% 88%, rgba(244, 230, 225, 0.72), transparent 26%),
    var(--paper);
}

.bt-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 64px;
  align-items: center;
}

.bt-eyebrow,
.bt-kicker,
.bt-label {
  color: var(--accent);
  font: 600 0.72rem/1.35 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bt-title {
  max-width: 680px;
  margin: 18px 0 22px;
  font: 700 clamp(3rem, 6.8vw, 6rem)/0.98 var(--font-display);
  letter-spacing: -0.065em;
}

.bt-lede {
  max-width: 620px;
  color: var(--ink-2);
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  line-height: 1.65;
}

.bt-release-note {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 0.93rem;
  line-height: 1.6;
}

.bt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 30px;
}

.bt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent-dark);
  color: var(--bt-sage-on-deep);
  font-weight: 650;
  transition: background 160ms ease, transform 160ms ease;
}

.bt-button:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.bt-text-link,
.bt-legal-content a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bt-hero-note {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(49, 102, 69, 0.2);
  border-radius: 32px;
  background: rgba(255, 254, 250, 0.86);
  box-shadow: 0 18px 54px rgba(24, 35, 29, 0.09);
}

.bt-hero-note::before,
.bt-hero-note::after {
  position: absolute;
  z-index: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.bt-hero-note::before {
  top: -115px;
  right: -85px;
  background: var(--bt-sage-soft);
}

.bt-hero-note::after {
  bottom: -140px;
  left: -92px;
  background: var(--bt-clay-soft);
}

.bt-hero-note > * {
  position: relative;
  z-index: 1;
}

.bt-hero-mark {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.bt-app-icon {
  display: block;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(24, 35, 29, 0.12);
}

.bt-hero-mark h2 {
  margin-top: 5px;
  font: 650 clamp(1.35rem, 2.8vw, 1.8rem)/1.1 var(--font-display);
  letter-spacing: -0.035em;
}

.bt-proof-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.bt-proof-list li {
  display: grid;
  grid-template-columns: minmax(104px, 0.42fr) 1fr;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-2);
  line-height: 1.55;
}

.bt-proof-list li:last-child { border-bottom: 0; }
.bt-proof-list strong { color: var(--accent-dark); font: 600 0.7rem/1.5 var(--font-mono); text-transform: uppercase; }

.bt-section { padding: 96px 0; }

.bt-section-head {
  max-width: 700px;
  margin-bottom: 38px;
}

.bt-section-title {
  margin-top: 12px;
  font: 650 clamp(2rem, 4vw, 3.35rem)/1.08 var(--font-display);
  letter-spacing: -0.045em;
}

.bt-section-lede {
  max-width: 660px;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 1.04rem;
  line-height: 1.7;
}

.bt-records {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bt-surface);
}

.bt-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bt-record-card {
  min-height: 166px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 20px;
  background: var(--paper);
}

.bt-record-card:nth-child(1) { border-top-color: #24707A; background: #D6EFF2; }
.bt-record-card:nth-child(2) { border-top-color: #94566C; background: #F5E4EC; }
.bt-record-card:nth-child(3) { border-top-color: #46656E; background: #E4ECEE; }
.bt-record-card:nth-child(4) { border-top-color: #8E4F45; background: var(--bt-clay-soft); }
.bt-record-card:nth-child(5) { border-top-color: #665F7B; background: var(--bt-violet-soft); }
.bt-record-card:nth-child(6) { border-top-color: #6E542F; background: var(--bt-amber-soft); }
.bt-record-index { color: var(--ink-3); font: 0.72rem var(--font-mono); }
.bt-record-card h3 { margin: 22px 0 8px; font: 650 1.12rem/1.25 var(--font-display); }
.bt-record-card p { color: var(--ink-2); line-height: 1.55; }

.bt-routine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.bt-routine-step {
  padding: 24px;
  border-top: 3px solid var(--accent);
  background: var(--bt-surface);
}

.bt-routine-step:nth-child(2) { border-top-color: #99703C; }
.bt-routine-step:nth-child(3) { border-top-color: #9B584D; }
.bt-routine-step .bt-record-index { display: block; margin-bottom: 18px; }
.bt-routine-step h3 { margin-bottom: 10px; font: 650 1.2rem/1.25 var(--font-display); }
.bt-routine-step p { color: var(--ink-2); line-height: 1.65; }

.bt-boundary {
  background: var(--accent-dark);
  color: var(--bt-sage-on-deep);
}

.bt-boundary .bt-kicker { color: var(--bt-sage-soft); }
.bt-boundary .bt-section-title { color: var(--bt-sage-on-deep); }
.bt-boundary .bt-section-lede { color: rgba(248, 255, 249, 0.84); }
.bt-boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 38px;
  background: rgba(248, 255, 249, 0.24);
}

.bt-boundary-card {
  padding: 24px;
  background: var(--accent-dark);
}

.bt-boundary-card strong {
  display: block;
  margin-bottom: 9px;
  font: 650 1.08rem/1.3 var(--font-display);
}

.bt-boundary-card p { color: rgba(248, 255, 249, 0.84); line-height: 1.65; }

.bt-links { padding: 72px 0 88px; }
.bt-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bt-link-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bt-surface);
  transition: border-color 160ms ease, transform 160ms ease;
}

.bt-link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.bt-link-card strong { display: block; margin-bottom: 8px; font: 650 1.2rem var(--font-display); }
.bt-link-card p { color: var(--ink-2); line-height: 1.55; }

.bt-legal-page { min-height: 100vh; padding: 126px 0 88px; }
.bt-legal-content { max-width: 780px; }
.bt-legal-back { display: inline-flex; margin-bottom: 28px; color: var(--accent-dark); font-weight: 650; }
.bt-legal-content h1 { margin: 16px 0 10px; font: 700 clamp(2.4rem, 6vw, 4.2rem)/1.02 var(--font-display); letter-spacing: -0.06em; }
.bt-legal-meta { margin-bottom: 38px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--ink-3); font: 0.75rem/1.6 var(--font-mono); }
.bt-legal-content h2 { margin: 38px 0 12px; font: 650 1.35rem/1.25 var(--font-display); }
.bt-legal-content p,
.bt-legal-content li { color: var(--ink-2); line-height: 1.78; }
.bt-legal-content p + p { margin-top: 12px; }
.bt-legal-content ul { padding-left: 24px; list-style: disc; }
.bt-legal-content li + li { margin-top: 8px; }
.bt-faq { margin: 24px 0 30px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bt-surface); }
.bt-faq h2 { margin-top: 0; }
.bt-faq p:last-child { margin-bottom: 0; }

@media (max-width: 840px) {
  .bt-hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .bt-hero { min-height: auto; padding-top: 126px; }
  .bt-record-grid,
  .bt-routine-grid,
  .bt-boundary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .bt-container { width: min(100% - 32px, 1120px); }
  .bt-hero { padding: 112px 0 64px; }
  .bt-title { font-size: clamp(2.7rem, 14vw, 4.3rem); }
  .bt-hero-note { padding: 22px; border-radius: 26px; }
  .bt-app-icon { width: 76px; height: 76px; border-radius: 18px; }
  .bt-proof-list li { grid-template-columns: 1fr; gap: 4px; }
  .bt-section { padding: 72px 0; }
  .bt-record-grid,
  .bt-routine-grid,
  .bt-boundary-grid,
  .bt-link-grid { grid-template-columns: 1fr; }
  .bt-record-card { min-height: auto; }
  .bt-legal-page { padding-top: 108px; }
  .bt-legal-content h2 { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .bt-button,
  .bt-link-card { transition: none; }
  .bt-button:hover,
  .bt-link-card:hover { transform: none; }
}
