/* www.bhaashi.com. Built on /bhaashi.css (palette, buttons, inputs, theme switch); this file adds the site's layout.
   Layout: one 1120px column; hero splits copy and a live read-along card; content pages use a 46rem reading column.
   Day follows the Bhaashi light palette; Night is the bedtime purple. Every colour comes from a token. */
:root {
  --line-strong: #C9CBCF;
  --hero-bg: radial-gradient(1100px 560px at 88% -10%, rgba(62, 106, 225, .12), transparent 62%), radial-gradient(800px 480px at 0% 110%, rgba(147, 51, 234, .08), transparent 60%);
  --card-shadow: 0 34px 80px -34px rgba(23, 26, 32, .28), 0 2px 6px rgba(23, 26, 32, .05);
  --word: rgba(62, 106, 225, .16);
  --star: 62, 106, 225;
  --header-bg: rgba(255, 255, 255, .82);
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --line-strong: rgba(255, 255, 255, .22);
    --hero-bg: radial-gradient(1000px 620px at 82% -10%, rgba(147, 51, 234, .30), transparent 62%), radial-gradient(760px 520px at 0% 110%, rgba(62, 106, 225, .20), transparent 60%);
    --card-shadow: 0 34px 90px -30px rgba(147, 51, 234, .45), 0 2px 6px rgba(0, 0, 0, .4);
    --word: rgba(216, 180, 254, .22);
    --star: 245, 243, 255;
    --header-bg: rgba(6, 4, 13, .78);
  }
}
:root.dark {
  --line-strong: rgba(255, 255, 255, .22);
  --hero-bg: radial-gradient(1000px 620px at 82% -10%, rgba(147, 51, 234, .30), transparent 62%), radial-gradient(760px 520px at 0% 110%, rgba(62, 106, 225, .20), transparent 60%);
  --card-shadow: 0 34px 90px -30px rgba(147, 51, 234, .45), 0 2px 6px rgba(0, 0, 0, .4);
  --word: rgba(216, 180, 254, .22);
  --star: 245, 243, 255;
  --header-bg: rgba(6, 4, 13, .78);
}

