/* ==========================================================================
   Trevor Wills · Portfolio · styles.css
   Visual language: sketch pad + tech pack. Grid paper, hairline rules,
   spec-sheet labels, square corners, one red "redline" accent.
   ========================================================================== */

:root {
  --paper: #FBFAF8;
  --grid: rgba(96, 120, 140, .11);
  --white: #FFFFFF;
  --band: #EFEDE9;
  --ink: #2B2A28;
  --ink-2: #5C5954;
  --line: #DAD6CF;
  /* Sage accent (#9CAF88). Filled sage areas carry ink text, not white,
     so they stay readable. */
  --accent: #9CAF88;
  --sage: #9CAF88;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  color: var(--ink);
  margin: 0;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); line-height: .98; text-transform: uppercase; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.25rem); line-height: 1.02; text-transform: uppercase; }
h3 { font-size: 1.3rem; line-height: 1.2; font-weight: 700; font-variation-settings: "wdth" 100; }
h4 { font-size: 1rem; font-weight: 700; font-variation-settings: "wdth" 100; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 300; background: var(--white); padding: .5rem 1rem; border: 1px solid var(--ink); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Spec-sheet label ------------------------------------------------------- */
.label, .eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 1rem;
}

/* Nav -------------------------------------------------------------------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.05; }
.nb-name { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 112; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .01em; }
.nb-role { font-family: var(--mono); font-size: .66rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.nav-menu { display: flex; align-items: center; gap: 1.8rem; }
.nav-menu > a, .nav-drop > button {
  font: 500 .95rem var(--sans); color: var(--ink); text-decoration: none;
  background: none; border: 0; padding: .4rem 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem;
}
.nav-menu > a:hover, .nav-drop > button:hover { color: var(--accent); }
.nav-drop { position: relative; }
.nav-drop > button svg { width: 14px; height: 14px; }
.nav-drop-panel { position: absolute; top: 100%; left: -1rem; min-width: 360px; background: var(--white); border: 1px solid var(--ink); padding: .5rem 0; display: none; }
.nav-drop:hover .nav-drop-panel, .nav-drop:focus-within .nav-drop-panel { display: block; }
.nav-drop-panel a { display: flex; gap: .9rem; padding: .55rem 1rem; text-decoration: none; font-size: .93rem; }
.nav-drop-panel a:hover { background: var(--paper); color: var(--accent); }
.nav-drop-panel .num { font-family: var(--mono); font-size: .75rem; color: var(--ink-2); padding-top: .15rem; }
.nav-menu > a.nav-cta { border: 1.5px solid var(--ink); padding: .45rem .95rem; border-radius: 3px; }
.nav-menu > a.nav-cta:hover { background: var(--ink); color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 9px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu { position: fixed; inset: 64px 0 0 0; background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 2rem; display: none; overflow-y: auto; }
  .nav-menu.active { display: flex; }
  .nav-menu > a, .nav-drop > button { font-size: 1.15rem; padding: .9rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-drop > button svg { display: none; }
  .nav-drop-panel { position: static; display: block; border: 0; min-width: 0; padding: .25rem 0 .75rem; }
  .nav-drop-panel a { padding: .5rem 0; }
  .nav-menu > a.nav-cta { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: .9rem 0; }
}

/* Buttons & links -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.25rem; font: 600 .95rem/1 var(--sans); text-decoration: none;
  border: 1.5px solid var(--ink); border-radius: 3px; background: var(--ink); color: var(--white);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn svg { width: 16px; height: 16px; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link svg { width: 16px; height: 16px; }
.prose a:not(.btn), .cs-prose a:not(.btn), .contact-card a { color: var(--accent); }
.btn, .btn:visited { color: var(--white); }
.btn--ghost, .btn--ghost:visited { color: var(--ink); }
.btn--ghost:hover { color: var(--white); }

/* Sections --------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight { padding: clamp(1.5rem, 3vw, 2.5rem) 0; }
.band { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 0; padding-bottom: 1rem; }
.section-head p { color: var(--ink-2); max-width: 46ch; margin: 0; }
.rule-top { border-top: 2px solid var(--ink); }

/* Home hero -------------------------------------------------------------- */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.hero h1 { max-width: 16ch; }
.hero-lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.5; max-width: 44ch; margin-top: 1.5rem; }
.photo { background: var(--white); border: 1px solid var(--line); padding: 10px 10px 0; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; }
.photo figcaption { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); padding: .6rem 0; display: flex; justify-content: space-between; gap: 1rem; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .photo { max-width: 260px; }
}

/* Spec sheet (facts) ----------------------------------------------------- */
.spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.spec--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spec-cell { padding: 1.25rem 1.25rem 1.5rem 0; }
.spec-cell + .spec-cell { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.spec-num { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 108; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; margin: .5rem 0 .55rem; }
.spec-val { font-weight: 600; margin: .35rem 0 0; }
.spec-cell p { font-size: .95rem; color: var(--ink-2); margin: 0; }
.spec-cell .label { margin: 0; }
.spec-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding: .9rem 0; font-size: .98rem; }
.spec-row:last-child { border-bottom: 1px solid var(--line); }
.spec-row .label { margin: .2rem 0 0; }
@media (max-width: 860px) {
  .spec, .spec--3 { grid-template-columns: 1fr 1fr; }
  .spec-cell:nth-child(odd) { padding-left: 0; border-left: 0; }
  .spec-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .spec-row { grid-template-columns: 1fr; gap: .2rem; }
}
@media (max-width: 480px) {
  .spec--3 { grid-template-columns: 1fr; }
  .spec--3 .spec-cell { padding-left: 0; border-left: 0; }
  .spec--3 .spec-cell + .spec-cell { border-top: 1px solid var(--line); }
}

