/* ==========================================================================
   Alexia Monroy — Portafolio 2026
   Concepto UI: "El guion bajo" — el espacio donde algo está por escribirse.
   ========================================================================== */

:root {
  /* Color */
  --paper: #f4f2ed;
  --paper-2: #eae7df;
  --ink: #121211;
  --ink-2: #3a3936;
  --muted: #62605b;
  --line: rgba(18, 18, 17, 0.14);
  --cobalt: #1556f0;
  --cobalt-deep: #0b3fc2;
  --sun: #ffd84d;
  --white: #ffffff;

  /* Type */
  --font-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --fs-xl: clamp(1.75rem, 1.3rem + 2vw, 3rem);
  --fs-2xl: clamp(2.5rem, 1.6rem + 4.2vw, 5.5rem);
  --fs-hero: clamp(3.1rem, 1.2rem + 8.4vw, 10rem);

  /* Space & shape */
  --gutter: clamp(1rem, 0.5rem + 2.4vw, 3rem);
  --section: clamp(5rem, 3rem + 8vw, 11rem);
  --radius: 10px;
  --radius-lg: 18px;
  --max: 1440px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; /* fixed nav never covers anchors or focus */ }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, blockquote { text-wrap: pretty; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
::selection { background: var(--cobalt); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-cobalt :focus-visible, .hero :focus-visible, .contact :focus-visible { outline-color: var(--sun); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 200;
  padding: 0.75rem 1rem; background: var(--ink); color: var(--white); border-radius: 999px;
  transform: translateY(-150%); transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

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

/* Shared pieces ------------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: "_"; color: var(--cobalt); font-weight: 700; }

.section-head {
  display: grid; gap: 1.25rem 3rem; align-items: end;
  padding-bottom: clamp(2rem, 1rem + 3vw, 4rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 1rem + 3vw, 4rem);
}
.section-head h2 {
  font-size: var(--fs-2xl); font-weight: 600; line-height: 0.95; letter-spacing: -0.045em;
}
.section-head p:not(.eyebrow) { max-width: 46ch; color: var(--ink-2); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr auto; }
  .section-head .eyebrow { grid-column: 1 / -1; }
}

.btn {
  --bg: var(--ink); --fg: var(--white);
  position: relative; display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem; min-height: 48px;
  border-radius: 999px; background: var(--bg); color: var(--fg);
  font-weight: 500; font-size: var(--fs-sm); overflow: hidden; isolation: isolate;
  transition: color 0.4s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--cobalt); transform: translateY(101%); transition: transform 0.5s var(--ease);
}
.btn:hover::after, .btn:focus-visible::after { transform: none; }
.btn--light { --bg: var(--white); --fg: var(--ink); }
.btn--light:hover, .btn--light:focus-visible { color: var(--white); }
.btn--light::after { background: var(--ink); }
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.link-u:hover, .link-u:focus-visible { background-size: 100% 1px; }

/* Reveal on scroll */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Loader -------------------------------------------------------------------- */
.loader {
  position: fixed; inset: 0; z-index: 150; display: none;
  place-items: center; background: var(--cobalt); color: var(--white);
  transition: transform 0.9s var(--ease-in-out);
}
.js .loader { display: grid; }
.no-intro .loader { display: none; }
.loader.is-done { transform: translateY(-100%); }
.loader__inner { display: flex; align-items: center; font-size: clamp(2.5rem, 9vw, 6.5rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.loader__inner .us { color: var(--sun); margin-inline: 0.04em; }
.loader__caret { width: 0.06em; height: 0.9em; margin-left: 0.06em; background: currentColor; animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Custom cursor --------------------------------------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 140; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--cobalt); display: none; place-items: center;
  /* white halo keeps the dot visible on cobalt, photos and dark sections */
  box-shadow: 0 0 0 2px var(--white), 0 2px 10px rgba(18, 18, 17, 0.28);
  transition: width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), background-color 0.3s, box-shadow 0.3s, opacity 0.3s;
  will-change: transform;
}
.has-cursor .cursor { display: grid; }
.cursor__label { opacity: 0; color: var(--white); font-size: 0.8rem; font-weight: 500; white-space: nowrap; transition: opacity 0.25s; }
.cursor.is-big { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.cursor.is-big .cursor__label { opacity: 1; }
.cursor.on-dark { background: var(--white); box-shadow: 0 0 0 2px var(--ink), 0 2px 10px rgba(18, 18, 17, 0.35); }
.cursor.on-cobalt { background: var(--sun); box-shadow: 0 0 0 2px var(--white), 0 2px 10px rgba(18, 18, 17, 0.3); }
.cursor.on-cobalt .cursor__label { color: var(--ink); }
.cursor.on-dark .cursor__label { color: var(--ink); }
.cursor.is-hidden { opacity: 0; }
@media (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
  .has-cursor input, .has-cursor textarea, .has-cursor select { cursor: text; }
}

/* Navigation ---------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
  color: var(--white);
  transition: background-color 0.4s, color 0.4s, padding 0.4s var(--ease), transform 0.5s var(--ease);
}
.nav.is-solid {
  background: rgba(244, 242, 237, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  color: var(--ink); padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { font-weight: 700; letter-spacing: -0.04em; font-size: 1.15rem; }
.nav__logo span { color: var(--sun); transition: color 0.4s; }
.nav.is-solid .nav__logo span { color: var(--cobalt); }
.nav__menu { display: flex; gap: clamp(1rem, 2vw, 2.25rem); font-size: var(--fs-sm); }
.nav__menu a { position: relative; padding-block: 0.4rem; }
.nav__menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.nav__menu a:hover::after, .nav__menu a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem; border: 1px solid currentColor; border-radius: 999px; font-size: var(--fs-sm);
  transition: background-color 0.3s, color 0.3s;
}
.nav__cta:hover { background: var(--white); color: var(--ink); }
.nav.is-solid .nav__cta:hover { background: var(--ink); color: var(--white); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.nav__toggle { display: none; min-height: 44px; padding-inline: 0.25rem; font-weight: 500; font-size: var(--fs-sm); }

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; align-items: center; gap: 0.5rem; }
  .nav__toggle::after { content: ""; width: 18px; height: 8px; border-block: 1.5px solid currentColor; transition: transform 0.4s var(--ease); }
  .nav__toggle[aria-expanded="true"]::after { transform: scaleY(0.2); }
  .nav__cta { display: none; }
  .nav__menu {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center;
    padding: var(--gutter); gap: 0.25rem; background: var(--ink); color: var(--white);
    font-size: clamp(2.5rem, 12vw, 4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 0.7s var(--ease-in-out), visibility 0s 0.7s;
  }
  .nav__menu.is-open { clip-path: inset(0); visibility: visible; transition: clip-path 0.7s var(--ease-in-out); }
  .nav:has(.is-open) { color: var(--white); background: transparent; border-color: transparent; backdrop-filter: none; }
  .nav:has(.is-open) .nav__logo span { color: var(--sun); }
}

/* Hero -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 6.5rem var(--gutter) 0;
  background: var(--cobalt); color: var(--white);
}
.hero__top {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  font-size: var(--fs-sm);
}
.hero__top p:first-child { font-style: italic; opacity: 0.9; }
.hero__title {
  align-self: center; padding-block: clamp(2.5rem, 6vh, 5rem);
  font-size: var(--fs-hero); font-weight: 600; line-height: 0.9; letter-spacing: -0.055em;
}
.hero__title em { letter-spacing: -0.03em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: inline-block; }
.js .hero__title .line > span { transform: translateY(105%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--i) * 0.09s + 0.1s); }
.is-loaded .hero__title .line > span { transform: none; }

.hero__bottom {
  position: relative; z-index: 2;
  display: grid; gap: 1.5rem; align-items: end;
  padding-bottom: clamp(1.5rem, 4vh, 3rem);
}
.hero__lede { max-width: 38ch; font-size: var(--fs-lg); line-height: 1.35; letter-spacing: -0.015em; }
.hero__lede strong { font-weight: 600; }
.hero__type { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.hero__type .us { color: var(--sun); margin-right: 0.08em; }
.caret { display: inline-block; width: 0.06em; height: 0.85em; margin-left: 0.05em; vertical-align: -0.05em; background: currentColor; animation: blink 0.9s steps(1) infinite; }
.hero__scroll { display: inline-flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); }
.hero__scroll span { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 50%; transition: background-color 0.3s, color 0.3s; }
.hero__scroll:hover span { background: var(--white); color: var(--cobalt); }
.hero__avatar {
  position: absolute; right: clamp(-1rem, 4vw, 10%); bottom: -3%; z-index: 1;
  width: clamp(170px, 26vw, 400px); pointer-events: none;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  translate: 0 var(--hy, 0); /* scroll drift from motion.js */
  transition: transform 0.8s var(--ease);
}
.js .hero__avatar img { transform: translateY(40%); opacity: 0; transition: transform 1.4s var(--ease) 0.5s, opacity 0.6s 0.5s; }
.is-loaded .hero__avatar img { transform: none; opacity: 1; }
.hero__bottom { padding-right: calc(clamp(170px, 26vw, 400px) * 0.8); }
@media (min-width: 900px) {
  .hero__bottom { grid-template-columns: 1fr auto; padding-right: calc(clamp(170px, 26vw, 400px) + 4vw); }
  .hero__scroll { grid-column: 1; grid-row: 2; }
}
@media (max-width: 899px) {
  .hero__type { font-size: var(--fs-lg); }
}

/* Marquee ------------------------------------------------------------------------ */
.marquee { position: relative; overflow: hidden; padding-block: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); background: var(--paper); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track, .marquee.is-paused .marquee__track, .marquee.is-offscreen .marquee__track { animation-play-state: paused; }
/* WCAG 2.2.2: moving content needs a pause control */
.marquee__toggle {
  position: absolute; right: var(--gutter); top: 50%; z-index: 2; transform: translateY(-50%);
  min-height: 36px; padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(244, 242, 237, 0.92); font-size: var(--fs-xs); color: var(--ink-2);
  opacity: 0; transition: opacity 0.3s, background-color 0.3s, color 0.3s;
}
.marquee:hover .marquee__toggle, .marquee__toggle:focus-visible, .marquee.is-paused .marquee__toggle { opacity: 1; }
.marquee__toggle:hover { background: var(--ink); color: var(--white); }
@media (hover: none) { .marquee__toggle { opacity: 1; } }
.marquee__track ul { display: flex; align-items: center; }
.marquee__track li {
  display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 3rem); padding-right: clamp(1.25rem, 3vw, 3rem);
  font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.04em; white-space: nowrap;
}
.marquee__track li::after { content: "✦"; font-size: 0.45em; color: var(--cobalt); }
.marquee__track li:nth-child(even) { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Work --------------------------------------------------------------------------- */
.section { padding-block: var(--section); }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.filters button {
  min-height: 44px; padding: 0.55rem 1.1rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--fs-sm); color: var(--ink-2); transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.filters button sup { font-size: 0.7em; margin-left: 0.2em; color: var(--muted); }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.filters button[aria-pressed="true"] sup { color: var(--sun); }

.grid { display: grid; gap: clamp(2.5rem, 4vw, 4rem) clamp(1rem, 2.4vw, 2.5rem); }
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(12, 1fr); }
  .card { grid-column: span 6; }
  .card.is-l { grid-column: span 7; }
  .card.is-s { grid-column: span 5; }
}
.card { min-width: 0; }
.card[hidden] { display: none; }
.card.is-entering { animation: cardIn 0.8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px); } }
.card a { display: block; transition: transform 0.2s var(--ease); }
.card a:active { transform: scale(0.985); }
.card__media {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3; background: var(--bg, var(--paper-2));
}
/* same media height in both columns so titles and tags line up across the row */
@media (min-width: 760px) { .card__media { aspect-ratio: auto; height: clamp(300px, 33vw, 560px); } }
.card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* driven by motion.js (parallax + entry zoom); separate from the hover `transform` */
  translate: 0 var(--py, 0); scale: var(--es, 1);
  transition: transform 1.2s var(--ease), opacity 0.6s var(--ease);
}
.card__media img.contain { object-fit: contain; padding: 6%; }
.card__media .alt { opacity: 0; }
.card a:hover .card__media img, .card a:focus-visible .card__media img { transform: scale(1.045); }
.card a:hover .card__media .alt, .card a:focus-visible .card__media .alt { opacity: 1; }
.card__badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500;
  background: rgba(255, 255, 255, 0.92); color: var(--ink);
}
.card__collage { position: absolute; inset: 0; display: grid; gap: 4px; }
.card__collage img { position: static; min-height: 0; }
.card__collage--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }.card__collage--row { grid-template-columns: repeat(4, 1fr); padding: 7% 5%; gap: 3%; }
.card__collage--row img { border-radius: 6px; height: 100%; }

