/* ============================================================
   JOPECURO® — José Rocha
   Ink black · Bone white · Signal orange
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Clash Display";
  src: url("../fonts/ClashDisplay-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Questa";
  src: url("../fonts/Questa-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #131108;
  --ink-soft: #1d1a10;
  --bone: #f2eee3;
  --bone-soft: #e7e2d2;
  --orange: #ff5100;
  --orange-deep: #e64900;

  --font-display: "Clash Display", "Arial Narrow", sans-serif;
  --font-body: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Questa", Georgia, serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-pad: clamp(5rem, 12vh, 10rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Themes ---------- */
/* --accent-text is the orange that is legible as small text on that ground:
   #ff5100 on bone is only 2.82:1, so light sections use a deeper burnt orange. */
body[data-theme="bone"]   { --bg: var(--bone);   --fg: var(--ink);  --accent: var(--orange); --accent-text: #c53a00; }
body[data-theme="ink"]    { --bg: var(--ink);    --fg: var(--bone); --accent: var(--orange); --accent-text: var(--orange); }
body[data-theme="orange"] { --bg: var(--orange); --fg: var(--ink);  --accent: var(--bone); --accent-text: var(--ink); }

/* ---------- Reset ---------- */
/* <picture> must not create a box of its own, or it breaks the img sizing rules below */
picture { display: contents; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Overlay scroll lock. touch-action must NOT be set here: Blink/WebKit intersect
   it down the tree, which would freeze the overlays' own scrollers. */
html.is-locked, html.is-locked body { overflow: hidden; }
html { scrollbar-gutter: stable; }
/* Lenis drives scrolling; the native smooth behaviour fights it. */
html.lenis, html.lenis body { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg, var(--bone));
  color: var(--fg, var(--ink));
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.9s var(--ease-out), color 0.9s var(--ease-out);
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul[role="list"], ol[role="list"] { list-style: none; }
::selection { background: var(--orange); color: var(--bone); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 400;
  background: var(--ink); color: var(--bone);
  padding: 0.6rem 1rem; border-radius: 2rem;
  transform: translateY(-300%);
  transition: transform 0.3s;
}
.skip-link:focus-visible { transform: none; }
:focus-visible {
  outline: 2px solid var(--accent-text, var(--orange));
  outline-offset: 3px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--fg, currentColor) 40%, transparent);
}
/* scroll targets take focus so screen readers follow the jump; they are not controls
   and must not be ringed */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

/* ---------- Film grain ---------- */
.noise {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 250;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -8%); }
  30% { transform: translate(4%, 6%); }
  50% { transform: translate(-7%, 3%); }
  70% { transform: translate(6%, -4%); }
  90% { transform: translate(-3%, 7%); }
}

/* ---------- Custom cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 400; pointer-events: none; }
  .cursor__dot {
    position: absolute; top: -4px; left: -4px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff; mix-blend-mode: difference;
  }
  .cursor__ring {
    position: absolute; top: -28px; left: -28px;
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--orange); color: var(--bone);
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase;
    transform: scale(0);
    transition: transform 0.35s var(--ease-out);
  }
  .cursor.is-hover .cursor__ring { transform: scale(1); }
  .cursor.is-hover .cursor__dot { opacity: 0; }
  body.has-cursor-hidden .cursor { opacity: 0; }
}

/* ---------- Preloader ---------- */
.preloader { display: none; }
.has-js .preloader {
  display: flex; flex-direction: column; justify-content: space-between;
  position: fixed; inset: 0; z-index: 350;
  background: var(--ink); color: var(--bone);
  padding: var(--gutter);
}
.preloader__center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
}
.preloader__word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 4.5rem);
  letter-spacing: 0.08em;
}
.preloader__foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.preloader__count {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300; line-height: 1;
}

