/* pro.css: the Oct 16, 2026 "pro" pass, loaded LAST on every site page (tools/pro_markup.py).
   Colors already moved to white / cool off-white in the source files (tools/pro_recolor.py); this layer
   carries the structural changes that the older stylesheets pin with !important:
   - light heroes everywhere (no navy dot-field heroes, no riso canvases or textures)
   - a solid white nav with dark ink on every page
   - one restrained clamp() type scale for h1 / h2
   - eyebrows as quiet labels instead of navy chips; one italic accent at most; no halftone markers
   - 8px buttons and a single photo-slot component (.pro-photo) with one ratio (3:2)
   Never loaded by decks/ or talks/. */

:root {
  --pro-bg: #FFFFFF; --pro-alt: #F5F7FA; --pro-sunk: #EEF1F6; --pro-line: #E2E6EE; --pro-line-2: #CDD3DF;
  --pro-ink: #0B1A4A; --pro-ink-2: #2F55A8; --pro-action: #22458A; --pro-ink-tint: rgba(47, 85, 168, .14); --pro-ink-tint-2: rgba(47, 85, 168, .30); --pro-text: #111827; --pro-soft: #465066; --pro-muted: #5D6677;
  --ease: cubic-bezier(.22, .61, .36, 1); --ease-io: cubic-bezier(.45, 0, .25, 1);
  --dur-fast: 180ms; --dur-ui: 280ms; --dur-reveal: 600ms;
  /* Motion tokens (MOTION2-BRIEF; recorded in the design system, DESIGN-SYSTEM.md).
     Photo crossfade: hold per photo + fade. Ken Burns (hero photos): duration, max zoom, drift.
     Drift (framed photos): duration, max zoom, drift. Reduce Motion swaps in gentler values below, never none. */
  /* HERO2-BRIEF (Oct 17): a photo change every 3.5s with a 1s crossfade; each photo pushes in 1.00 to 1.12 with a
     4 to 6% pan over 7s from its fade-in (2 x hold), so the push is clearly visible while it is on screen.
     --kb-pan scales the per-photo pan directions (css/cine.css). */
  --xf-hold: 3.5s; --xf-fade: 1s;
  --kb-dur: 7s; --kb-scale: 1.12; --kb-pan: 1; --kb-tx: -3%; --kb-ty: -1.5%;
  --drift-dur: 22s; --drift-scale: 1.07; --drift-tx: -2.5%; --drift-ty: -1.5%;
  /* Spacing scale (EDITORIAL-BRIEF; DESIGN-SYSTEM.md): every gap, padding and margin in css/ds.css and the migrated
     sections comes from here. --section-y is the vertical rhythm between sections; --measure caps body lines. */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px; --space-10: 128px;
  --section-y: clamp(var(--space-8), 8vw, var(--space-10));
  --measure: 68ch; --measure-narrow: 60ch;
  --radius-ctl: 8px; --radius-card: 12px; --hairline: 1px solid var(--pro-line);
  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-md: 17px; --text-lg: 19px;
  --lh-tight: 1.15; --lh-body: 1.6;
  --ic: 22px; --ic-lg: 28px; --mk: 11px; --mk-sm: 9px; --tap: 44px; --band-h: 30px; --band-r: 5px;   /* icon, matrix marker, tap target */
  --shadow-text: 0 1px 8px rgba(8, 15, 38, .6);
  /* Texture: the deck's dot grid over hero photos (css/cine.css .cine-dots; DOTS-BRIEF) */
  --tex-dots-c: rgba(201, 214, 242, .9); --tex-dots-s: 22px; --tex-dots-o: .22;
  --pro-h1: clamp(34px, 1.1rem + 2.1vw, 52px);
  --pro-h2: clamp(26px, .95rem + 1.25vw, 36px);
  --pro-h3: clamp(22px, 1rem + .45vw, 28px);
  --pro-tint: #C9D6F2;   /* light accent on navy */
  --paper-art: #F5F7FA; --riso-tint: none;
}
/* Reduce Motion (macOS/iOS/Windows setting): photos still move, gently; the crossfade is slower (opacity fades are
   fine for vestibular users). Only large zoom/pan and scroll-linked effects are dropped. */