.card__meta { display: grid; grid-template-columns: auto 1fr auto; gap: 0.25rem 1rem; align-items: baseline; padding-top: 1.1rem; }
.card__num { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.card__meta h3 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.card__go {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  transition: background-color 0.4s, color 0.4s, transform 0.5s var(--ease), border-color 0.4s;
}
.card a:hover .card__go, .card a:focus-visible .card__go { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); transform: rotate(-45deg); }
.card__meta p { grid-column: 2 / -1; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; grid-column: 2 / -1; margin-top: 0.5rem; }
.tags li { font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }

/* About ------------------------------------------------------------------------- */
.about { background: var(--white); }
.about__grid { display: grid; gap: clamp(2.5rem, 5vw, 6rem); }
@media (min-width: 960px) { .about__grid { grid-template-columns: 5fr 7fr; align-items: start; } }
.about__visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--cobalt); color: var(--white); aspect-ratio: 4 / 5;
  display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2.5rem); padding: clamp(1.25rem, 2.5vw, 2rem);
}
@media (min-width: 960px) { .about__visual { position: sticky; top: 6rem; } }
.about__visual p { font-size: var(--fs-sm); display: flex; justify-content: space-between; }
.about__visual .about__hello { display: block; font-size: var(--fs-xl); font-weight: 400; letter-spacing: -0.04em; line-height: 1; position: relative; z-index: 2; }
.about__hello strong { font-weight: 700; display: block; }
.about__visual img { position: absolute; right: -4%; bottom: -4%; width: 70%; translate: 0 var(--ay, 0); transition: transform 1s var(--ease); }
.about__visual:hover img { transform: translateY(-3%) rotate(-2deg); }
.about__manifesto { font-size: var(--fs-xl); line-height: 1.12; letter-spacing: -0.035em; font-weight: 500; margin-block: 1.25rem 2rem; }
.about__manifesto em { color: var(--cobalt); }
.about__bio { display: grid; gap: 1rem; color: var(--ink-2); max-width: 60ch; }
.about__bio strong { color: var(--ink); font-weight: 600; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); margin-block: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(4, 1fr); } }
/* number on top, label below: all figures share one baseline regardless of label length */
.facts div { display: grid; grid-template-rows: auto auto; align-content: start; gap: 0.6rem; padding: 1.5rem 1rem 1.5rem 0; border-bottom: 1px solid var(--line); }
.facts dd { grid-row: 1; font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.05em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.facts dt { grid-row: 2; font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); max-width: 18ch; }
.facts dd em { font-size: 0.42em; vertical-align: 0.95em; margin-left: 0.04em; letter-spacing: 0; }

