/* Why Lab: Field Notes. Ink on grid paper, four highlighters, notebook cards. */
:root {
  --ink: #1F1D2B;
  --ink-soft: #3A3848;
  --muted: #4B4958;
  --paper: #F6F5F0;
  --grid: #E3E6EE;
  --white: #FFFFFF;
  --line: #D6D4DE;
  --lime: #D9F04A;
  --pink: #FFB3D1;
  --mint: #9BE8CF;
  --apricot: #FFC98A;
  --font-body: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --font-note: 'Kalam', 'Bradley Hand', 'Segoe Print', 'Comic Neue', 'Comic Sans MS', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--ink); }
a:hover { color: #000; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--lime); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Hidden honeypot field for Netlify forms */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Sticky header clears the phone's status bar */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }

/* Mobile menu */
.nav-toggle {
  display: none;
  font: inherit; font-weight: 700; font-size: 15px;
  min-height: 44px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: var(--white); color: var(--ink); cursor: pointer;
  align-items: center; gap: 8px;
}
.nav-toggle .bars { display: inline-flex; flex-direction: column; gap: 3px; }
.nav-toggle .bars span { display: block; width: 16px; height: 2px; background: var(--ink); }
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .site-nav .nav-links { display: none !important; width: 100%; flex-direction: column; align-items: flex-start !important; gap: 14px !important; padding-top: 8px; }
  .site-nav.open .nav-links { display: flex !important; }
}

