/* Agentic Engineering 101 · landing. TAM-100 web (theam/brand-system 0.2.7): strict B&W through color roles,
   Neue Galano ExtraBold for the hero and primary section titles only, IBM Plex Mono for everything else,
   photography as threshold-binary 1-bit with visible pixel, no shadows, radii none/sm/pill. */

@font-face {
  font-family: 'Neue Galano';
  src: url('./fonts/NeueGalano-ExtraBold.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
  font-feature-settings: "ss01" 1;
}
@font-feature-values "Neue Galano" { @styleset { tam-canonical-a: 1; } }
@font-face { font-family: 'IBM Plex Mono'; src: url('./fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('./fonts/IBMPlexMono-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('./fonts/IBMPlexMono-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

/* color.roles · light is the piece default; hero, video and closing bands override to dark */
:root, [data-theme="light"] {
  --surface-primary: #FFFFFF; --surface-secondary: #F5F5F5;
  --text-primary: #000000; --text-secondary: #787878;
  --border-primary: #000000; --accent-link: #0000FF; --accent-focus: #FFD923;
  --signature: #707070;
}
[data-theme="dark"] {
  --surface-primary: #000000; --surface-secondary: #161b22;
  --text-primary: #FFFFFF; --text-secondary: #999999;
  --border-primary: #FFFFFF; --accent-link: #79C0FF; --accent-focus: #FFD923;
  --signature: #999999;
}
[data-theme] { background: var(--surface-primary); color: var(--text-primary); }

:root {
  --mono: 'IBM Plex Mono', monospace;
  --display: 'Neue Galano', 'Montserrat', sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --margin: 67px; --gutter: 30px; --max: 1440px;
}
@media (max-width: 1023px) { :root { --margin: 32px; --gutter: 24px; } }
@media (max-width: 639px) { :root { --margin: 16px; --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--mono); font-size: 20px; line-height: 30px; font-weight: 400; overflow-x: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent-link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--margin); top: -100px; z-index: 10; }
.skip:focus { top: var(--s4); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
.grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--gutter); }
.grid > * { min-width: 0; }

/* typography.display_scope: Galano only for the main headline and primary section titles */
.display { font-family: var(--display); font-weight: 800; font-feature-settings: normal; font-variant-alternates: styleset(tam-canonical-a); }
.h1 { font-size: clamp(40px, 15vw, 96px); line-height: 0.94; letter-spacing: -0.01em; }
@media (min-width: 1024px) { .h1 { font-size: clamp(72px, calc(9vw - 12px), 120px); } }
.h2 { font-size: 30px; line-height: 40px; }
@media (min-width: 1024px) { .h2 { font-size: 40px; line-height: 45px; } }
.dot { display: inline-block; vertical-align: -0.15em; margin-left: 0.02em; }  /* sub-brand naming bullet, baseline -0.15em */
.eyebrow { font-size: 14px; line-height: 20px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: var(--s2); }
.body-1 { font-size: 20px; line-height: 30px; }
.body-2 { font-size: 14px; line-height: 20px; }
.medium { font-weight: 500; }
.muted { color: var(--text-secondary); }

/* button · squared, 40 high, single line, Mono 14 title case */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 var(--s6);
  border-radius: 4px; font: 400 14px/1 var(--mono); white-space: nowrap; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: none; color: inherit; transition: background-color .15s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text-primary); color: var(--surface-primary); }
.btn-primary:hover { background: var(--text-secondary); }
.btn-primary:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 0; }
.btn-outline { border-color: var(--border-primary); color: var(--text-primary); }
.btn-outline:hover { background: var(--surface-secondary); }
.btn-outline:focus-visible { outline: none; border: 2px solid var(--accent-focus); }
.btn-text { padding: 0; height: 40px; color: var(--text-primary); }
.btn-text .arrow { margin-left: var(--s2); transition: transform .15s; }
.btn-text:hover { text-decoration: underline; }
.btn-text:hover .arrow { transform: translateX(4px); }
.btn-text:focus-visible { outline: none; text-decoration: underline 2px var(--accent-focus); text-underline-offset: 4px; }
.btn-hero { padding: 0 var(--s9); }
@media (max-width: 639px) { .btn-hero { padding: 0 var(--s6); } }

/* pill_tag · category */
.pill { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--s3); border: 1px solid var(--border-primary);
  border-radius: 999px; font-size: 14px; line-height: 20px; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* header */