/* ---------- Header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem var(--gutter);
  mix-blend-mode: difference; color: #fff;
  transition: transform 0.5s var(--ease-out), color 0.9s var(--ease-out);
}
.site-head.is-hidden { transform: translateY(-110%); }
/* difference-blending #fff against the orange section yields cyan at 1.3:1 */
body[data-theme="orange"] .site-head { mix-blend-mode: normal; color: var(--ink); }
.site-head__brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: 0.02em; font-size: 1.05rem;
}
.site-head__brand sup { font-size: 0.55em; }
.site-head__mark { width: 22px; height: 26px; }
.site-head__meta {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}
.site-head__nav { margin-left: auto; display: flex; gap: 1.8rem; }
.site-head__nav a {
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
  position: relative; padding: 0.2rem 0;
}
.site-head__nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.site-head__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.menu-toggle__bars { display: inline-flex; flex-direction: column; gap: 5px; width: 26px; }
.menu-toggle__bars i {
  display: block; height: 2px; background: currentColor;
  transition: transform 0.4s var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 899px) {
  .site-head__nav, .site-head__meta { display: none; }
  .menu-toggle { margin-left: auto; }
}

/* ---------- Fullscreen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 240;
  background: var(--ink); color: var(--bone);
  display: flex; flex-direction: column;
  padding: calc(4rem + var(--gutter)) var(--gutter) var(--gutter);
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0;
  transition: opacity 0.5s var(--ease-out), visibility 0s 0.5s;
}
.menu.is-open { visibility: visible; opacity: 1; transition-delay: 0s; }
/* Overlays keep their own ground, so they must keep their own accent and text colour
   or the focus ring inherits the section theme and vanishes against them. */
.menu, .preloader { --accent-text: var(--orange); --fg: var(--bone); --bg: var(--ink); }
.menu__close {
  position: absolute; top: 1.1rem; right: var(--gutter);
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: inherit; background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.85rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.6rem 0;
}
.menu__close-x {
  position: relative; display: block; width: 26px; height: 26px;
  transition: transform 0.4s var(--ease-out);
}
.menu__close-x i {
  position: absolute; top: 50%; left: 0;
  display: block; width: 100%; height: 2px;
  background: currentColor;
}
.menu__close-x i:first-child { transform: rotate(45deg); }
.menu__close-x i:last-child { transform: rotate(-45deg); }
.menu__close:hover .menu__close-x,
.menu__close:focus-visible .menu__close-x { transform: rotate(90deg); color: var(--orange); }
@media (max-width: 599px) {
  .menu__close-label { display: none; }
}
.menu__nav { display: flex; flex-direction: column; gap: 0.2rem; }
.menu__link {
  display: flex; align-items: baseline; gap: 1.2rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  line-height: 1.15;
  transition: color 0.3s;
}
.menu__link:hover { color: var(--orange); }
.menu__index { font-size: 0.9rem; font-family: var(--font-body); opacity: 0.5; }
.menu__foot {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  justify-content: space-between; align-items: baseline;
}
.menu__mail { font-family: var(--font-serif); font-size: 1.4rem; }
.menu__socials { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.menu__socials a:hover { color: var(--orange); }

/* Touch targets: 44px minimum where a finger has to land. */
@media (hover: none) {
  .menu__close { padding: 0.9rem 0; }
  .menu__link { padding-block: 0.25rem; }
  a.award-row__title { display: inline-block; padding-block: 0.55rem; }
  .contact__socials a, .site-foot a, .menu__socials a { display: inline-flex; align-items: center; min-height: 44px; }

}

/* ---------- Sections shared ---------- */
section { padding: var(--section-pad) var(--gutter); position: relative; }
/* Beyond ~1800px the measure falls apart; centre the content instead of stretching it. */
@media (min-width: 1800px) {
  section, .site-head, .site-foot { max-width: 1760px; margin-inline: auto; }
  .menu, .preloader { padding-inline: calc((100vw - 1760px) / 2 + var(--gutter)); }
}
.section-head {
  display: flex; align-items: baseline; gap: 1.2rem;
  flex-wrap: wrap;
  border-top: 1px solid;
  border-color: color-mix(in srgb, currentColor 25%, transparent);
  padding-top: 1.2rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
.section-head__index {
  font-size: 0.85rem; letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text, var(--orange));
  font-weight: 700;
}
.section-head__label {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.section-head__label em {
  font-family: var(--font-serif); font-style: italic;
  text-transform: none; font-size: 0.6em; letter-spacing: 0;
  opacity: 0.7;
}
.hint-touch { display: none; }
@media (hover: none) {
  .hint-hover { display: none; }
  .hint-touch { display: inline; }
}
.section-head__hint {
  margin-left: auto; font-size: 0.85rem; opacity: 0.68;
  font-style: italic; font-family: var(--font-serif);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(5rem + var(--gutter));
  padding-bottom: 0;
  overflow: hidden;
}
.hero__top {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  justify-content: space-between; align-items: flex-end;
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
.hero__intro { max-width: 34ch; font-size: 1rem; line-height: 1.5; opacity: 0.85; }
.hero__intro a { text-decoration: underline; text-underline-offset: 3px; }
.hero__intro a:hover { color: var(--accent-text, var(--orange)); }
.pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 3rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.pill__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 55%, transparent); }
  60% { box-shadow: 0 0 0 9px transparent; }
}

