/* ==========================================================================
   Federico Zicarelli — Personal brand
   Editorial minimalism · Porsche Olive / Soft Cream / Warm Amber
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Palette */
  --olive: #343C2D;
  --olive-deep: #2B3225;          /* footer / overlay tone */
  --cream: #F0EADF;
  --cream-deep: #E7DFD1;          /* subtle panel tone on cream */
  --amber: #D28A52;               /* decorative: rules, dots, underlines */
  --amber-on-dark: #E09A63;       /* small text on olive (WCAG AA) */
  --amber-on-light: #94552A;      /* small text on cream (WCAG AA) */

  --ink: var(--olive);
  --ink-soft: rgba(52, 60, 45, 0.78);
  --ink-muted: rgba(52, 60, 45, 0.62);
  --line: rgba(52, 60, 45, 0.18);
  --line-light: rgba(240, 234, 223, 0.18);
  --cream-soft: rgba(240, 234, 223, 0.80);
  --cream-muted: rgba(240, 234, 223, 0.62);

  /* Type */
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-h1: clamp(2.75rem, 1.55rem + 4.6vw, 5.25rem);   /* 44 → 84 */
  --fs-h2: clamp(2.25rem, 1.5rem + 2.9vw, 3.75rem);    /* 36 → 60 */
  --fs-h3: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-body: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  --fs-nav: 0.875rem;
  --fs-label: 0.75rem;

  /* Layout */
  --max: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(5.5rem, 4rem + 7vw, 10rem);
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body.is-locked { overflow: hidden; }

h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: italic; }

::selection { background: var(--olive); color: var(--cream); }

:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: 4px;
  border-radius: 1px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--olive); color: var(--cream);
  font-size: var(--fs-nav); font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.nowrap { white-space: nowrap; }

/* ---------- 3. Shared typographic pieces ---------- */
.eyebrow,
.section-index,
.project__category,
.project__num,
.project__status,
.caption {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

.eyebrow {
  display: flex; align-items: center; gap: 0.875rem;
  color: var(--ink);
}
.eyebrow__rule {
  width: 2.25rem; height: 1px; background: var(--amber); flex: none;
}

.section-index {
  display: inline-flex; align-items: baseline; gap: 0.75rem;
  color: var(--ink-soft);
}
.section-index span {
  color: var(--amber-on-light);
  font-feature-settings: "tnum";
}
.section-index--light { color: var(--cream-soft); }
.section-index--light span { color: var(--amber-on-dark); }

.caption {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 0.875rem;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  font-weight: 500;
}
.caption--light { color: var(--cream-muted); }

/* Button: solid Warm Amber, olive text (AA contrast) */
.button {
  display: inline-flex; align-items: center; gap: 0.75rem;
  min-height: 52px;
  padding: 0 1.75rem;
  background: var(--amber);
  color: var(--olive-deep);
  border: 1px solid var(--amber);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.button:hover,
.button:focus-visible { background: var(--olive); border-color: var(--olive); color: var(--cream); }
.button--on-dark:hover,
.button--on-dark:focus-visible { background: var(--cream); border-color: var(--cream); color: var(--olive); }

.arrow {
  display: inline-block;
  transition: transform 0.5s var(--ease-out);
}
a:hover .arrow,
a:focus-visible .arrow { transform: translateX(4px); }

/* Image frames */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--cream-deep);
}
.frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(240, 234, 223, 0.94);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(1.1);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}