/* Responsive overrides for the inline-styled layouts */
@media (max-width: 900px) {
  [style*="repeat(4, minmax(0, 1fr))"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  [style*="repeat(4, minmax(0, 1fr))"],
  [style*="repeat(2, minmax(0, 1fr))"] { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="grid-column: span 2"] { grid-column: 1 / -1 !important; }
}
/* Handwritten notes: never fall back to a fancy script font while Kalam loads */
[style*="Kalam"] { font-family: var(--font-note) !important; }
@media (max-width: 640px) {
  [style*="padding: 88px 24px"], [style*="padding: 96px 24px"], [style*="padding: 80px 24px"],
  [style*="padding: 72px 24px"], [style*="padding: 64px 24px"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  [style*="padding: 32px;"] { padding: 22px !important; }
}

/* Course map (Programs page) */
.cm { display: flex; flex-direction: column; gap: 22px; }
.cm-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.cm-eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cm-sub { margin: 8px 0 0; font-size: 15px; color: var(--ink-soft); }
.cm-sub a { font-weight: 700; }
.cm-more {
  display: flex; align-items: center; min-height: 44px; padding: 8px 10px; box-sizing: border-box;
  border: 1.5px dashed var(--ink); border-radius: 10px; font-size: 13px; font-weight: 700; line-height: 1.3;
  text-decoration: none; color: var(--ink); background: var(--paper);
}
.cm-more:hover { background: var(--lime); }
.cm-title { margin: 6px 0 0; font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; }
.cm-stages { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cm-stages-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cm-stage {
  font: inherit; font-weight: 700; font-size: 15px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer;
}
.cm-stage[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.cm-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.cm-found {
  flex: 999 1 420px; min-width: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  display: flex; gap: 14px; align-items: center; background: var(--lime);
  border: 2px solid var(--ink); border-radius: 14px; padding: 14px 18px; min-height: 56px;
}
.cm-found small { display: block; font-family: var(--font-mono); font-size: 12px; }
.cm-found strong { display: block; font-size: 18px; font-weight: 800; }
.cm-progress { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-progress-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.cm-progress-head span:last-child { font-family: var(--font-mono); font-size: 13px; }
.cm-bar { height: 14px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--white); }
.cm-bar-fill { height: 100%; width: 0; background: var(--lime); transition: width 0.25s ease; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 14px; align-items: start; }
.cm-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cm-col-head { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); min-height: 84px; }
@media (max-width: 520px) { .cm-col-head { min-height: 0; } }
.cm-col-name { align-self: flex-start; font-size: 14px; font-weight: 800; line-height: 1.2; border-radius: 5px; padding: 2px 6px; }
.cm-col-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cm-item {
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; display: flex; gap: 8px; align-items: flex-start;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; min-height: 44px;
}
.cm-item[aria-pressed="true"] { border-color: var(--ink); }
.cm-item span:last-child { font-size: 14px; line-height: 1.3; font-weight: 500; }
.cm-box {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; border: 2px solid var(--ink); border-radius: 5px;
  background: var(--white); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.cm-found .cm-box { width: 24px; height: 24px; border-radius: 6px; font-size: 15px; }
[aria-pressed="true"] > .cm-box { background: var(--ink); }
.cm-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; border-top: 2px dashed var(--ink); padding-top: 16px; }
.cm-foot-chip { font-weight: 800; font-size: 15px; border: 2px solid var(--ink); border-radius: 6px; padding: 1px 8px; }
.cm-foot p { margin: 0; font-size: 16px; color: var(--ink-soft); }
.cm-foot .cm-note { font-family: var(--font-note); font-size: 22px; color: var(--ink-soft); margin-left: auto; }

/* Video slots */
.vslot { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vslot-frame {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 100%; aspect-ratio: 16 / 9; box-sizing: border-box; padding: 0;
  border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; color: var(--ink);
  background-color: var(--white);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px; box-shadow: 6px 6px 0 var(--ink); font: inherit;
}
.vslot-frame.has-video { background-size: cover; background-position: center; cursor: pointer; }
.vslot-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vslot-label {
  position: absolute; top: 12px; left: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  background: var(--white); border: 1.5px solid var(--ink); border-radius: 6px; padding: 3px 8px;
}
.vslot-play {
  width: 76px; height: 76px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center; box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.2s ease;
}
.vslot-play svg { margin-left: 4px; }
.vslot-frame.has-video:hover .vslot-play, .vslot-frame.has-video:focus-visible .vslot-play { transform: scale(1.08) rotate(-4deg); }
.vslot-soon { position: absolute; bottom: 12px; right: 16px; font-family: var(--font-note); font-size: 20px; color: var(--ink-soft); transform: rotate(-2deg); }
.vslot-cap { font-size: 14px; color: var(--muted); padding-left: 4px; }
.vslot-compact .vslot-frame { border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); background-size: 12px 12px; }
.vslot-compact .vslot-frame.has-video { background-size: cover; }
.vslot-compact .vslot-play { width: 38px; height: 38px; box-shadow: 2px 2px 0 var(--ink); }
.vslot-compact .vslot-play svg { width: 16px; height: 16px; margin-left: 2px; }
.vslot-compact .vslot-label, .vslot-compact .vslot-soon { display: none; }
.stage-clip { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.stage-clip .vslot { flex: 0 0 150px; width: 150px; }
.stage-clip-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 16px; }
.stage-clip-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.stage-clip.playing { flex-direction: column; align-items: stretch; }
.stage-clip.playing .vslot { flex: 1 1 auto; width: 100%; max-width: 720px; }

/* Motion. Only runs when the html element has .motion (set in the head, skipped for reduced motion) */
html.motion .hl { background-size: 0% 100% !important; background-repeat: no-repeat !important; transition: background-size 0.9s cubic-bezier(0.6, 0.1, 0.2, 1); }
html.motion .hl.in { background-size: 100% 100% !important; }
html.motion .note { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s ease-out 0.35s; }
html.motion .note.in { clip-path: inset(0 0 0 0); }
html.motion .note.done { clip-path: none; }
html.motion .plan-row { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
html.motion .plan-row.in { opacity: 1; transform: none; }
html.motion .vslot-play { animation: vslot-nudge 3.2s ease-in-out 1.5s infinite; }
@keyframes vslot-nudge { 0%, 86%, 100% { transform: none; } 90% { transform: scale(1.1) rotate(-6deg); } 95% { transform: scale(0.97) rotate(3deg); } }
@keyframes cm-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.cm-box.pop { animation: cm-pop 0.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .cm-box.pop, .vslot-play { animation: none !important; } }

/* ---------- Programs page: chooser + program tabs ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.btn { text-decoration: none; padding: 14px 22px; border-radius: 12px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; border: 2px solid var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { color: var(--white); background: #000; }
.btn-light { background: var(--white); color: var(--ink); }

.chooser { padding: 64px 0 72px; }
.chooser .wrap { display: flex; flex-direction: column; gap: 18px; }
.chooser-title { margin: 0; font-size: clamp(44px, 6vw, 80px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.chooser-intro { margin: 0; font-size: 19px; line-height: 1.55; max-width: 680px; color: var(--ink-soft); }
.cc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.cc { background: var(--white); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); transform-origin: center; }
.cc-face { padding: 26px; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.cc-face[hidden] { display: none !important; }
.cc-tag { align-self: flex-start; font-family: var(--font-mono); font-size: 12px; background: var(--hl); border-radius: 6px; padding: 4px 9px; }
.cc-quote { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.cc-who { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-soft); flex: 1; }
.cc-pick { align-self: flex-start; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--hl); color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; padding: 12px 20px; min-height: 48px; box-shadow: 3px 3px 0 var(--ink); }
.cc-pick:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.cc-back-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cc-name { margin: 8px 0 0; font-size: clamp(34px, 4vw, 46px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.cc-note { display: block; font-size: 24px; color: var(--ink-soft); }
.cc-back-btn { font: inherit; font-size: 15px; font-weight: 600; background: none; border: 0; text-decoration: underline; cursor: pointer; color: var(--ink); padding: 8px 0; min-height: 44px; }
.cc-video { position: relative; aspect-ratio: 16 / 9; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--paper); max-width: 860px; width: 100%; }
.cc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cc-back-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; max-width: 860px; }
.cc-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
/* chosen state: the picked card takes the whole row, the others step aside */
.cc-grid.has-choice { grid-template-columns: minmax(0, 1fr); }
.cc-grid.has-choice .cc:not(.chosen) { display: none; }
.cc.flip-out { transition: transform 0.22s ease-in; transform: perspective(1200px) rotateY(90deg); }
.cc.flip-in { transform: perspective(1200px) rotateY(-90deg); }
.cc.flip-in.go { transition: transform 0.28s ease-out; transform: perspective(1200px) rotateY(0deg); }

.programs { background: var(--white); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 64px 0 72px; scroll-margin-top: 70px; }
.programs .wrap { display: flex; flex-direction: column; gap: 14px; }
.pt-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-tab { font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; padding: 11px 18px; min-height: 48px; }
.pt-tab[aria-selected="true"] { background: var(--hl); box-shadow: 3px 3px 0 var(--ink); }
.pt-swipe { margin: 0; font-size: 20px; color: var(--ink-soft); }
@media (hover: hover) and (pointer: fine) { .pt-swipe { display: none; } }
.pt-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 24px; align-items: flex-start; transition: height 0.3s ease; }
.pt-track::-webkit-scrollbar { display: none; }
.pt-panel { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.pt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.pt-head-text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pt-name { margin: 6px 0 0; font-size: clamp(40px, 5vw, 56px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.pt-note { display: block; font-size: 26px; color: var(--ink-soft); margin-top: -4px; }
.pt-desc { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 680px; }
.pt-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.pt-m0 { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; font-size: 16px; }
.pt-m0-chip { font-family: var(--font-mono); font-size: 12px; background: var(--lime); border-radius: 6px; padding: 4px 9px; }
.pt-tab-extra { background: var(--paper); border: 2px dashed var(--ink); border-radius: 16px; padding: 22px 24px; font-size: 17px; line-height: 1.6; max-width: 820px; }
.pt-tab-extra p { margin: 0 0 10px; }
.pt-tab-extra p:last-child { margin: 0; }
@media (max-width: 880px) {
  .cc-grid { grid-template-columns: minmax(0, 1fr); }
  .cc-quote { font-size: 22px; }
  .cc-face { padding: 22px; }
}

/* ---------- Homepage hero: what it is + intro video above the fold ---------- */
.hero { max-width: 1200px; margin: 0 auto; padding: 48px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head video" "body video"; column-gap: 48px; row-gap: 22px; align-items: start; }
.hero-head { grid-area: head; display: flex; flex-direction: column; gap: 16px; }
.hero-title { margin: 0; font-size: clamp(40px, 5.2vw, 66px); font-weight: 800; letter-spacing: -0.05em; line-height: 1.02; }
.hero-video { grid-area: video; display: flex; flex-direction: column; gap: 8px; align-self: center; min-width: 0; }
.hero-body { grid-area: body; display: flex; flex-direction: column; gap: 22px; }
.hero-lede { margin: 0; font-size: 19px; line-height: 1.55; color: var(--ink-soft); max-width: 580px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "video" "body"; padding-top: 32px; }
}
.walkaway { border-top: 2px dashed var(--ink); padding-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.walkaway-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; font-size: 18px; font-weight: 600; }
.walkaway-list > div { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .walkaway-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Stage photos ---------- */
.hello { display: flex; gap: 12px; align-items: center; padding-left: 4px; }
.hello img { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; flex-shrink: 0; }
.hello div { display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--ink-soft); }
.hello strong { color: var(--ink); font-size: 16px; }
.stage-card { overflow: hidden; }
.stage-photo { display: block; width: calc(100% + 56px); max-width: none; margin: -28px -28px 6px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 2px solid var(--ink); }
.cc-photo { display: block; width: calc(100% + 52px); max-width: none; margin: -26px -26px 4px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 2px solid var(--ink); border-radius: 16px 16px 0 0; }
@media (max-width: 880px) { .cc-photo { width: calc(100% + 44px); margin: -22px -22px 4px; } }