.hero__title { position: relative; z-index: 2; }
.hero__line { overflow: hidden; padding-block: 0.02em; }
/* once the reveal has played the line must stop clipping, or the cursor scatter
   cuts the characters off. Scoped to the hero: .hero__line is reused by the
   contact title, whose own reveal still needs the mask. */
.hero-revealed .hero .hero__line { overflow: visible; }
.contact-revealed .contact__title .hero__line { overflow: visible; }
.hero__word {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 14.5vw, 15rem);
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero__word--outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--fg, currentColor);
}
.hero__ast {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 7rem);
  font-weight: 600;
  vertical-align: super;
  display: inline-block;
}
.hero__line .char { display: inline-block; }

.hero__foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end; gap: 2rem;
  margin-top: clamp(1.5rem, 4vh, 3rem);
  padding-bottom: 2rem;
}
.hero__footnote {
  max-width: 34ch;
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.05rem; opacity: 0.8;
}
.hero__badge { position: relative; width: 110px; height: 110px; }
.badge-spin { width: 100%; height: 100%; animation: spin 14s linear infinite; }
.badge-spin text {
  fill: currentColor;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  font-family: var(--font-body); font-weight: 600;
}
.badge-spin__center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 1.4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 899px) {
  .hero__foot { grid-template-columns: 1fr; }
  .hero__badge { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  margin-inline: calc(var(--gutter) * -1);
  border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  padding-block: 1rem;
  overflow: hidden;
}
.marquee { will-change: transform; }
.marquee__track {
  display: flex; white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.manifesto {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: clamp(1.5rem, 3.4vw, 2.9rem);
  line-height: 1.28;
  letter-spacing: 0.005em;
  max-width: 24ch;
}
.manifesto .word { opacity: 0.14; display: inline-block; }
.about__media { position: sticky; top: 15vh; }
.about__media img { border-radius: 4px; }
.about__media figcaption {
  margin-top: 0.8rem;
  font-family: var(--font-serif); font-style: italic;
  font-size: 0.95rem; opacity: 0.65;
}
@media (max-width: 899px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { position: static; max-width: 480px; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 8vw, 6rem);
  background: color-mix(in srgb, currentColor 25%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}
.stat {
  background: var(--bg);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  display: flex; flex-direction: column; gap: 0.4rem;
  transition: background-color 0.9s var(--ease-out);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }

/* ---------- Work ---------- */
.work-list { border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.work-row {
  width: 100%;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1.6fr) minmax(0, 1fr) 5.5rem 2rem;
  align-items: center; gap: 1.2rem;
  padding: clamp(1.2rem, 3vw, 2rem) 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  text-align: left;
  position: relative;
  isolation: isolate;
  transition: color 0.35s var(--ease-out), padding-left 0.35s var(--ease-out);
}
.work-row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fg);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.45s var(--ease-expo);
}
.work-row:hover::before, .work-row:focus-visible::before { transform: scaleY(1); }
.work-row:hover, .work-row:focus-visible { color: var(--bg); padding-left: 1.2rem; }
.work-row__index { font-size: 0.85rem; opacity: 0.68; font-variant-numeric: tabular-nums; }
/* Desktop gets the floating hover preview, so the inline thumb stays out of the way.
   On touch it is the only imagery the Work section has. */
.work-row__thumb { display: none; }
.work-row__thumb img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; border-radius: 4px;
}
@media (hover: none) {
  .work-row {
    grid-template-columns: 2rem 4.5rem minmax(0, 1.6fr) minmax(0, 1fr) 5.5rem 1.5rem;
    align-items: center;
  }
  .work-row__thumb {
    display: block; width: 4.5rem; aspect-ratio: 4 / 5;
    overflow: hidden; border-radius: 4px;
  }
}
.work-row__title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.9rem, 5.2vw, 4rem);
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.work-row__cat { font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.65; }
.work-row__year { font-variant-numeric: tabular-nums; font-size: 0.9rem; opacity: 0.65; text-align: right; }
.work-row__arrow {
  font-size: 1.4rem;
  transform: translateX(-6px) rotate(-45deg);
  transition: transform 0.35s var(--ease-out);
}
.work-row:hover .work-row__arrow { transform: translateX(0) rotate(0deg); }
@media (max-width: 767px) {
  .work-row { grid-template-columns: 2rem minmax(0, 1fr) 2rem; }
  .work-row__cat, .work-row__year { display: none; }
  .work-row__title {
    font-size: clamp(1.5rem, 7vw, 2.4rem);
    white-space: normal; overflow: visible; text-overflow: clip;
    line-height: 1.0;
  }
}
@media (hover: none) and (max-width: 767px) {
  .work-row { grid-template-columns: 4.2rem minmax(0, 1fr) 1.5rem; }
  .work-row__index { display: none; }
  .work-row__thumb { width: 4.2rem; }
}