.wordmark {
  position: relative; z-index: 2;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark__accent { color: var(--amber); }
.wordmark--light { color: var(--cream); }

.site-nav__list { display: flex; gap: clamp(1.75rem, 3vw, 3rem); }
.site-nav__link {
  position: relative;
  display: inline-block;
  padding-block: 0.5rem;
  font-size: var(--fs-nav);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.2rem;
  height: 1px; background: var(--amber);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.site-nav__link:hover,
.site-nav__link.is-active { color: var(--ink); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }

/* Mobile toggle */
.menu-toggle {
  position: relative; z-index: 2;
  display: none; align-items: center; gap: 0.75rem;
  min-height: 44px; padding-inline: 0.25rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.menu-toggle__lines { display: grid; gap: 5px; width: 22px; }
.menu-toggle__lines span {
  display: block; height: 1px; background: currentColor;
  transition: transform 0.45s var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__lines span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines span:last-child  { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 3rem) var(--gutter) 2rem;
  background: var(--olive);
  color: var(--cream);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}
.mobile-menu.is-open {
  opacity: 1; visibility: visible;
  transition: opacity 0.45s var(--ease), visibility 0s;
}
.mobile-menu__list { display: grid; gap: 0.25rem; }
.mobile-menu__list a {
  display: flex; align-items: baseline; gap: 1rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 11vw, 3.5rem);
  line-height: 1.05;
  transform: translateY(12px); opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.mobile-menu.is-open .mobile-menu__list a { transform: none; opacity: 1; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(2) a { transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-menu__list li:nth-child(3) a { transition-delay: 0.1s; }
.mobile-menu__num {
  font-family: var(--sans); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.14em; color: var(--amber-on-dark);
  min-width: 1.75rem;
}
.mobile-menu__foot {
  font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-muted);
}

/* When the menu is open, header elements sit on olive */
.site-header.menu-open { background: transparent; border-bottom-color: transparent; }
.site-header.menu-open .wordmark,
.site-header.menu-open .menu-toggle { color: var(--cream); }

/* ---------- 5. Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem));
  padding-bottom: 2rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: end;
  flex: 1;
}
.hero__text {
  grid-column: 1 / span 8;
  align-self: center;
  padding-bottom: clamp(1rem, 4vw, 4rem);
}
.hero__title {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  max-width: 8.6em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.hero__title em { font-style: italic; }

.underline-accent {
  background-image: linear-gradient(var(--amber), var(--amber));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 2px;
  padding-bottom: 0.04em;
}

.hero__body {
  display: grid; gap: 1.75rem; justify-items: start;
  margin-top: clamp(2rem, 3.5vw, 3rem);
  margin-left: clamp(0rem, 8vw, 6.5rem);
  max-width: 30rem;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero__figure {
  grid-column: 10 / span 3;
  align-self: end;
  margin-bottom: clamp(1rem, 4vw, 4rem);
}
.frame--portrait { aspect-ratio: 3 / 4; }
/* soften saturated daylight so the photo sits within the warm palette */
.frame--portrait img,
.frame--about img,
.project--agency .project__media img { filter: saturate(0.82) sepia(0.06); }

.hero__meta {
  display: flex; justify-content: space-between; gap: 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  position: relative;
  font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted);
}

/* hairline aligned to the content edge, not the padded container */
.hero__meta::before {
  content: ""; position: absolute; top: 0;
  left: var(--gutter); right: var(--gutter);
  height: 1px; background: var(--line);
}

/* ---------- 6. Projects ---------- */
.projects {
  padding-block: var(--section-y);
}

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 1.5rem;
  align-items: end;
  margin-bottom: clamp(3.5rem, 7vw, 6.5rem);
}
.section-head .section-index { grid-column: 1 / -1; }
.section-head__title {
  grid-column: 1 / span 7;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.section-head__intro {
  grid-column: 9 / span 4;
  max-width: 22rem;
  color: var(--ink-soft);
  padding-bottom: 0.5rem;
}

.project {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
}
.project + .project { margin-top: clamp(5rem, 10vw, 9rem); }

.project__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--cream-deep);
}
.project__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease-out);
}

.project__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1;
  letter-spacing: -0.015em;
}
.project__desc {
  max-width: 26rem;
  font-size: var(--fs-body);
  line-height: 1.65;
}

/* — 01 · Matten Agency: photograph-led, olive panel overlapping — */
.project--agency { align-items: end; }
.project--agency .project__media {
  grid-column: 1 / span 8;
  grid-row: 1;
  aspect-ratio: 4 / 3;
}
.project--agency .project__panel {
  grid-column: 8 / span 5;
  grid-row: 1;
  align-self: end;
  position: relative;
  z-index: 1;
  margin-bottom: clamp(-4rem, -5vw, -2rem);
  padding: clamp(2rem, 4vw, 3.5rem);
  background: var(--olive);
  color: var(--cream);
  display: grid; gap: 1.25rem; justify-items: start;
}
.project--agency .project__num { color: var(--amber-on-dark); }
.project--agency .project__category {
  color: var(--cream-muted);
  font-weight: 500;
  letter-spacing: 0.12em;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-light);
  width: 100%;
}
.project--agency .project__title { margin-top: 0.75rem; }
.project--agency .project__desc { color: var(--cream-soft); margin-bottom: 0.75rem; }