.details { display: grid; gap: 2rem 3rem; }
@media (min-width: 700px) { .details { grid-template-columns: repeat(2, 1fr); } }
.details h3 { font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.75rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.details li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.3rem; }
.details li { align-items: baseline; }
.details li span:last-child { color: var(--muted); text-align: right; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li { display: inline-flex; padding: 0.4rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; font-size: var(--fs-sm); }

/* Services ---------------------------------------------------------------------- */
.services { background: var(--ink); color: var(--white); }
.services .eyebrow, .services .section-head p:not(.eyebrow) { color: rgba(255, 255, 255, 0.72); }
.services .eyebrow::before { color: var(--sun); }
.services .section-head { border-color: rgba(255, 255, 255, 0.18); }
.service { position: relative; border-bottom: 1px solid rgba(255, 255, 255, 0.18); isolation: isolate; }
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--cobalt);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.6s var(--ease);
}
.service:hover::before { transform: scaleY(1); transform-origin: top; }
.service__row {
  display: grid; gap: 0.75rem 2rem; padding: clamp(1.75rem, 3vw, 2.75rem) clamp(0rem, 1vw, 1rem);
}
@media (min-width: 900px) { .service__row { grid-template-columns: 4rem 1.2fr 1.4fr 1fr; align-items: start; } }
.service__num { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; padding-top: 0.6rem; }
.service h3 { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; transition: transform 0.6s var(--ease); }
.service:hover h3 { transform: translateX(0.5rem); }
.service p { color: rgba(255, 255, 255, 0.78); }
.service ul { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.78); }
.service ul li::before { content: "_ "; color: var(--sun); }
.service:hover p, .service:hover ul { color: var(--white); }

