/* ──────────────────────────────────────────────────────────────────────────
   Valentina Freijo — Portfolio
   "Lujo Editorial Minimalista"

   Design system, in code:
   - Type: Fraunces (display, soft-modern serif w/ optical sizing) +
           Söhne-substitute (Inter Tight) for sans body. Hybrid pairing.
   - Color: 5-step organic neutral palette (linen → bone → stone → slate → ink).
            No pure white, no pure black. Tweakable via 3 palette presets.
   - Scale: editorial. h1 clamp(64px, 14vw, 280px), generous leading.
   - Spacing: 12-col grid, vertical rhythm built on 8px baseline.
   - Motion: fade-up on scroll, dot cursor, snap soft scroll.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* Palette default — Niebla (off-white #FDFDFC, ink #12110D) */
  --c-bg:        #FDFDFC;
  --c-bg-soft:   #F4F4F2;
  --c-paper:     #EAEAE7;
  --c-rule:      #D6D5D0;
  --c-mute:      #9C9A93;
  --c-text-soft: #6A6862;   /* accent — supporting copy */
  --c-text:      #12110D;   /* accent — body */
  --c-text-deep: #12110D;   /* primary ink */

  /* Type scale (sans-serif protagonist) */
  --f-display: "Inter", -apple-system, system-ui, sans-serif;
  --f-sans:    "Inter", -apple-system, system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Editorial measure */
  --measure-narrow: 36ch;
  --measure-prose:  56ch;

  /* Page chrome */
  --pad-x: clamp(24px, 6vw, 80px);
  --max-w: 1440px;

  /* Rhythm */
  --rhythm: 8px;
}

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* slight noise/paper texture via radial gradient */
  background-image:
    radial-gradient(1200px 600px at 20% 0%, rgba(214, 208, 194, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 100%, rgba(163, 156, 144, 0.14), transparent 60%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: default; padding: 0; }

/* Custom dot cursor — only when device supports hover */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, [role="button"], input, textarea { cursor: none; }
  .dot-cursor {
    position: fixed; top: 0; left: 0;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-text-deep);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width .25s ease, height .25s ease, opacity .2s ease, background .2s ease;
    mix-blend-mode: multiply;
  }
  .dot-cursor.hover {
    width: 36px; height: 36px;
    background: rgba(54, 50, 48, 0.18);
  }
  .dot-cursor.on-dark {
    background: #FDFDFC;
    mix-blend-mode: difference;
  }
  .dot-cursor.on-dark.hover {
    background: rgba(253, 253, 252, 0.22);
    mix-blend-mode: normal;
  }
}

/* ── Type primitives ─────────────────────────────────────────────────── */
.display {
  font-family: var(--f-display);
  font-weight: 300;
  font-style: normal;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.display-italic {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.03em;
}
.eyebrow {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}
.kicker {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}
.lede {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--c-text);
  max-width: var(--measure-prose);
}
.prose {
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  max-width: var(--measure-prose);
}
.prose-deep {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--c-text);
}
.meta {
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--c-text-soft);
  font-variant-numeric: tabular-nums;
}
.meta-mono {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--c-text-soft);
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.divider {
  height: 0.5px;
  background: var(--c-rule);
  width: 100%;
}
.section {
  padding-block: clamp(80px, 14vh, 160px);
  position: relative;
}
.section + .section {
  border-top: 0.5px solid var(--c-rule);
}

/* Grid scaffolds */
.g-12 { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2.4vw, 32px); }
.g-2  { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 48px); }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad-x);
  background: linear-gradient(to bottom, var(--c-bg) 60%, rgba(242, 237, 228, 0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar .nav-left,
.topbar .nav-right {
  display: flex; align-items: center; gap: 28px;
}
.topbar .brand {
  font-family: "Space Grotesk", "Geist", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.025em;
  text-transform: lowercase;
  line-height: 1;
  transition: font-size .55s cubic-bezier(.2,.7,.2,1);
}
.topbar .brand em { font-style: italic; font-weight: 300; color: var(--c-text-soft); }

/* Hover swap: /freijo ⇄ /valentina.
   Use a 1-cell grid so both names occupy the same cell — the container
   sizes to the widest of the two, so /valentina never gets cut off. */
.topbar .brand-swap {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1em;
  overflow: hidden;
  vertical-align: top;
  text-decoration: none;
}
.topbar .brand-swap:hover,
.topbar .brand-swap:focus-visible { text-decoration: none; }
/* Kill the nav-link underline (::after) on the brand swap */
.topbar .brand-swap::after,
.topbar .brand-swap:hover::after { display: none !important; content: none !important; }

.topbar .brand-swap .brand-default,
.topbar .brand-swap .brand-hover {
  grid-area: 1 / 1;
  display: inline-block;
  white-space: nowrap;
  transition: transform .42s cubic-bezier(.2,.7,.2,1), opacity .3s ease;
  will-change: transform, opacity;
}
.topbar .brand-swap .brand-hover {
  transform: translateY(100%);
  opacity: 0;
}
.topbar .brand-swap:hover .brand-default,
.topbar .brand-swap:focus-visible .brand-default {
  transform: translateY(-100%);
  opacity: 0;
}
.topbar .brand-swap:hover .brand-hover,
.topbar .brand-swap:focus-visible .brand-hover {
  transform: translateY(0);
  opacity: 1;
}

.nav-link {
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--c-text-soft);
  position: relative;
  padding: 4px 0;
  transition: color .3s ease;
}
.nav-link:hover { color: var(--c-text-deep); }
.nav-link.is-active { color: var(--c-text-deep); }
.nav-link.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0.5px;
  background: var(--c-text-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover::after { transform: scaleX(1); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-text-soft);
  border: 0.5px solid var(--c-rule);
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--c-bg-soft);
}
.lang-toggle .seg {
  padding: 1px 4px;
  transition: color .25s ease;
}
.lang-toggle .seg.active { color: var(--c-text-deep); font-weight: 600; }
.lang-toggle .pipe { opacity: .35; }

/* ── HERO ────────────────────────────────────────────────────────────── */
/* ── HERO — large stage card ─────────────────────────────────────────── */
.hero-stage {
  min-height: auto;
  padding-top: clamp(80px, 12vh, 140px);
  padding-bottom: clamp(40px, 6vh, 80px);
  display: block;
}
.hero-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 40%, #6a6864 0%, #5a5854 50%, #4c4a47 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12), 0 6px 16px rgba(0,0,0,0.08);
}
.hero-card-waves {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: auto;
  z-index: 0;
}
.hero-card-grain {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.05) 0.7px, transparent 1.4px),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.10) 0.6px, transparent 1.3px);
  background-size: 14px 14px, 18px 18px;
  mix-blend-mode: overlay;
  opacity: 0.6;
  pointer-events: none;
}
.hero-stage-statement {
  position: relative;
  z-index: 1;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #FDFDFC;
  text-align: center;
  margin: 0;
  padding: 0 clamp(32px, 6vw, 80px);
}
.hs-line { display: block; }
@media (max-width: 880px) {
  .hero-card { aspect-ratio: 4 / 5; }
}

.hero {
  min-height: 92vh;
  padding-top: clamp(120px, 18vh, 200px);
  padding-bottom: clamp(40px, 6vh, 80px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}
.hero-portrait {
  position: relative;
}
.hero-portrait-photo {
  position: absolute;
  top: clamp(120px, 18vh, 180px);
  right: var(--pad-x);
  width: clamp(200px, 24vw, 320px);
  z-index: 2;
  margin: 0;
}
.hp-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(ellipse at 60% 30%, #d8d4cc 0%, #aaa49a 35%, #6b675f 70%, #2e2c28 100%),
    linear-gradient(160deg, #c9c5be 0%, #58544c 100%);
  filter: grayscale(100%) contrast(1.05);
  overflow: hidden;
}
.hp-grain {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.06) 0.7px, transparent 1.4px),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.10) 0.6px, transparent 1.3px);
  background-size: 12px 12px, 16px 16px;
  mix-blend-mode: overlay;
  opacity: 0.7;
}
.hp-caption {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--c-text-soft);
  text-transform: uppercase;
  margin-top: 10px;
  text-align: right;
}
.hero-statement {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 64px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--c-text-deep);
  max-width: 22ch;
  margin: 0;
  position: relative;
  z-index: 1;
}
.hs-line { display: block; }
.hero-rule {
  border: 0;
  border-top: 0.5px solid var(--c-rule);
  margin: clamp(32px, 5vh, 56px) 0 0;
  width: 30%;
  max-width: 320px;
}
@media (max-width: 880px) {
  .hero-portrait-photo {
    position: relative;
    top: auto; right: auto;
    width: 60%;
    margin: 0 auto clamp(24px, 4vh, 40px);
  }
  .hero-statement { max-width: none; }
}

.hero-line {
  display: block;
}
.hero-eyebrow-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(40px, 6vh, 80px);
}
.hero-line {
  display: block;
}