/* — 02 · TheMatten: interface-led, cream panel with technical spec lines — */
.project--tech {
  align-items: stretch;
  margin-top: clamp(8rem, 14vw, 12rem) !important;
}
.project--tech .project__panel {
  grid-column: 1 / span 5;
  display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start;
  padding-block: 1.75rem;
  border-top: 1px solid var(--ink);
}
.project__topline {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  margin-bottom: clamp(1rem, 3vw, 2.5rem);
}
.project--tech .project__num { color: var(--ink-muted); }
.project__status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.project--tech .project__desc { color: var(--ink-soft); }

.project__specs {
  width: 100%;
  border-top: 1px solid var(--line);
  margin-block: 0.5rem 1rem;
}
.project__specs div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.project__specs dt { font-weight: 500; color: var(--ink-muted); }
.project__specs dd { color: var(--ink); }

.project--tech .project__media {
  grid-column: 7 / span 6;
  align-self: center;
  padding: clamp(0.75rem, 1.6vw, 1.25rem);
  background: var(--cream-deep);
  border: 1px solid var(--line);
}
.project--tech .project__media img { height: auto; outline: 1px solid var(--line); }

/* ---------- 7. About ---------- */
.about {
  padding-block: 0 var(--section-y);
  background: var(--olive);
  color: var(--cream);
}
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}
.about__figure {
  grid-column: 1 / span 4;
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  margin-top: clamp(4rem, 9vw, 8rem);
}
.frame--about { aspect-ratio: 4 / 5; background: #3e4636; }

.about__text { grid-column: 6 / span 7; }
.about__title {
  margin-top: 1.75rem;
  max-width: 13ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.about__title em { color: var(--amber-on-dark); }

.about__body {
  display: grid; gap: 1.25rem;
  max-width: 34rem;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--cream-soft);
}
.about__body p:first-child { color: var(--cream); }

.about__statement {
  max-width: 32rem;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-left: 1.5rem;
  border-left: 1px solid var(--amber);
}
.about__statement p {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.2;
  color: var(--cream);
}


/* ---------- 8. Contact ---------- */
.contact { padding-block: var(--section-y); }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: end;
}
.contact__main { grid-column: 1 / span 8; }
.contact__title {
  margin-top: 1.75rem;
  max-width: 14ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.contact__intro {
  max-width: 26rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--ink-soft);
  font-size: var(--fs-lead);
}

.contact__main .button { margin-top: 2.5rem; }

.social {
  grid-column: 10 / span 3;
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}
.social a {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  transition: padding 0.5s var(--ease-out), color 0.3s var(--ease);
}
.social__arrow {
  color: var(--ink-muted);
  transition: transform 0.5s var(--ease-out), color 0.3s var(--ease);
}
.social a:hover { padding-left: 0.5rem; }
.social a:hover .social__arrow { transform: translate(2px, -2px); color: var(--amber-on-light); }

/* ---------- 9. Footer ---------- */
.site-footer {
  background: var(--olive);
  color: var(--cream);
}
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 112px;
  padding-block: 2rem;
}
.site-footer__copy,
.site-footer__top {
  font-size: 0.8125rem;
  color: var(--cream-muted);
  letter-spacing: 0.02em;
}
.site-footer__top { transition: color 0.3s var(--ease); }
.site-footer__top:hover { color: var(--cream); }

/* ---------- 10. Motion ---------- */

/* Reading progress: amber hairline under the header */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--amber);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}
.site-header.menu-open .scroll-progress { opacity: 0; }

/* Interests marquee (top of the About section) */
.marquee {
  overflow: hidden;
  padding-block: clamp(1.75rem, 3vw, 2.75rem);
  margin-bottom: var(--section-y);
  border-bottom: 1px solid var(--line-light);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex: none; }
.marquee__group li {
  display: flex; align-items: center;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 5.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--cream);
  white-space: nowrap;
}
.marquee__group li:nth-child(even) { font-style: italic; color: var(--cream-soft); }
.marquee__group li::after {
  content: "";
  width: 0.14em; height: 0.14em;
  margin-inline: 0.55em;
  border-radius: 50%;
  background: var(--amber);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* Headlines: words rise out of a mask */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.08em 0.14em;
  margin: 0 -0.08em -0.14em;
}
.js .word__inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--delay, 0s) + var(--i, 0) * 65ms);
}
.js .is-visible .word__inner { transform: none; }
.js .reveal[data-split] { opacity: 1; transform: none; }