.work-preview {
  position: fixed; top: 0; left: 0; z-index: 150;
  width: clamp(240px, 26vw, 420px);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  overflow: hidden; border-radius: 6px;
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.work-preview.is-active { opacity: 1; transform: scale(1); }
.work-preview img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.3s;
}
.work-preview img.is-current { opacity: 1; }
@media (hover: none) { .work-preview { display: none; } }

/* ---------- Capabilities ---------- */
.caps > .cap { border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.caps > .cap:first-of-type { border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.cap__head {
  width: 100%;
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: clamp(1.2rem, 3vw, 1.8rem) 0.3rem;
  text-align: left;
}
.cap__num { font-size: 0.85rem; opacity: 0.55; font-variant-numeric: tabular-nums; }
.cap__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.4rem, 3.6vw, 2.6rem);
  text-transform: uppercase;
  transition: transform 0.35s var(--ease-out), color 0.3s;
  transform-origin: left center;
}
.cap__head:hover .cap__name { transform: translateX(0.6rem); color: var(--orange); }
.cap__plus { margin-left: auto; position: relative; width: 18px; height: 18px; flex: none; align-self: center; }
.cap__plus::before, .cap__plus::after {
  content: ""; position: absolute; background: currentColor;
  transition: transform 0.4s var(--ease-out);
}
.cap__plus::before { top: 8px; left: 0; width: 18px; height: 2px; }
.cap__plus::after { top: 0; left: 8px; width: 2px; height: 18px; }
.cap.is-open .cap__plus::after { transform: scaleY(0); }
.cap__body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-expo), visibility 0s 0.55s;
  visibility: hidden;
}
.cap.is-open .cap__body {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.55s var(--ease-expo), visibility 0s;
}
.cap__inner { overflow: hidden; }
.cap__inner p { max-width: 58ch; padding: 0 0.3rem 1.4rem 0; opacity: 0.85; }
.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0 0.3rem 1.8rem 0; }
.tags li {
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 3rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
}
@media (min-width: 768px) {
  .cap__inner p, .tags { margin-left: calc(0.85rem + 1.5rem + 0.3rem); }
}