/* Hero variant A — left-stacked, biggest possible */
.hero-A .hero-headline {
  font-size: clamp(64px, 13.5vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-weight: 300;
}
.hero-A .hero-headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--c-text-soft);
}
.hero-A .hero-foot {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 1fr);
  gap: clamp(24px, 4vw, 80px);
  margin-top: clamp(60px, 10vh, 120px);
  align-items: end;
}

/* Hero variant B — centered, narrow column */
.hero-B { align-items: center; text-align: center; }
.hero-B .hero-headline {
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 300;
  max-width: 18ch;
}
.hero-B .hero-headline em { font-style: italic; color: var(--c-text-soft); }
.hero-B .hero-foot {
  margin-top: clamp(60px, 10vh, 120px);
  max-width: 540px;
  text-align: center;
}
.hero-B .hero-eyebrow-row { width: 100%; }

/* Hero variant C — asymmetric, line-broken */
.hero-C .hero-headline {
  font-size: clamp(56px, 10vw, 168px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 300;
}
.hero-C .hero-line:nth-child(2n) { padding-left: clamp(40px, 14vw, 220px); }
.hero-C .hero-line:nth-child(3n) { padding-left: clamp(80px, 22vw, 360px); }
.hero-C .hero-line em { font-style: italic; color: var(--c-text-soft); }
.hero-C .hero-foot {
  margin-top: clamp(60px, 10vh, 120px);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 480px);
  gap: clamp(24px, 4vw, 80px);
  align-items: end;
}

/* ── Section header (used across Process / Services / Work / Contact) ─ */
.s-head {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 80px);
  margin-bottom: clamp(60px, 10vh, 120px);
  align-items: start;
}
.s-head .s-head-label { padding-top: 8px; }
.s-head .s-head-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  max-width: 14ch;
}
.s-head .s-head-title em { font-style: italic; color: var(--c-text-soft); }
.s-head-no-kicker { grid-template-columns: 1fr; }
.s-head-no-kicker > div:only-child .s-head-title { max-width: none; }

/* ── Process — old list (unused) ──────────────────────────────────────── */
.process-list { display: flex; flex-direction: column; }
.process-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 3fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(36px, 6vh, 64px) 0;
  border-top: 0.5px solid var(--c-rule);
  align-items: baseline;
}
.process-row:last-child { border-bottom: 0.5px solid var(--c-rule); }
.process-row .p-num {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--c-text-soft);
  letter-spacing: 0.04em;
}
.process-row .p-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--c-text-deep);
}
.process-row .p-desc {
  font-family: var(--f-sans);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--c-text);
  max-width: 52ch;
}

/* ── Services ────────────────────────────────────────────────────────── */

/* ── (kept) Legacy services-grid variant (unused but harmless) ────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--c-rule);
}
.service-card {
  padding: clamp(36px, 5vh, 56px) clamp(28px, 3vw, 48px) clamp(36px, 5vh, 56px) 0;
  border-bottom: 0.5px solid var(--c-rule);
}
.service-card:nth-child(odd) {
  padding-right: clamp(40px, 5vw, 80px);
  border-right: 0.5px solid var(--c-rule);
}
.service-card:nth-child(even) {
  padding-left: clamp(40px, 5vw, 80px);
}
.service-card .s-num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-text-soft);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 24px;
}
.service-card .s-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-text-deep);
  margin: 0 0 18px;
  max-width: 16ch;
}
.service-card .s-desc {
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--c-text);
  max-width: 42ch;
}

/* Per-project image gradients (CSS-only painterly placeholders).
   Each .w-image-{n} is a different mood, applied wherever the class lands. */
.w-image-01, .w-image-02, .w-image-03, .w-image-04, .w-image-05, .w-image-06 {
  position: relative;
}
.w-image-01::before, .w-image-02::before, .w-image-03::before, .w-image-04::before, .w-image-05::before, .w-image-06::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
}
.w-image-01::after, .w-image-02::after, .w-image-03::after, .w-image-04::after, .w-image-05::after, .w-image-06::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.05) 0.7px, transparent 1.4px),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.10) 0.6px, transparent 1.3px),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.04) 0.5px, transparent 1.1px);
  background-size: 14px 14px, 18px 18px, 22px 22px;
  background-position: 0 0, 5px 7px, 11px 3px;
  mix-blend-mode: overlay;
  opacity: 0.85;
  pointer-events: none;
}

/* Lestrade — paper, document research, warm ink */
.w-image-05::before {
  background-color: #c8b89c;
  background-image:
    radial-gradient(ellipse at 60% 40%, rgba(248, 240, 224, 0.95), transparent 60%),
    linear-gradient(135deg, rgba(54, 50, 48, 0.85), rgba(120, 110, 100, 0.55) 50%, rgba(220, 208, 188, 0.85));
}
/* Vespers — meditation app, deep midnight blue with a soft moon glow */
.w-image-06::before {
  background-image: url(/assets/alavuelta-mockup.png);
  background-size: cover;
  background-position: center;
}
/* Casa Bruna — gastronomy editorial, deeper terracotta-ish neutrals */
.w-image-04::before {
  background-color: #6a5648;
  background-image:
    radial-gradient(ellipse at 30% 70%, rgba(60, 48, 40, 0.95), transparent 65%),
    radial-gradient(ellipse at 80% 30%, rgba(232, 210, 184, 0.85), transparent 55%),
    linear-gradient(155deg, rgba(170, 145, 124, 0.85), rgba(54, 46, 40, 0.85));
}
/* Plover OS — financial ops, cool slate, structured */
.w-image-03::before {
  background-color: #6e7278;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(232, 232, 226, 0.85), transparent 60%),
    linear-gradient(120deg, rgba(60, 64, 70, 0.95), rgba(170, 172, 170, 0.55) 60%, rgba(28, 32, 38, 0.95));
}
/* Marea — poetic archive, foggy water-light */
.w-image-02::before {
  background-color: #b4b6ae;
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(244, 240, 228, 0.95), transparent 65%),
    radial-gradient(ellipse at 70% 80%, rgba(130, 138, 138, 0.85), transparent 60%),
    linear-gradient(160deg, rgba(190, 192, 188, 0.7), rgba(80, 82, 78, 0.85));
}
/* Quartet — chamber music, soft & quiet, warm cream-graphite */
.w-image-01::before {
  background-color: #b8a888;
  background-image:
    radial-gradient(ellipse at 40% 50%, rgba(248, 240, 224, 0.95), transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(110, 96, 84, 0.7), transparent 55%),
    linear-gradient(135deg, rgba(212, 198, 178, 0.7), rgba(70, 60, 52, 0.7));
}