/* Underline under "ideas." draws in after the headline */
.js .underline-accent {
  background-size: 0% 2px;
  transition: background-size 1.2s var(--ease-out) 0.85s;
}
.js .is-visible .underline-accent { background-size: 100% 2px; }

/* Photographs: curtain reveal + settle */
.js [data-reveal-img] {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.5s var(--ease-out) var(--img-delay, 0.1s);
}
.js [data-reveal-img].is-visible { clip-path: inset(0 0 0 0); }
.js [data-reveal-img] img {
  transform: scale(1.18);
  transition: transform 2s var(--ease-out) var(--img-delay, 0.1s);
}
.js [data-reveal-img].is-visible img { transform: scale(1); }
.frame--portrait { --img-delay: 0.35s; }
.project:hover [data-reveal-img].is-visible img {
  transform: scale(1.04);
  transition-delay: 0s; transition-duration: 1.4s;
}
.project--tech:hover [data-reveal-img].is-visible img { transform: scale(1.015); }

/* Parallax: the picture is taller than its frame and drifts on scroll */
[data-parallax] > picture {
  position: absolute; left: 0; right: 0; top: -8%; bottom: -8%;
  display: block;
  will-change: transform;
}
[data-parallax] > picture img { width: 100%; height: 100%; object-fit: cover; }

/* Matten Agency panel slides up after the photograph */
.js .project--agency .project__panel {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s var(--ease-out) 0.4s, transform 1.3s var(--ease-out) 0.4s;
}
.js .project--agency.is-visible .project__panel { opacity: 1; transform: none; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 11. Responsive ---------- */
@media (max-width: 1024px) {
  .hero__text { grid-column: 1 / span 8; }
  .hero__figure { grid-column: 9 / span 4; }
  .section-head__intro { grid-column: 8 / span 5; }
  .project--agency .project__media { grid-column: 1 / span 9; }
  .project--agency .project__panel { grid-column: 6 / span 7; }
  .project--tech .project__panel { grid-column: 1 / span 6; }
  .project--tech .project__media { grid-column: 7 / span 6; }
  .social { grid-column: 9 / span 4; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }

  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }

  /* Hero */
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2.5rem); }
  .hero__grid { grid-template-columns: 1fr; row-gap: 3rem; }
  .hero__text, .hero__figure { grid-column: 1 / -1; }
  .hero__text { padding-bottom: 0; }
  .hero__body { margin-left: 0; }
  .hero__figure {
    width: min(68%, 320px);
    justify-self: end;
    margin-bottom: 0;
  }
  .hero__meta { flex-direction: column; gap: 0.5rem; }
  .hero__meta-center { display: none; }

  /* Projects */
  .section-head { grid-template-columns: 1fr; }
  .section-head__title, .section-head__intro { grid-column: 1 / -1; }

  .project { grid-template-columns: 1fr; }
  .project--agency .project__media,
  .project--agency .project__panel,
  .project--tech .project__media,
  .project--tech .project__panel { grid-column: 1 / -1; grid-row: auto; }

  .project--agency .project__media { aspect-ratio: 4 / 3; }
  .project--agency .project__panel {
    margin: -2.5rem 0 0 1.25rem;
  }

  .project--tech .project__media { order: -1; margin-bottom: 2rem; }
  .project--tech { margin-top: 6rem !important; }

  /* About */
  .about__grid { grid-template-columns: 1fr; }
  .about__text, .about__figure { grid-column: 1 / -1; }
  .about__text { order: -1; }
  .about__figure {
    position: static;
    width: min(70%, 320px);
    margin-top: 4rem;
  }

  /* Contact */
  .contact__grid { grid-template-columns: 1fr; }
  .contact__main, .social { grid-column: 1 / -1; }
  .social { margin-top: 4rem; }

  .site-footer__inner { flex-wrap: wrap; }
  .site-footer__top { display: none; }
}

@media (max-width: 480px) {
  .hero__title { max-width: none; }
  .project--agency .project__panel { margin-left: 0.75rem; }
  .project__specs div { grid-template-columns: 6.5rem 1fr; }
}

/* ---------- 12. Preferences ---------- */
@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;
  }
  .marquee__track { animation: none; width: auto; }
  .marquee__group { flex-wrap: wrap; flex: 1; }
  .marquee__group[aria-hidden="true"] { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .menu-toggle, .mobile-menu { display: none; }
  .about, .site-footer { background: none; color: var(--olive); }
}