/* Work index ------------------------------------------------------------- */
.work-list { border-top: 2px solid var(--ink); }
.work-row { display: grid; grid-template-columns: 56px minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); padding: clamp(1.75rem, 3.5vw, 2.75rem) 0; border-bottom: 1px solid var(--line); align-items: start; }
.work-idx { font-family: var(--mono); font-size: .85rem; color: var(--ink-2); padding-top: .15rem; }
.work-media { display: block; background: var(--white); border: 1px solid var(--line); padding: 8px; }
.work-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .2s; }
.work-meta { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: .6rem; }
.work-text h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 800; font-variation-settings: "wdth" 106; margin-bottom: .75rem; }
.work-text h3 a { text-decoration: none; }
.work-text h3 a:hover { color: var(--accent); }
.work-text p { color: var(--ink-2); }
@media (max-width: 860px) {
  .work-row { grid-template-columns: 1fr; gap: 1rem; }
}

.more-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.mini { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1.25rem; padding: 1.5rem 1.5rem 1.5rem 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.mini + .mini { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.mini img { aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); background: var(--white); padding: 5px; }
.mini h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.mini p { font-size: .95rem; color: var(--ink-2); margin: 0 0 .6rem; }
.mini:hover h3 { color: var(--accent); }
@media (max-width: 760px) {
  .more-grid { grid-template-columns: 1fr; }
  .mini { grid-template-columns: 90px minmax(0, 1fr); }
  .mini + .mini { padding-left: 0; border-left: 0; }
}

/* Principles ------------------------------------------------------------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.principle { padding: 1.5rem 1.5rem .5rem 0; }
.principle + .principle { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.pnum { font-family: var(--mono); font-size: .8rem; color: var(--accent); display: block; margin-bottom: .75rem; }
.principle h3 { margin-bottom: .6rem; }
.principle p { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 860px) {
  .principles { grid-template-columns: 1fr; }
  .principle + .principle { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Closing CTA ------------------------------------------------------------ */
.cta { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; align-items: end; border-top: 2px solid var(--ink); padding-top: 2rem; }
.cta p { color: var(--ink-2); max-width: 52ch; margin: 0; }
.cta .btn-row { margin-top: 0; justify-content: flex-end; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } .cta .btn-row { justify-content: flex-start; } }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--band); border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.1fr .7fr .7fr; gap: 2rem; }
.footer-id p { margin: .35rem 0; color: var(--ink-2); }
.footer-id .nb-name { color: var(--ink); }
.footer-col h4 { font-family: var(--mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: .7rem; }
.footer-col a { display: block; text-decoration: none; padding: .18rem 0; }
.footer-col a:hover, .footer-id a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-id { grid-column: 1 / -1; } }

/* Inner page hero -------------------------------------------------------- */
.page-hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); max-width: 54ch; margin: 1.25rem 0 0; }

/* About ------------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.45fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.prose p { font-size: 1.1rem; max-width: 62ch; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-grid .photo { max-width: 300px; } }

.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.block-head h2 { margin: 0; }
.block-head .label { margin: 0; }

.timeline { border-top: 2px solid var(--ink); }
.tl-item { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.tl-when { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); padding-top: .2rem; }
.tl-body h3 { font-size: 1.15rem; margin-bottom: .1rem; }
.tl-role { font-weight: 600; margin: 0 0 .5rem; }
.tl-body p, .tl-body li { color: var(--ink-2); }
.tl-body p:last-child { margin-bottom: 0; }
.tl-body ul { padding-left: 1.1rem; }
.tl-body li { margin-bottom: .35rem; }
@media (max-width: 700px) { .tl-item { grid-template-columns: 1fr; gap: .3rem; } }

.cap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.cap { padding: 1.25rem 1.25rem 1rem 0; }
.cap + .cap { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.cap h3 { font-size: 1.05rem; margin-bottom: .75rem; }
.cap ul { list-style: none; padding: 0; }
.cap li { padding: .5rem 0; border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 960px) {
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .cap:nth-child(odd) { padding-left: 0; border-left: 0; }
  .cap:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap + .cap { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.num-list { list-style: none; padding: 0; border-top: 2px solid var(--ink); counter-reset: n; }
.num-list li { counter-increment: n; display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: .85rem 0; border-bottom: 1px solid var(--line); }
.num-list li::before { content: counter(n, decimal-leading-zero); font-family: var(--mono); font-size: .78rem; color: var(--accent); padding-top: .2rem; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-card { background: var(--white); border: 1px solid var(--line); padding: 1.5rem; }
.contact-card h2 { font-size: 1rem; font-family: var(--mono); font-weight: 500; letter-spacing: .04em; color: var(--ink-2); margin-bottom: .6rem; }
.contact-card .big { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 104; font-size: clamp(1.2rem, 2.2vw, 1.6rem); text-decoration: none; color: var(--ink); word-break: break-word; }
.contact-card .big:hover { color: var(--accent); }
.contact-card p { color: var(--ink-2); margin: .6rem 0 0; font-size: .95rem; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

/* Résumé highlights ------------------------------------------------------ */
.hl-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.hl-item { padding: 1.25rem 1.5rem 1.25rem 0; border-bottom: 1px solid var(--line); }
.hl-item:nth-child(even) { padding-left: 1.5rem; padding-right: 0; border-left: 1px solid var(--line); }
.hl-item h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.hl-item p { color: var(--ink-2); margin: 0; font-size: .98rem; }
@media (max-width: 760px) { .hl-grid { grid-template-columns: 1fr; } .hl-item:nth-child(even) { padding-left: 0; border-left: 0; } }