.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); min-height: 96px; padding-top: var(--s5); padding-bottom: var(--s5); }
.wordmark { margin-right: auto; }
.mood { display: flex; align-items: center; gap: var(--s4); }
.btn-compact { padding: 0 var(--s5); }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.7; }
.ico { width: 16px; height: 16px; margin-right: var(--s2); flex: none; }
.mood-note { font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.mood-note a { color: inherit; }
.mood-note a:hover { color: var(--text-primary); }
@media (max-width: 1279px) { .mood-note { display: none; } }
.mood-float { position: fixed; right: var(--margin); bottom: calc(var(--s5) + env(safe-area-inset-bottom, 0px)); z-index: 20; }
.mood-float[hidden] { display: none; }
.btn-float { background: #000; color: #fff; border-color: #fff; }  /* reads on the black bands and on white */
.btn-float:hover { background: #161b22; }
.btn-float:focus-visible { outline: none; border: 2px solid var(--accent-focus); }
@media (max-width: 639px) { .mood { order: 3; width: 100%; } .mood .btn { width: 100%; } }
.wordmark { display: block; color: var(--text-primary); }
.wordmark svg { height: 40px; width: auto; }
.lang { display: flex; gap: var(--s4); font-size: 14px; line-height: 20px; text-transform: uppercase; letter-spacing: 0.05em; }
.lang a { color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.lang a[aria-current="true"] { color: var(--text-primary); }
.lang a:hover { color: var(--text-primary); }

/* hero · the Lab's split black band, the film square falling across it */
.hero { position: relative; padding: var(--s8) 0 0; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--band-tail, 160px); background: #FFFFFF; }
.hero .grid { position: relative; z-index: 1; align-items: end; }
.hero-copy { grid-column: 1 / span 4; padding-bottom: calc(var(--band-tail, 160px) + var(--s8)); }
.hero-copy .eyebrow { margin-bottom: var(--s5); }
.hero-copy .h1 { margin-bottom: var(--s6); }
.claim { font-size: 20px; line-height: 30px; font-weight: 500; margin-bottom: var(--s4); }
.lead { max-width: 34ch; margin-bottom: var(--s7); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5) var(--s6); }
.facts { margin-top: var(--s7); }
.hero-film { grid-column: 5 / span 4; justify-self: end; width: 100%; max-width: 600px; margin: 0; }
@media (max-width: 1023px) {
  .hero .grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { grid-column: 1; padding-bottom: var(--s8); }
  .hero-film { grid-column: 1; justify-self: start; max-width: 560px; }
}

/* film · a gray video thresholded live to 1-bit in a canvas (see main.js) */
.film { position: relative; aspect-ratio: 1 / 1; background: #000; overflow: hidden; border: 1px solid #000; }
.film canvas, .film img.poster { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.film video { display: none; }
.film .box { position: absolute; border: 0; pointer-events: none; opacity: 0; transition: opacity .2s; mix-blend-mode: difference; }
.film .box.on { opacity: 1; }
.film .box i { position: absolute; width: 18px; height: 18px; border: 2px solid #fff; }
.film .box i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.film .box i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.film .box i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.film .box i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.film .tag { position: absolute; pointer-events: none; opacity: 0; transition: opacity .2s; background: #fff; color: #000; border-color: #000; }
.film .tag.on { opacity: 1; }
.film-caption { margin-top: var(--s3); font-size: 14px; line-height: 20px; color: var(--text-secondary); }

/* ticker · lines from the song, short_titles_caps */
.ticker { border-top: 1px solid var(--border-primary); border-bottom: 1px solid var(--border-primary); overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker p { display: flex; gap: var(--s6); padding: var(--s4) var(--s6) var(--s4) 0; font-size: 14px; line-height: 20px; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.ticker p span[aria-hidden] { font-family: var(--display); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* sections */
.section { padding: var(--s10) 0; }
@media (max-width: 639px) { .section { padding: var(--s9) 0; } }
.section-head { grid-column: 1 / span 5; margin-bottom: var(--s8); }
.section-head .h2 { margin-top: 0; }
.prose { grid-column: 1 / span 5; display: grid; gap: var(--s5); max-width: 62ch; }
.aside { grid-column: 6 / span 3; }
@media (max-width: 1023px) { .section-head, .prose, .aside { grid-column: 1 / -1; } .aside { margin-top: var(--s8); } }

/* method · three loops and one bottleneck */
.loops { grid-column: 1 / span 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.loop { border-top: 1px solid var(--border-primary); padding-top: var(--s5); }
.loop .k { font-size: 14px; line-height: 20px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: var(--s3); }
.loop h3 { font-size: 20px; line-height: 30px; font-weight: 500; margin-bottom: var(--s2); }
.loop p { font-size: 14px; line-height: 20px; }
.loop .arrow { display: none; }
.bottleneck { grid-column: 1 / span 5; align-self: start; margin-top: var(--s7); padding: var(--s5) 0; border-top: 1px dashed var(--border-primary); border-bottom: 1px dashed var(--border-primary); display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: baseline; }
.bottleneck h3 { font-size: 20px; line-height: 30px; font-weight: 500; }
.bottleneck p { font-size: 14px; line-height: 20px; }
@media (max-width: 1023px) { .loops, .bottleneck { grid-column: 1 / -1; } }
@media (max-width: 639px) { .loops { grid-template-columns: 1fr; } .bottleneck { grid-template-columns: 1fr; gap: var(--s2); } }

/* syllabus */
.syllabus { grid-column: 1 / -1; }
.group { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--gutter); padding: var(--s6) 0; border-top: 1px solid var(--border-primary); }
.group:last-child { border-bottom: 1px solid var(--border-primary); }
.group-name { grid-column: 1 / span 2; font-size: 14px; line-height: 20px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); padding-top: 6px; }
.modules { grid-column: 3 / span 6; display: grid; gap: var(--s6); }
.module { display: grid; grid-template-columns: 64px 1fr; column-gap: var(--s5); }
.module .num { font-size: 30px; line-height: 40px; color: var(--text-secondary); }
.module h3 { font-size: 20px; line-height: 30px; font-weight: 500; }
.module .what { margin-top: var(--s1); }
.module .lab { margin-top: var(--s3); font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.module .lab b { font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em; margin-right: var(--s2); color: var(--text-primary); }
@media (max-width: 1023px) { .group-name { grid-column: 1 / -1; margin-bottom: var(--s5); } .modules { grid-column: 1 / -1; } }
@media (max-width: 639px) { .module { grid-template-columns: 48px 1fr; column-gap: var(--s3); } .module .num { font-size: 20px; line-height: 30px; } }

/* who it's for · comparable columns aligned from the top */
.cols { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.col { border-top: 1px solid var(--border-primary); padding-top: var(--s5); }
.col h3 { font-size: 20px; line-height: 30px; font-weight: 500; margin-bottom: var(--s3); }
.col p { font-size: 14px; line-height: 20px; }
.prereq { grid-column: 1 / span 5; margin-top: var(--s8); }
@media (max-width: 1023px) { .cols { grid-template-columns: 1fr; } .prereq { grid-column: 1 / -1; } }

/* how it works · callout inside the section */
.callout { grid-column: 1 / span 6; background: var(--surface-secondary); border-radius: 4px; padding: var(--s7); display: grid; gap: var(--s5); }
.callout h3 { font-size: 30px; line-height: 40px; font-weight: 500; }
@media (max-width: 1023px) { .callout { grid-column: 1 / -1; padding: var(--s6); } }
@media (max-width: 639px) { .callout { padding: var(--s5); } .callout h3 { font-size: 20px; line-height: 30px; } }

/* video */
.video { grid-column: 1 / span 6; }
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt .btn { position: absolute; left: var(--s5); bottom: var(--s5); }
.yt-note { margin-top: var(--s3); }
.listen { grid-column: 7 / span 2; align-self: end; }
.listen ul { display: grid; gap: var(--s2); margin-top: var(--s3); }
@media (max-width: 1023px) { .video, .listen { grid-column: 1 / -1; } .listen { margin-top: var(--s7); } }

/* closing band */
.closing { padding: var(--s10) 0; }
.closing .grid { align-items: center; }
.closing-copy { grid-column: 1 / span 4; display: grid; gap: var(--s5); align-content: start; }
.closing-copy .h2 { font-size: clamp(48px, 6vw, 96px); line-height: 0.96; }
.closing-film { grid-column: 6 / span 3; }
@media (max-width: 1023px) { .closing .grid { grid-template-columns: minmax(0, 1fr); } .closing-copy, .closing-film { grid-column: 1 / -1; } .closing-film { margin-top: var(--s8); max-width: 480px; } }

/* faq · disclosure integrated into the system */
.faq { grid-column: 1 / span 6; }
.faq details { border-top: 1px solid var(--border-primary); }
.faq details:last-child { border-bottom: 1px solid var(--border-primary); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s5); padding: var(--s5) 0; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: none; text-decoration: underline 2px var(--accent-focus); text-underline-offset: 6px; }
.faq .answer { padding: 0 0 var(--s5); max-width: 62ch; font-size: 14px; line-height: 20px; }
@media (max-width: 1023px) { .faq { grid-column: 1 / -1; } }

/* footer */
.site-footer { padding: var(--s8) 0 var(--s7); border-top: 1px solid var(--border-primary); }
.site-footer .wrap { display: grid; gap: var(--s5); }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.site-footer a { color: var(--signature); text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); }
@media (hover: none) { .site-footer a { text-decoration: underline; } }
.site-footer p, .site-footer li { font-size: 14px; line-height: 20px; color: var(--signature); }

/* legal page */
.legal { padding: var(--s9) 0 var(--s10); }
.legal .doc { max-width: 72ch; display: grid; gap: var(--s5); }
.legal h1 { margin-bottom: var(--s5); }
.legal h2 { font-size: 20px; line-height: 30px; font-weight: 500; margin-top: var(--s7); }
.legal p, .legal li { font-size: 14px; line-height: 20px; }
.legal ul { list-style: disc; padding-left: var(--s5); display: grid; gap: var(--s2); }
.legal table { border-collapse: collapse; font-size: 14px; line-height: 20px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4) var(--s3) 0; border-top: 1px solid var(--border-primary); }
.legal th { font-weight: 500; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .btn, .btn-text .arrow, .film .box, .film .tag { transition: none; }
}