/* ── Contact ─────────────────────────────────────────────────────────── */
.contact-block {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
.contact-headline {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(64px, 11vw, 180px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
}
.contact-headline em { font-style: italic; color: var(--c-text-soft); }
.contact-headline a { display: inline-block; transition: color .3s ease; }
.contact-headline a:hover { color: var(--c-text-soft); }
.contact-aside .lede { margin-bottom: 28px; }
.socials { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 0.5px solid var(--c-rule); }
.social-row {
  display: grid; grid-template-columns: 96px 1fr 16px;
  gap: 16px; padding: 14px 0; border-bottom: 0.5px solid var(--c-rule);
  font-family: var(--f-sans); font-size: 14px; align-items: baseline;
  transition: padding-left .3s ease;
}
.social-row:hover { padding-left: 8px; }
.social-row .k { color: var(--c-text-soft); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.social-row .v { color: var(--c-text-deep); font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.02em; }
.social-row .arr { color: var(--c-text-soft); text-align: right; font-family: var(--f-mono); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer-clip-wrap {
  overflow: hidden;
}
.footer--dark {
  background: #1a1816;
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 1.1s cubic-bezier(.16,1,.3,1);
}
.footer--dark.footer--visible {
  transform: translateY(0);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding-bottom: clamp(32px, 5vh, 56px);
  border-bottom: 0.5px solid rgba(255,255,255,0.12);
}
.footer-col-title {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin: 0 0 16px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col--brand {
  gap: 12px;
}
.footer-brand {
  font-family: "Space Grotesk", "Geist", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.025em;
  color: #fcfaf6;
}
.footer-tagline {
  font-family: var(--f-sans);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin: 0;
}
.footer-col-link {
  font-family: var(--f-sans);
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color .25s ease;
}
a.footer-col-link:hover { color: #fcfaf6; }
.footer-bottom-dark {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: clamp(20px, 3vh, 32px);
  font-family: var(--f-sans);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.02em;
}
.footer-clock { font-variant-numeric: tabular-nums; }

/* ── Bio photo hover ─────────────────────────────────────────────────── */
.bio-photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.bio-photo-item img { border-radius: 10px; }
.bio-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 13, 11, 0.82);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 20px;
  opacity: 0;
  transition: opacity .35s cubic-bezier(.2,.7,.2,1);
}
.bio-photo-item:hover .bio-photo-overlay { opacity: 1; }
.bio-photo-desc {
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(253,250,246,0.85);
  margin: 0;
}
.bio-photo-caption {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(253,250,246,0.45);
}

/* ── Legal page ──────────────────────────────────────────────────────── */
.legal-sections {
  display: flex;
  flex-direction: column;
  margin-top: clamp(32px, 5vh, 56px);
  margin-bottom: clamp(48px, 8vh, 96px);
}
.legal-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.legal-section-title {
  font-family: var(--f-sans);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
  color: var(--c-text-deep);
  margin: 0;
}
.legal-section-body {
  font-family: var(--f-sans);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.75;
  color: var(--c-text-deep);
  margin: 0;
  max-width: 72ch;
}

.footer-simple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0;
}
.footer-copy {
  font-family: var(--f-sans);
  font-size: 15px;
  color: rgba(252,250,246,0.45);
}
.footer-terms {
  font-family: var(--f-sans);
  font-size: 15px;
  color: rgba(252,250,246,0.45);
  text-decoration: none;
  transition: color .25s ease;
}
.footer-terms:hover { color: #fcfaf6; }
.footer-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-icon-link {
  color: rgba(252,250,246,0.45);
  display: flex;
  align-items: center;
  transition: color .25s ease;
}
.footer-icon-link:hover { color: #fcfaf6; }
.footer-icon-link:hover img { filter: brightness(0) invert(1) !important; }

/* legacy — keep for any remaining refs */
.footer-email { display: none; }
.footer-bottom { display: none; }

/* ── Reveal animation ────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Project page — more dramatic entrance */
.proj-detail-page .reveal {
  transform: translateY(60px);
  filter: blur(4px);
  transition: opacity 1.05s cubic-bezier(0.16,1,0.3,1), transform 1.05s cubic-bezier(0.16,1,0.3,1), filter 1.05s cubic-bezier(0.16,1,0.3,1);
}
.proj-detail-page .reveal.in {
  transform: none;
  filter: blur(0);
}
.proj-cover.reveal {
  transform: translateY(60px) scale(0.96);
  filter: blur(6px);
}
.proj-cover.reveal.in {
  transform: none;
  filter: blur(0);
}
.proj-color-cell.reveal {
  transform: translateY(50px);
  filter: blur(3px);
  transition: opacity 0.95s cubic-bezier(0.16,1,0.3,1), transform 0.95s cubic-bezier(0.16,1,0.3,1), filter 0.95s cubic-bezier(0.16,1,0.3,1);
}
.proj-color-cell.reveal.in {
  transform: none;
  filter: blur(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1);
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .55s; }

/* ── Bio page (Cuberto-style: spare, editorial) ──────────────────── */
.bio-page {
  padding: clamp(100px, 16vh, 160px) 0 80px;
  max-width: 1300px;
  margin: 0 auto;
  min-height: 80vh;
}
@media (max-width: 600px) {
  .bio-page { padding-left: 20px; padding-right: 20px; }
}

/* Hero — minimal, no display drama */
.bio-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(40px, 6vh, 64px);
}
.bio-hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--c-text-deep);
}
.bio-hero-photo {
  width: clamp(110px, 14vw, 160px);
  aspect-ratio: 1 / 1;
  background: var(--c-text-deep);
}
@media (max-width: 720px) {
  .bio-hero { grid-template-columns: 1fr; align-items: start; }
  .bio-hero-photo { width: 120px; }
}
.bio-toggle-btn {
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--c-text-deep);
  background: none;
  border: 1.5px solid var(--c-text-deep);
  border-radius: 100px;
  padding: 12px 24px;
  cursor: pointer;
  align-self: center;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  transition: color .35s ease;
}
.bio-toggle-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-text-deep);
  clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
  transition: clip-path .6s cubic-bezier(.2,.7,.2,1);
}
.bio-toggle-btn:hover::before {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}
.bio-toggle-btn:hover { color: var(--c-bg); }
.bio-toggle-btn span { position: relative; z-index: 1; }
@keyframes bio-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bio-fade-in { animation: bio-fade-in .45s cubic-bezier(.2,.7,.2,1) both; }
.bio-photo-stagger {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1);
}
.bio-photo-stagger.in {
  opacity: 1;
  transform: translateY(0);
}

.bio-hero-kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-deep);
}
.bio-hero-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--c-text-deep);
  text-wrap: balance;
}
.bio-hero-lede {
  font-family: var(--f-sans);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.55;
  color: var(--c-text-soft);
  margin: 0;
  max-width: 56ch;
}

/* CTA → reveal gallery */
.bio-cta-row {
  margin-top: clamp(48px, 7vh, 80px);
  display: flex;
  justify-content: flex-start;
}
.bio-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px 18px 24px;
  background: transparent;
  border: 1px solid var(--c-rule);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--c-text-deep);
  transition: background .35s cubic-bezier(.2,.7,.2,1), border-color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  text-align: left;
}
.bio-cta:hover { background: var(--c-text-deep); color: var(--c-bg); border-color: var(--c-text-deep); }
.bio-cta.is-open { background: var(--c-text-deep); color: var(--c-bg); border-color: var(--c-text-deep); }
.bio-cta-label {
  font-family: var(--f-display);
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.bio-cta-hint {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  padding-left: 16px;
  border-left: 1px solid currentColor;
  line-height: 1.2;
}
.bio-cta-arrow {
  font-family: var(--f-sans);
  font-size: 18px;
  line-height: 1;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.bio-cta:hover .bio-cta-arrow { transform: translateY(2px); }
.bio-cta.is-open .bio-cta-arrow { transform: rotate(0deg); }

/* Gallery wrapper */
.bio-gallery {
  margin-top: clamp(40px, 6vh, 64px);
  animation: bio-gallery-in .55s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes bio-gallery-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Wave divider — interactive line that bends with cursor */
.wave-divider {
  position: relative;
  height: 1px;
  width: 100%;
  margin: clamp(40px, 6vh, 64px) 0;
  color: var(--c-text-deep);
  overflow: visible;
}
.wave-hit {
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  height: 40px;
  z-index: 2;
  cursor: crosshair;
  transition: top .35s cubic-bezier(.2,.7,.2,1), height .35s cubic-bezier(.2,.7,.2,1);
}
.wave-divider:hover .wave-hit {
  top: -150px;
  height: 300px;
}
.wave-svg {
  position: absolute;
  left: 0;
  top: -100px;
  width: 100%;
  height: 200px;
  pointer-events: none;
  overflow: visible;
}

/* Prose block — single column, no dividers */
.bio-prose-block {
  display: block;
  margin: 0;
}
.bio-prose-block::after { content: ''; display: table; clear: both; }
.bio-prose-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 64px);
}
.bio-prose-text {
  flex: 1;
  min-width: 0;
  max-width: 800px;
}
.bio-prose-photo {
  flex-shrink: 0;
  width: clamp(200px, 23vw, 300px);
  order: 2;
}
.bio-prose-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}
.bio-prose-p {
  font-family: var(--f-sans);
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.7;
  color: var(--c-text);
  margin: 0 0 1.4em;
  text-wrap: pretty;
}
.bio-prose-p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .bio-prose-inner { flex-direction: column-reverse; }
  .bio-prose-photo { width: 100%; max-width: 280px; }
}
@media (max-width: 480px) {
  .bio-prose-inner { display: block; }
  .bio-prose-photo {
    float: left;
    width: 160px;
    max-width: 160px;
    margin: 0 20px 16px 0;
    shape-outside: url('/assets/perfil.png');
    shape-image-threshold: 0.1;
    shape-margin: 12px;
  }
}

/* Services cards grid */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.svc-item {
  border: 1px solid var(--c-rule);
  border-radius: 14px;
  padding: 28px 26px 32px;
}
.svc-item-title {
  font-family: var(--f-display);
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 600;
  color: var(--c-text-deep);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  line-height: 1.2;
}
.svc-item-desc {
  font-family: var(--f-sans);
  font-size: clamp(14px, 1.1vw, 15px);
  line-height: 1.7;
  color: var(--c-text-mid);
  margin: 0;
  text-wrap: pretty;
}
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; }
}
/* Process — intro lede */
.proc-lede-wrap {
  margin-top: clamp(16px, 2.5vh, 24px);
}

/* Process — lede */
.proc-lede-wrap { max-width: 800px; }
.proc-lede-wrap strong { font-weight: 600; }

/* Process — component wrap */
.proc-wrap {
  margin-top: 32px;
  margin-bottom: clamp(60px, 8vh, 96px);
}

/* ── Desktop: horizontal tabs ── */
.proc-tabs-view { display: block; }
.proc-accordion-view { display: none; }

.proc-tabs-bar {
  display: flex;
  gap: 8px;
  position: relative;
  margin-bottom: 14px;
}
.proc-tabs-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--c-rule);
  transform: translateY(-50%);
  z-index: 0;
}
.proc-tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px;
  border: 1px solid var(--c-rule);
  border-radius: 10px;
  background: var(--c-bg);
  cursor: pointer;
  flex: 1;
  transition: border-color .18s, background .18s;
}
.proc-tab:hover:not(.is-active) { border-color: var(--c-text-mid); }
.proc-tab.is-active {
  background: var(--c-text-deep);
  border-color: var(--c-text-deep);
}
.proc-tab-icon { display: flex; flex-shrink: 0; color: var(--c-text-mid); }
.proc-tab.is-active .proc-tab-icon { color: var(--c-bg); }
.proc-tab-name {
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--c-text-deep);
}
.proc-tab.is-active .proc-tab-name { color: var(--c-bg); }