/* Case studies ----------------------------------------------------------- */
.cs-hero { padding: clamp(2.5rem, 5vw, 4rem) 0 0; }
.breadcrumb { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 0 0 1.75rem; }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.cs-hero h1 { max-width: 20ch; }
.cs-hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); max-width: 56ch; margin: 1.25rem 0 2.5rem; }
.cs-hero-media { background: var(--white); border: 1px solid var(--line); padding: 10px; }
.cs-hero-media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.cs-meta .m { padding: 1rem 1rem 1.1rem 0; }
.cs-meta .m + .m { padding-left: 1rem; border-left: 1px solid var(--line); }
.cs-meta h4 { font-family: var(--mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: .35rem; }
.cs-meta p { margin: 0; font-size: .98rem; font-weight: 500; line-height: 1.4; }
@media (max-width: 760px) {
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta .m:nth-child(odd) { padding-left: 0; border-left: 0; }
  .cs-meta .m:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.cs-prose { max-width: 680px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); }
.cs-prose h2 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); margin: 0 0 1rem; }
.cs-prose p { font-size: 1.08rem; }
.cs-prose .lede { font-size: clamp(1.18rem, 1.9vw, 1.42rem); line-height: 1.45; font-weight: 500; }

.img-full, .img-duo, .img-grid, .carousel, .cs-stats, .linkout, .pull-quote { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.img-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.img-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.img-full, .img-grid figure, .img-duo figure { background: var(--white); border: 1px solid var(--line); padding: 8px; }
.img-duo .img-full { margin-bottom: 0; }
.img-grid img, .img-duo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.img-full img { width: 100%; }
.zoomable { cursor: zoom-in; }
.img-grid-credit { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: -1.75rem 0 clamp(2.5rem, 5vw, 3.5rem); }
@media (max-width: 700px) { .img-grid { grid-template-columns: 1fr 1fr; } .img-duo { grid-template-columns: 1fr; } }

.cs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); max-width: 680px; margin-left: auto; margin-right: auto; }
.cs-stat { padding: 1rem 1rem 1.1rem 0; }
.cs-stat + .cs-stat { padding-left: 1rem; border-left: 1px solid var(--line); }
.cs-stat .num { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 108; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; margin-bottom: .45rem; }
.cs-stat .lab { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.cs-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pull-quote { max-width: 680px; margin-left: auto; margin-right: auto; border-left: 3px solid var(--sage); padding: .2rem 0 .2rem 1.5rem; }
.pull-quote p { font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 100; font-size: clamp(1.25rem, 2.1vw, 1.6rem); line-height: 1.28; margin: 0 0 .6rem; }
.pull-quote cite { font-style: normal; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }

.carousel { position: relative; background: var(--white); border: 1px solid var(--line); padding: 10px; }
.carousel-window { overflow: hidden; }
.carousel-wrapper { display: flex; transition: transform .45s ease; }
.carousel-slide { flex: 0 0 100%; }
.carousel-slide img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--white); }
.carousel-btn { position: absolute; top: 45%; transform: translateY(-50%); width: 44px; height: 44px; border: 1.5px solid var(--ink); background: var(--white); color: var(--ink); border-radius: 3px; cursor: pointer; display: grid; place-items: center; }
.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn:hover { background: var(--ink); color: var(--white); }
.carousel-dots { display: flex; justify-content: center; gap: 6px; padding: .8rem 0 .3rem; }
.carousel-dot { width: 22px; height: 3px; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.carousel-dot.active { background: var(--ink); }

/* Captioned carousel (3D case study): caption sits under each image */
.carousel--captioned .carousel-btn { top: 34%; }
.carousel-caption { margin: .9rem .25rem .2rem; font-size: .95rem; line-height: 1.45; color: var(--ink-2); min-height: 2.9em; }
.carousel-count { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--accent); margin-right: .7rem; }
@media (max-width: 700px) { .carousel--captioned .carousel-btn { top: 26%; width: 38px; height: 38px; } .carousel--captioned .carousel-btn.prev { left: 14px; } .carousel--captioned .carousel-btn.next { right: 14px; } .carousel-caption { min-height: 4.4em; } }

.linkout { max-width: 680px; margin-left: auto; margin-right: auto; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: var(--white); border: 1px solid var(--ink); padding: 1.5rem; }
.lo-meta { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.linkout h3 { margin-top: .3rem; }
.linkout .url { font-family: var(--mono); font-size: .85rem; color: var(--ink-2); margin-top: .3rem; }

.next-project a { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 2.5rem 0 3rem; text-decoration: none; border-top: 2px solid var(--ink); }
.np-label { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 0; }
.next-project h3 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 800; font-variation-settings: "wdth" 108; text-transform: uppercase; margin-top: .35rem; }
.np-arrow { width: 52px; height: 52px; border: 1.5px solid var(--ink); border-radius: 3px; display: grid; place-items: center; flex: none; }
.np-arrow svg { width: 22px; height: 22px; }
.next-project a:hover h3 { color: var(--accent); }
.next-project a:hover .np-arrow { background: var(--ink); color: var(--white); }

/* Lightbox --------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(251, 250, 248, .97); display: none; align-items: center; justify-content: center; padding: 4rem 4.5rem; }
.lightbox.active { display: flex; }
.lightbox-figure { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
#lightbox-img { max-width: 100%; max-height: calc(100vh - 10rem); object-fit: contain; background: var(--white); border: 1px solid var(--line); padding: 8px; }
.lightbox.is-loading #lightbox-img { opacity: .4; }
.lightbox-meta { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); display: flex; gap: 1rem; margin-top: .8rem; }
.lightbox-close, .lightbox-nav { position: absolute; width: 44px; height: 44px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 3px; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.lightbox-close { top: 1rem; right: 1rem; font-size: 1.6rem; line-height: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-nav svg { width: 20px; height: 20px; }
@media (max-width: 700px) { .lightbox { padding: 4rem .75rem 5rem; } .lightbox-nav { top: auto; bottom: 1rem; transform: none; } }

/* Motion & print --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  body { background: #fff; font-size: 10.5pt; }
  .site-nav, .site-footer, .no-print, .skip-link { display: none !important; }
  .section, .page-hero { padding: .6rem 0; }
  .band { border: 0; }
  h1 { font-size: 24pt; }
  a { text-decoration: none; }
  .tl-item, .hl-item, .cap { break-inside: avoid; }
}

/* Intro splash (homepage root only, once per session, ~1600ms) ---- */
/* Non-blocking: the page underneath is never hidden, so it paints normally
   even if this overlay is slow to load or its script fails. */