/* ---------- Awards ---------- */
.award-list { border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); counter-reset: award; }
.award-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.2rem; align-items: baseline;
  padding: 1.1rem 0.3rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  transition: padding-left 0.35s var(--ease-out);
  position: relative;
}
@media (hover: hover) and (pointer: fine) { .award-row:hover { padding-left: 1rem; } }
.award-row:hover .award-row__org { color: var(--accent-text, var(--orange)); }
.award-row__year { font-variant-numeric: tabular-nums; font-size: 0.9rem; opacity: 0.6; }
.award-row__org {
  font-family: var(--font-display); font-weight: 550;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  text-transform: uppercase;
  transition: color 0.3s;
}
.award-row__title { font-size: 0.95rem; opacity: 0.8; }
@media (max-width: 599px) {
  .award-row {
    grid-template-columns: 1fr auto;
    gap: 0.2rem 1rem;
    padding: 0.9rem 0.3rem;
  }
  .award-row__year { grid-column: 2; grid-row: 1; text-align: right; }
  .award-row__org { grid-column: 1; grid-row: 1; }
  .award-row__title { grid-column: 1 / -1; grid-row: 2; }
}
a.award-row__title { text-decoration: underline; text-underline-offset: 3px; }
a.award-row__title:hover { color: var(--accent-text, var(--orange)); opacity: 1; }
/* Linked rows carry a real document; say so instead of relying on an underline. */
a.award-row__title::after {
  content: "Certificate";
  display: inline-block;
  margin-left: 0.7rem;
  padding: 0.12em 0.55em;
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent);
  border-radius: 3rem;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.6;
  vertical-align: 0.15em;
  transition: opacity 0.3s, border-color 0.3s;
}
a.award-row__title[href^="http"]::after { content: "Read"; }
a.award-row__title:hover::after { opacity: 1; border-color: currentColor; }
@media (max-width: 599px) { a.award-row__title::after { margin-left: 0.5rem; font-size: 0.58rem; } }
.awards__jury {
  margin-top: 2.5rem;
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  font-size: 1rem;
}
.awards__jury em { font-family: var(--font-serif); }
.awards__jury-logo { filter: invert(1); width: 28px; height: 28px; }
body[data-theme="ink"] .awards__jury-logo { filter: none; }

/* ---------- Experience ---------- */
.xp__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(2rem, 6vw, 5rem);
}
.xp__col-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 1.3rem; margin-bottom: 1.2rem; opacity: 0.75;
}
.xp__col ul li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 1rem; align-items: baseline;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  font-size: 0.95rem;
}
.xp__col ul li span:first-child { font-weight: 700; }
.xp__col ul li span:nth-child(2) { opacity: 0.7; }
.xp__col ul li span:last-child { font-variant-numeric: tabular-nums; opacity: 0.68; font-size: 0.85rem; }
.xp__note {
  margin-top: 1.4rem;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.6;
}
@media (max-width: 599px) {
  .xp__col ul li { grid-template-columns: 1fr auto; }
  .xp__col ul li span:nth-child(2) { grid-column: 1 / -1; order: 3; font-size: 0.85rem; }
}

/* ---------- Book ---------- */
.book__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.book__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 7rem);
  line-height: 0.98; text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.book__title > span, .book__title > em { white-space: nowrap; }
