/* Tomato homepage. Source of truth: docs/redesign/tomato-homepage-mockup.html (1440px wide). */

@font-face{font-family:'Big Shoulders Display';font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/big-shoulders-display-latin.woff2) format('woff2')}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/hanken-grotesk-latin.woff2) format('woff2')}
@font-face{font-family:'Courier Prime';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/courier-prime-400-latin.woff2) format('woff2')}
@font-face{font-family:'Courier Prime';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/courier-prime-700-latin.woff2) format('woff2')}

:root{
  --tomato:#C42A18;
  --ink:#FFFFFF;
  --butter:#FFE7A3;
  --file-ink:#1F1A17;
  --ink-88:rgba(255,255,255,.88);
  --ink-60:rgba(255,255,255,.6);
  --panel:rgba(203,68,52,.84);
  --base:#7F1B10;
  --display:'Big Shoulders Display',Impact,sans-serif;
  --body:'Hanken Grotesk',ui-sans-serif,system-ui,sans-serif;
  --mono:'Courier Prime','Courier New',ui-monospace,monospace;
  --gutter:clamp(16px,3.9vw,56px);
  --section:clamp(72px,8.4vw,120px);
  --rule:2px solid var(--ink);
  --ease:cubic-bezier(.2,.8,.2,1);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body{margin:0;background:var(--tomato);color:var(--ink);font-family:var(--body);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
h1,h2,h3,p,figure,blockquote,dl,dd{margin:0}
img{display:block;max-width:100%;height:auto}
::selection{background:var(--butter);color:var(--tomato)}
:focus-visible{outline:3px solid var(--butter);outline-offset:4px}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
.accent{color:var(--butter)}
.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}
.wrap{width:100%;max-width:1440px;margin-inline:auto;padding-inline:var(--gutter)}
.skip{position:absolute;left:16px;top:-80px;z-index:10;padding:12px 20px;border-radius:999px;background:var(--butter);color:var(--tomato);font-weight:700;text-decoration:none}
.skip:focus{top:12px}

/* Shared pieces */
.pill{display:inline-flex;align-items:center;justify-content:center;gap:.3em;border-radius:999px;background:var(--butter);color:var(--tomato);font-weight:700;text-decoration:none;white-space:nowrap;transition:background-color .15s,color .15s}
.pill:hover{background:var(--ink);color:var(--tomato)}
.pill-sm{min-height:44px;padding:0 18px;font-size:15px;font-weight:600}
.pill-lg{min-height:60px;padding:0 30px;font-size:19px}
.pill-xl{min-height:68px;padding:0 36px;font-size:22px;background:var(--tomato);color:var(--butter)}
.pill-xl:hover{background:var(--file-ink);color:var(--butter)}
.text-link{display:inline-flex;align-items:center;gap:.3em;min-height:44px;font-size:17px;font-weight:600;color:var(--ink);text-underline-offset:5px}
.text-link:hover{color:var(--butter)}
.display-xl{font:900 clamp(60px,8.4vw,120px)/.86 var(--display);text-transform:uppercase}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:48px}
.section-intro{max-width:440px;font-size:19px;line-height:1.5;color:var(--ink-88)}
.label{font-size:14px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--butter)}