.intro {
  position: fixed; inset: 0; z-index: 500;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px;
  display: flex; align-items: center; justify-content: center; padding: var(--gutter);
  transition: transform .22s cubic-bezier(.7, 0, .2, 1);
}
.intro.is-leaving { transform: translateY(-100%); }
.intro__sheet { width: min(640px, 100%); }
.intro__tag { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: 1.5rem; }
.intro__name { font-family: var(--mono); font-weight: 500; font-size: clamp(2.2rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -.02em; color: var(--ink); text-transform: uppercase; min-height: 1em; white-space: nowrap; }
.intro__role { font-family: var(--mono); font-size: clamp(.85rem, 1.6vw, 1rem); color: var(--ink-2); margin-top: 1rem; min-height: 1.5em; }
.intro__caret { display: inline-block; width: .55em; height: .9em; background: var(--accent); vertical-align: -.05em; margin-left: .06em; animation: introBlink 1s steps(1) infinite; }
.intro__role .intro__caret { height: 1em; width: .5em; }
.intro__rule { height: 3px; background: var(--accent); width: 0; margin-top: 1.5rem; transition: width .5s ease; }
.intro.is-ruled .intro__rule { width: 100%; }
.intro__skip { position: absolute; right: var(--gutter); bottom: var(--gutter); font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); background: none; border: 0; cursor: pointer; padding: .5rem; }
.intro__skip:hover { color: var(--accent); }
@keyframes introBlink { 50% { opacity: 0; } }

/* Case study chapters, steps, notes, tables --------------------------------- */
.cs-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line); margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.cs-index a { padding: .75rem 1rem .9rem 0; text-decoration: none; font-size: .92rem; font-weight: 500; line-height: 1.3; border-bottom: 1px solid var(--line); }
.cs-index a span { display: block; font-family: var(--mono); font-size: .7rem; color: var(--accent); letter-spacing: .04em; margin-bottom: .25rem; }
.cs-index a:hover { color: var(--accent); }
.chapter-no { display: block; font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: .55rem; }
.cs-prose[id] { scroll-margin-top: 90px; }
.cs-prose .lede + p { margin-top: .25rem; }

.steps { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--white); margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.step { padding: 1rem 1rem 1.2rem; position: relative; }
.step + .step { border-left: 1px solid var(--line); }
.step + .step::before { content: ""; position: absolute; left: -5px; top: 1.15rem; width: 9px; height: 9px; background: var(--white); border: 1.5px solid var(--accent); border-radius: 50%; }
.step .k { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .04em; }
.step h3 { font-size: 1rem; margin: .35rem 0 .35rem; }
.step p { font-size: .88rem; color: var(--ink-2); margin: 0; line-height: 1.45; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: 1px solid var(--line); }
  .step + .step::before { display: none; }
}

.rules { list-style: none; margin: 0 0 clamp(2.5rem, 5vw, 3.5rem); padding: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--white); }
.rules li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem; align-items: baseline; padding: 1rem 1.25rem; }
.rules li + li { border-top: 1px solid var(--line); }
.rules .k { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .04em; }
.rules h3 { font-size: 1rem; margin: 0; }
.rules p { font-size: .9rem; color: var(--ink-2); margin: 0; line-height: 1.45; }
@media (max-width: 860px) {
  .rules li { grid-template-columns: 2rem minmax(0, 1fr); row-gap: .3rem; }
  .rules p { grid-column: 2; }
}