.proc-tabs-panel {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px 28px 36px;
  background: var(--c-bg);
}
.proc-tabs-desc {
  font-family: var(--f-sans);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.7;
  color: var(--c-text-mid);
  margin: 0;
}

/* ── Mobile: accordion ── */
@media (max-width: 720px) {
  .proc-tabs-view { display: none; }
  .proc-accordion-view { display: flex; flex-direction: column; }
  .proc-wrap { margin-top: 24px; }
}

.proc-acc-item {
  overflow: hidden;
  border-left: 1px solid var(--c-rule);
  border-right: 1px solid var(--c-rule);
  border-bottom: 1px solid var(--c-rule);
}
.proc-acc-item:first-child {
  border-top: 1px solid var(--c-rule);
  border-radius: 10px 10px 0 0;
}
.proc-acc-item:last-child { border-radius: 0 0 10px 10px; }
.proc-acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .2s, color .2s;
}
.proc-acc-item.is-open > .proc-acc-trigger { background: var(--c-text-deep); }
.proc-acc-left { display: flex; align-items: center; gap: 10px; }
.proc-acc-icon { display: flex; color: var(--c-text-mid); }
.proc-acc-item.is-open .proc-acc-icon { color: var(--c-bg); }
.proc-acc-name {
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--c-text-deep);
}
.proc-acc-item.is-open .proc-acc-name { color: var(--c-bg); }
.proc-acc-chevron {
  flex-shrink: 0;
  color: var(--c-text-mid);
  transition: transform .25s ease;
}
.proc-acc-item.is-open .proc-acc-chevron { transform: rotate(180deg); color: var(--c-bg); }
.proc-acc-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.proc-acc-item.is-open .proc-acc-body { max-height: 260px; }
.proc-acc-desc {
  padding: 16px 18px 22px;
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-text-mid);
  margin: 0;
}

/* ── Masonry-style gallery (efferd-style) ──────────────────────────── */
.gallery-section {
  margin: clamp(40px, 8vh, 80px) 0 clamp(40px, 6vh, 60px);
  padding-top: clamp(48px, 8vh, 96px);
  border-top: 0.5px solid var(--c-rule);
}
.gallery-head {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: clamp(40px, 6vh, 64px);
  max-width: 60ch;
}
.gallery-head .kicker {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--c-text-soft); text-transform: uppercase;
}
.gallery-title {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(28px, 3.2vw, 44px); line-height: 1.05;
  letter-spacing: -0.02em; color: var(--c-text-deep);
  margin: 0; max-width: 18ch;
}
.gallery-title em { font-style: italic; color: var(--c-text-soft); }

/* CSS Masonry — true column-fill so heights vary naturally */
.masonry {
  column-count: 3;
  column-gap: 16px;
}
.masonry-item {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .masonry { column-count: 2; }
}
@media (max-width: 880px) {
  .topbar .nav-left .nav-link:not(.brand) { display: none; }
  .s-head { grid-template-columns: 1fr; }
  .contact-block { grid-template-columns: 1fr; }
  .masonry { column-count: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 32px; }
  .proj-body { grid-template-columns: 1fr !important; }
  .proj-sheet { padding: 32px 20px !important; }
}

/* ── Project detail — page mode (project.html) ──────────────────────── */
.proj-page {
  padding-top: clamp(80px, 12vh, 140px);
  padding-bottom: clamp(80px, 12vh, 140px);
}
.proj-sheet--page {
  background: transparent;
  width: 100%; max-width: 1100px; margin: 0 auto;
  padding: 0;
  position: relative;
  animation: none;
  box-shadow: none;
  border: 0;
}
.proj-sheet--page .proj-close {
  position: static;
  display: inline-block;
  margin-bottom: clamp(32px, 5vh, 56px);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-text-soft);
  text-decoration: none;
}
.proj-sheet--page .proj-close:hover { color: var(--c-text-deep); }

/* ── Project detail overlay ─────────────────────────────────────────── */
.proj-overlay {
  position: fixed; inset: 0;
  background: rgba(18, 17, 13, 0.62);  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 80;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 4vw;
  overflow-y: auto;
  animation: projFade .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes projFade { from { opacity: 0; } to { opacity: 1; } }
.proj-sheet {
  background: var(--c-bg);
  width: 100%; max-width: 980px;
  padding: 64px 72px 88px;
  position: relative;
  border: 0.5px solid var(--c-rule);
  animation: projRise .55s cubic-bezier(.2,.7,.2,1);
}
@keyframes projRise { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.proj-close {
  position: absolute; top: 20px; right: 24px;
  background: transparent; border: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--c-text-soft); text-transform: uppercase;
  cursor: pointer; padding: 8px 12px;
  transition: color .25s;
}
.proj-close:hover { color: var(--c-text-deep); }
.proj-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 28px; border-bottom: 0.5px solid var(--c-rule); }
.proj-head .kicker {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--c-text-soft); text-transform: uppercase;
}
.proj-title {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(48px, 6vw, 88px); line-height: 0.98;
  letter-spacing: -0.035em; color: var(--c-text-deep); margin: 0;
}
.proj-title em { font-style: normal; color: var(--c-text-soft); }

/* Project detail — same structure as Bio */
.proj-detail-page { position: relative; }
.proj-detail-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(40px, 6vh, 72px);
}
.proj-detail-sidebar {
  list-style: none;
}
.proj-detail-sidebar::before,
.proj-detail-sidebar::after {
  display: none;
  content: none;
}
.proj-sidebar-title {
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-deep);
  margin-bottom: 16px;
}
.proj-detail-sidebar .proj-meta-grid {
  display: flex;
  flex-direction: column;
  border-top: 0.5px solid var(--c-rule);
}
.proj-detail-sidebar .proj-meta-grid .row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--c-rule);
}
.proj-detail-sidebar .proj-meta-grid .row .k {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--c-text-soft);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.proj-detail-sidebar .proj-meta-grid .row .v {
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--c-text-deep);
  text-align: right;
}
.proj-sidebar-client-full {
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-deep);
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
}
.proj-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}
.proj-link {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--c-text-soft);
  text-decoration: none;
  transition: color .25s ease;
}
.proj-link:hover { color: var(--c-text-deep); }
.proj-link--back {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 0.5px solid var(--c-rule);
}
.proj-link-btn {
  display: block;
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--c-text-deep);
  text-decoration: none;
  text-align: center;
  padding: 12px 16px;
  border: 1.5px solid var(--c-text-deep);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  transition: color .35s ease;
}
.proj-link-btn-inner {
  position: relative;
  z-index: 1;
}
.proj-link-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-text-deep);
  clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
  transition: clip-path .6s cubic-bezier(.2,.7,.2,1);
}
.proj-link-btn:hover::before {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}
.proj-link-btn:hover {
  color: var(--c-bg);
}
@media (max-width: 860px) {
  .proj-detail-body { grid-template-columns: 1fr; }
}
.proj-color-grid {
  --grid-row-h: 420px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: var(--grid-row-h);
  gap: 10px;
  margin-top: clamp(16px, 2vh, 28px);
}
.proj-color-cell { border-radius: 14px; }