.book__title em {
  font-family: var(--font-serif); font-style: italic;
  text-transform: none; font-weight: 400;
  letter-spacing: 0.01em;
}
.book__title .char { display: inline-block; }
.book__copy { max-width: 46ch; font-size: 1.1rem; margin-bottom: 2rem; }
.book__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }
.book__media { max-width: 420px; justify-self: center; }
.book__media img { border-radius: 6px; }

/* Portrait shot — offset frame, duotone wash, colour on hover */
.shot {
  --shot-line: var(--orange);
  --shot-tint: var(--orange);
  position: relative;
  width: 100%;
  rotate: -2.5deg;
  transition: rotate 0.8s var(--ease-out);
}
.book .shot {
  --shot-line: var(--fg);
  --shot-tint: var(--ink);
  max-width: 460px;
}
.shot::before {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--shot-line);
  border-radius: 6px;
  translate: 16px 16px;
  transition: translate 0.8s var(--ease-out);
  pointer-events: none;
}
.shot__frame {
  position: relative;
  isolation: isolate;
  overflow: hidden; border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}
.shot__frame img {
  display: block; width: 100%; height: auto;
  filter: grayscale(1) contrast(1.1);
  transition: filter 0.8s var(--ease-out);
}
.shot__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(205deg, var(--shot-tint), transparent 70%);
  mix-blend-mode: multiply;
  opacity: 0.7;
  transition: opacity 0.8s var(--ease-out);
  pointer-events: none;
}
.shot__tag,
.shot__caption {
  position: absolute;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  white-space: nowrap; opacity: 0.85;
}
.shot__tag {
  top: 0; left: -1.5rem;
  writing-mode: vertical-rl; transform: rotate(180deg);
}
.shot__tag i {
  font-family: var(--font-serif); font-style: italic;
  text-transform: none; letter-spacing: 0.06em;
}
.shot__caption {
  left: 0; bottom: -2.5rem;
  font-family: var(--font-serif); font-style: italic;
  text-transform: none; letter-spacing: 0.02em;
  font-size: 0.9rem; font-weight: 400;
}
@media (hover: hover) and (pointer: fine) {
  .shot:hover { rotate: 0deg; }
  .shot:hover::before { translate: 0 0; }
  .shot:hover .shot__frame img { filter: grayscale(0) contrast(1); }
  .shot:hover .shot__frame::after { opacity: 0; }
}

@media (max-width: 899px) {
  .book__grid { grid-template-columns: 1fr; }
  .book__media { justify-self: start; max-width: 320px; }
  .book .shot { max-width: min(300px, 100%); }
  .shot::before { translate: 10px 10px; }
  .shot__tag {
    position: static;
    writing-mode: horizontal-tb;
    transform: none;
    display: block;
    margin-bottom: 0.7rem;
  }
}

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  border-radius: 3rem;
  padding: 0.95rem 1.9rem;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn--solid { background: var(--fg); color: var(--bg); border: 1px solid var(--fg); }
.btn--solid:hover { background: transparent; color: var(--fg); }
.btn--ghost { border: 1px solid color-mix(in srgb, currentColor 45%, transparent); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Contact ---------- */
.contact {
  min-height: 90svh;
  display: flex; flex-direction: column; justify-content: center;
  text-align: left;
}
.contact__eyebrow {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.2rem; opacity: 0.7; margin-bottom: 1rem;
}
.contact__title { margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.contact__index { margin-right: 1rem; }
.contact__mail {
  align-self: flex-start;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 4.5vw, 3.2rem);
  border-bottom: 2px solid var(--orange);
  padding-bottom: 0.2rem;
  transition: color 0.3s;
  will-change: transform;
}
.contact__mail:hover { color: var(--orange); }
.contact__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: clamp(3rem, 8vh, 5rem);
  font-size: 0.95rem;
}
.contact__meta a:hover { color: var(--orange); }
.contact__meta [data-clock] { font-variant-numeric: tabular-nums; }
.contact__socials { display: flex; flex-direction: column; gap: 0.4rem; }
.contact__socials a { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; }