.note { position: relative; max-width: 680px; margin: 1.6rem auto clamp(2.5rem, 5vw, 3.5rem); background: var(--white); border: 1px solid var(--ink); padding: 1.2rem 1.5rem; }
.note .tag { position: absolute; left: -1px; top: 0; transform: translateY(-100%); background: var(--ink); color: var(--white); font-family: var(--mono); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; padding: .28rem .6rem; }
.note p { margin: 0; font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 100; font-size: 1.15rem; line-height: 1.35; }
.note--draft { border: 1.5px dashed var(--accent); background: #F3F6F0; }
.note--draft .tag { background: var(--accent); }
.note--draft p { font-family: var(--sans); font-weight: 500; font-size: .95rem; }

.table-wrap { max-width: 680px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--white); border-top: 2px solid var(--ink); }
.spec-table th { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.spec-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table td:first-child { font-weight: 700; }

/* Image slots (draft view only) --------------------------------------------- */
.draft-only { display: none !important; }
html.show-drafts .draft-only { display: block !important; }
html.show-drafts .img-grid.draft-only, html.show-drafts .img-duo.draft-only { display: grid !important; }
.wide-slot { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.img-slot { background: var(--white); border: 1px solid var(--line); padding: 8px; }
.img-slot .slot {
  aspect-ratio: 4 / 3; border: 1.5px dashed #AFBAC3; display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem; padding: 1rem;
  background-color: #F6F8F9;
  background-image: linear-gradient(rgba(96,120,140,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(96,120,140,.12) 1px, transparent 1px);
  background-size: 14px 14px;
}
.img-slot--wide .slot { aspect-ratio: 21 / 8; }
.slot-k { font-family: var(--mono); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.slot-t { font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 100; font-size: 1rem; }
.img-slot p { margin: 0; font-size: .84rem; line-height: 1.4; color: var(--ink-2); max-width: 46ch; }
@media (max-width: 700px) { .img-slot--wide .slot { aspect-ratio: 4 / 3; } }
.draft-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--accent); color: var(--white); font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; padding: .5rem var(--gutter); text-align: center; }
@media print { .draft-only, .draft-bar { display: none !important; } }
.more-grid--one { grid-template-columns: 1fr; }
.more-grid--one .mini { max-width: 720px; }
.cs-hero-media--slide img { aspect-ratio: 16 / 9; object-fit: contain; background: var(--white); }
@media (max-width: 520px) {
  .cs-stats { grid-template-columns: 1fr; }
  .cs-stat + .cs-stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Concerns callout pair ------------------------------------------------------ */
.concerns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 960px; margin: 2.4rem auto clamp(2.5rem, 5vw, 3.5rem); }
.concern { position: relative; background: var(--white); border: 1px solid var(--ink); padding: 1.4rem 1.5rem 1.35rem; }
.concern .tag { position: absolute; left: -1px; top: 0; transform: translateY(-100%); background: var(--accent); color: var(--white); font-family: var(--mono); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; padding: .28rem .6rem; }
.concern h3 { font-size: 1.2rem; margin-bottom: .55rem; }
.concern p { margin: 0; font-size: .98rem; color: var(--ink-2); }
@media (max-width: 760px) { .concerns { grid-template-columns: 1fr; gap: 2.4rem; } }
.spec-table th:empty { width: 1%; }
.hero h1.hero-title { max-width: none; }
.hero-title span { display: block; white-space: nowrap; }
@media (max-width: 480px) { .hero-title span { white-space: normal; } }
.hero h1.hero-title { font-size: clamp(2.2rem, 4.2vw, 3.9rem); }

/* Brand logo wall (homepage) ------------------------------------------------- */
.logo-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding: 1.1rem 0 1rem; }
.logo-row:last-child { border-bottom: 1px solid var(--line); }
.logo-row .label { margin: .35rem 0 0; }
.logo-grid { list-style: none; margin: 0; padding: 0 1px 1px 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.logo-grid--retail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.logo-cell { height: 92px; display: flex; align-items: center; justify-content: center; padding: 0 14px; background: var(--white); border: 1px solid var(--line); margin: 0 -1px -1px 0; }
.logo-cell img { max-width: 78%; max-height: 34px; width: auto; height: auto; object-fit: contain; filter: grayscale(1) contrast(1.1); opacity: .5; transition: filter .25s ease, opacity .25s ease; }
.logo-cell:hover img, .logo-cell:focus-within img { filter: none; opacity: 1; }
.logo-cell.lg-xwide { padding: 0 8px; }
.logo-cell.lg-xwide img { max-width: 100%; max-height: 30px; }
.logo-cell.lg-wide img { max-width: 84%; max-height: 30px; }
.logo-cell.lg-tall img { max-height: 46px; }
.logo-cell.lg-square img { max-height: 50px; }
.logo-also { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: .6rem 0 0; }
@media (hover: none) { .logo-cell img { filter: grayscale(1) contrast(1.1); opacity: .6; } }
@media (max-width: 960px) { .logo-grid, .logo-grid--retail { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) { .logo-row { grid-template-columns: 1fr; gap: .5rem; } }
@media (max-width: 520px) { .logo-grid, .logo-grid--retail { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-cell { height: 80px; } }
.logo-cell img[src*="kenneth-cole"] { max-height: 19px; max-width: 80%; }
.logo-cell img[src*="guess"] { max-height: 24px; max-width: 64%; }
.logo-cell img[src*="tommy-bahama"] { max-height: 36px; max-width: 90%; }
.logo-cell img[src*="red-wing"] { max-height: 52px; }
.logo-cell img[src*="kohls"] { max-height: 20px; max-width: 70%; }
/* Toolkit row (text only, sits under the logo wall) */
.tool-grid { list-style: none; margin: 0; padding: 0 1px 1px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-cell { min-height: 92px; display: flex; flex-direction: column; justify-content: flex-start; padding: 14px 18px; background: var(--white); border: 1px solid var(--line); margin: 0 -1px -1px 0; }
.tool-kind { font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin: 0 0 .4rem; }
.tool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: .95rem; line-height: 1.5; color: var(--ink); }
.tool-list li { white-space: nowrap; }
.tool-list li:not(:last-child)::after { content: "/"; color: var(--line); margin: 0 .55rem; }
@media (max-width: 720px) { .tool-grid { grid-template-columns: 1fr; } .tool-cell { min-height: 0; } }

/* Image spots: placeholder files stay hidden on the live site; a real image
   dropped in with the same file name shows automatically (see js/scripts.js). */
.img-slot, .slot-group { display: none; }
html.show-drafts .img-slot, .img-slot.is-real { display: block; }
html.show-drafts .img-grid.slot-group, .img-grid.slot-group.has-real,
html.show-drafts .img-duo.slot-group, .img-duo.slot-group.has-real { display: grid; }
html.show-drafts .wide-slot.slot-group, .wide-slot.slot-group.has-real { display: block; }
.img-slot img { width: 100%; }
.img-grid .img-slot img, .img-duo .img-slot img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Training guide viewer (AI design team case study) ---------------------- */
.guide-viewer { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.guide-viewer .carousel { margin-bottom: 0; }
.guide-viewer .carousel-slide img { aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); cursor: zoom-in; }
.guide-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; }
.guide-controls .carousel-btn { position: static; transform: none; flex: none; }
.guide-controls .carousel-dots { flex: 1; flex-wrap: wrap; padding: 0; }
.guide-viewer .linkout { max-width: none; margin: 12px 0 0; }
.guide-viewer .linkout .btn { flex: none; }
@media (max-width: 700px) { .guide-controls { gap: .6rem; } .guide-controls .carousel-dots { gap: 4px; } .guide-controls .carousel-dot { width: 10px; } }
.guide-anim { position: relative; }
.guide-anim video { position: absolute; left: 50.6875%; top: 31.4444%; width: 17.5%; height: 52.4444%; object-fit: cover; background: var(--band); pointer-events: none; }

/* Live site viewer with a slides fallback (trend case study) */
.viewer { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.viewer-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.viewer-tabs button { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; padding: .7rem 1.1rem; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ink-2); cursor: pointer; }
.viewer-tabs button:hover { color: var(--ink); }
.viewer-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.viewer-frame { background: var(--white); border: 1px solid var(--line); padding: 10px; }
.viewer-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; background: var(--white); }
.viewer-note { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: .8rem 0 0; }
.viewer .carousel { margin-bottom: 0; }
@media (max-width: 700px) { .viewer-frame iframe { aspect-ratio: 3 / 4; } }

/* Brand logo strip inside the case study meta row (color logos, kept small) */
.cs-meta--brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-meta .m.m--brands { grid-column: 1 / -1; padding: 1rem 0 1.25rem; border-left: 0; border-top: 1px solid var(--line); }
.meta-logos { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.5rem; }
.meta-logos li { display: flex; align-items: center; }
.meta-logos img { display: block; height: auto; width: 64px; max-width: none; }
.meta-logos img[src*="levis"] { width: 52px; }
.meta-logos img[src*="calvin-klein"] { width: 92px; }
.meta-logos img[src*="tommy-hilfiger"] { width: 120px; }
.meta-logos img[src*="columbia"] { width: 88px; }
.meta-logos img[src*="cole-haan"] { width: 96px; }
.meta-logos img[src*="dickies"] { width: 48px; }
.meta-logos img[src*="tommy-bahama"] { width: 86px; }
.meta-logos img[src*="kenneth-cole"] { width: 96px; }
.meta-logos img[src*="dockers"] { width: 62px; }
.meta-logos img[src*="haggar"] { width: 76px; }
.meta-logos img[src*="red-wing"] { width: 52px; }
.meta-logos img[src*="guess"] { width: 62px; }
@media (max-width: 760px) {
  .cs-meta--brands { grid-template-columns: 1fr 1fr; }
  .meta-logos { gap: 1rem 1.6rem; }
}

/* Carousel with obvious controls (Walmart case study) */
.carousel--clear .carousel-slide img { aspect-ratio: 16 / 9; }
.carousel--clear .carousel-btn { width: 54px; height: 54px; background: var(--ink); color: var(--white); border-color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .28); }
.carousel--clear .carousel-btn:hover { background: var(--accent); border-color: var(--accent); }
.carousel--clear .carousel-btn.prev { left: 24px; }
.carousel--clear .carousel-btn.next { right: 24px; }
.carousel--clear .carousel-btn svg { width: 26px; height: 26px; stroke-width: 2.6; }
.carousel--clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.carousel-pos { margin: .2rem 0 .3rem; text-align: center; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--ink-2); }
@media (max-width: 700px) {
  .carousel--clear .carousel-btn { width: 44px; height: 44px; }
  .carousel--clear .carousel-btn.prev { left: 14px; }
  .carousel--clear .carousel-btn.next { right: 14px; }
  .carousel--clear .carousel-btn svg { width: 22px; height: 22px; }
}