/* Grid cell hover caption */
.proj-grid-cap-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}
.proj-grid-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  color: #fff;
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.proj-grid-cap-wrap:hover .proj-grid-caption { transform: translateY(0); }
.proj-grid-cap-wrap img { transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
.proj-grid-cap-wrap:hover img { transform: scale(1.05); }
.proj-no-zoom:hover img { transform: none; }

/* Fila 1: grande (8/12) + chico (4/12) */
.proj-color-cell--0 { grid-column: span 8; grid-row: 1; overflow: hidden; }
.proj-color-cell--1 { grid-column: span 4; grid-row: 1; }

/* Fila 2: card full-width */
.proj-color-cell--2 { grid-column: span 12; grid-row: 2; overflow: hidden; }

/* Fila 3: wrapper flex ocupa toda la fila */
.proj-row-3 { grid-column: span 12; display: flex; gap: 10px; height: var(--grid-row-h); }
.proj-color-cell--3 { flex: 3; }
.proj-color-cell--4 { flex: 6; }
.proj-color-cell--5 { width: 205px; flex-shrink: 0; border-radius: 0; overflow: hidden; }

/* Fila 4: tres celdas iguales */
.proj-row-4 { grid-column: span 12; display: flex; gap: 10px; height: var(--grid-row-h); }
.proj-color-cell--r4 { flex: 1; border-radius: 14px; overflow: hidden; }

/* Next-project preview card — hidden on desktop */
.proj-next-preview {
  display: none;
}

@media (max-width: 720px) {
  /* Hide fixed nav arrows — not useful on mobile */
  .proj-nav { display: none !important; }
  .fab-contact { display: none !important; }

  /* Convert grid to a vertical flex stack — avoids all grid row-sizing conflicts */
  .proj-color-grid {
    --grid-row-h: 220px;
    display: flex;
    flex-direction: column;
  }

  /* Every direct cell: full width, fixed height */
  .proj-color-cell {
    grid-column: unset !important;
    grid-row: unset !important;
    width: 100%;
    height: var(--grid-row-h);
    flex-shrink: 0;
  }

  /* Row 1 squares (Lego): stack the three panels vertically */
  .proj-row-1 {
    height: auto !important;
    flex-direction: column;
  }
  .proj-row-1 > * {
    flex: none !important;
    width: 100% !important;
    height: var(--grid-row-h) !important;
    overflow: hidden;
    position: relative;
  }

  /* Row 3 flex row: stack vertically */
  .proj-row-3 {
    height: auto;
    flex-direction: column;
  }
  .proj-row-3 > * { height: var(--grid-row-h); }
  .proj-color-cell--1 { height: 300px; }
  .proj-color-cell--3 { height: 120px !important; }
  .proj-color-cell--4 { height: 360px !important; }
  .proj-color-cell--5 { width: 100% !important; flex-shrink: 0; height: auto !important; }
  .proj-row-3-squares { width: 100% !important; flex-shrink: 0; }
  .proj-portrait-icon-pair { flex-direction: row !important; height: auto !important; }
  .proj-portrait-icon-pair > * { flex: 1 !important; aspect-ratio: 1 / 1 !important; height: auto !important; }

  /* Yuquerí: backend image — show full panel without cropping */
  .proj-color-cell--1:has(.proj-backend-img) { height: auto !important; }
  .proj-backend-wrap { position: relative; height: auto !important; }
  .proj-backend-img { object-fit: contain !important; position: relative !important; inset: unset !important; height: auto !important; width: 100% !important; }

  /* Yuquerí: split comparison and icons into stacked sections */
  .proj-comp-icons-cell {
    height: auto !important;
    flex-direction: column !important;
  }
  .proj-comp-icons-cell .proj-comparison-wrap {
    height: var(--grid-row-h);
    flex: none !important;
    width: 100%;
  }
  .proj-icons-grid {
    display: flex !important;
    flex-direction: row !important;
    height: auto !important;
    flex: none !important;
  }
  .proj-icons-grid > * {
    flex: 1 !important;
    aspect-ratio: 1 / 1 !important;
  }

  /* Oriental: responsividad rect image — show full mockup without cropping */
  .proj-rect-contain-img {
    object-fit: contain !important;
    position: relative !important;
    inset: unset !important;
    height: auto !important;
    width: 100% !important;
  }
  .proj-oriental-row2 .proj-color-cell:has(.proj-rect-contain-img) {
    height: auto !important;
  }

  /* Oriental layout: stack all cells vertically one at a time */
  .proj-oriental-row1,
  .proj-oriental-row2 {
    flex-direction: column;
    gap: 10px;
  }
  .proj-oriental-row1 .proj-color-cell,
  .proj-oriental-row2 .proj-color-cell {
    flex: none !important;
    width: 100% !important;
    aspect-ratio: unset !important;
  }
  .proj-oriental-row1 .proj-color-cell { height: var(--grid-row-h) !important; }
  .proj-oriental-row2 .proj-color-cell { height: 320px !important; }

  /* Row 4: stack vertically */
  .proj-row-4 {
    height: auto !important;
    flex-direction: column;
  }
  .proj-row-4 > .proj-color-cell--r4 { height: var(--grid-row-h) !important; flex: none !important; width: 100% !important; }
  .proj-row-4 .proj-color-cell--r4:first-child { height: auto !important; }
  .proj-row-4 .proj-color-cell--r4:nth-child(2) { height: 400px !important; }
  .proj-row-4 .proj-color-cell--r4:nth-child(3) { height: 360px !important; }
  .proj-row-1 .proj-color-cell--1 { height: 360px !important; }
  .proj-faces-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: 1fr !important;
    height: auto !important;
  }
  .proj-faces-grid > * { aspect-ratio: 1 / 1 !important; }

  /* A la vuelta gallery */
  .proj-vuelta-row1,
  .proj-vuelta-row2 {
    flex-direction: column !important;
    height: auto !important;
  }
  .proj-vuelta-row1 > *,
  .proj-vuelta-row2 > .proj-color-cell {
    width: 100% !important;
    flex: none !important;
    flex-shrink: 0 !important;
    height: var(--grid-row-h) !important;
  }
  .proj-vuelta-row2 > .reveal:not(.proj-color-cell) {
    width: 100% !important;
    flex: none !important;
    height: var(--grid-row-h) !important;
  }
  .proj-vuelta-cell1,
  .proj-vuelta-cell2,
  .proj-vuelta-cell3 {
    height: auto !important;
    width: 100% !important;
  }
  .proj-vuelta-cell1 img,
  .proj-vuelta-cell2 img {
    width: 100% !important;
    height: auto !important;
    object-fit: unset !important;
    object-position: unset !important;
  }
  .proj-vuelta-cell3 img {
    position: relative !important;
    inset: unset !important;
    width: 100% !important;
    height: auto !important;
    object-fit: unset !important;
  }

  /* Reduce top padding on project pages */
  .proj-page { padding-top: clamp(48px, 7vh, 72px); }

  /* Next project preview card */
  .proj-next-preview {
    display: block;
    position: relative;
    margin: 40px 0 52px;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    text-decoration: none;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
  }
  .proj-next-preview-bg {
    position: absolute;
    inset: 0;
  }
  .proj-next-preview-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(to top, rgba(18,17,13,0.72) 0%, transparent 60%);
  }
  .proj-next-preview-label {
    font-family: var(--f-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 7px;
  }
  .proj-next-preview-name {
    font-family: var(--f-display);
    font-weight: 300;
    font-size: clamp(22px, 5.5vw, 28px);
    letter-spacing: -0.025em;
    line-height: 1.05;
  }
  .proj-next-preview-name em { font-style: normal; opacity: 0.5; }
}

.proj-cover {
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 18px;
  overflow: hidden;
  margin: 0 0 clamp(48px, 7vh, 80px) 0;
  position: relative;
  isolation: isolate;
}
.proj-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 120%;
  top: -10%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  will-change: transform;
  pointer-events: none;
  display: block;
}
.proj-cover-mark {
  position: absolute;
  bottom: 18px;
  left: 22px;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  mix-blend-mode: difference;
}
@media (max-width: 720px) {
  .proj-cover { aspect-ratio: 4 / 3; border-radius: 12px; }
}
.proj-back {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--c-text-soft);
  text-decoration: none;
  margin-bottom: clamp(12px, 1.5vh, 20px);
  margin-top: clamp(8px, 1vh, 14px);
}
.proj-back:hover { color: var(--c-text-deep); }

.proj-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  max-height: 80vh;
  overflow: hidden;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-text-soft);
  font-family: var(--f-sans);
  font-size: 13px;
  padding: 14px 10px;
  transition: color .3s ease, opacity .3s ease;
  opacity: 0.7;
}
.proj-nav:hover { color: var(--c-text-deep); opacity: 1; }
.proj-nav--prev { left: clamp(8px, 2vw, 28px); flex-direction: row; }
.proj-nav--next { right: clamp(8px, 2vw, 28px); flex-direction: row-reverse; }
.proj-nav-arrow {
  font-size: 28px;
  line-height: 1;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.proj-nav--prev:hover .proj-nav-arrow { transform: translateX(-4px); }
.proj-nav--next:hover .proj-nav-arrow { transform: translateX(4px); }
.proj-nav-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity .3s ease, transform .3s ease;
  white-space: nowrap;
  max-height: 70vh;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-nav--next .proj-nav-name { transform: translateX(-4px); }
.proj-nav:hover .proj-nav-name {
  opacity: 1;
  transform: translateX(0);
}

.proj-meta-block {
  margin-top: clamp(48px, 7vh, 80px);
  padding-top: clamp(40px, 6vh, 64px);
  border-top: 0.5px solid var(--c-rule);
}
.proj-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0px;
}
.proj-meta-grid .row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--c-rule);
}
.proj-meta-grid .row .k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}
.proj-meta-grid .row .v {
  font-family: var(--f-display);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 400;
  color: var(--c-text-deep);
  line-height: 1.2;
}