@media (prefers-reduced-motion: reduce) {
  :root { --xf-hold: 6s; --xf-fade: 1.5s; --kb-dur: 12s; --kb-scale: 1.05; --kb-pan: .4; --kb-tx: -1%; --kb-ty: -.5%;
    --drift-dur: 30s; --drift-scale: 1.03; --drift-tx: -1%; --drift-ty: -.5%; }
}

/* ---------- Ground and textures ---------- */
html body { background: var(--pro-bg) !important; background-image: none !important; }
html body .hero-bg, html body [data-riso-field]{ display: none !important; }
html body [data-dots] { background-image: none !important; }
html body .section-alt { background: var(--pro-alt) !important; }
/* dot grids, halftones, and the rotating seal watermark are retired (magazine texture) */
html body section.hero-opt:not(#pro) { background-image: none !important; }
html body section.hero-opt.hero-opt-A:not(#pro)::before { display: none !important; }
html body :is(.pp-cta-band, .pp-final, .dark-band, section.pp-cta-band)::before { background-image: none !important; }
html body :is(.pp-cta-band, .pp-final, .zl-hero) { background-image: none !important; }
html body :is(.hmark, .hw)::after { display: none !important; }

/* ---------- Heroes: light, structured, hairline below ---------- */
html body section.hero-inv, html body section.hero-full, html body section.hero-riso { background: var(--pro-alt) !important; border-bottom: 1px solid var(--pro-line); }
html body .hero-inv :is(h1, .display, .cs-h1) { color: var(--pro-ink) !important; text-shadow: none !important; }
html body .hero-inv :is(h1, .display) em { color: var(--pro-ink-2) !important; }
html body .hero-inv :is(.lede, .sub, .thesis, p) { color: var(--pro-soft) !important; }
html body .hero-inv :is(.zl-hero-cn, .hero-note, .zl-hero-note) { color: var(--pro-muted) !important; }
html body .hero-inv .btn-ghost { color: var(--pro-ink) !important; border-color: var(--pro-line-2) !important; background: #fff !important; }
html body .hero-inv :is(.pc-facts, .pp-glance) b { color: var(--pro-muted) !important; }
html body .hero-inv :is(.pc-facts, .pp-glance) span { color: var(--pro-text) !important; }
html body .hero-inv a:not(.btn) { color: var(--pro-ink-2) !important; }

/* ---------- Nav: solid white, dark ink, every page ---------- */
html body .nav, html body .nav.scrolled { background: rgba(255, 255, 255, .96) !important; border-bottom: 1px solid var(--pro-line) !important; -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px); }
html body.zl-page .nav :is(.wordmark, .nav-links a, .nav-toggle, .nav-dd-btn) { color: var(--pro-soft) !important; }
html body.zl-page .nav :is(.nav-links a:hover, .nav-dd-btn:hover, .nav-dd.open .nav-dd-btn) { color: var(--pro-ink) !important; }
html body.zl-page .nav .nav-lockup{ filter: none !important; }
html body.zl-page .nav .lang-switch { background: #fff !important; border-color: var(--pro-line) !important; }
html body.zl-page .nav .lang-switch a:not(.lang-active) { color: var(--pro-soft) !important; }
html body.zl-page .nav .lang-switch a.lang-active { background: var(--pro-ink) !important; color: #fff !important; }
html body.zl-page .nav .btn-ghost { color: var(--pro-ink) !important; border-color: var(--pro-line-2) !important; }

/* ---------- Type: one restrained scale ---------- */
html body main :is(h1.display, h1.cs-h1, .hero h1, .hero-riso-h1, .pg-h1, .el-h1):not(#pro) {
  font-size: var(--pro-h1) !important; line-height: 1.08 !important; letter-spacing: -.02em !important; font-weight: 500 !important; max-width: 20ch;
}
html body main .hero-riso-h1:not(#pro) { max-width: 18ch; }
html body main :is(.h2, .h2-md, .h2-sm, .h2-closing, .el-h2):not(#pro) {
  font-size: var(--pro-h2) !important; line-height: 1.15 !important; letter-spacing: -.015em !important; font-weight: 500 !important;
}
html body main :is(.lede, .el-lede) { color: var(--pro-soft); }
html[lang^="zh"] body main :is(h1, .h2, .el-h1, .el-h2):not(#pro) { line-height: 1.22 !important; letter-spacing: 0 !important; }

/* ---------- Labels instead of chips ---------- */
html body .eyebrow {
  background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important;
  color: var(--pro-ink-2) !important; font-family: var(--font-body) !important; font-size: 12px !important; font-weight: 600 !important;
  letter-spacing: .1em !important; text-transform: uppercase; line-height: 1.3 !important;
}
html body .eyebrow::before { display: none !important; }
html body :is(.dark-band, .el-cta, .pp-cta-band, .footer, [class*="dark"]) .eyebrow { color: #A9BEEA !important; background: none !important; }
html[lang^="zh"] body .eyebrow { letter-spacing: .04em !important; font-size: 13px !important; }

/* ---------- Accents: italic only, no halftone markers ---------- */
html body :is(.rh, .hw-m)::after { display: none !important; }
html body .rh { font-weight: inherit !important; color: var(--pro-ink-2); }

/* ---------- Buttons: 8px ---------- */
html body .btn { border-radius: var(--radius-ctl) !important; }
html body .btn-primary { box-shadow: none !important; }
html body .btn-primary:hover { box-shadow: none !important; }
html body .btn-ghost { border-color: var(--pro-line-2); background: #fff; }

/* ---------- Photo slots: one ratio (3:2), rounded, hairline ---------- */
.pro-photo { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--pro-line); background: var(--pro-sunk); aspect-ratio: 3 / 2; position: relative; }
.pro-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pro-photo-cap { margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--pro-muted); }
.pro-photo.is-todo { display: flex; align-items: center; justify-content: center; border-style: dashed; border-color: var(--pro-line-2); background: var(--pro-alt); }
.pro-photo.is-todo::after { content: ""; width: 44px; height: 34px; border: 1.5px solid var(--pro-line-2); border-radius: 6px;
  background: radial-gradient(circle at 70% 32%, var(--pro-line-2) 4px, transparent 5px), linear-gradient(135deg, transparent 55%, var(--pro-line-2) 55% 60%, transparent 60%); }

/* ---------- Homepage hero: copy left, a real photo right ---------- */
html body .hero-full .hero-riso-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) !important; align-items: center; padding-block: clamp(120px, 11vw, 150px) clamp(56px, 6vw, 88px) !important; }
html body .hero-full { min-height: 0 !important; }
html body .hero-full .hero-art { order: 2; display: block !important; width: 100%; max-width: 620px; justify-self: end; transform: none !important; padding: 0 !important; }
html body .hero-full .hero-riso-copy { order: 1; }
html body .hero-full .hero-more { display: none !important; }
@media (max-width: 900px) {
  html body .hero-full .hero-riso-grid { grid-template-columns: 1fr !important; padding-block: 104px 48px !important; }
  html body .hero-full .hero-art { order: 2; display: block !important; width: 100%; max-width: 620px; justify-self: end; transform: none !important; padding: 0 !important; }
}

/* ---------- Motion: gentle reveal (reuses motion.js .reveal / .in), soft crossfades ---------- */
html body .reveal { transform: translateY(12px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
html body .reveal.in { transform: none; }
/* reveals only hide content once JS is known to run (html.js is set by an inline script in <head>) */
html:not(.js) body .reveal { opacity: 1 !important; transform: none !important; }
/* the hero is visible from the first paint: no reveal fade on top of the photo crossfade */
html body main section.cine-hero .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html body .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Logo strips: monochrome, one height, honest labels ---------- */
.pro-logos { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px 24px; align-items: center; padding: 18px 0; border-top: 1px solid var(--pro-line); }
.pro-logos + .pro-logos { border-top: 0; padding-top: 0; }
.pro-logos > span { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pro-muted); }
html[lang^="zh"] .pro-logos > span { letter-spacing: .04em; font-size: 12.5px; }
.pro-logos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.pro-logos img { height: 24px; width: auto; max-width: 132px; object-fit: contain; filter: grayscale(1); opacity: .72; display: block; }
/* optical sizing, proportional to the About page reference heights (DESIGN.md 6.9) */
.pro-logos img[src*="/isb."] { height: 27px; } .pro-logos img[src*="tsinghua"] { height: 26px; }
.pro-logos img[src*="harvard"], .pro-logos img[src*="brown"] { height: 23px; }
.pro-logos img[src*="apple"], .pro-logos img[src*="/yc."] { height: 22px; } .pro-logos img[src*="goldman"] { height: 21px; }
.pro-logos img[src*="caltech"], .pro-logos img[src*="microsoft"] { height: 17px; }
.pro-logos img[src*="kimi"] { height: 14px; } .pro-logos img[src*="mckinsey"], .pro-logos img[src*="deloitte"] { height: 13px; }
.pro-tools { overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.pro-tools ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; width: max-content; align-items: center; animation: pro-tools 46s linear infinite; }
.pro-tools li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pro-soft); white-space: nowrap; }
.pro-tools img { height: 22px; width: 22px; object-fit: contain; filter: grayscale(1); opacity: .8; }
@keyframes pro-tools { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .pro-tools ul { animation: none; flex-wrap: wrap; width: auto; } .pro-tools li[aria-hidden="true"] { display: none; } }
@media (max-width: 760px) { .pro-logos { grid-template-columns: 1fr; } .pro-logos ul { gap: 12px 22px; } }

/* ---------- Photo-led program heroes: a large real photo band under the hero copy ---------- */

.pro-photo.is-wide { aspect-ratio: 2 / 1; border-radius: 14px; }
.pro-photo.is-wide img { object-position: var(--focus, 50% 40%); }
@media (max-width: 760px) { .pro-photo.is-wide { aspect-ratio: 3 / 2; border-radius: 12px; } }

/* ---------- UX polish (RES-BRIEF, Oct 16) ---------- */
/* anchors land below the sticky nav and banner; smooth only when motion is welcome */
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* anchor landings clear the sticky nav: --scroll-offset (HERO2-BRIEF C) */
:root { --scroll-offset: 92px; }
@media (max-width: 760px) { :root { --scroll-offset: 68px; } }
html body :is([id], section) { scroll-margin-top: var(--scroll-offset); }

/* one visible focus ring everywhere */
html body :is(a, button, summary, [role="tab"], input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #2F55A8; outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .85); }
html body :is(.cine-hero, .footer, .el-cta, .pp-cta-band, .promo-bar) :is(a, button, summary):focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 5px rgba(11, 26, 74, .6); }

/* tap targets: small links and pills get a 44px hit area without changing their look */
/* (padding with matching negative margin: a bigger hit area, the same layout and look; the .tlink
   underline is a text-decoration on its label, so the padding never moves it) */
html body :is(.tlink, .footer-col a, .footer-contact a, .pg-hero-mail) { padding-block: 12px; margin-block: -12px; }
html body .promo-x { min-width: 44px; }
/* phrases marked to stay together in headings and ledes (they were unstyled) */
.m-nw { white-space: nowrap; }
/* secondary text links (contact rows, founder links, proof links): the .tlink underline, 1px and 3px
   under the text, faded in rather than popped */
html body :is(.footer-contact a, .hp-cf-links a:not(.tlink), .hc-direct a, .pg-proof-go, .pg-founder-links a) {
  text-decoration: underline 1px transparent; text-underline-offset: 3px; transition: text-decoration-color .25s ease, color .2s ease, opacity .2s ease; }
html body :is(.footer-contact a, .hp-cf-links a:not(.tlink), .hc-direct a, .pg-proof-go, .pg-founder-links a):is(:hover, :focus-visible) {
  text-decoration: underline 1px currentColor; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html body :is(.footer-contact a, .hp-cf-links a, .hc-direct a, .pg-proof-go, .pg-founder-links a) { transition: none; } }
html body .promo-link { min-height: 40px; }

/* forms: clear focus, invalid, loading, and success states */
html body form :is(input, select, textarea) { transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
html body form :is(input, select, textarea):focus { border-color: #2F55A8 !important; box-shadow: 0 0 0 3px rgba(47, 85, 168, .2) !important; outline: none; }
html body form :is(input, select, textarea):user-invalid { border-color: #B42318 !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .14) !important; }
html body form .cf-submit[disabled], html body form .cf-submit[aria-busy="true"] { opacity: .75; cursor: progress; }
html body .cf-status:not(:empty) { margin-top: 10px; font-size: 14px; color: #B42318; }
html body .pp-lead-done:not([hidden]) { animation: pro-in var(--dur-ui) var(--ease) both; }
@keyframes pro-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* the banner ticker runs on the compositor */
html body .promo-tm { will-change: transform; }
@media (prefers-reduced-motion: reduce) { html body .pp-lead-done:not([hidden]) { animation: none; } }

/* the winter banner's space is reserved before promo.js runs (html.promo-pending, set in <head>) */
html.promo-pending:not(.promo-bar-on) body { padding-top: 40px; }

/* ---------- Header: scrolls with the page (RES-BRIEF, Oct 16, 8:17pm) ----------
   Plain CSS sticky: the banner above it scrolls away normally, the nav sticks at the top.
   No JS-driven offset, no hide/show on scroll, no transition or transform on its position.
   (overflow-x: clip, not hidden, on html/body: hidden would turn body into a scroll container
   and break sticky.) Beats styles.css (fixed), newsletter.css (--nlb-off top), and the phone layer. */
html, html body { overflow-x: clip !important; }
html body .nav:not(#pro-nav) { position: sticky !important; top: 0 !important; left: auto; right: auto;
  transform: none !important; transition: background-color .2s ease !important; will-change: auto !important; z-index: 1000; }

/* ---------- Drift on framed photos (RES-BRIEF 8:18pm, MOTION2-BRIEF) ----------
   The hero's cinematic feel carried to the other large still photos (closing CTA, results cases, contact,
   school photo rows): a slow zoom and drift, transform only, ease-in-out, back and forth, at every width.
   Every wrapper clips (overflow: hidden) and the zoom always exceeds the drift, so no edge shows.
   Reduce Motion: the same, gentler (motion tokens), never switched off. */
@keyframes pro-drift { from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(var(--drift-tx, -2.5%), var(--drift-ty, -1.5%), 0) scale(var(--drift-scale, 1.07)); } }
html body :is(.pp-close-photo, .pg-case-media, .pro-photo, .pg-contact-photo) > img {
  animation: pro-drift var(--drift-dur, 22s) var(--ease-io, cubic-bezier(.45, 0, .55, 1)) infinite alternate both; }
html body :is(.pp-close-photo, .pg-case-media, .pro-photo, .pg-contact-photo):nth-of-type(even) > img { animation-delay: -9s; }
/* Pay page: its first section was padded to clear the old fixed nav; the nav is in the flow now */
html body main > .pay-sec:first-child { padding-top: clamp(40px, 5vw, 64px) !important; }

/* ---------- Sitewide whitespace pass (EDITORIAL-BRIEF item 5) ----------
   Tokens only (--section-y, --space-*, --measure). Above 760px; the phone layer keeps its own rhythm.
   Sections already on ds components (ds-section) set their own; heroes, the newsletter band, the photo
   gallery and the logo strips are left alone. */
@media (min-width: 761px) {
  html body main > section:not(.cine-hero):not(.hero):not(.nl-band):not(.gallery-strip):not(.ds-section):not([class*="strip"]):not([class*="band"]) {
    padding-block: var(--section-y) !important; }
  /* one-line proof rows and tight sections keep a shorter rhythm */
  html body main > section:is(.is-tight, :has(> .el-wrap > .el-proof-line:only-child)) { padding-block: var(--space-7) !important; }
  html body main :is(.sec-head, .el-head, .pc-head, .pg-head, .pc-proof-head):not(.ds-head) { margin-bottom: var(--space-7) !important; }
  html body main :is(.sec-head, .el-head, .pc-head, .pg-head) :is(.lede, p) { max-width: var(--measure-narrow); }
  html body main section:not(.cine-hero) :is(p.lede, .pg-lede, .el-lede, .pc-lede, .pp-close-sub, .card-p, .el-p, .pc-p) { max-width: var(--measure); }
  html body main :is(.pg-pcards, .el-grid, .el-cards, .pc-grid, .pc-cards, .pp-grid, .ap-pcards) { gap: var(--space-5) !important; }
}