/* Long URLs in the link-out box must wrap on narrow screens ------------------ */
.linkout .url { overflow-wrap: anywhere; word-break: break-word; }

/* ==========================================================================
   Interaction layer (Sept 2026): tech-pack hover, before/after compare,
   count-up stats, page transitions. All of it switches off for reduced motion.
   ========================================================================== */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Tech-pack markup on homepage case study images ---------------------------
   Hovering a row "marks up" its image like a spec sheet: crop marks, a width
   dimension line with a figure label, a height dimension line, and a tag. */
.work-media { position: relative; transition: border-color .2s; }
.work-row:hover .work-media, .work-row:focus-within .work-media { border-color: var(--ink); }
.tp { position: absolute; inset: 0; pointer-events: none; }
.tp-c { position: absolute; width: 16px; height: 16px; border: 0 solid var(--accent); opacity: 0; transition: opacity .18s, transform .35s cubic-bezier(.2, .7, .2, 1); }
.tp-c.tl { left: -8px; top: -8px; border-left-width: 1.5px; border-top-width: 1.5px; transform: translate(8px, 8px); }
.tp-c.tr { right: -8px; top: -8px; border-right-width: 1.5px; border-top-width: 1.5px; transform: translate(-8px, 8px); }
.tp-c.bl { left: -8px; bottom: -8px; border-left-width: 1.5px; border-bottom-width: 1.5px; transform: translate(8px, -8px); }
.tp-c.br { right: -8px; bottom: -8px; border-right-width: 1.5px; border-bottom-width: 1.5px; transform: translate(-8px, -8px); }
.tp-w { position: absolute; left: 0; right: 0; top: -19px; height: 9px; border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); transform: scaleX(0); transition: transform .5s cubic-bezier(.7, 0, .2, 1) .05s; }
.tp-w::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid var(--accent); }
.tp-w b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%); background: var(--paper); padding: 0 .5rem; font: 500 .66rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--accent); white-space: nowrap; opacity: 0; transition: opacity .2s .35s; }
.tp-h { position: absolute; top: 0; bottom: 0; left: -19px; width: 9px; border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: scaleY(0); transition: transform .5s cubic-bezier(.7, 0, .2, 1) .12s; }
.tp-h::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; border-left: 1px solid var(--accent); }
.tp-tag { position: absolute; right: 16px; bottom: 16px; background: var(--ink); color: var(--white); font: 500 .66rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: .45rem .6rem; opacity: 0; transform: translateY(6px); transition: opacity .2s .25s, transform .3s .25s; }
.work-row:hover .tp-c, .work-row:focus-within .tp-c { opacity: 1; transform: none; }
.work-row:hover .tp-w, .work-row:focus-within .tp-w { transform: scaleX(1); }
.work-row:hover .tp-h, .work-row:focus-within .tp-h { transform: scaleY(1); }
.work-row:hover .tp-w b, .work-row:focus-within .tp-w b { opacity: 1; }
.work-row:hover .tp-tag, .work-row:focus-within .tp-tag { opacity: 1; transform: none; }
@media (hover: none), (max-width: 860px) { .tp { display: none; } }