body { min-height: 100vh; display: flex; flex-direction: column; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
main { flex: 1; }
img, svg { max-width: 100%; }
a { text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow-col { max-width: calc(46rem + 40px); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 21px/1 var(--font-display); letter-spacing: -.01em; margin-right: auto; }
.brand img { border-radius: 8px; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 112px); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(36px, 6vw, 72px); align-items: center; }
.display { margin: 14px 0 20px; font-size: clamp(46px, 7.4vw, 88px); line-height: 1; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.display .title, .display-s .title, .section-title .title { padding-bottom: .06em; }
.lede { margin: 0; max-width: 34rem; font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--muted); }
.lede strong { color: var(--text); }

/* Read-along player (the example chapter) */
.player { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 3vw, 28px); box-shadow: var(--card-shadow); display: grid; gap: 18px; }
.player-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-book { font: 700 16px var(--font-display); color: var(--text); }
.readalong { margin: 0; font-size: clamp(19px, 2.1vw, 22px); line-height: 1.62; color: var(--muted); min-height: 7.5em; }
.readalong .s { transition: color .3s ease; }
.readalong .s.now { color: var(--text); }
.readalong .w { border-radius: 6px; transition: background-color .18s ease, box-shadow .18s ease; }
.readalong .w.now { background: var(--word); box-shadow: 0 0 0 3px var(--word); }
.player-controls { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.play { width: 48px; min-height: 48px; padding: 0; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.play:hover { background: var(--primary-hover); }
.play span { width: 14px; height: 16px; display: block; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
.play[aria-pressed="false"] span { width: 0; height: 0; border-left: 15px solid currentColor; border-right: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.progress { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: inherit; transition: width .25s linear; }
.time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.speeds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 18px; background: var(--soft); }
.speeds button { min-height: 48px; padding: 6px 4px; border-radius: 14px; flex-direction: column; gap: 0; font-size: 14px; line-height: 1.2; background: transparent; color: var(--secondary-text); border-color: transparent; }
.speeds button:hover { background: var(--secondary-bg-hover); }
.speeds button span { color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.speeds button[aria-checked="true"] { background: var(--primary); color: var(--on-primary); }
.speeds button[aria-checked="true"] span { color: inherit; opacity: .85; }
.player figcaption { font-size: 13px; }

/* Sections */
.band { padding-block: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); }
.section-title { margin: 10px 0 16px; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.section-lede { margin: 0 0 40px; max-width: 40rem; font-size: 19px; color: var(--muted); }
.split-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.split-grid p { max-width: 34rem; font-size: 18px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { border-top: 2px solid var(--line); padding-top: 22px; }
.step-n { display: block; font: 800 56px/1 var(--font-display); background-image: var(--title-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 14px; }
.steps h3 { margin: 0 0 8px; font: 700 21px/1.25 var(--font-display); }
.steps p { margin: 0; color: var(--muted); }

.memory { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px 26px; box-shadow: var(--card-shadow); }
.memory-head { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.memory ul { list-style: none; margin: 0; padding: 0; }
.memory li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-bottom: 1px dashed var(--line-strong); }
.memory li:last-child { border-bottom: 0; }
.memory b { font-weight: 700; }
.memory span { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
th { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.paces { max-width: 560px; font-size: 18px; }

.care { list-style: none; margin: 8px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.care h3 { margin: 0 0 6px; font: 700 20px/1.25 var(--font-display); }
.care p { margin: 0; color: var(--muted); max-width: 30rem; }

.orbit { width: 100%; max-width: 380px; justify-self: center; overflow: visible; }
.orbit .ring { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.orbit .ring.faint { stroke-dasharray: 3 7; }
.orbit .world circle { fill: var(--primary); }
.orbit .world text { fill: var(--text); font: 700 15px var(--font-display); }
.orbit .later { fill: var(--muted); opacity: .45; }

.closing { padding-block: 0 clamp(64px, 9vw, 112px); }
.closing-inner { text-align: center; }
.closing-inner > * { max-width: 40rem; margin-left: auto; margin-right: auto; }
.closing-inner { background: var(--hero-bg); border: 1px solid var(--line); border-radius: 32px; padding-block: clamp(44px, 7vw, 72px); }
.closing-inner p { font-size: 18px; color: var(--muted); }
.closing-inner .actions { justify-content: center; }

/* Content pages */
.page-head { padding-block: clamp(48px, 8vw, 88px) 8px; background: var(--hero-bg); }
.page-head + .band { border-top: 0; padding-top: 32px; }
.display-s { margin: 12px 0 18px; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.prose { font-size: 17px; line-height: 1.7; }
.prose h2 { margin: 44px 0 12px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 24px 0 6px; font: 700 18px var(--font-display); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose table { font-size: 15px; line-height: 1.5; margin: 8px 0 12px; }
.prose code { font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--soft); }
.beliefs { list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.beliefs li { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; }
.beliefs b { font-family: var(--font-display); }

/* Contact form */
.contact { padding: clamp(20px, 4vw, 32px); display: grid; gap: 4px; margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.contact select, .contact textarea { width: 100%; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 14px; }
.contact select { min-height: 48px; }
.contact textarea { resize: vertical; min-height: 9em; line-height: 1.5; }
.contact [aria-invalid="true"] { border-color: var(--bad); }
.field-hint { margin: 6px 0 0; font-size: 14px; }
.field-error { margin: 6px 0 0; font-size: 14px; color: var(--bad); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact .button { justify-self: start; }
.form-status { margin: 8px 0 0; font-weight: 600; }
.form-status.bad { color: var(--bad); }
.sent { padding: clamp(24px, 4vw, 36px); }
.sent h2 { margin: 0 0 8px; font-size: 26px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding-block: 32px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font: 800 17px var(--font-display); margin-right: auto; }
.foot-brand img { border-radius: 6px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.foot nav a:hover { color: var(--text); }
.foot p { margin: 0; font-size: 14px; }

@media (max-width: 900px) {
  .hero-grid, .split-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .orbit { max-width: 280px; order: 2; }
}
@media (max-width: 640px) {
  .care { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .memory li { grid-template-columns: minmax(0, 1fr); }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 14px; }
  .bar { gap: 12px; }
}
@media (max-width: 400px) { .brand span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
.pace-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 8px 26px 12px; box-shadow: var(--card-shadow); }
.pace-card tr:last-child td { border-bottom: 0; }