.process { margin-top: clamp(4rem, 8vw, 7rem); }
.process h3 { font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); margin-bottom: 2rem; }
.process ol { display: grid; gap: 1px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius-lg); overflow: hidden; counter-reset: step; }
@media (min-width: 700px) { .process ol { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .process ol { grid-template-columns: repeat(4, 1fr); } }
.process li { background: var(--ink); padding: clamp(1.5rem, 2.5vw, 2.25rem); counter-increment: step; display: grid; gap: 0.75rem; align-content: start; min-height: 15rem; transition: background-color 0.4s; }
.process li:hover { background: #1c1c1a; }
.process li::before { content: "0" counter(step); font-family: var(--font-serif); font-style: italic; font-size: 3rem; line-height: 1; color: var(--sun); }
.process h4 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.03em; }
.process p { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.75); }

/* Testimonials ------------------------------------------------------------------ */
.voices__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(88%, 560px); gap: clamp(1rem, 2vw, 2rem);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 0.5rem;
  overscroll-behavior-x: contain;
  /* bleed to the viewport edge instead of clipping at the content column */
  margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.voices__track::-webkit-scrollbar { display: none; }
/* desktop: all three cards fit the content column, nothing gets clipped */
@media (min-width: 1100px) {
  .voices__track { grid-auto-columns: calc((100% - 2 * clamp(1rem, 2vw, 2rem)) / 3); margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
  /* arrows only make sense once there are more than three testimonials */
  .voices:not(:has(.voice:nth-child(4))) .voices__nav { display: none; }
}
.voice {
  scroll-snap-align: start; display: grid; grid-template-rows: 1fr auto; gap: 2rem;
  padding: clamp(1.75rem, 3vw, 2.75rem); border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line);
  min-height: 22rem;
}
.voice blockquote { font-size: var(--fs-lg); line-height: 1.3; letter-spacing: -0.02em; }
.voice blockquote::before { content: "“"; display: block; height: 2.25rem; margin-left: -0.04em; font-family: var(--font-serif); font-size: 5rem; line-height: 0.9; color: var(--cobalt); }
.voice figcaption { display: flex; align-items: center; gap: 0.85rem; font-size: var(--fs-sm); }
.voice figcaption span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper-2); font-weight: 600; }
.voice figcaption small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.voice--placeholder { background: transparent; border-style: dashed; border-color: rgba(18, 18, 17, 0.28); }
.voice--placeholder blockquote { color: var(--muted); }
.voices__nav { display: flex; gap: 0.5rem; }
.voices__nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); transition: background-color 0.3s, color 0.3s; }
.voices__nav button:hover:not(:disabled) { background: var(--ink); color: var(--white); }
.voices__nav button:disabled { opacity: 0.35; cursor: default; }