/* Header */
.site-header{border-bottom:var(--rule)}
.header-inner{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.logo{font:900 36px/1 var(--display);color:var(--ink);text-decoration:none}
.logo span{color:var(--butter)}
.status{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.status-dot{width:10px;height:10px;flex-shrink:0;border-radius:999px;background:var(--butter)}
.nav{display:flex;align-items:center;gap:28px;font-size:15px;font-weight:600}
.nav-link{display:inline-flex;align-items:center;min-height:44px;color:var(--ink);text-decoration:none}
.nav-link:hover{color:var(--butter)}

/* Hero */
.hero{position:relative;min-height:828px;display:flex;align-items:center;overflow-x:clip}
.hero-copy{position:relative;z-index:1;width:600px;display:flex;flex-direction:column;gap:24px}
.eyebrow{font-size:14px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-88)}
.hero h1{font:900 90px/.86 var(--display);letter-spacing:.005em;text-transform:uppercase}
.hero-lede{max-width:540px;font-size:28px;font-weight:600;line-height:1.12;letter-spacing:-.015em;color:var(--butter)}
.hero-note{max-width:470px;font-size:17px;line-height:1.55;color:var(--ink-88)}
.arrow-down{display:none}
.hero-actions{display:flex;align-items:center;flex-wrap:wrap;gap:16px 28px}

/* Hero 3D: a 560x380 plane with five layers. .is-open (set by hero.js) spreads them apart. */
.stack-3d{position:absolute;top:0;bottom:0;right:0;left:calc(var(--gutter) + 564px);perspective:2600px;perspective-origin:50% 45%;pointer-events:none}
.plane{position:absolute;left:50%;top:70%;width:560px;height:380px;margin:-190px 0 0 -280px;transform-style:preserve-3d;transform:rotateX(57deg) rotateZ(-40deg);animation:orbit 16s ease-in-out infinite}
@keyframes orbit{0%,100%{transform:rotateX(57deg) rotateZ(-47deg)}50%{transform:rotateX(53deg) rotateZ(-31deg)}}
.layer{position:absolute;inset:0;border:2px solid var(--ink-60);border-radius:22px;background:var(--panel);transform:translateZ(var(--z));transition:transform 1100ms var(--ease) var(--delay)}
.is-open .layer{transform:translateZ(var(--z-open))}
.layer-base{--z:0px;--z-open:0px;--delay:0ms;border-color:rgba(255,255,255,.22);background-color:var(--base);background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:28px 28px}
.layer-office{--z:12px;--z-open:100px;--delay:60ms}
.layer-tech{--z:24px;--z-open:200px;--delay:140ms}
.layer-pool{--z:36px;--z-open:300px;--delay:220ms}
.layer-cal{--z:48px;--z-open:400px;--delay:300ms;inset:auto;left:150px;top:130px;width:260px;height:120px;border:0;border-radius:20px;background:var(--butter);color:var(--tomato);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
.cal-name{font:900 50px/1 var(--display)}
.cal-note{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.base-label{position:absolute;left:22px;right:22px;bottom:16px;display:flex;align-items:baseline;justify-content:space-between}
.base-name{font:900 38px/1.2 var(--display);text-transform:uppercase}
.base-note{font-size:13px;font-weight:600;color:rgba(255,255,255,.82)}
.layer-title{position:absolute;left:22px;top:18px;display:flex;flex-direction:column;gap:2px}
.layer-title span:first-child{font-size:19px;font-weight:700;color:var(--butter)}
.layer-title span:last-child{font-size:13px;font-weight:500;color:rgba(255,255,255,.86)}
.office-bars{position:absolute;left:22px;top:84px;bottom:22px;width:92px;display:flex;flex-direction:column;gap:14px}
.office-bars span{height:10px;border-radius:5px;background:rgba(255,255,255,.45)}
.office-bars span:nth-child(1){width:100%;background:var(--butter)}
.office-bars span:nth-child(2){width:80%}
.office-bars span:nth-child(3){width:90%}
.office-bars span:nth-child(4){width:70%}
.office-bars span:nth-child(5){width:85%}
.office-map{position:absolute;left:132px;top:84px}
.map-bg{fill:rgba(0,0,0,.2)}
.map-grid{stroke:rgba(255,255,255,.12);stroke-width:2}
.map-route{fill:none;stroke:var(--butter);stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.stop-done{fill:var(--butter)}
.stop-now{fill:var(--ink)}
.stop-next{fill:none;stroke:var(--ink);stroke-width:3}
.tech-stops{position:absolute;left:22px;right:22px;top:84px;display:flex;flex-direction:column;gap:12px}
.tech-stop{height:52px;padding:0 16px;border-radius:12px;background:rgba(255,255,255,.1);display:flex;align-items:center;gap:14px}
.tech-check{width:22px;height:22px;flex-shrink:0;border-radius:50%;background:var(--butter)}
.tech-line{height:10px;border-radius:5px;background:rgba(255,255,255,.45)}
.tech-tag{margin-left:auto;width:64px;height:22px;border-radius:11px;background:rgba(255,255,255,.18)}
.tech-stop.is-current{border:2px solid var(--butter);background:rgba(255,255,255,.14)}
.is-current .tech-check{background:none;border:3px solid var(--butter)}
.is-current .tech-line{background:var(--ink)}
.is-current .tech-tag{background:var(--butter)}
.is-next .tech-check{background:none;border:2px solid rgba(255,255,255,.5)}
.w-160{width:160px}.w-190{width:190px}.w-210{width:210px}.w-230{width:230px}
.pool-ring{position:absolute;left:22px;top:100px}
.ring-track{fill:none;stroke:rgba(255,255,255,.2);stroke-width:18}
.ring-value{fill:none;stroke:var(--butter);stroke-width:18;stroke-linecap:round;stroke-dasharray:320 440}
.ring-core{fill:rgba(255,255,255,.12)}
.pool-lines{position:absolute;left:236px;right:22px;top:104px;display:flex;flex-direction:column;gap:18px}
.pool-pair{display:flex;flex-direction:column;gap:8px}
.pool-key{height:8px;border-radius:4px;background:rgba(255,255,255,.4)}
.pool-val{height:14px;border-radius:7px;background:rgba(255,255,255,.7)}
.w-35p{width:35%}.w-40p{width:40%}.w-75p{width:75%}.w-90p{width:90%}
.pool-buttons{display:flex;align-items:center;gap:10px;padding-top:10px}
.pool-pay{width:110px;height:34px;border-radius:17px;background:var(--butter)}
.pool-alt{width:90px;height:34px;border-radius:17px;border:2px solid rgba(255,255,255,.55)}
/* Connectors stand up out of the plane: rotateX(90deg) turns their height into depth. */
.wire{position:absolute;width:2px;height:36px;background:var(--ink-60);transform-origin:top center;transform:rotateX(90deg);transition:height 1100ms var(--ease)}
.is-open .wire{height:300px}
.wire-left{left:36px;top:344px}
.wire-right{left:522px;top:34px}
.wire-cal{left:279px;top:190px;height:12px;background:var(--butter);transform:translateZ(36px) rotateX(90deg);transition:transform 1100ms var(--ease) 220ms,height 1100ms var(--ease) 300ms}
.is-open .wire-cal{height:100px;transform:translateZ(300px) rotateX(90deg)}
.packet{position:absolute;width:12px;height:12px;border-radius:3px;background:var(--butter);box-shadow:0 0 14px var(--butter);opacity:0}
.packet-up{left:31px;top:339px}
.packet-down{left:517px;top:29px;background:var(--ink);box-shadow:0 0 14px var(--ink)}
.packet-cal{left:274px;top:185px}
.is-open .up-1{animation:rise 2.8s linear 1.1s infinite}
.is-open .up-2{animation:rise 2.8s linear 2.5s infinite}
.is-open .down-1{animation:rise 2.8s linear 1.4s infinite reverse}
.is-open .down-2{animation:rise 2.8s linear 2.8s infinite reverse}
.is-open .packet-cal{animation:to-cal 1.9s ease-in-out 1.6s infinite}
@keyframes rise{0%{transform:translateZ(0);opacity:0}12%{opacity:1}88%{opacity:1}100%{transform:translateZ(300px);opacity:0}}
@keyframes to-cal{0%{transform:translateZ(300px);opacity:0}15%{opacity:1}85%{opacity:1}100%{transform:translateZ(400px);opacity:0}}
.is-paused .plane,.is-paused .packet{animation-play-state:paused}

/* Phones and tablets: the same stack, flat and still. */
.stack-flat{display:none;flex-direction:column;gap:16px;max-width:480px}
.flat{position:relative;padding:14px 18px;border:2px solid var(--ink-60);border-radius:14px;background:var(--panel);display:flex;flex-direction:column;gap:2px}
.flat-name{font-size:19px;font-weight:700;color:var(--butter)}
.flat-note{font-size:13px;font-weight:500;color:var(--ink)}
.flat+.flat::before,.flat+.flat::after{content:"";position:absolute;top:-18px;width:2px;height:16px;background:var(--ink-60)}
.flat+.flat::before{left:26px}
.flat+.flat::after{right:26px}
.flat-after-cal::before{left:calc(50% - 1px);background:var(--butter)}
.flat-after-cal::after{display:none}
.flat-cal{border-color:var(--butter);background:var(--butter);flex-direction:row;align-items:baseline;justify-content:center;gap:14px}
.flat-cal .flat-name{font:900 38px/1 var(--display);color:var(--tomato)}
.flat-cal .flat-note{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--tomato)}
.flat-base{border-color:rgba(255,255,255,.22);background-color:var(--base);background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:28px 28px;flex-direction:row;align-items:baseline;justify-content:space-between}
.flat-base .flat-name{font:900 30px/1.1 var(--display);text-transform:uppercase;color:var(--ink)}
.flat-base .flat-note{font-weight:600;color:rgba(255,255,255,.82)}

/* Proof strip */
.proof-grid{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:var(--rule);border-bottom:var(--rule)}
.proof-item{padding:40px 32px 44px;display:flex;flex-direction:column;gap:10px}
.proof-item:first-child{padding-left:0}
.proof-item+.proof-item{border-left:var(--rule)}
.proof-figure{font:900 clamp(56px,6.1vw,88px)/.9 var(--display);color:var(--butter)}
.proof-text{font-size:18px;line-height:1.45;color:var(--ink-88)}

/* Sound familiar? */
.problems{padding-top:var(--section);display:flex;flex-direction:column;gap:40px}
.problem-list{margin:0;padding:0;list-style:none;border-bottom:var(--rule)}
.problem{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:48px;padding:36px 0;border-top:var(--rule)}
.problem-quote{font-size:clamp(26px,2.8vw,40px);font-weight:600;line-height:1.1;letter-spacing:-.015em}
.problem-answer{display:flex;flex-direction:column;gap:8px;padding-top:6px}
.problem-answer p:last-child{font-size:20px;line-height:1.5}

/* Work */
.work{padding-top:var(--section)}
.work-head{display:flex;justify-content:space-between;align-items:baseline;padding-bottom:20px;font-size:15px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.work-head h2{font:inherit}
.work-list{margin:0;padding:0;list-style:none;border-bottom:var(--rule)}
.work-row{display:flex;align-items:center;gap:32px;min-height:150px;border-top:var(--rule);color:var(--ink);text-decoration:none}
.work-title{flex-grow:1;font:900 clamp(52px,7.8vw,112px)/.9 var(--display);text-transform:uppercase;transition:color .15s}
.work-desc{width:360px;flex-shrink:0;font-size:19px;line-height:1.4}
.work-arrow{font-size:44px;font-weight:600;color:var(--butter);transition:transform .2s var(--ease)}
.work-row:hover .work-title{color:var(--butter)}
.work-row:hover .work-arrow{transform:translate(4px,-4px)}

/* Before Cannonball: case files */
.files{padding-top:var(--section);display:flex;flex-direction:column;gap:48px}
.files-heading{display:flex;flex-direction:column;gap:18px}
.file-kicker{font:700 15px/1.3 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--butter)}
.files-intro{max-width:460px;font-size:22px;font-weight:600;line-height:1.35}
.file-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.file{position:relative;padding:26px 28px 22px;border-radius:6px;background:var(--butter);color:var(--file-ink);box-shadow:0 18px 40px rgba(40,6,2,.28);display:flex;flex-direction:column;gap:14px}
.file:nth-child(1){transform:rotate(-.6deg)}
.file:nth-child(2){transform:rotate(.4deg)}
.file:nth-child(3){transform:rotate(-.3deg)}
.file:nth-child(4){transform:rotate(.5deg)}
.file:nth-child(5){transform:rotate(-.5deg)}
.file-label{min-height:40px;padding-right:150px;display:flex;align-items:center;font:700 14px/1.3 var(--mono);letter-spacing:.06em;text-transform:uppercase}
.stamp{position:absolute;top:18px;right:18px;padding:3px 10px;border:3px solid var(--tomato);border-radius:4px;color:var(--tomato);font:900 24px/1 var(--display);letter-spacing:.06em;text-transform:uppercase;transform:rotate(-9deg)}
.file h3{font:900 42px/.92 var(--display);text-transform:uppercase}
.file dl{display:flex;flex-direction:column}
.file dl div{display:flex;gap:14px;padding:9px 0;border-top:1px dashed rgba(31,26,23,.35)}
.file dt{width:88px;flex-shrink:0;padding-top:2px;font:700 13px/1.3 var(--mono);letter-spacing:.04em;text-transform:uppercase}
.file dd{font:15px/1.45 var(--mono)}
.redact{display:inline-block;height:.95em;vertical-align:-.14em;border-radius:2px;background:var(--file-ink);forced-color-adjust:none}
.redact-butter{background:var(--butter)}
.w-40{width:40px}.w-60{width:60px}.w-70{width:70px}.w-90{width:90px}.w-120{width:120px}.w-140{width:140px}.w-170{width:170px}
.file-more{padding:26px 28px;border:3px dashed var(--butter);border-radius:6px;color:var(--ink);text-decoration:none;display:flex;flex-direction:column;justify-content:space-between;gap:20px;transition:background-color .15s}
.file-more:hover{background:rgba(255,231,163,.1)}
.file-more-label{font:700 14px/1.3 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--butter)}
.file-more-title{font:900 54px/.9 var(--display);text-transform:uppercase}
.file-more-note{font-size:19px;line-height:1.45;color:var(--ink-88)}
.file-more-cta{font-weight:700;color:var(--butter);white-space:nowrap}

/* Quote */
.quote{padding-top:var(--section)}
.quote figure{max-width:1120px;display:flex;flex-direction:column;gap:24px}
.quote blockquote{font-size:clamp(46px,6.1vw,88px);font-weight:600;line-height:1.02;letter-spacing:-.025em}
.quote figcaption{font-size:18px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--butter)}

/* How it works */
.how{padding-top:var(--section);display:flex;flex-direction:column;gap:40px}
.steps{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.step{padding:32px;border:var(--rule);border-radius:16px;display:flex;flex-direction:column;gap:14px}
.step-num{font:900 64px/.9 var(--display);color:var(--butter)}
.step h3{font-size:28px;font-weight:700;letter-spacing:-.01em}
.step p{font-size:18px;line-height:1.55;color:var(--ink-88)}

/* About */
.about{padding-block:var(--section);display:flex;align-items:center;gap:64px}
.about-photo{position:relative;width:420px;height:480px;flex-shrink:0;padding:24px 18px 40px;border-radius:16px;background:var(--butter);overflow:hidden;display:flex;align-items:flex-end;justify-content:center}
.about-sun{position:absolute;top:36px;left:36px;width:120px;height:120px;fill:var(--tomato);stroke:var(--tomato);stroke-width:4;stroke-linecap:round}
.about-copy{flex-grow:1;display:flex;flex-direction:column;gap:24px}
.about-copy h2{font-size:clamp(38px,4.45vw,64px);font-weight:600;line-height:1.02;letter-spacing:-.025em}
.about-copy p{max-width:720px;font-size:19px;line-height:1.55;color:var(--ink-88)}
.github-link{align-self:flex-start;display:inline-flex;align-items:center;gap:.3em;min-height:44px;font-size:17px;font-weight:700;color:var(--butter);text-underline-offset:5px}
.github-link:hover{color:var(--ink)}

/* Contact and footer: the butter block */
.contact,.site-footer{background:var(--butter);color:var(--tomato)}
.contact :focus-visible,.site-footer :focus-visible{outline-color:var(--file-ink)}
.contact-inner{padding-top:clamp(64px,6.7vw,96px);padding-bottom:clamp(56px,5vw,72px);display:flex;flex-direction:column;gap:28px}
.contact h2{font:900 clamp(54px,10.4vw,150px)/.86 var(--display);text-transform:uppercase}
.contact-note{max-width:700px;font-size:22px;font-weight:600;line-height:1.4}
.contact-actions{display:flex;align-items:center;flex-wrap:wrap;gap:16px 28px}
.contact-email{display:inline-flex;align-items:center;min-height:44px;font-size:22px;font-weight:700;color:var(--tomato);text-underline-offset:5px}
.contact-email:hover,.footer-inner a:hover{color:var(--file-ink)}
.footer-inner{min-height:80px;border-top:2px solid var(--tomato);display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:15px;font-weight:600}
.footer-inner a{display:inline-flex;align-items:center;gap:.3em;min-height:44px;color:var(--tomato)}

/* Project pages (built by scripts/build-pages.mjs): headline on the left, story on the right. */
.project-head{padding-top:clamp(28px,3.9vw,56px);padding-bottom:clamp(40px,4.2vw,60px);display:flex;flex-direction:column;align-items:flex-start;gap:22px}
.back-link{display:inline-flex;align-items:center;gap:.4em;min-height:44px;font-size:14px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink);text-decoration:none}
.back-link:hover{color:var(--butter)}
.project-head h1{font:900 clamp(64px,10.4vw,150px)/.86 var(--display);text-transform:uppercase}
.project-lede{max-width:880px;font-size:clamp(24px,2.5vw,36px);font-weight:600;line-height:1.15;letter-spacing:-.015em;color:var(--butter)}
.project-deck{max-width:720px;font-size:19px;line-height:1.55;color:var(--ink-88)}
.project-head .pill{margin-top:6px}
.project-hero img{width:100%;border-radius:16px;box-shadow:0 18px 40px rgba(40,6,2,.28)}
.project-hero figcaption{margin-top:12px;font-size:14px;color:var(--ink-88)}
.chapters{padding-top:var(--section)}
.chapter{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);grid-template-rows:auto 1fr;column-gap:48px;padding:40px 0 clamp(56px,5.6vw,80px);border-top:var(--rule)}
.chapter h2{grid-row:1 / span 2;align-self:start;position:sticky;top:24px;font-size:clamp(28px,2.8vw,40px);font-weight:600;line-height:1.1;letter-spacing:-.015em}
.chapter-text{grid-column:2;grid-row:1;max-width:680px;display:flex;flex-direction:column;gap:16px}
.chapter-text p{font-size:19px;line-height:1.55;color:var(--ink-88)}
.chapter-media{grid-column:2;grid-row:2;margin-top:36px}
.text-links{display:flex;flex-wrap:wrap;gap:4px 28px}
.shots{display:flex;flex-direction:column;gap:28px}
.shots-phone{flex-direction:row;flex-wrap:wrap;gap:24px}
.shots-phone .shot{width:min(300px,calc(50% - 12px))}
.shot-link{position:relative;display:block;border-radius:14px}
.shot img{width:100%;border-radius:14px;box-shadow:0 18px 40px rgba(40,6,2,.28)}
.shots-phone .shot-link,.shots-phone .shot img{border-radius:28px}
.shot-link::after{content:"Enlarge ↗";position:absolute;right:12px;bottom:12px;padding:8px 14px;border-radius:999px;background:var(--butter);color:var(--tomato);font-size:14px;font-weight:700;opacity:0;transition:opacity .15s}
.shot-link:hover::after,.shot-link:focus-visible::after{opacity:1}
.pipeline{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.pipeline li{padding:24px;border:var(--rule);border-radius:16px;display:flex;flex-direction:column;gap:8px}
.pipeline strong{font-size:22px;font-weight:700}
.pipeline span{font-size:16px;line-height:1.5;color:var(--ink-88)}
.more-work .work-row{min-height:120px}
.more-work .work-title{font-size:clamp(48px,5.6vw,80px)}

/* Ask3D model viewer (scripts/partials/model.html, public/model.js): a butter stage. */
#model-example{scroll-margin-top:24px}
.model-stage{height:550px;padding:24px 24px 0;border-radius:16px;background:var(--butter);color:var(--file-ink);display:flex;flex-direction:column}
.model-stage :focus-visible{outline-color:var(--file-ink)}
.model-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.model-brand{font:900 40px/1 var(--display);text-transform:uppercase}
.model-brand>span{color:var(--tomato)}
.model-top button,.model-controls button{min-height:44px;padding:0 18px;border-radius:999px;background:var(--tomato);color:var(--butter);font-size:15px;font-weight:700;white-space:nowrap}
.model-top button:hover,.model-controls button:hover,.model-top button[aria-pressed=true]{background:var(--file-ink)}
.model-top button:disabled,.model-controls button:disabled{opacity:.5;cursor:default}
.canvas-wrap{flex:1;position:relative;min-height:0;margin:0 -24px}
#model{width:100%;height:100%;display:block;touch-action:pan-y;cursor:grab}
#model.dragging{cursor:grabbing;touch-action:none}
.model-loading{position:absolute;inset:40% 0 auto;text-align:center;font-size:15px;pointer-events:none}
.model-controls,.model-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;font:700 13px/1.3 var(--mono);letter-spacing:.04em}
.model-controls{padding-bottom:16px}
.model-bottom{min-height:48px;border-top:1px dashed rgba(31,26,23,.35);text-transform:uppercase}