/* ---------- Footer ---------- */
.site-foot {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  font-size: 0.8rem; opacity: 0.9;
}
.site-foot p { opacity: 0.65; }
.site-foot__reg {
  display: inline-flex; align-items: center; gap: 0.35em;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: color 0.3s, text-decoration-color 0.3s;
}
.site-foot__reg:hover { color: var(--accent-text, var(--orange)); text-decoration-color: currentColor; }
.site-foot__top { letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.site-foot__top:hover { color: var(--orange); }

/* Case-study source nodes: in the DOM for crawlers, never painted. */
.case-source { display: none !important; }

/* ---------- Case overlay ---------- */
.case {
  position: fixed; inset: 0; z-index: 260;
  visibility: hidden;
  transition: visibility 0s 0.6s;
}
.case.is-open { visibility: visible; transition-delay: 0s; }
.case__backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 10, 5, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.5s var(--ease-out);
  cursor: pointer;
}
.case.is-open .case__backdrop { opacity: 1; }
.case__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(720px, 94vw);
  background: var(--bone); color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  transform: translateX(102%);
  transition: transform 0.6s var(--ease-expo);
}
.case.is-open .case__panel { transform: none; }
.case__close {
  position: sticky; top: 0; float: right; z-index: 2;
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700;
  background: var(--ink); color: var(--bone);
  border-radius: 3rem; padding: 0.6rem 1.2rem;
}
.case__close:hover { background: var(--orange); }
.case__file {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: #c53a00;
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.case__file::after {
  content: ""; flex: 1; height: 1px;
  background: color-mix(in srgb, currentColor 35%, transparent);
}
.case__file span { font-variant-numeric: tabular-nums; }
.case__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  text-transform: uppercase; line-height: 1;
  margin: 1rem 0 1.5rem;
}
.case__meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  border-top: 1px solid rgba(19, 17, 8, 0.2);
  border-bottom: 1px solid rgba(19, 17, 8, 0.2);
  padding: 1rem 0; margin-bottom: 2rem;
}
.case__meta dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.68; }
.case__meta dd { font-size: 0.95rem; font-weight: 500; }
.case__content > p, .case__content p { margin: 1.2rem 0; max-width: 60ch; }
.case__content figure { margin: 1.5rem 0; border-radius: 6px; overflow: hidden; }
/* Download call-to-action at the foot of a case study */
.case__cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.2rem;
  margin: 2rem 0 0.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}
.case__cta .btn { font-size: 0.85rem; padding: 0.75rem 1.4rem; }

/* outbound arrow, drawn rather than set in a glyph so it matches the type
   weight and lines up on the cap height in every family */
.icon-arrow {
  width: 1em; height: 1em;
  flex: none;
  vertical-align: -0.08em;
  transition: transform 0.35s var(--ease-out);
}
a:hover > .icon-arrow,
.btn:hover .icon-arrow { transform: translate(0.15em, -0.15em); }
.contact__mail .icon-arrow { width: 0.62em; height: 0.62em; stroke-width: 1; }
/* a second document in the same case does not need its own rule above it */
.case__cta--tight { margin-top: 0.9rem; padding-top: 0; border-top: 0; }
.case__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.case__gallery figure { margin: 0; }
.case__gallery figure:only-child { grid-column: 1 / -1; }
@media (max-width: 599px) { .case__gallery { grid-template-columns: 1fr; } }

/* ---------- Reveal defaults (JS enhances) ---------- */
/* Promotion is only worth it while something is actually animating; leaving it on
   pins a compositor layer per element for the life of the page. */
[data-reveal]:not(.is-revealed), [data-img-reveal]:not(.is-revealed) { will-change: transform, opacity; }


/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .noise, .cursor { display: none !important; }
  .shot { rotate: none; }
  .shot::before { translate: 12px 12px; }
  .marquee__track { animation: none; }
  .manifesto .word { opacity: 1; }
}
