/* The book landing page (/book). Tokens from questions.css and atlas.css: warm paper, one accent (oxblood)
   for action, the site's three typefaces, 20px cards, pill buttons. Dark colors come from html.atlas. */

/* the language links: short names (한국어) still get a 44px target */
.book-hero .langs a{min-width:44px; justify-content:center}

/* hero: the words and the form on one side, the painting on the other */
.book-hero{padding-bottom:clamp(36px,5vw,64px)}
.bh{display:grid; gap:clamp(24px,4vw,56px); align-items:center}
.bh-text{display:grid; gap:clamp(14px,1.6vw,20px); min-width:0}
.book-hero h1{font-size:clamp(42px,5.4vw,76px); max-width:13ch}
.book-hero .sub{margin:0; font:400 clamp(21px,2.3vw,28px)/1.25 var(--f-display); color:var(--ink); max-width:30ch; text-wrap:balance}
.book-hero .lede{margin:0; max-width:52ch}
.bh-art{margin:0; min-width:0}
.bh-art img{display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; object-position:100% 50%;
  border-radius:var(--r-card); border:1px solid var(--rule); box-shadow:var(--shadow-card); background:var(--paper-3)}
.bh-art figcaption{margin-top:12px; font:500 12px/1.5 var(--f-mono); letter-spacing:.04em; color:var(--muted)}
.book-hero .stats{margin-top:clamp(4px,1vw,12px)}
.working{margin:0; font-size:14px; color:var(--muted)}
@media (min-width:900px){
  .bh{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr)}
  .bh-art img{aspect-ratio:1/1}
}

/* the waitlist form */
.wl{display:grid; gap:10px; max-width:520px; margin-top:6px; scroll-margin-top:96px}
.wl form{display:grid; gap:8px}
.wl label{font:600 11.5px/1.4 var(--f-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-2)}
.wl-row{display:flex; flex-wrap:wrap; gap:8px}
.wl input[type=email]{flex:1 1 220px; min-width:0; min-height:48px; padding:12px 18px; font:400 16px/1.3 var(--f-body); color:var(--ink);
  background:var(--card); border:1.5px solid var(--rule-2); border-radius:999px; transition:border-color .18s, box-shadow .18s}
.wl input[type=email]::placeholder{color:var(--muted); opacity:1}
.wl input[type=email]:focus-visible{outline:none; border-color:var(--ox); box-shadow:0 0 0 3px color-mix(in oklch, var(--ox) 22%, transparent)}
.wl input[aria-invalid="true"]{border-color:var(--ox)}
.wl .btn{flex:0 0 auto; min-height:48px}
.wl .btn[disabled]{opacity:.6; cursor:progress; transform:none}
.wl-status{margin:0; min-height:1.5em; font:500 15px/1.5 var(--f-body); color:var(--ink-2)}
.wl-status.ok{padding:14px 18px; border-radius:16px; border:1px solid var(--rule); background:var(--card); color:var(--ink); font-weight:600}
.wl-status.err{color:var(--ox); font-weight:600}
.wl-note{margin:0; font-size:14px; line-height:1.5; color:var(--muted); max-width:46ch}
.book-hero .btn:focus-visible,.book-toc .btn:focus-visible,.book-now .switch a:focus-visible{outline:3px solid var(--gold-deep); outline-offset:2px}

/* what the book teaches */
.book-about{background:var(--paper-2); border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); padding:clamp(56px,7vw,104px) 0}
.book-about .wrap{display:grid; gap:clamp(24px,4vw,64px)}
.ba-head{display:grid; gap:16px; align-content:start}
.book-about h2,.book-toc h2,.book-now h2{font-size:clamp(34px,4.4vw,58px); max-width:16ch}
.ba-body{display:grid; gap:18px; max-width:62ch}
.ba-body p{margin:0; font-size:clamp(17px,1.5vw,19px); line-height:1.65; color:var(--ink-2)}
.ba-body p:first-child{font:400 clamp(24px,2.6vw,32px)/1.25 var(--f-display); color:var(--ink); text-wrap:balance}
.ba-body .by{padding-top:18px; border-top:1px solid var(--rule-2); font:600 12px/1.6 var(--f-mono); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-2)}
@media (min-width:900px){
  .book-about .wrap{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}
  .ba-head{position:sticky; top:96px}
}

/* the planned chapters */
.book-toc{padding:clamp(56px,7vw,104px) 0}
.book-toc .wrap{display:grid; gap:16px}
.book-toc .lede{margin:0}
.parts{display:grid; gap:clamp(12px,1.6vw,20px); margin-top:clamp(12px,2vw,24px)}
.part{display:grid; gap:10px; align-content:start; padding:clamp(18px,2.2vw,28px); background:var(--card); border:1px solid var(--rule);
  border-radius:var(--r-card); box-shadow:var(--shadow-card)}
.part h3{font-size:clamp(25px,2.4vw,32px); line-height:1.12}
.part ol,.part ul{list-style:none; margin:4px 0 0; padding:0; display:grid}
.part li{display:flex; gap:14px; align-items:baseline; padding:11px 0; border-top:1px solid var(--rule); font-size:17px; line-height:1.45; color:var(--ink)}
.part .n{flex:none; min-width:2ch; font:600 12px/1 var(--f-mono); color:var(--ox); font-variant-numeric:tabular-nums}
.part.plain li{font:400 clamp(21px,2vw,25px)/1.25 var(--f-display)}
.part.back{background:var(--paper-2); box-shadow:none}
.again{margin:clamp(16px,2.4vw,28px) 0 0}
@media (min-width:760px){
  .parts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .part.back{grid-column:1 / -1}
  .part.back ul{grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:28px}
}

/* read the teachings today */
.book-now{padding:0 0 clamp(56px,7vw,104px)}
.book-now .wrap{display:grid; gap:16px; justify-items:start}
.book-now .lede{margin:0}
.book-now .switch{margin:8px 0 0}
@media (max-width:760px){
  .book-now .switch{display:grid; grid-auto-flow:row; grid-template-columns:1fr; width:100%; border-radius:28px}
  .book-now .switch a{border-radius:24px}
}

@media (prefers-reduced-motion: reduce){
  .wl input[type=email]{transition:none}
  html{scroll-behavior:auto}
}

/* Right to left (Arabic): tracked caps would pull joined letters apart */
[dir="rtl"] .wl label,[dir="rtl"] .bh-art figcaption,[dir="rtl"] .ba-body .by,[dir="rtl"] .switch a{letter-spacing:0}
[dir="rtl"] .bh-art img{object-position:100% 50%}