/* Blank project page — title floats over page background */
.proj-page--blank {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: transparent;
}
.proj-page--blank .proj-close {
  position: absolute;
  top: clamp(80px, 12vh, 140px);
  left: var(--shell-pad, 32px);
}
.proj-head--blank {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-bottom: 0;
  padding-bottom: 0;
}
.proj-head--blank .proj-title { font-size: clamp(64px, 9vw, 140px); }
.proj-quote {
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(20px, 2vw, 26px); line-height: 1.4;
  color: var(--c-text-soft); margin: 8px 0 0; max-width: 52ch;
}
.proj-hero {
  position: relative; aspect-ratio: 16/9;
  margin: 36px 0 48px; overflow: hidden;
}
.proj-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; }
.proj-prose .lede {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(20px, 1.7vw, 24px); line-height: 1.45;
  color: var(--c-text-deep); margin: 0 0 24px;
}
.proj-prose .prose {
  font-family: var(--f-sans); font-size: 15.5px; line-height: 1.7;
  color: var(--c-text); margin: 0 0 18px;
}
.proj-meta { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; border-top: 0.5px solid var(--c-rule); }
.proj-meta .row {
  display: grid; grid-template-columns: 90px 1fr; gap: 12px;
  font-family: var(--f-sans); font-size: 12.5px; line-height: 1.5;
  padding: 8px 0; border-bottom: 0.5px solid var(--c-rule);
}
.proj-meta .k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--c-text-soft); text-transform: uppercase; padding-top: 2px; }
.proj-meta .v { color: var(--c-text-deep); }

/* ── Projects · Stack page ──────────────────────────────────────────── */
.ps-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.ps-head {
  padding-top: clamp(110px, 14vh, 160px);
  padding-bottom: clamp(20px, 3vh, 36px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  border-bottom: 0.5px solid var(--c-rule);
}
.ps-head .kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-soft);
  align-self: end;
  justify-self: end;
  order: 2;
}
.ps-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--c-text-deep);
  margin: 0;
}
.ps-title em { font-style: normal; color: var(--c-text-soft); }

.ps-stage {
  position: relative;
  flex: 1;
  min-height: clamp(560px, 78vh, 900px);
  overflow: hidden;
}

/* ── Center editorial quote ─────────────────────────────────────────── */
.ps-quote {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(68ch, 84vw);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.5s;
  z-index: 1;
}
.ps-quote.is-visible { opacity: 1; }

.ps-quote-lead {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(16px, 2.4vw, 38px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--c-text-deep);
  margin: 0 0 32px;
  max-width: 92vw;
  margin-left: auto;
  margin-right: auto;
}
.ps-quote-line {
  display: block;
  white-space: nowrap;
}
.ps-quote-line--greet {
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--c-text-soft);
  margin-bottom: 0.32em;
}
.ps-quote-emoji {
  display: inline-block;
  font-style: normal;
  font-weight: 400;
  /* keep emoji from picking up text gradient/letter-spacing oddities */
  letter-spacing: 0;
  transform: translateY(-0.04em);
}
/* ── RotatingText ────────────────────────────────────────────────────── */
@keyframes revealLTR {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 -4px 0 0); }
}
.text-rotate {
  display: inline-flex;
  flex-wrap: wrap;
  white-space: pre-wrap;
  position: relative;
  font-style: italic;
  font-weight: 600;
  vertical-align: baseline;
}
.text-rotate--pill {
  color: #fff;
  border-radius: 8px;
  padding: 0 13px 3px;
  vertical-align: middle;
}
.text-rotate-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;
}
.text-rotate-word {
  display: inline-flex;
}
.text-rotate-element {
  display: inline-block;
}
.text-rotate-space   { white-space: pre; }
.text-rotate--anim  { animation: revealLTR 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }

.ps-rotor {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  font-style: italic;
  font-weight: 600;
  color: var(--c-text-deep);
}
.ps-rotor-ghost {
  display: inline-block;
  visibility: hidden;
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
}
.ps-rotor-stage {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: block;
  overflow: hidden;
}
.ps-rotor-word {
  position: absolute;
  left: 0; right: 0; top: 0;
  text-align: center;
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(2px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.6s ease,
    color 0.4s ease;
}
.ps-rotor-word.is-current {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.ps-quote-text {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(13.5px, 1.05vw, 15.5px);
  line-height: 1.65;
  color: var(--c-text-soft);
  margin: 0 auto 20px;
  max-width: 56ch;
  text-wrap: pretty;
}
.ps-quote-attr {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-soft);
  margin: 0;
}
.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;
}

/* ── Stack hint (visible only before scatter) ───────────────────────── */
.ps-stack-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(48px, 8vh, 96px);
  transform: translateX(-50%);
  background: transparent;
  border: 0;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 100;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--c-text-soft);
  animation: ps-hint-pulse 2.4s ease-in-out infinite;
}
.ps-stack-hint:hover { color: var(--c-text-deep); }
.ps-stack-hint-line {
  width: 1px;
  height: 28px;
  background: var(--c-rule);
}
@keyframes ps-hint-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-3px); }
}