@media (max-width:900px){
  .chapter{grid-template-columns:minmax(0,1fr);grid-template-rows:none;row-gap:16px;padding-top:32px}
  .chapter h2{grid-row:auto;position:static}
  .chapter-text,.chapter-media{grid-column:auto;grid-row:auto}
  .chapter-media{margin-top:16px}
  .pipeline{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
  .project-deck,.chapter-text p{font-size:17px}
  .model-stage{height:460px;padding:18px 18px 0}
  .canvas-wrap{margin:0 -18px}
  .model-brand{font-size:32px}
  .model-controls{flex-wrap:wrap}
}

/* Narrower desktops: shrink the 3D view (about 726x653 at full size) so it clears the
   headline and keeps 16px from the edge at the narrowest width of each step. */
@media (max-width:1439px){
  .stack-3d{transform:scale(.94);transform-origin:50% 70%}
}
@media (max-width:1365px){
  .stack-3d{transform:scale(.84)}
}
@media (max-width:1279px){
  .hero-copy{width:540px}
  .hero h1{font-size:80px}
  .stack-3d{left:calc(var(--gutter) + 504px);transform:scale(.8)}
  .work-desc{width:300px}
}
@media (max-width:1199px){
  .stack-3d{transform:scale(.68)}
}

/* Tablets: a flat, still stack beside the text instead of the 3D view. */
@media (max-width:1099px){
  .hero{min-height:0;padding-block:56px 72px;gap:48px}
  .hero-copy{width:auto;flex:1 1 0;max-width:600px}
  .hero h1{font-size:72px}
  .stack-3d{display:none}
  .stack-flat{display:flex;flex:0 1 380px}
  .file-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .step{padding:26px 24px}
  .about{gap:48px}
  .about-photo{width:360px;height:420px}
}
/* Portrait tablets and phones: one column, with the stack below the text. */
@media (max-width:959px){
  .hero{flex-direction:column;align-items:stretch}
  .hero-copy{flex:none;max-width:640px}
  .hero h1{font-size:clamp(48px,12.4vw,90px)}
  .stack-flat{flex:none;max-width:480px}
  .arrow-side{display:none}
  .arrow-down{display:inline}
  .steps{grid-template-columns:1fr}
}
@media (max-width:900px){
  .header-inner{padding-block:12px;display:grid;grid-template-columns:auto 1fr;grid-template-areas:"logo status" "nav nav";gap:8px 16px}
  .logo{grid-area:logo}
  .status{grid-area:status;justify-self:end;font-size:12px}
  .nav{grid-area:nav;gap:4px 20px;flex-wrap:wrap}
  .nav .pill{margin-left:auto}
  .proof-grid{grid-template-columns:1fr}
  .proof-item,.proof-item:first-child{padding:28px 0 32px}
  .proof-item+.proof-item{border-left:0;border-top:var(--rule)}
  .section-head{flex-direction:column;align-items:flex-start;gap:20px}
  .problem{grid-template-columns:1fr;gap:16px;padding:28px 0}
  .work-row{display:grid;grid-template-columns:1fr auto;grid-template-areas:"title arrow" "desc desc";align-items:center;gap:10px 16px;min-height:0;padding:24px 0 26px}
  .work-arrow{grid-area:arrow;font-size:32px;line-height:1}
  .work-title{grid-area:title}
  .work-desc{grid-area:desc;width:auto;max-width:520px;font-size:17px}
  .about{flex-direction:column;align-items:stretch}
  .about-photo{width:100%;max-width:420px;height:auto;aspect-ratio:1}
  .about-sun{top:28px;left:28px;width:96px;height:96px}
}
@media (max-width:640px){
  .nav{gap:4px 16px;font-size:14px}
  .pill-sm{padding:0 14px}
  .hero-lede{font-size:23px}
  .hero-note{font-size:16px}
  .file-grid{grid-template-columns:1fr}
  .file{padding:22px 20px 20px}
  .file-label{padding-right:130px}
  .stamp{top:16px;right:14px;font-size:20px}
  .file h3{font-size:36px}
  .file dt{width:72px}
  .file-more-title{font-size:46px}
  .step{padding:26px 22px}
  .display-xl,.contact h2{font-size:min(64px,16vw)}
  .contact-note,.contact-email{font-size:19px}
  .pill-xl{min-height:60px;padding:0 26px;font-size:19px}
}

/* Reduced motion: open once and hold still. No orbit, no packets, no transitions. */
@media (prefers-reduced-motion:reduce){
  .plane{animation:none}
  .layer,.wire,.wire-cal{transition:none}
  .layer{transform:translateZ(var(--z-open))}
  .wire{height:300px}
  .wire-cal{height:100px;transform:translateZ(300px) rotateX(90deg)}
  .stack-3d .packet{animation:none;opacity:0}
  .pill,.work-title,.work-arrow,.file-more{transition:none}
}

@media (forced-colors:active){
  .pill{border:2px solid ButtonText}
}
