/* madchimp.id — shared styles: base, type, nav, buttons, ASCII, footer, page sections.
   Variables come from /css/tokens.css. Fonts: JetBrains Mono + IBM Plex Sans (OFL) from Google Fonts. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--bone); font: 400 16px/24px var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--royal-on-ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
.display { font: 800 72px/76px var(--mono); letter-spacing: -0.02em; margin: 0; }
.display.xl { font-size: 104px; line-height: 108px; }
.display.lg { font-size: 88px; line-height: 92px; }
.display.md { font-size: 64px; line-height: 68px; }
.display.sm { font-size: 56px; line-height: 62px; }
.h1 { font: 800 44px/48px var(--mono); letter-spacing: -0.015em; margin: 0; }
.h2 { font: 700 24px/30px var(--mono); letter-spacing: -0.005em; margin: 0; }
.h3 { font: 700 16px/22px var(--mono); margin: 0; }
.body-lg { font: 400 18px/28px var(--sans); margin: 0; }
.body { font: 400 16px/24px var(--sans); margin: 0; }
.body-sm { font: 400 14px/20px var(--sans); margin: 0; }
.label { font: 500 12px/16px var(--mono); letter-spacing: 0.06em; margin: 0; }
.data { font: 700 14px/18px var(--mono); margin: 0; }
.data.lg { font-size: 16px; line-height: 24px; }
@media (max-width: 760px) {
  .display, .display.xl, .display.lg, .display.md { font-size: 42px; line-height: 46px; }
  .display.sm { font-size: 32px; line-height: 36px; }
  .h1 { font-size: 32px; line-height: 36px; }
  .h2 { font-size: 20px; line-height: 26px; }
  .data.lg { font-size: 14px; line-height: 22px; }
}
.muted { color: var(--bone-muted); }
.accent { color: var(--royal-on-ink); }
.on-bone { background: var(--bone); color: var(--ink); }
.on-bone .muted { color: var(--ink-muted); }
.on-white { background: var(--white); color: var(--ink); }
.on-white .muted { color: var(--ink-muted); }
.hl { color: var(--royal); }

/* the cursor: a block, blinks about once a second */
.cursor { display: inline-block; width: 0.55em; height: 0.92em; background: var(--royal); vertical-align: -0.1em; margin-left: 0.06em; }
.cursor.bone { background: var(--bone); }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }

/* layout */
.wrap { padding: var(--pad-y) var(--gutter); }
.row { display: flex; gap: 64px; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack.tight { gap: 10px; }
@media (max-width: 760px) { .row { flex-direction: column; align-items: stretch; gap: 24px; } }
.rule-top { border-top: 1px solid var(--ink-line); }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 48px; border-bottom: 1px solid var(--ink-line); background: var(--ink); position: relative; z-index: 20; }
.wordmark { font: 800 24px/26px var(--mono); letter-spacing: -0.02em; color: var(--bone); text-decoration: none; display: inline-flex; align-items: center; }
.wordmark .cursor { width: 13px; height: 22px; vertical-align: 0; margin-left: 2px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font: 500 14px/16px var(--mono); letter-spacing: 0.06em; text-decoration: none; color: var(--bone); padding: 14px 0; }
.nav-links a[aria-current="page"]::before { content: "> "; }
.nav-links a:hover { color: var(--royal-on-ink); }
.nav-status { font: 500 12px/16px var(--mono); letter-spacing: 0.06em; color: var(--bone-muted); }
.menu-btn { display: none; font: 500 14px/16px var(--mono); letter-spacing: 0.06em; background: none; border: 0; color: var(--bone); padding: 14px 0; cursor: pointer; }
@media (max-width: 760px) {
  .nav { height: 60px; padding: 0 20px; }
  .wordmark { font-size: 19px; line-height: 21px; }
  .wordmark .cursor { width: 10px; height: 18px; }
  .menu-btn { display: block; }
  .nav-links { display: none; position: fixed; inset: 60px 0 0 0; background: var(--ink); flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px; }
  .nav-links a { font-size: 20px; line-height: 24px; padding: 14px 0; min-height: 44px; border-bottom: 1px solid var(--ink-line); }
  .nav-status { padding-top: 20px; }
  .nav.open .nav-links { display: flex; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 14px/18px var(--mono); padding: 14px 22px; text-decoration: none; border: 1.5px solid transparent; min-height: 44px; cursor: pointer; }
.btn.primary { background: var(--royal); color: var(--bone); }
.btn.primary:hover { background: #2552D6; }
.btn.ghost { border-color: var(--bone); color: var(--bone); background: transparent; }
.btn.ghost.on-light { border-color: var(--ink); color: var(--ink); }
.btn[aria-disabled="true"] { cursor: default; }
@media (max-width: 760px) { .btn.block-sm { width: 100%; } }

/* ascii art (live text) */
.ascii { font: 700 12px/1.2 var(--mono); white-space: pre; margin: 0; letter-spacing: 0; user-select: none; }
.ascii .b { color: var(--band); opacity: var(--band-o); }
.ascii .f { color: var(--fill); opacity: var(--fill-o); }
.ascii .t { color: #EFE9DF; opacity: var(--feat-o, 1); }
.ascii.on-ink { --band: #1D46C2; --band-o: 1; --fill: #1D46C2; --fill-o: .42; --feat-o: 1; }
.ascii.on-royal { --band: #99ACE4; --band-o: .62; --fill: #6E89D8; --fill-o: .5; --feat-o: .96; }
.ascii.on-sola { --band: #CAA0F2; --band-o: .62; --fill: #B477EC; --fill-o: .5; --feat-o: .96; }
.plate { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden; }
.plate.royal { background: var(--royal); }
.plate.sola { background: var(--sola); }
.plate.dark-royal { background: var(--royal-dark); }

/* sign-off footer */
.signoff { padding: 96px var(--gutter) 40px; border-top: 1px solid var(--ink-line); display: flex; flex-direction: column; gap: 40px; }
.signoff .links { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.signoff .links a { text-decoration: none; }
.signoff .links a:hover { color: var(--royal-on-ink); }
.signoff .giant { font: 800 clamp(60px, 15vw, 216px)/1 var(--mono); letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.05em; margin: 0; }
.signoff .giant .cursor { width: 0.55em; height: 0.88em; vertical-align: 0; }
.signoff .legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .signoff { padding: 56px 20px 32px; gap: 24px; } .signoff .links, .signoff .legal { flex-direction: column; } }

figure { margin: 0; }
figcaption { margin-top: 10px; }

/* ---------- home ---------- */
.hero { position: relative; min-height: 788px; overflow: hidden; padding: 40px var(--gutter) 48px 82px; }
.hero .tty { position: relative; z-index: 2; padding-left: 14px; }
.hero .ascii { position: absolute; right: -40px; top: -24px; font-size: 24.5px; z-index: 1; }
.hero .headline { position: relative; z-index: 2; margin-top: 76px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero .headline span { display: inline-block; background: var(--ink); padding: 4px 18px 8px 14px; font: 800 104px/108px var(--mono); letter-spacing: -0.02em; }
.hero .headline span.sel { background: var(--royal); }
.hero .log { position: relative; z-index: 2; margin-top: 28px; background: var(--ink); padding: 16px 20px 16px 14px; display: inline-flex; flex-direction: column; gap: 6px; font: 700 16px/24px var(--mono); }
.log .p { color: var(--royal-on-ink); }
.log .o { color: var(--bone); }
.log .m { color: var(--bone-muted); }
.tmux { display: flex; justify-content: space-between; align-items: center; background: var(--ink-raised); font: 700 14px/18px var(--mono); }
.tmux .win { display: flex; }
.tmux .win a { padding: 12px 14px; text-decoration: none; color: var(--bone-muted); }
.tmux .win a.on { color: var(--bone); }
.tmux .win .sess { background: var(--royal); color: var(--bone); padding: 12px 16px; }
.tmux .right { display: flex; gap: 20px; padding-right: 24px; font: 500 12px/16px var(--mono); letter-spacing: .06em; }
.marquee { background: var(--royal); overflow: hidden; white-space: nowrap; padding: 18px 0; }
.marquee .track { display: inline-flex; gap: 40px; font: 700 20px/28px var(--mono); animation: scroll 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }
.manifesto .text { font: 800 60px/70px var(--mono); letter-spacing: -0.015em; max-width: 1180px; margin: 0; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; border-top: 2px solid var(--ink); padding-top: 40px; }
.principles .idx { font: 800 64px/68px var(--mono); color: var(--royal); }
.viewsec { position: relative; min-height: 960px; overflow: hidden; }
.viewsec .text { position: relative; z-index: 2; max-width: 560px; }
.viewsec .globe-link { position: absolute; left: 720px; top: 70px; z-index: 1; text-decoration: none; }
pre.globe { font: 700 17.4px/1.2 var(--mono); white-space: pre; margin: 0; }
.g-land { color: rgba(239,233,223,.42); } .g-sea { color: #4A4A4A; } .g-ev { color: var(--royal-on-ink); }
.live-log .logrow { display: flex; gap: 20px; font: 700 14px/22px var(--mono); }
.live-log .head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.alert { color: var(--alert); }
.films .featured { position: relative; height: 760px; background: center 30% / cover no-repeat; }
.films .featured::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,15,15,0) 45%, rgba(15,15,15,.92)); }
.films .overlay { position: absolute; left: var(--gutter); bottom: 64px; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.films .ep { font: 800 120px/120px var(--mono); color: var(--royal-on-ink); }
.films .strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.films .poster { aspect-ratio: 16 / 9; background-position: center; background-size: cover; background-repeat: no-repeat; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.films .meta { display: flex; gap: 16px; margin-top: 14px; }
.sm-only { display: none; }
.films .meta .n { font: 800 40px/44px var(--mono); color: var(--royal-on-ink); }

/* medium widths (tablet, small laptop): the logo stacks above the headline, as on phone, but larger */
@media (min-width: 761px) and (max-width: 1279px) {
  .hero { min-height: 0; padding: 40px 48px 56px; display: flex; flex-direction: column; gap: 32px; }
  .hero .tty { padding-left: 0; }
  .hero .ascii { position: static; align-self: center; font-size: min(15px, calc((100vw - 96px) / 38.4)); }
  .hero .headline { margin-top: 0; gap: 12px; }
  .hero .headline span { font-size: 72px; line-height: 76px; }
  .hero .log { margin-top: 0; }
}

@media (max-width: 760px) {
  .hero { min-height: 0; padding: 24px 20px 40px; display: flex; flex-direction: column; gap: 24px; }
  .hero .tty { padding-left: 0; }
  .hero .ascii { position: static; font-size: min(8.72px, calc((100vw - 40px) / 38.4)); }
  .hero .headline { margin-top: 0; display: block; }
  .hero .headline span { display: inline; font-size: 48px; line-height: 58px; padding: 2px 10px 4px 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: transparent; }
  .hero .headline span.sel { padding-left: 8px; background: var(--royal); }
  .hero .log { margin-top: 0; padding: 0; font-size: 13px; line-height: 20px; }
  .tmux .win a:not(.on), .tmux .right span:not(:last-child) { display: none; }
  .tmux .right { padding-right: 14px; }
  .marquee { padding: 14px 0; } .marquee .track { font-size: 16px; line-height: 22px; gap: 32px; }
  .manifesto .text { font-size: 30px; line-height: 38px; }
  .principles { grid-template-columns: 1fr; gap: 0; border-top: 0; padding-top: 0; }
  .principles > div { border-top: 2px solid var(--ink); padding: 20px 0; }
  .principles .idx { font-size: 40px; line-height: 44px; }
  .viewsec { min-height: 0; }
  .viewsec .globe-link { position: static; display: block; margin: 8px 0; }
  pre.globe { font-size: min(6.6px, calc((100vw - 40px) / 52.8)); }
  .films .featured { height: 260px; margin: 0 20px; }
  .films .overlay { left: 12px; bottom: 12px; }
  .films .ep { font-size: 56px; line-height: 56px; }
  .films .overlay .h1, .films .overlay .ctl-note { display: none; }
  .sm-only { display: block; }
  .films .strip { display: flex; overflow-x: auto; gap: 14px; scroll-snap-type: x mandatory; }
  .films .strip > div { flex: 0 0 260px; scroll-snap-align: start; }
}

/* ---------- making ---------- */
.mk-hero figure, .mk-hero img { width: 660px; }
.mk-sec img.sq { width: 560px; }
.mk-sec .text { max-width: 600px; }
.full { width: 100%; height: 600px; object-fit: cover; }
.mk-30 figure { width: 480px; }
.tee img { width: 480px; }
@media (max-width: 760px) {
  .mk-hero figure, .mk-hero img, .mk-sec figure, .mk-sec img.sq, .mk-30 figure, .tee img { width: 100%; }
  .full { height: 240px; }
}

/* ---------- chimps ---------- */
.ch-hero .ascii { font-size: min(16.2px, calc((100vw - 144px) / 2 / 38.4)); }   /* half the width beside the text; a fixed 16.2px ran 106 px past the screen at 1024 */
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.types .plate .ascii { font-size: min(14.4px, calc((50vw - 140px) / 38.4)); }
.facegrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; }
.facegrid .plate .ascii { font-size: min(5.6px, calc((20vw - 60px) / 38.4)); }
.sola-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; }
.sola-row .plate .ascii { font-size: min(5.6px, calc((20vw - 60px) / 38.4)); }
.sola-sec { border-top: 4px solid var(--sola); }
.switch { display: inline-flex; border: 1px solid var(--ink-line); }
.switch button { font: 700 14px/18px var(--mono); padding: 13px 18px; background: none; border: 0; color: var(--bone-muted); cursor: pointer; min-height: 44px; }
.switch button[aria-pressed="true"] { background: var(--royal); color: var(--bone); }
.renders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.renders img, .renders .slot { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.renders .slot { background: var(--ink); display: flex; align-items: center; justify-content: center; }
.renders .slot .plate { width: 60%; }
.renders .slot .ascii { font-size: min(5.6px, calc((20vw - 60px) / 38.4)); }
@media (max-width: 760px) {
  .ch-hero .ascii { font-size: min(8.72px, calc((100vw - 40px) / 38.4)); }
  .types { grid-template-columns: 1fr 1fr; gap: 15px; }
  .types .plate .ascii { font-size: calc((50vw - 40px) / 40); }
  .facegrid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .facegrid .plate .ascii { font-size: calc((33vw - 30px) / 40); }
  .sola-row { display: flex; overflow-x: auto; gap: 12px; }
  .sola-row > div { flex: 0 0 140px; }
  .sola-row .plate .ascii { font-size: 3.4px; }
  .renders { grid-template-columns: 1fr; }
  .renders > :not(:first-child) { display: none; }
}