/* ── Cards layer ────────────────────────────────────────────────────── */
.ps-cards {
  position: absolute;
  inset: 0;
}
.ps-stage:not(.is-open) .ps-cards {
  cursor: pointer;
}
.ps-card {
  position: absolute;
  /* width + height come from inline style (per-card sizing in sections.jsx) */
  background: var(--card-bg, #C9C4B8);
  border-radius: 10px;
  box-shadow:
    0 1px 2px rgba(20, 18, 14, 0.05),
    0 16px 32px -16px rgba(20, 18, 14, 0.18),
    0 30px 60px -30px rgba(20, 18, 14, 0.14);
  text-decoration: none;
  color: inherit;
  transition:
    left 1.8s cubic-bezier(0.22, 1, 0.36, 1),
    top 1.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.8s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.6s ease,
    z-index 0s;
  will-change: transform, left, top;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  outline: none;
}
.ps-card-photo {
  flex: 1;
  background: var(--card-bg, #C9C4B8);
  position: relative;
}
.ps-card-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px 16px;
  background: linear-gradient(to top, rgba(14,12,8,0.55) 0%, transparent 60%);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .4s cubic-bezier(.2,.7,.2,1), transform .4s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.ps-card.is-scattered.is-hover .ps-card-label,
.ps-card.is-scattered:hover .ps-card-label,
.ps-card.is-scattered:focus-visible .ps-card-label {
  opacity: 1;
  transform: translateY(0);
}
/* Only the name is shown on hover — number + year are hidden. */
.ps-card-num,
.ps-card-year {
  display: none;
}
.ps-card-name {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: rgba(252, 250, 246, 0.96);
  text-wrap: balance;
  text-shadow: 0 1px 12px rgba(20, 18, 14, 0.55), 0 0 1px rgba(20, 18, 14, 0.4);
}

/* Hover state — only after scatter */
.ps-card.is-scattered {
  cursor: grab;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.ps-card.is-scattered.is-dragging {
  cursor: grabbing;
  transition: none !important;
}
.ps-card.is-scattered.is-dragging .ps-card-label {
  opacity: 0;
}
.ps-card.is-scattered:hover,
.ps-card.is-scattered:focus-visible {
  /* slightly bigger + straighten a touch + bolder shadow.
     We override the rotation in the rotation chain by using a CSS variable trick
     wouldn't work cleanly here, so instead lean on box-shadow + scale via filter. */
  box-shadow:
    0 2px 4px rgba(20, 18, 14, 0.08),
    0 28px 56px -20px rgba(20, 18, 14, 0.28),
    0 50px 100px -40px rgba(20, 18, 14, 0.22);
}
/* The transform on the card already includes the rotation; we add scale via a
   nested wrapper-less approach: bump the photo + meta inward. Instead, scale the card
   itself but only the visual children — keeps inline style intact. */
.ps-card.is-scattered:hover .ps-card-photo,
.ps-card.is-scattered:focus-visible .ps-card-photo {
  filter: brightness(1.04);
}

/* When NOT open, hide the meta entirely so the deck reads as flat cards */
.ps-stage:not(.is-open) .ps-card {
  pointer-events: none;
}

/* Responsive: scale cards down and allow text to wrap on smaller screens */
@media (max-width: 1024px) {
  .ps-cards { transform: scale(0.82); transform-origin: center center; }
}

/* ── Mobile: phrase on top, static project grid below ───────────────── */
@media (max-width: 720px) {
  /* Stage becomes a normal flow column */
  .ps-stage {
    position: static !important;
    min-height: auto !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
  }

  /* Quote: no longer absolutely centered — sits at top as a block */
  .ps-quote {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    width: auto !important;
    max-width: 100%;
    text-align: left;
    padding: clamp(84px, 16vw, 100px) 20px 28px;
    pointer-events: auto;
  }
  .ps-quote-line { white-space: normal; }
  .ps-quote-lead {
    font-size: clamp(22px, 6vw, 32px);
    line-height: 1.25;
    margin-bottom: 16px;
  }
  .ps-quote-text { font-size: 14px; max-width: 100%; }

  /* Cards layer: two masonry columns, no gaps */
  .ps-cards {
    position: static !important;
    display: block !important;
    column-count: 2 !important;
    column-gap: 10px !important;
    transform: none !important;
    padding: 0 16px 40px !important;
    cursor: auto !important;
  }

  /* Each card: masonry item with aspect-ratio from desktop proportions */
  .ps-card {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex !important;
    flex-direction: column !important;
    break-inside: avoid;
  }
  .ps-cards .ps-card:nth-child(1) { aspect-ratio: 380 / 270; }
  .ps-cards .ps-card:nth-child(2) { aspect-ratio: 360 / 400; }
  .ps-cards .ps-card:nth-child(3) { aspect-ratio: 235 / 305; }
  .ps-cards .ps-card:nth-child(4) { aspect-ratio: 1 / 1 !important; height: calc((100vw - 42px) / 2) !important; }
  .ps-cards .ps-card:nth-child(5) { aspect-ratio: 305 / 410; }
  .ps-cards .ps-card:nth-child(6) { aspect-ratio: 260 / 260; }
  .ps-card .ps-card-photo {
    border-radius: 10px;
    flex: 1;
  }

  /* Always show card name on mobile */
  .ps-card .ps-card-label {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background: linear-gradient(to top, rgba(18,17,13,0.72) 0%, transparent 100%);
    border-radius: 0 0 10px 10px;
  }

  /* Hide the stack hint — not relevant in grid mode */
  .ps-stack-hint { display: none !important; }

  /* Override: cards are always tappable in mobile grid mode */
  .ps-stage:not(.is-open) .ps-card { pointer-events: auto !important; }

  /* Reveal: pure opacity fade (transform: none !important on .ps-card blocks translateY) */
  .ps-cards.reveal-stagger > * {
    transition: opacity .7s cubic-bezier(.2,.7,.2,1);
  }
}


/* ── Off-Menu style nav (trigger + dropdown panel) ─────────────────── */
.omenu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.omenu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  transition: background-color .25s ease, opacity .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.omenu-trigger:hover { background: transparent; }
/* Keep the trigger always visible & in place — even when the panel is open.
   Switch dot color to white so it reads on the dark panel below. */
.omenu-trigger.is-open { background: transparent; }
.omenu-trigger.is-open .omenu-grid > span { background: #FDFDFC; }

/* Subtle hover effect on the icon itself — soft rotation + dot bloom */
.omenu-trigger .omenu-grid {
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.omenu-trigger:hover .omenu-grid {
  transform: rotate(45deg);
}
.omenu-trigger .omenu-grid > span {
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .25s ease;
}
.omenu-trigger:hover .omenu-grid > span {
  transform: scale(1.25);
}

.omenu-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  color: var(--c-text-deep);
  flex: 0 0 auto;
}
.omenu-grid {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3px;
  flex: 0 0 auto;
}
.omenu-grid > span {
  width: 5px;
  height: 5px;
  background: currentColor;
  color: var(--c-text-deep);
  border-radius: 50%;
}

/* Two-phase open: phase A (0→42%) slides LEFT revealing a ~52px strip;
   brief hold 42→54%; phase B (54→100%) grows DOWN to full height. */
@keyframes omenu-open {
  0%   { clip-path: inset(0 0 calc(100% - 52px) 100% round 16px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  42%  { clip-path: inset(0 0 calc(100% - 52px) 0    round 16px); animation-timing-function: linear; }
  54%  { clip-path: inset(0 0 calc(100% - 52px) 0    round 16px); animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
  100% { clip-path: inset(0 0 0                 0    round 16px); }
}
@keyframes omenu-close {
  0%   { clip-path: inset(0 0 0                 0    round 16px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  46%  { clip-path: inset(0 0 calc(100% - 52px) 0    round 16px); animation-timing-function: linear; }
  58%  { clip-path: inset(0 0 calc(100% - 52px) 0    round 16px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  100% { clip-path: inset(0 0 calc(100% - 52px) 100% round 16px); }
}

/* Panel — organic two-phase reveal: first slides open horizontally to the LEFT
   from the trigger, then expands DOWNWARD. Closing reverses the order. */
.omenu-panel {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 252px;
  padding: 50px 20px 18px;
  background: #0E0E0E;
  color: #FDFDFC;
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 80px -20px rgba(0,0,0,0.45),
    0 12px 30px -12px rgba(0,0,0,0.35);
  /* CLOSED: fully clipped — nothing peeks behind the trigger. */
  clip-path: inset(0 0 100% 100% round 16px);
  opacity: 1;
  pointer-events: none;
  z-index: 199;
}
.omenu-panel.is-closing {
  animation: omenu-close .9s cubic-bezier(.4, 0, .2, 1) both;
}
.omenu-panel.is-open {
  pointer-events: auto;
  animation: omenu-open .9s cubic-bezier(.4, 0, .2, 1) both;
}

/* Trigger sits ABOVE the panel so it stays visible at all times. */
.omenu-trigger {
  position: relative;
  z-index: 201;
}

/* Inner content fades in after the surface fully lands (~0.7s). */
.omenu-panel > * {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.omenu-panel.is-open > * {
  opacity: 1;
  transform: translateY(0);
}
.omenu-panel.is-open > *:nth-child(1) { transition-delay: 0.92s; }
.omenu-panel.is-open > *:nth-child(2) { transition-delay: 0.96s; }
.omenu-panel.is-open > *:nth-child(3) { transition-delay: 1.00s; }
.omenu-panel.is-open > *:nth-child(4) { transition-delay: 1.04s; }
.omenu-panel.is-open > *:nth-child(5) { transition-delay: 1.08s; }
.omenu-panel.is-open > *:nth-child(6) { transition-delay: 1.12s; }
.omenu-panel.is-open > *:nth-child(7) { transition-delay: 1.16s; }

.omenu-panel-head { display: none !important; }

.omenu-panel .omenu-links .omenu-link {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.7,.2,1), color .2s ease;
}
.omenu-panel.is-open .omenu-links .omenu-link {
  opacity: 1;
  transform: translateX(0);
}
.omenu-panel.is-open .omenu-links .omenu-link:nth-child(1) { transition-delay: 0.96s; }
.omenu-panel.is-open .omenu-links .omenu-link:nth-child(2) { transition-delay: 1.02s; }
.omenu-panel.is-open .omenu-links .omenu-link:nth-child(3) { transition-delay: 1.08s; }
.omenu-panel.is-open .omenu-links .omenu-link:nth-child(4) { transition-delay: 1.14s; }
.omenu-panel.is-open .omenu-links .omenu-link:nth-child(5) { transition-delay: 1.20s; }
.omenu-panel.is-open .omenu-links .omenu-link:nth-child(6) { transition-delay: 1.26s; }

@media (prefers-reduced-motion: reduce) {
  .omenu-panel,
  .omenu-panel > *,
  .omenu-panel .omenu-links .omenu-link {
    transition-duration: .15s !important;
    transition-delay: 0s !important;
  }
  .omenu-panel { clip-path: none; }
}

.omenu-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 14px;
  color: #FDFDFC;
}
.omenu-panel-head .omenu-dot { color: #FDFDFC; }
.omenu-panel-head .omenu-grid > span { color: #FDFDFC; }

/* Links */
.omenu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 4px;
}
.omenu-link {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: rgba(253,253,252,0.62);
  text-decoration: none;
  padding: 4px 0;
  transition: color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1), letter-spacing .35s cubic-bezier(.2,.7,.2,1);
  display: inline-block;
  width: max-content;
}
.omenu-link:hover {
  color: #FDFDFC;
  transform: translateX(10px);
  letter-spacing: -0.005em;
}
.omenu-link.is-active { color: rgba(253,253,252,0.92); }

.omenu-links-sm .omenu-link {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.005em;
  padding: 2px 0;
}

.omenu-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 14px 4px;
}

.omenu-section-label {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-transform: none;
  color: rgba(253,253,252,0.45);
  padding: 2px 4px 8px;
}

/* Social row */
.omenu-socials {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 2px;
}
.omenu-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: rgba(253,253,252,0.62);
  transition: color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.omenu-social:hover {
  color: #FDFDFC;
  transform: translateY(-1px);
}
.omenu-social svg { display: block; }
.omenu-social-img { filter: brightness(0) invert(1) opacity(0.62); transition: filter .25s ease; }
.omenu-social:hover .omenu-social-img { filter: brightness(0) invert(1); }

.omenu-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px;
}
.omenu-lang-row .omenu-section-label { padding: 0; }
.omenu-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(253,253,252,0.55);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.omenu-lang-toggle .seg { padding: 1px 4px; transition: color .2s ease; }
.omenu-lang-toggle .seg.active { color: #FDFDFC; font-weight: 600; }
.omenu-lang-toggle .pipe { opacity: .4; }

@media (max-width: 720px) {
  .omenu-panel { width: 260px; right: 0; }
}


/* ── Floating Conversemos FAB ─────────────────────────────────────────── */
.fab-contact {
  position: fixed;
  right: clamp(20px, 3vw, 36px);
  bottom: clamp(20px, 3vw, 36px);
  width: 96px;
  height: 96px;
  z-index: 80;
  display: block;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fab-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #d9d6cf;
  box-shadow: 0 6px 28px rgba(20, 18, 14, 0.18), 0 1px 2px rgba(20, 18, 14, 0.08);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, background-color .35s ease;
}
.fab-contact:hover::before {
  background: #cfccc4;
  box-shadow: 0 10px 36px rgba(20, 18, 14, 0.24), 0 2px 4px rgba(20, 18, 14, 0.1);
}

.fab-avatar {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
  background: #fefefe;
}
.fab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  display: block;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.fab-contact:hover .fab-avatar img {
  transform: scale(1.05);
}

/* Circular SVG text ring */
.fab-text-ring {
  position: absolute;
  inset: -22px;
  width: calc(100% + 44px);
  height: calc(100% + 44px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s cubic-bezier(.2,.7,.2,1);
  animation: fabTextSpin 10s linear infinite;
  animation-play-state: paused;
}
.fab-text-ring text {
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  fill: var(--c-text-deep, #1a1816);
  text-transform: uppercase;
  font-weight: 500;
}
.fab-contact:hover .fab-text-ring {
  opacity: 1;
  animation-play-state: running;
}
@keyframes fabTextSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .fab-text-ring { animation: none; }
}

@media (max-width: 720px) {
  .fab-contact {
    width: 76px;
    height: 76px;
  }
}


/* ── Contact page ────────────────────────────────────────────────────── */
.contact-page {
  padding: clamp(120px, 14vh, 180px) 0 clamp(120px, 16vh, 200px);
}
.contact-hero {
  max-width: 920px;
  margin: 0 auto 64px;
}
.contact-hero .kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-soft);
  display: block;
  margin-bottom: 20px;
}
.contact-title {
  font-size: clamp(56px, 9vw, 124px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 300;
  color: var(--c-text-deep);
  margin: 0 0 28px;
  text-wrap: pretty;
}
.contact-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--c-text-soft);
}
.contact-lede {
  font-family: var(--f-sans);
  font-size: 19px;
  line-height: 1.55;
  color: var(--c-text-soft);
  max-width: 56ch;
  margin: 0;
}

/* Grid: meta column + form column */
.contact-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
}
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
}

/* Meta column */
.contact-meta { display: flex; flex-direction: column; gap: 28px; }
.cm-block { display: flex; flex-direction: column; gap: 6px; }
.cm-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}
.cm-value, .cm-email {
  font-family: var(--f-sans);
  font-size: 15px;
  color: var(--c-text-deep);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
}
.cm-email { transition: color .25s ease; }
.cm-email:hover { color: var(--c-accent, #BB1F00); }
.cm-socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cm-social-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--c-rule);
  transition: padding-left .35s cubic-bezier(.2,.7,.2,1), border-color .25s ease;
}
.cm-social-link:hover { padding-left: 4px; border-color: var(--c-text-deep); }
.cm-social-name {
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--c-text-deep);
  font-weight: 500;
}
.cm-social-value {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-text-soft);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cf-row { display: flex; flex-direction: column; gap: 22px; }
.cf-row--two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 560px) { .cf-row--two { grid-template-columns: 1fr; } }

.cf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cf-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}
.cf-input {
  font-family: var(--f-sans);
  font-size: clamp(17px, 1.3vw, 19px);
  color: var(--c-text-deep);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--c-rule);
  padding: 10px 0;
  outline: none;
  border-radius: 0;
  transition: border-color .25s ease;
  width: 100%;
}
.cf-input::placeholder { color: var(--c-text-soft); opacity: 0.65; }
.cf-input:focus { border-color: var(--c-text-deep); }
.cf-textarea {
  resize: vertical;
  min-height: 130px;
  font-family: var(--f-sans);
  line-height: 1.5;
}
.cf-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
  cursor: pointer;
}