/* Contact ----------------------------------------------------------------------- */
.contact { background: var(--cobalt); color: var(--white); padding-top: var(--section); overflow: hidden; }
.contact__title {
  font-size: clamp(3.5rem, 1rem + 13vw, 15rem); font-weight: 600; letter-spacing: -0.065em; line-height: 0.85;
  margin-block: 1.5rem clamp(2.5rem, 5vw, 4.5rem);
}
.contact__title .us { color: var(--sun); margin-left: 0.02em; animation: blink 1.1s steps(1) infinite; }
.contact .eyebrow { color: rgba(255, 255, 255, 0.85); }
.contact .eyebrow::before { color: var(--sun); }
.contact__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1fr 1.2fr; } }
.contact__lede { font-size: var(--fs-lg); line-height: 1.35; letter-spacing: -0.015em; max-width: 30ch; margin-bottom: 2rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1rem; margin-bottom: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 999px; font-size: var(--fs-sm);
}
.channels { display: grid; border-top: 1px solid rgba(255, 255, 255, 0.4); }
.channels a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4); font-size: var(--fs-lg); letter-spacing: -0.02em;
  transition: padding 0.5s var(--ease);
}
.channels a:hover { padding-inline: 0.75rem; }
.channels small { display: block; font-size: var(--fs-xs); opacity: 0.8; letter-spacing: 0; }

.form { display: grid; gap: 1.5rem; }
@media (min-width: 600px) { .form { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.75rem 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent; color: var(--white); font-size: var(--fs-lg); border-radius: 0;
  transition: border-color 0.3s;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='m1 1 6 6 6-6'/%3E%3C/svg%3E") right center no-repeat; }
.field select option { color: var(--ink); }
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.4; }
.field ::placeholder { color: rgba(255, 255, 255, 0.74); }
.req { color: var(--sun); }
.form__note { font-size: var(--fs-xs); opacity: 0.9; margin-bottom: -0.5rem; }
.field__error { min-height: 1.25em; font-size: var(--fs-xs); color: var(--white); font-weight: 500; }
.field__error:not(:empty)::before { content: "! "; display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; margin-right: 0.35em; border-radius: 50%; background: var(--sun); color: var(--ink); font-size: 0.85em; }
.field [aria-invalid="true"] { border-bottom-color: var(--sun); border-bottom-width: 2px; }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--sun); border-bottom-width: 2px; }
.field input:user-invalid, .field textarea:user-invalid { border-bottom-color: var(--sun); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.form__status { font-size: var(--fs-sm); min-height: 1.5em; }

.footer { display: grid; gap: 1rem; padding-block: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.4); font-size: var(--fs-sm); }
@media (min-width: 760px) { .footer { grid-template-columns: 1fr auto auto; align-items: center; gap: 2rem; } }
.footer em { font-size: 1.1em; }