/* Before / after compare slider -------------------------------------------- */
.compare { margin: 0 0 clamp(2.5rem, 5vw, 3.5rem); }
.compare-stage { position: relative; overflow: hidden; background: var(--white); border: 1px solid var(--line); aspect-ratio: var(--ar, 16 / 9); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; --pos: 50%; }
.compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.compare-knob { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%); background: var(--accent); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .22); }
.compare-knob svg { width: 20px; height: 20px; }
.compare-tag { position: absolute; top: 10px; font: 500 .64rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; background: var(--white); color: var(--ink); border: 1px solid var(--line); padding: .35rem .5rem; pointer-events: none; }
.compare-tag--l { left: 10px; }
.compare-tag--r { right: 10px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.compare-stage:has(.compare-range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare figcaption, .compare-row-cap { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin-top: .7rem; }
.compare-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.compare-row .compare { margin: 0; }
.compare-row .compare-knob { width: 30px; height: 30px; }
.compare-row .compare-knob svg { width: 16px; height: 16px; }
.compare-row + .compare-row-cap { margin: .9rem 0 clamp(2.5rem, 5vw, 3.5rem); }
@media (max-width: 760px) { .compare-row { grid-template-columns: 1fr; gap: 1.25rem; } }

/* Homepage stats: count up + meter ----------------------------------------- */
.spec-num { font-variant-numeric: tabular-nums; }
.spec-meter { height: 9px; margin: .55rem 0 .7rem; position: relative; }
.spec-meter--ticks { display: flex; justify-content: space-between; align-items: flex-end; max-width: 180px; }
.spec-meter--ticks i { width: 1.5px; height: 9px; background: var(--sage); transform: scaleY(0); transform-origin: bottom; transition: transform .25s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 55ms); }
.spec-meter--ticks i:nth-child(5n+1) { height: 9px; }
.spec-meter--ticks i:not(:nth-child(5n+1)) { height: 5px; }
.spec-meter--bar { max-width: 180px; }
.spec-meter--bar::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid var(--line); }
.spec-meter--bar b { position: absolute; left: 0; top: 3px; height: 3px; width: var(--v); background: var(--sage); transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.spec-meter--bar b::after { content: ""; position: absolute; right: -1px; top: -3px; height: 9px; border-right: 1.5px solid var(--sage); }
.spec.is-counted .spec-meter--ticks i { transform: scaleY(1); }
.spec.is-counted .spec-meter--bar b { transform: scaleX(1); }

/* Page transitions: a case study image grows into the next page's hero ----- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-nav { view-transition-name: site-nav; }
.cs-hero-media img { view-transition-name: cs-media; }
::view-transition-group(cs-media) { animation-duration: .5s; animation-timing-function: cubic-bezier(.7, 0, .2, 1); overflow: clip; }
::view-transition-old(cs-media), ::view-transition-new(cs-media) { height: 100%; object-fit: cover; animation-duration: .5s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* Print shadow ----------------------------------------------------------------
   Framed images sit on the grid paper like prints: a short, soft shadow so they
   lift slightly off the page. No tilt, no motion. */
.photo, .work-media, .cs-hero-media, .img-full, .img-grid figure, .img-duo figure { box-shadow: 2px 2px 3px rgba(0, 0, 0, .16); }

/* Stat note -------------------------------------------------------------------
   One line under a stat band saying how the numbers were measured. Pulled up
   so it reads as part of the band above it. */
.stat-note { max-width: 680px; margin: calc(.8rem - clamp(2.5rem, 5vw, 3.5rem)) auto clamp(2.5rem, 5vw, 3.5rem); font-family: var(--mono); font-size: .74rem; line-height: 1.55; color: var(--ink-2); }
.stat-note b { display: block; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: .2rem; }

/* Built with AI ---------------------------------------------------------------
   A short flag under a case study's subtitle, so the AI work is visible before
   scrolling. The three-column table further down says who did what. */
.cs-hero .lead--tagged { margin-bottom: 1.1rem; }
.cs-built { font-family: var(--mono); font-size: .76rem; line-height: 1.7; color: var(--ink-2); max-width: 64ch; margin: 0 0 2.5rem; }
.cs-built .tag { display: inline-block; background: var(--accent); color: var(--white); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1.4; padding: .28rem .6rem; margin-right: .7rem; }
.cs-built a { color: var(--accent); white-space: nowrap; }
.spec-table--ai td { font-size: .95rem; line-height: 1.45; }
.spec-table--ai td:first-child { white-space: nowrap; }

/* Key figure on each homepage case study (Oct 2026) ------------------------
   One number per project, set large so it reads before the summary. */
.work-fig { display: flex; align-items: center; gap: .9rem; margin: 0 0 .85rem; }
.work-fig .n { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 100; font-size: clamp(2.2rem, 3.6vw, 3rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.work-fig .l { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); line-height: 1.4; max-width: 24ch; padding-top: .15em; }

/* Ink text on sage fills ------------------------------------------------- */
.btn:not(.btn--ghost):hover, .btn:not(.btn--ghost):hover:visited { color: var(--ink); }
.carousel--clear .carousel-btn:hover { color: var(--ink); }
.draft-bar, .concern .tag, .compare-knob, .cs-built .tag, .note--draft .tag { color: var(--ink); }

/* Sage readability (Oct 2026) ---------------------------------------------
   Light sage is too faint for small text on the paper background, so text
   stays ink and the sage shows up as an underline. Sage still fills shapes:
   button hovers, bars, ticks, rules and tags. */
.text-link, .prose a:not(.btn), .cs-prose a:not(.btn), .contact-card a, .cs-built a, .jump {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: .3em;
}
.text-link:hover, .prose a:not(.btn):hover, .cs-prose a:not(.btn):hover, .contact-card a:hover, .cs-built a:hover, .jump:hover { text-decoration-color: var(--ink); }

.pnum, .num-list li::before, .carousel-count, .cs-index a span, .chapter-no, .step .k, .rules .k,
.tool-kind, .stat-note b, .slot-k, .tp-w b, .book-dim b, .style-k, .book-chapter,
.book-toc button[aria-current="true"], .book-toc button[aria-current="true"] span {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: .3em;
}
.pnum, .chapter-no, .step .k, .rules .k, .tool-kind, .style-k { display: inline-block; }
.cs-index a span { display: table; margin-bottom: .45rem; }
.pnum, .chapter-no { margin-bottom: .9rem; }

.nav-menu > a:hover, .nav-drop > button:hover, .nav-drop-panel a:hover, .work-text h3 a:hover, .mini:hover h3,
.footer-col a:hover, .footer-id a:hover, .contact-card .big:hover, .breadcrumb a:hover, .next-project a:hover h3,
.intro__skip:hover, .cs-index a:hover, .book-toc button:hover {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: .3em;
}
.nav-menu > a.nav-cta:hover { color: var(--white); text-decoration: none; }

:focus-visible, .carousel--clear:focus-visible, .compare-stage:has(.compare-range:focus-visible) { outline-color: var(--ink); }

/* At a glance (Oct 2026) ----------------------------------------------------
   Sits under the meta row on every case study: challenge, what I did, result.
   Same ruled style as the meta row so it reads as part of the page header. */
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.glance > div { padding: 1.1rem 1.25rem 1.3rem 0; }
.glance > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.glance h4 { font-family: var(--mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 0 0 .5rem; }
.glance p { margin: 0; font-size: 1rem; line-height: 1.5; }
.glance .n { display: block; font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 100; font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1; margin: .1rem 0 .45rem; }
.glance-k { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin: 0 0 .6rem; }
.glance-k span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .3em; }
@media (max-width: 760px) {
  .glance { grid-template-columns: 1fr; }
  .glance > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* More detail drawers (Oct 2026) ---------------------------------------------
   Process detail is kept on the page but closed by default. Click the bar to
   open it. */
.more { max-width: 680px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.more > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary .t { font-weight: 600; font-size: 1rem; line-height: 1.35; }
.more > summary .k { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .2rem; font-weight: 400; }
.more > summary::after { content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent); color: var(--ink); font: 500 1.2rem/1 var(--mono); }
.more[open] > summary::after { content: "\2212"; }
.more > summary:hover .t { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.more-body { padding: .4rem 0 .6rem; }
.more-body > *:last-child { margin-bottom: 1rem; }
.more-body .cs-prose, .more-body .table-wrap, .more-body .stat-note { max-width: none; margin-left: 0; margin-right: 0; }
.more-body .steps { --n: 3; }
.more-body .stat-note { margin-top: 0; }
@media print { .more > summary::after { display: none; } }

/* More work (homepage): two smaller, matching cards ------------------------ */
.more-work { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.more-work .section-head { padding-bottom: .75rem; }
.mw-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.mw-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.25rem; padding: 1.5rem 1.5rem 1.5rem 0; align-items: start; }
.mw-card + .mw-card { padding-left: 1.5rem; padding-right: 0; border-left: 1px solid var(--line); }
.mw-card .work-media img { aspect-ratio: 3 / 2; }
.mw-card h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.mw-card h3 a { text-decoration: none; }
.mw-card p { color: var(--ink-2); font-size: .95rem; margin: 0 0 .7rem; }
@media (max-width: 960px) { .mw-card { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .mw-grid { grid-template-columns: 1fr; }
  .mw-card + .mw-card { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* About: toolkit moved from the homepage */
.about-tools { margin-top: .5rem; }

/* More work: let a third card wrap cleanly (Oct 2026) */
@media (min-width: 761px) {
  .mw-card:nth-child(odd) { padding-left: 0; padding-right: 1.5rem; border-left: 0; }
  .mw-card:nth-child(even) { padding-left: 1.5rem; padding-right: 0; border-left: 1px solid var(--line); }
  .mw-card:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Link under the design team principles (Oct 2026) */
.principles-more { margin: clamp(1.5rem, 3vw, 2rem) 0 0; }

/* Earlier work: label the hands-on designer projects (Oct 2026) */
.era-tag { display: inline-block; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); border-bottom: 1px solid var(--accent); margin: 0 0 .5rem; }
.more-work .section-head { align-items: flex-end; }
.more-work .section-head h3 { margin: 0; }
.era-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem; margin: 1.25rem 0 0; color: var(--ink-2); font-size: .95rem; max-width: 62ch; }
.era-note .era-tag { margin: 0; }
.nav-drop-panel .nav-drop-label { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: .4rem 0 0; padding: .6rem 1rem .25rem; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .nav-drop-panel .nav-drop-label { padding-left: 0; } }
@media (min-width: 961px) {
  .mw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 3rem; }
  .mw-card { grid-template-columns: 1fr; align-content: start; }
  .mw-card, .mw-card + .mw-card, .mw-card:nth-child(odd), .mw-card:nth-child(even) { padding: 1.5rem 0; border: 0; position: relative; }
  .mw-card + .mw-card::before { content: ""; position: absolute; left: -1.5rem; top: 0; bottom: 0; width: 1px; background: var(--line); }
}
.more-work .section-head p.era-tag { color: var(--accent); }
.era-note { margin-bottom: 1.5rem; }