.cf-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cf-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  background: var(--c-text-deep);
  color: var(--c-bg);
  border: 0;
  padding: 16px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .25s ease, opacity .2s ease;
}
.cf-submit:hover { transform: translateY(-1px); }
.cf-submit:disabled { opacity: 0.6; cursor: progress; }
.cf-submit span {
  display: inline-block;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.cf-submit:hover span { transform: translateX(4px); }

.cf-status { font-family: var(--f-mono); font-size: 12px; }
.cf-status--error { color: #BB1F00; }

/* Chips */
.cf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cf-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--c-rule);
  background: transparent;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-soft);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
  line-height: 1;
}
.cf-chip:hover {
  border-color: var(--c-text);
  color: var(--c-text);
}
.cf-chip.is-active {
  background: var(--c-text-deep);
  border-color: var(--c-text-deep);
  color: var(--c-bg);
}

/* File upload */
.cf-file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1.5px dashed var(--c-rule);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: border-color .2s ease, background .2s ease;
}
.cf-file:hover { border-color: var(--c-text); background: var(--c-bg-soft); }
.cf-file.has-file { border-style: solid; border-color: var(--c-text); }
.cf-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--c-rule);
  font-size: 14px;
  color: var(--c-text);
  transition: background .2s ease;
}
.cf-file.has-file .cf-file-icon { background: var(--c-text-deep); color: var(--c-bg); border-color: var(--c-text-deep); }
.cf-file-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.cf-file-text {
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cf-file-note {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--c-text-soft);
}
.cf-file-remove {
  font-size: 11px;
  color: var(--c-text-soft);
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color .2s ease, background .2s ease;
}
.cf-file-remove:hover { color: var(--c-text-deep); background: var(--c-paper); }

/* Bottom row: email + submit */
.cf-bottom-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: flex-end;
}
@media (max-width: 560px) {
  .cf-bottom-row { grid-template-columns: 1fr; }
  .cf-bottom-row .cf-actions { margin-top: 4px; }
}

/* Success state */
.contact-form.is-sent {
  min-height: 320px;
  align-items: flex-start;
  justify-content: center;
}
.cf-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 36px 0;
  animation: cf-fade-in .5s cubic-bezier(.2,.7,.2,1) both;
}
.cf-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--c-text-deep);
  color: var(--c-bg);
  font-size: 22px;
  font-weight: 500;
}
.cf-success-text {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--c-text-deep);
  margin: 0;
  max-width: 28ch;
  font-weight: 400;
}
.cf-success-reset {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--c-text-soft);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color .25s ease;
}
.cf-success-reset:hover { color: var(--c-text-deep); }

@keyframes cf-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Natural Language Form ───────────────────────────────────────────── */
.nlf-form {
  margin-top: clamp(40px, 6vh, 72px);
  max-width: 64ch;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nlf-line {
  font-family: var(--f-sans);
  font-size: clamp(17px, 1.3vw, 19px);
  font-weight: 400;
  line-height: 2;
  color: var(--c-text-deep);
  margin: 0 0 0.4em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 5px;
}
.nlf-line--block {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.nlf-text {
  color: var(--c-text-deep);
}
.nlf-input,
.nlf-select {
  font-family: var(--f-sans);
  font-size: inherit;
  font-weight: 400;
  font-style: italic;
  color: var(--c-text-deep);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--c-mute);
  outline: none;
  padding: 0 4px 2px;
  min-width: 140px;
  transition: border-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
  cursor: text;
}
.nlf-input::placeholder { color: var(--c-mute); font-style: normal; }
.nlf-input--error { border-bottom-color: #ff2009 !important; }
.nlf-hint {
  font-family: var(--f-sans);
  font-size: 11px;
  color: #ff2009;
}
.nlf-input:focus,
.nlf-select:focus {
  border-bottom-color: var(--c-text-deep);
}
.nlf-select {
  cursor: pointer;
  padding-right: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239C9A93'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}
.nlf-textarea {
  font-family: var(--f-sans);
  font-size: inherit;
  font-weight: 400;
  font-style: italic;
  color: var(--c-text-deep);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--c-mute);
  outline: none;
  padding: 4px 4px 6px;
  width: 100%;
  resize: none;
  overflow: hidden;
  min-height: 40px;
  line-height: 1.7;
  transition: border-color .2s ease;
}
.nlf-textarea::placeholder { color: var(--c-mute); font-style: normal; }
.nlf-textarea:focus { border-bottom-color: var(--c-text-deep); }
.nlf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: clamp(32px, 5vh, 56px);
}
.nlf-privacy {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--c-text-soft);
  cursor: pointer;
}
.nlf-privacy input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--c-text-deep);
  flex-shrink: 0;
  cursor: pointer;
}
.nlf-privacy-link {
  color: var(--c-text-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nlf-submit {
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--c-text-deep);
  background: none;
  border: 1.5px solid var(--c-text-deep);
  border-radius: 100px;
  padding: 12px 28px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: color .35s ease;
}
.nlf-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-text-deep);
  clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
  transition: clip-path .6s cubic-bezier(.2,.7,.2,1);
}
.nlf-submit:hover::before { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
.nlf-submit:hover { color: var(--c-bg); }
.nlf-submit:disabled { opacity: 0.6; cursor: progress; }
.nlf-submit span { position: relative; z-index: 1; }
.nlf-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-top: clamp(40px, 6vh, 72px);
  animation: cf-fade-in .5s cubic-bezier(.2,.7,.2,1) both;
}
.nlf-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 999px;
  background: var(--c-text-deep);
  color: var(--c-bg);
  font-size: 22px;
}
.nlf-success-text {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 300;
  color: var(--c-text-deep);
  margin: 0;
}
@media (max-width: 600px) {
  .nlf-line { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.9; }
  .nlf-input, .nlf-select { min-width: 120px; }
  .nlf-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .ps-quote-line:not(.ps-quote-line--greet) { display: inline; }
}