/* Case study dialog ---------------------------------------------------------------- */
.case {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink); overflow: hidden;
}
.case::backdrop { background: rgba(18, 18, 17, 0.6); }
.case[open] { animation: caseIn 0.8s var(--ease) both; }
.case.is-closing { animation: caseOut 0.45s var(--ease-in-out) both; }
@keyframes caseIn { from { transform: translateY(100%); } }
@keyframes caseOut { to { transform: translateY(100%); } }
.case__scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.case__bar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.85rem var(--gutter); background: rgba(244, 242, 237, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); font-size: var(--fs-sm);
}
.case__close { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; transition: background-color 0.3s, color 0.3s; }
.case__close:hover { background: var(--ink); color: var(--white); }
.case__body { max-width: 1240px; margin-inline: auto; padding: clamp(2.5rem, 6vw, 6rem) var(--gutter) 0; }
.case__head h2 { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; margin-block: 1rem 1.5rem; }
.case__lede { font-size: var(--fs-lg); line-height: 1.35; letter-spacing: -0.015em; max-width: 44ch; color: var(--ink-2); }
.case__facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem 2rem; margin-block: clamp(2rem, 4vw, 3.5rem); padding-block: 1.5rem; border-block: 1px solid var(--line); }
@media (min-width: 900px) { .case__facts { grid-template-columns: repeat(4, 1fr); } }
.case__facts dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.3rem; }
.case__facts dd { font-size: var(--fs-sm); line-height: 1.45; }
.case__facts a { color: var(--cobalt); }
.case__cover { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg, var(--paper-2)); }
.case__cover img { width: 100%; }
.case__block { display: grid; gap: 1rem 3rem; padding-block: clamp(2.5rem, 5vw, 4.5rem); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .case__block { grid-template-columns: 1fr 2fr; } .case__block > .gallery, .case__block > .swatches { grid-column: 1 / -1; } }
.case__block h3 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.03em; display: flex; gap: 0.75rem; align-items: baseline; }
.case__block h3 span { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--cobalt); }
.case__block > div { display: grid; gap: 1rem; color: var(--ink-2); max-width: 62ch; }
.case__block strong { color: var(--ink); font-weight: 600; }
.case__block ul li { padding-left: 1.2em; position: relative; }
.case__block ul li::before { content: "_"; position: absolute; left: 0; color: var(--cobalt); font-weight: 700; }

.gallery { display: grid; gap: clamp(0.75rem, 1.5vw, 1.25rem); margin-top: 1rem; }
.gallery figure { border-radius: var(--radius); overflow: hidden; background: var(--bg, var(--paper-2)); }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { padding: 0.6rem 0.25rem 0; font-size: var(--fs-xs); color: var(--muted); background: var(--paper); }
.gallery figure:has(figcaption) { background: none; }
.gallery figure:has(figcaption) img { border-radius: var(--radius); background: var(--bg, var(--paper-2)); }
@media (min-width: 640px) {
  .g-2 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(3, 1fr); }
  .g-4 { grid-template-columns: repeat(4, 1fr); }
  .g-12 { grid-template-columns: 1fr 2fr; }
  .gallery .span-all { grid-column: 1 / -1; }
}
.g-4.g-tight { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .g-4.g-tight { grid-template-columns: repeat(4, 1fr); } }

.swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
@media (min-width: 640px) { .swatches { grid-template-columns: repeat(4, 1fr); } }
.swatch { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--white); font-size: var(--fs-xs); }
.swatch i { display: block; height: 5.5rem; background: var(--c); }
.swatch span { display: block; padding: 0.6rem 0.75rem; }
.swatch b { display: block; font-size: var(--fs-sm); font-weight: 600; }

.case__next { display: block; padding-block: clamp(3rem, 6vw, 5rem); text-align: center; }
.case__next small { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.case__next span { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.05em; line-height: 1; transition: color 0.3s; }
.case__next:hover span { color: var(--cobalt); }

/* 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: 0s !important; }
  .marquee__track { animation: none; flex-wrap: wrap; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
