/* ============================================================
   Andrea Correa — Portfolio
   Editorial minimalist system. Serif display + grotesque body.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* ===== Design System tokens — Portfolio 2026 ===== */
  /* Purple scale */
  --purple-50:  #FBEFFF;  --purple-100: #F5E7FF;  --purple-200: #EDD4FF;
  --purple-300: #E0B3FF;  --purple-400: #C670FF;  --purple-500: #B951FB;
  --purple-600: #A72EEF;  --purple-700: #901ED2;  --purple-800: #791EAB;
  --purple-900: #631989;  --purple-950: #450566;
  /* Neutral scale */
  --neutral-100: #FBFAFC; --neutral-200: #F4EFF7; --neutral-300: #D8D5DB;
  --neutral-400: #BAB7BD; --neutral-500: #969399; --neutral-600: #757178;
  --neutral-700: #636066; --neutral-800: #312F33; --neutral-900: #1D1C1F;

  /* Spacing (4px base) */
  --space-1: 4px;  --space-2: 8px;   --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px;  --space-8: 32px; --space-10: 40px;
  --space-12: 48px;--space-16: 64px; --space-20: 80px;--space-24: 96px;

  /* Radius */
  --radius-sm: 4px; --radius-m: 8px; --radius-l: 12px; --radius-xl: 16px;
  --radius-2xl: 24px; --radius-3xl: 32px; --radius-full: 9999px;

  /* Shadows */
  --shadow-1: 0 1px 4px rgba(12,12,13,0.05);
  --shadow-2: 0 2px 4px rgba(12,12,13,0.05), 0 4px 6px rgba(12,12,13,0.10);
  --shadow-3: 0 4px 4px rgba(12,12,13,0.05), 0 12px 16px rgba(12,12,13,0.08);
  --shadow-4: 0 4px 4px rgba(12,12,13,0.05), 0 16px 32px rgba(12,12,13,0.10);
  --shadow-5: 0 16px 32px rgba(12,12,13,0.40);
  --shadow-6: inset 2px 2px 6px rgba(30,28,31,0.25);

  /* ===== Semantic mapping — LIGHT (default) ===== */
  color-scheme: light;
  --paper:      var(--neutral-100); /* Neutral/100 background */
  --paper-2:    #F4EFF7;            /* cards/placeholders (neutral-200) */
  --paper-3:    #ECE7F0;            /* tint */
  --ink:        var(--neutral-900);
  --ink-soft:   var(--neutral-800);
  --muted:      var(--neutral-700);
  --muted-2:    var(--neutral-500);
  --hairline:   #E7E3EC;            /* cool light hairline */
  --hairline-2: #F1EEF5;
  --lav:        var(--purple-300);  /* primary button fill */
  --lav-soft:   var(--purple-200);
  --btn-stroke: rgba(29,28,31,0.22);   /* secondary button outline */
  --btn-stroke-strong: rgba(29,28,31,0.45);
  --accent:     var(--purple-700);  /* marks, links, bullets */
  --accent-ink: var(--purple-950);

  --inkbg:      #081219;            /* dark navy footer */
  --inkbg-soft: #1B2730;
  --ondark:     #FBFAFC;           /* constant light text on dark surfaces */

  --serif: "Caprasimo", ui-serif, Georgia, "Times New Roman", serif;
  --sans:  "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 64ch;

  --t-fast: 180ms cubic-bezier(.4,0,.2,1);
  --t-med:  360ms cubic-bezier(.4,0,.2,1);
  --t-slow: 720ms cubic-bezier(.16,1,.3,1);
}

/* ===== DARK MODE ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:      #0F141A;            /* dark surface */
  --paper-2:    #19212A;            /* cards/placeholders */
  --paper-3:    #232C36;
  --ink:        #FBFAFC;
  --ink-soft:   #E2DEE8;
  --muted:      #A6A2AE;
  --muted-2:    #7B7886;
  --hairline:   #2A333D;
  --hairline-2: #1E262F;
  --lav:        var(--purple-300);  /* primary button fill — matches light, high contrast on dark */
  --lav-soft:   var(--purple-800);
  --btn-stroke: rgba(255,255,255,0.24);   /* secondary button outline — thin & muted */
  --btn-stroke-strong: rgba(255,255,255,0.52);
  --accent:     var(--purple-400);  /* vibrant purple accent on dark */
  --accent-ink: var(--purple-300);

  --inkbg:      #080D12;            /* footer slightly deeper than page */
  --inkbg-soft: #161E26;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  font-family: var(--sans);
  background-color: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  overflow-x: clip;
  transition: color 300ms ease;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: var(--ondark); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 1024px) { .fig-section > .wrap { padding-inline: 120px; } .morework-section.wrap { padding-inline: 120px; } }
.measure { max-width: var(--measure); }
.section { padding-block: clamp(4.5rem, 11vw, 9rem); }
.hairline { border: 0; border-top: 1px solid var(--hairline); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
.display {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.75rem);  /* → Display One 60px */
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 400;
}
.display em, h1 em, h2 em, h3 em { font-style: normal; font-weight: 400; color: var(--accent); }
.h2 { font-size: clamp(1.75rem, 3.6vw, 2.25rem); line-height: 1.1; }  /* Heading-xl/2xl */
.h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -0.01em; }  /* Subtitle */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { color: var(--accent); }

.lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--ink-soft); letter-spacing: 0; }
.body { color: var(--ink-soft); font-size: 1.125rem; line-height: 1.55; }
.body--muted { color: var(--muted); }
.serif-note { font-family: var(--serif); color: var(--muted); }

/* ---------- Links / inline ---------- */
.link {
  position: relative;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--t-med);
}
.link:hover::after { transform: scaleX(1); }
.link .arr { transition: transform var(--t-fast); }
.link:hover .arr { transform: translateX(3px); }

/* ---------- Buttons (pill, 2px stroke, Work Sans 700) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1.5; letter-spacing: 0;
  padding: 14px 28px; border-radius: var(--radius-full); border: 2px solid transparent; color: var(--ink);
  background: transparent;
  transition: transform 220ms cubic-bezier(.16,1,.3,1), background-color 300ms ease-out, color 300ms ease-out, border-color 300ms ease-out;
}
/* Hover: a circular layer grows from the bottom-center, under the label.
   A real round element scaled with transform — GPU-smooth — so the circle
   is visibly round as it expands. The button never moves, scales, or lifts. */
/* The circle is a REAL child element (<span class="btn__fill">) scaled with
   transform — GPU-smooth and visibly round as it grows. */
.btn--primary, .btn--secondary { position: relative; }
/* Smart-animate style: a circle rises from the button's BOTTOM-center and
   expands until it fully covers the button. The element is a true circle
   (equal w/h, border-radius 50%) sized large enough that, anchored at the
   bottom edge, scale(1) reaches every corner — so it reads as a circle
   filling the button, not a dome cap. */
.btn__fill { display: none; }
.btn__label { position: relative; }
/* Primary — soft lavender fill, dark label. Hover: gentle scale only. */
.btn--primary { background-color: var(--purple-300); color: var(--neutral-900); border: 0; padding: 16px 30px; }
.btn--primary:hover { transform: scale(1.04); }
/* Secondary — white pill, dark 2px outline, dark label. Hover: gentle scale only. */
.btn--secondary { background-color: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn--secondary:hover { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .btn__fill { transition: none; }
}
.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; padding-inline: 14px; }
/* Dark mode: secondary/ghost button typography is Neutral/100 */
/* Ghost button keeps theme ink color */
:root[data-theme="dark"] .btn--ghost { color: var(--neutral-100); }
.btn .arr { display: inline-flex; align-items: center; font-size: 1.35em; position: relative; z-index: 1; }

/* ---------- Tags / chips (Design System component: pill, bold 12/16, 8×16) ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0; line-height: 16px;
  padding: 8px 16px; border: 0; border-radius: var(--radius-full); white-space: nowrap;
  background: var(--neutral-200); color: var(--neutral-900);          /* Neutral variant */
}
.chip--lav   { background: var(--purple-200); color: var(--purple-950); }   /* Secondary — soft lavender */
.chip--solid { background: var(--purple-950); color: var(--neutral-100); }  /* Primary — deep purple */
:root[data-theme="dark"] .chip--solid { background: var(--purple-800); }    /* lift for legibility on dark */

/* ---------- Custom cursor chip (matches .chip--solid) ---------- */
.cursor-chip {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; will-change: transform;
}
.cursor-chip__inner {
  position: absolute;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  font-family: var(--sans); font-size: 12px; font-weight: 700; line-height: 16px; letter-spacing: 0;
  padding: 8px 16px; border-radius: var(--radius-full);
  background: var(--purple-950); color: var(--neutral-100); white-space: nowrap;
  transition: opacity 200ms ease, transform 240ms cubic-bezier(.16,1,.3,1);
}
:root[data-theme="dark"] .cursor-chip__inner { background: var(--purple-800); }
.cursor-chip.is-visible .cursor-chip__inner {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
}
/* Hide the native cursor over interactive project elements (fine pointers only) */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor-chip .pcard,
  body.has-cursor-chip .pcard * { cursor: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-chip__inner { transition: opacity 160ms ease; }
}

/* ---------- ¿Quién soy? — scroll-driven photo choreography ---------- */
.quien {
  position: relative;
  background: #1A1A1A;
  height: 300vh;                 /* tall track; the stage pins while scrolling */
}
.quien__stage {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.quien__text {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; line-height: 0.86;
}
.quien__line {
  font-family: var(--serif); font-weight: 400;
  font-size: 21vw; letter-spacing: -0.025em;
  color: #fff;
  opacity: 0; will-change: transform, opacity;   /* each line rises in, staggered */
}
.quien__line em { font-style: normal; color: #fff; }
.quien__photos { position: absolute; inset: 0; z-index: 5; }
.quien__photo {
  position: absolute; left: 50%; top: 50%;
  width: min(300px, 21vw); height: min(300px, 21vw); border-radius: 16px;
  opacity: 0; will-change: transform, opacity;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.55);
}
.quien__photo::part(image) { object-fit: cover; }
.quien__photo::part(frame) { border-radius: 16px; }
@media (prefers-reduced-motion: reduce) {
  .quien { height: auto; min-height: 100vh; }
  .quien__line { opacity: 1; transform: none; }
}

/* ---------- Phosphor icons (bold) ---------- */
i[class*="ph-"] { display: inline-flex; align-items: center; line-height: 1; vertical-align: middle; }
.arr { display: inline-flex; align-items: center; transition: transform var(--t-fast); }
.btn i[class*="ph-"] { font-size: 1.35em; }
.breadcrumb i[class*="ph-"] { font-size: 1.1em; }
.pcard__arrow i[class*="ph-"] { font-size: 1.4rem; }
.ph__mark i[class*="ph-"] { font-size: 18px; }
.projnav__dir i[class*="ph-"] { font-size: 0.95em; }
.tw-toggle i[class*="ph-"] { font-size: 1.05em; }

/* ---------- Image placeholder ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(124,118,107,0.045) 11px 12px),
    var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--muted);
}
.ph[data-ratio="1:1"]   { aspect-ratio: 1 / 1; }
.ph[data-ratio="4:3"]   { aspect-ratio: 4 / 3; }
.ph[data-ratio="16:9"]  { aspect-ratio: 16 / 9; }
.ph[data-ratio="21:9"]  { aspect-ratio: 21 / 9; }
.ph__inner {
  text-align: center; padding: 1.5rem; max-width: 30ch;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.ph__mark {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--muted-2); color: var(--muted-2);
  display: grid; place-items: center;
}
.ph__label { font-size: 0.8rem; line-height: 1.4; letter-spacing: 0.01em; }
.ph__hint { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  transition: background var(--t-med), border-color var(--t-med), backdrop-filter var(--t-med);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: transparent;
}
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: var(--progress-color, var(--purple-400, #A78BFA)); z-index: 61;
  transition: width 0.1s linear;
}
body.brandhero--worlds { --progress-color: #8251F6; }
body.brandhero--linkedin { --progress-color: #0A66C2; }
body.brandhero--emilia { --progress-color: #9c4252; }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; letter-spacing: -0.005em; white-space: nowrap; color: var(--ink); display: inline-block; transform-origin: center center; transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.brand:hover { transform: rotate(-6deg); }
.nav__right { display: flex; align-items: center; gap: 1.75rem; }
.nav__links { display: flex; align-items: center; gap: 2.5rem; }
.nav__ctas { display: flex; align-items: center; gap: 0.6rem; }
.btn--nav { padding: 10px 20px; font-size: 0.9rem; }
.btn--nav.btn--primary { padding: 12px 22px; }
@media (max-width: 900px) { .nav__ctas { display: none; } }
.nav__overlay-ctas { display: flex; flex-direction: column; gap: 0.75rem; width: min(420px, 100%); margin: 2rem auto 0; padding-inline: var(--gutter); }
body.brandhero--linkedin .nav:not(.scrolled) .btn--nav.btn--secondary { color: #FFFFFF; border-color: #FFFFFF; }
body.brandhero--worlds .nav:not(.scrolled) .btn--nav.btn--secondary { color: #3B1E7A; border-color: #3B1E7A; }
body.brandhero--emilia .nav:not(.scrolled) .btn--nav.btn--secondary { color: #6E2030; border-color: #6E2030; }

/* Theme toggle — lavender track, white knob with deep-purple sun/moon (Design System) */
.theme-toggle {
  position: relative; flex: none; width: 62px; height: 32px;
  border-radius: var(--radius-full); border: 0;
  background: var(--purple-200); cursor: pointer; padding: 0;
  transition: transform 220ms ease-out;
}
.theme-toggle:hover { transform: scale(0.96); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.theme-toggle__knob {
  position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--neutral-100); color: var(--purple-950);
  display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 1px 3px rgba(69,5,102,0.18);
  transition: left 280ms cubic-bezier(.4,0,.2,1);
}
.theme-toggle[aria-pressed="true"] .theme-toggle__knob { left: calc(100% - 29px); }
.theme-toggle__knob i { position: absolute; transition: opacity 160ms ease, transform 220ms ease; }
.theme-toggle .ph-moon { opacity: 0; transform: rotate(-40deg) scale(0.6); }
.theme-toggle .ph-sun  { opacity: 1; transform: none; }
.theme-toggle[aria-pressed="true"] .ph-moon { opacity: 1; transform: none; }
.theme-toggle[aria-pressed="true"] .ph-sun  { opacity: 0; transform: rotate(40deg) scale(0.6); }
.nav__link {
  font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink);
  position: relative; padding-bottom: 5px; transition: color var(--t-fast);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: center;
  transition: transform var(--t-med);
}
@media (hover: hover) {
  .nav__link:hover { color: var(--muted); }          /* hover only where a pointer exists */
}
.nav__link.active { color: var(--ink); }              /* active state */
.nav__link.active::after { transform: scaleX(1); }

/* Hamburger ↔ X (Phosphor) */
.nav__burger {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  font-size: 1.7rem; color: var(--ink); margin: -10px -10px -10px 0;
}
.nav__burger i { transition: transform var(--t-fast); }
.nav__burger .ph-x { display: none; }
body.menu-open .nav__burger .ph-list { display: none; }
body.menu-open .nav__burger .ph-x { display: inline-flex; }

/* Mobile / tablet overlay menu — full-width rows, neutral-100 → neutral-200 fill */
.nav__overlay {
  position: fixed; inset: 0; z-index: 55; background: var(--paper);
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  padding-top: 84px;
  opacity: 0; visibility: hidden; transition: opacity var(--t-med), visibility var(--t-med);
}
body.menu-open .nav__overlay { opacity: 1; visibility: visible; }
.nav__menu-link {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 68px; padding: 1.25rem 1.5rem;
  font-family: var(--sans); font-size: 1.25rem; font-weight: 700; letter-spacing: 0;
  color: var(--ink); background: var(--paper); text-align: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--t-med), transform var(--t-med), background var(--t-fast), color var(--t-fast);
}
.nav__menu-link:active,
.nav__menu-link.active { background: var(--paper-2); color: var(--ink); }
@media (hover: hover) {
  .nav__menu-link:hover { background: var(--paper-2); color: var(--ink); }
}
body.menu-open .nav__menu-link { opacity: 1; transform: none; }
body.menu-open .nav__menu-link:nth-child(1) { transition-delay: 0.05s; }
body.menu-open .nav__menu-link:nth-child(2) { transition-delay: 0.10s; }
body.menu-open .nav__menu-link:nth-child(3) { transition-delay: 0.15s; }
body.menu-open .nav__menu-link:nth-child(4) { transition-delay: 0.20s; }

/* Nav collapses to hamburger on tablet & below */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}

/* ============================================================
   FOOTER (inverted)
   ============================================================ */
.footer { background: var(--inkbg); color: var(--ondark); padding-block: clamp(4.5rem, 10vw, 8rem); border-top: 1px solid rgba(255,255,255,0.06); }
.footer a { color: var(--ondark); }
.footer .btn--primary { background-color: var(--purple-300); color: var(--neutral-900); }
.footer .btn--primary:hover { transform: scale(1.04); }
/* Closing CTA band */
.footer__cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.4rem; padding-bottom: clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid rgba(255,255,255,0.09); }
.footer__cta .footer__lead { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.04; max-width: 20ch; }
.footer__sub { color: var(--muted-2); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.5; max-width: 52ch; }
.footer__cta .btn--primary { margin-top: 0.4rem; }
.footer__lead { font-family: var(--serif); font-size: clamp(2.1rem, 7vw, 4.6rem); line-height: 0.98; letter-spacing: -0.03em; font-weight: 400; text-align: center; }
.footer__lead em { color: var(--lav); }
.footer__row { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(1.5rem, 4vw, 2.25rem); margin-top: 36px; }
.footer__contacts { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: clamp(1.75rem, 4vw, 2.75rem); min-width: 0; max-width: 100%; }
.fcontact { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; color: var(--ondark); transition: transform var(--t-fast); }
.fcontact:hover { transform: scale(1.04); }
.fcontact i[class*="ph-"] { font-size: 24px; flex-shrink: 0; }
.fcontact__label { font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1.5; letter-spacing: 0; position: relative; overflow-wrap: anywhere; }
.footer__legal { font-size: 0.82rem; color: var(--muted-2); letter-spacing: 0.01em; }
.footer__made {
  /* Design system "Caption" text style: Work Sans · bold · 12/16 · 0% tracking */
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.75rem;        /* 12px */
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
  color: var(--ondark);
  opacity: 0.82;
  margin-top: clamp(4rem, 8vw, 6rem);
}

/* ============================================================
   HOME — HERO
   ============================================================ */
.hero { padding-top: clamp(8rem, 16vh, 11rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.hero__display { margin-top: 1.4rem; font-size: clamp(2.5rem, 7vw, 4.75rem); line-height: 1.18; }
.hero-line { display: block; }
.hero-line + .hero-line { margin-top: 0.12em; }
/* Hero entrance — each element rises in with fade, staggered via --d */
@keyframes heroRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  /* Hold the hero hidden during the loader; the entrance plays only once
     .hero-go is added (by loader.js on finish), so it isn't wasted behind the loader. */
  .anim .hero-anim { opacity: 0; will-change: opacity, transform; }
  .anim.hero-go .hero-anim { animation: heroRise 0.95s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d, 0ms); }
}
.hero__lead { margin-top: 1.8rem; max-width: 46ch; color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1rem; margin-top: 3.2rem; }
@media (max-width: 1024px) and (min-width: 600px) {
  .hero--center .hero__display { font-size: clamp(1.6rem, 5.2vw, 3.5rem); }
  .hero--center .hero-line { white-space: nowrap; }
  .hero--center .hero__ctas { margin-top: 2.8rem; }
}
.hero__visual .ph { border-radius: var(--radius-l); }

/* Centered hero (matches Figma Hero-section/Desktop) */
.hero--center { min-height: 86vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: clamp(7rem, 13vh, 9.5rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.hero__center { max-width: 920px; margin-inline: auto; }
.hero--center .hero__display { margin-top: 1.6rem; }
.hero--center .hero__lead { margin-inline: auto; max-width: 58ch; }
.hero--center .hero__ctas { justify-content: center; }

/* ============================================================
   HOME — SOBRE MÍ
   ============================================================ */
.about__head { display: grid; grid-template-columns: minmax(0,0.85fr) minmax(0,1.15fr); gap: clamp(2rem,5vw,4rem); align-items: end; }
.about__blocks { margin-top: clamp(3rem, 7vw, 5rem); display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4rem); }
.about__block {
  display: grid; grid-template-columns: minmax(0,0.9fr) minmax(0,1.1fr); gap: clamp(1.5rem,5vw,4rem);
  padding-top: clamp(2.5rem,5vw,3.5rem); border-top: 1px solid var(--hairline);
}
.about__num { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); }
.about__h { display: flex; gap: 1.1rem; align-items: baseline; }

/* ============================================================
   HOME — PROYECTOS
   ============================================================ */
/* ============================================================
   HOME — PROYECTOS (3-col vertical cards)
   ============================================================ */
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.4vw, 2rem); }
.pcard {
  display: flex; flex-direction: column;
  position: relative;
  border-radius: var(--radius-2xl); overflow: hidden;
  background: #FFFFFF;
  border: 0;
  box-shadow: 0 0 0 1px var(--neutral-200);
  transition: box-shadow 300ms ease-out;
}
:root[data-theme="dark"] .pcard { background: var(--paper-2); }
.pcard:hover { box-shadow: 0 0 0 1px var(--neutral-200); }
/* Ensure the box-shadow hover transition wins over the .reveal transition (higher specificity) */
.anim .pcard.reveal { transition: opacity var(--t-slow), transform var(--t-slow), box-shadow 300ms ease-out; transition-delay: 0s; }

/* Media — solid brand-color panel, 24px radius on all corners */
.pcard__media {
  position: relative; aspect-ratio: 379 / 200; overflow: hidden;
  border-radius: var(--radius-2xl);
  display: flex; align-items: center; justify-content: center;
}
.pcard__media .pcard__img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  padding: 6px; box-sizing: border-box;
  transform: scale(1.15);
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.18));
  transition: transform 0.45s cubic-bezier(.16,1,.3,1);
}
.pcard:hover .pcard__media .pcard__img { transform: scale(1.2); }
.pcard__media--linkedin { background: #0A66C2; }
.pcard__media--emilia  { background: #F7BAB6; }
.pcard__media--worlds  { background: #8251F6; }
/* “Destacado” tag — LinkedIn featured card only */
.pcard__badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  background: #ECF5FE; color: #0A66C2;
  font-family: var(--sans); font-weight: 600; font-size: 12px; line-height: 16px;
  padding: 4px 8px; border-radius: var(--radius-full);
}
.pcard__badge i { font-size: 16px; }
.pcard__badge--worlds { background: #EEE6FE; color: #5E32C9; }

/* Body — neutral surface, title / description */
.pcard__body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
  padding: 24px;
}
.pcard__tags { flex-wrap: wrap; }
.pcard__title {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.5rem; line-height: 1.17; letter-spacing: -0.01em;
  color: var(--ink); text-wrap: balance;
}
.pcard__desc { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.pcard__eyebrow {
  font-family: var(--sans); font-weight: 600;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 4px;
}
.pcard__eyebrow--worlds { color: #8251F6; }
.pcard__eyebrow--linkedin { color: #4A7FE0; }
.pcard__eyebrow--emilia { color: #C6494F; }

/* ============================================================
   HOME — SOBRE MÍ (portrait + text)
   ============================================================ */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about__media { display: flex; justify-content: center; }
/* Circular photo container — owns the custom cursor interaction */
.about__photo { position: relative; cursor: none; width: 100%; max-width: 300px; aspect-ratio: 1 / 1; }
/* Editable photo slot — simple dark circle placeholder, fillable until published */
.about__slot {
  width: 100%; height: 100%; aspect-ratio: 1 / 1; border: 0;
  border-radius: 50%; overflow: hidden; background: var(--paper-2);
}
.about__slot::part(frame) { background: transparent; }
/* Custom "¡Hola!" bubble cursor that follows the mouse over the photo */
.about__cursor {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  width: 64px; height: 64px; border-radius: 50%; background: #7F77DD;
  display: grid; place-items: center; text-align: center;
  font-family: var(--serif); font-weight: 400; font-size: 1.05rem; color: #26215C;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.15s ease;
}
.about__text { display: flex; flex-direction: column; gap: 1.1rem; }
.about__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.08; letter-spacing: -0.015em; color: var(--ink); }
.about__text p { color: var(--muted); font-size: 1.0625rem; line-height: 1.6; max-width: 60ch; }

/* Lo que me gusta — organic tags */
.likes { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.likes__title { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; letter-spacing: -0.005em; color: #A79FE8; }
.likes__list { list-style: none; margin: 1.1rem 0 0; padding: 1rem 0.5rem 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0; max-width: 460px; }
.like {
  display: inline-block; list-style: none; position: relative;
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1; white-space: nowrap; padding: 0.6em 0.95em;
  transition: transform 220ms cubic-bezier(.16,1,.3,1);
}
.like::marker { content: none; }
.like:hover { transform: rotate(0deg) scale(1.05) !important; z-index: 6; }
/* chunky, heavily-rounded, organic corners + overlap */
.like--solid { background: #7F77DD; color: var(--purple-950); font-size: 24px; border-radius: 24px; transform: rotate(-7deg); z-index: 3; }
.like--soft  { background: rgba(127,119,221,0.16); color: #6A61C9; border: 2px solid rgba(127,119,221,0.6); font-size: 28px; border-radius: 999px; transform: rotate(6deg) translateY(-18px); margin-left: -22px; z-index: 4; }
.like--dark  { background: var(--neutral-800, #2A282D); color: var(--neutral-100); font-size: 20px; border-radius: 40% 60% 50% 30%; transform: rotate(-4deg) translateY(20px); margin-left: -34px; z-index: 5; }
.like--ghost { background: rgba(255,255,255,0.07); color: var(--ink-soft); border: 2px solid var(--hairline); font-size: 26px; border-radius: 999px; transform: rotate(8deg) translateY(-10px); margin-left: -26px; z-index: 2; }
:root[data-theme="dark"] .like--dark { background: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .like--soft { color: #B7AFFF; }

/* ============================================================
   TESTIMONIOS — carrusel auto-scroll
   ============================================================ */
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.08; letter-spacing: -0.015em;
  text-align: left;
  color: var(--ink); margin-bottom: clamp(2rem, 4vw, 3rem);
}
.tcarousel {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tcarousel__track {
  display: flex;
  gap: clamp(1.1rem, 2vw, 1.6rem);
  width: max-content;
  padding-inline: clamp(1.1rem, 2vw, 1.6rem);
  animation: testiScroll 88s linear infinite;
  will-change: transform;
}
.tcarousel:hover .tcarousel__track { animation-play-state: paused; }
@keyframes testiScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .tcarousel__track { animation: none; }
  .tcarousel { overflow-x: auto; }
}
.tcard {
  flex: 0 0 auto;
  width: clamp(300px, 80vw, 360px);
  height: 320px;
  box-sizing: border-box;
  display: flex; flex-direction: column;
  padding: 20px 16px;
  background: #FFFFFF;
  border: 0;
  border-radius: var(--radius-2xl);
  margin: 0;
}
:root[data-theme="dark"] .tcard { background: var(--paper-2); }
.tcard__mark {
  font-family: var(--serif); font-weight: 400;
  font-size: 3.75rem; line-height: 0.7; color: #B951FB;
  margin: 0 0 0.25rem;
}
.tcard__text {
  margin: 0; flex: 1 1 auto; min-height: 0;
  color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.5;
  letter-spacing: 0; overflow: hidden;
}
.tcard__who { display: flex; flex-direction: column; gap: 0; margin-top: 1rem; }
.tcard__name { color: var(--ink); font-weight: 600; font-size: 1.125rem; line-height: 1.33; }
.tcard__role { color: var(--muted); font-size: 0.875rem; line-height: 1.7; }

/* ---- Single-testimonial slider ---- */
.tslider { max-width: 760px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.tslider__viewport { overflow: hidden; border-radius: var(--radius-2xl); }
.tslider__track { display: flex; gap: 20px; transition: transform 0.45s cubic-bezier(.65,0,.35,1); }
.tslide {
  position: relative;
  height: clamp(260px, 30vw, 300px);
  width: 100%; flex: none; box-sizing: border-box;
  padding: clamp(1.6rem, 3.6vw, 2.6rem) clamp(1.8rem, 4vw, 3rem) clamp(1.4rem, 2.8vw, 2rem);
  background: var(--purple-950);
  border-radius: var(--radius-2xl);
  display: flex; flex-direction: column; justify-content: flex-start;
  overflow: hidden;
}
:root[data-theme="dark"] .tslide { background: #2A0F3D; }
.tslide__text {
  margin: 0;
  color: var(--neutral-100);
  font-family: var(--sans); font-weight: 400; font-style: normal;
  font-size: clamp(0.9rem, 1.25vw, 1.05rem); line-height: 1.5; letter-spacing: 0;
  transition: opacity 320ms ease, transform 320ms ease;
  overflow-y: hidden;
}
.tslide__who { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 1.25rem; transition: opacity 320ms ease, transform 320ms ease; }
.tslide__who-text { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.tslide__name { color: var(--neutral-100); font-weight: 700; font-size: 1.125rem; line-height: 1.3; margin: 0; }
.tslide__role { color: rgba(251,250,252,0.6); font-size: 0.875rem; line-height: 1.3; margin: 0; }

.tslider__controls {
  display: flex; align-items: center; justify-content: center; gap: 1.1rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}
.tslider__arrow {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  cursor: pointer; transition: transform var(--t-fast);
  flex: none;
}
.tslider__arrow:hover { transform: scale(1.04); }
.tslider__dots { display: flex; align-items: center; gap: 0.4rem; }
.tslider__dot {
  width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0;
  background: var(--neutral-300); cursor: pointer;
  transition: width var(--t-fast), background var(--t-fast);
}
:root[data-theme="dark"] .tslider__dot { background: var(--hairline); }
.tslider__dot.is-active { width: 26px; background: var(--purple-400); }
@media (max-width: 600px) {
  .tslide { height: clamp(360px, 92vw, 430px); }
}

/* ============================================================
   PROJECT PAGES
   ============================================================ */
.proj-hero { padding-top: clamp(7.5rem, 14vh, 10rem); }
.breadcrumb { font-size: 0.9rem; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 0.5rem; transition: color var(--t-fast); }
.breadcrumb:hover { color: var(--ink); }
.breadcrumb .arr { transition: transform var(--t-fast); }
.breadcrumb:hover .arr { transform: translateX(-3px); }
.proj-hero__title { margin-top: 1.6rem; }
/* Home hero (project-style layout) */
.hero-home__title { margin-top: 0; font-size: clamp(2.5rem, 7vw, 4.75rem); line-height: 1.18; }
.hero-home__title .hero-line { display: block; }
.hero-home__title .hero-line + .hero-line { margin-top: 0.12em; }
.proj-hero .hero__ctas { margin-top: 2rem; }
.proj-hero__media .ph { width: 100%; height: auto; aspect-ratio: 21 / 9; border: 0; border-radius: var(--radius-l); overflow: hidden; background: var(--purple-200); }
.proj-hero__media .ph::part(frame) { background: transparent; }
.proj-hero__img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius-l); }

/* ---------- Demo: browser mockup + looping video ---------- */
.demo { margin: 0; }
.browser {
  border-radius: 16px; overflow: hidden; background: #fff;
  border: 1px solid var(--hairline);
  box-shadow: 0 34px 70px -28px rgba(69,5,102,0.45);
}
:root[data-theme="dark"] .browser { border-color: rgba(255,255,255,0.08); box-shadow: 0 34px 80px -30px rgba(0,0,0,0.7); }
.browser__bar {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 18px; background: #EFEAF4;
}
.browser__dot { width: 11px; height: 11px; border-radius: 50%; background: #cfc8d6; }
.browser__dot--r { background: #FF5F57; }
.browser__dot--y { background: #FEBC2E; }
.browser__dot--g { background: #28C840; }
.browser__pill {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 44%; height: 23px; border-radius: 12px; background: #fff;
}
.browser__screen { line-height: 0; background: #fff; }
.demo__video { display: block; width: 100%; height: auto; background: #fff; }
.demo__cap { margin-top: 1.1rem; color: var(--muted); font-size: 0.95rem; font-family: var(--serif); }

/* ---------- Lightbox ---------- */
.psec__content img,
.psec__full img,
.imggrid img,
figure.imgfig img,
.wa-ba img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vmin, 56px);
  background: rgba(244, 239, 247, 0.62);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}
:root[data-theme="dark"] .lightbox { background: rgba(9, 7, 12, 0.66); }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox__img {
  max-width: 90vw; max-height: 88vh;
  object-fit: contain; border-radius: 14px;
  box-shadow: 0 50px 120px -28px rgba(40, 12, 55, 0.4), 0 16px 44px rgba(20, 8, 30, 0.16);
  cursor: default;
  transform: scale(0.94); transition: transform 0.34s cubic-bezier(.16, 1, .3, 1);
}
:root[data-theme="dark"] .lightbox__img { box-shadow: 0 50px 130px -28px rgba(0, 0, 0, 0.7); }
.lightbox.open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute; top: clamp(14px, 3vmin, 28px); right: clamp(14px, 3vmin, 28px);
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 50%; color: #fff; font-size: 1.5rem;
  background: rgba(24, 14, 30, 0.55); cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox__close:hover { background: rgba(24, 14, 30, 0.78); transform: scale(0.94); }
.lightbox__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.lb-open { overflow: hidden; }
:root[data-theme="dark"] .proj-hero__media .ph { background: var(--purple-900); }
.proj-hero__tagline { margin-top: 1.4rem; max-width: 46ch; }
.proj-hero__tags { margin-top: 1.6rem; }
.proj-hero__media { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* Case cover — image floated, centered on a soft lavender band */
.hero-cover {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 5vw, 4.5rem);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 130% at 50% -10%, var(--purple-100) 0%, var(--purple-200) 55%, var(--purple-300) 120%);
  overflow: hidden;
}
:root[data-theme="dark"] .hero-cover {
  background:
    radial-gradient(120% 130% at 50% -10%, var(--purple-800) 0%, var(--purple-900) 55%, var(--purple-950) 120%);
}
.hero-cover__img {
  display: block; width: 100%; max-width: 880px; height: auto;
  border-radius: var(--radius-l);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow-5);
}
:root[data-theme="dark"] .hero-cover__img { border-color: rgba(255,255,255,0.08); }
@media (max-width: 600px) { .hero-cover { padding: 1.1rem; } }

/* LinkedIn brand-blue cover band (#0A66C2 gamut) */
.hero-cover--blue {
  background:
    radial-gradient(120% 130% at 50% -10%, #4F97E3 0%, #0A66C2 55%, #064079 120%);
}
:root[data-theme="dark"] .hero-cover--blue {
  background:
    radial-gradient(120% 130% at 50% -10%, #0A66C2 0%, #074A8C 55%, #042A52 120%);
}

/* Emilia Rescata rose cover band (#F7BAB6 gamut) */
.hero-cover--rose {
  background:
    radial-gradient(120% 130% at 50% -10%, #FCDCD9 0%, #F7BAB6 55%, #EF9189 120%);
}
:root[data-theme="dark"] .hero-cover--rose {
  background:
    radial-gradient(120% 130% at 50% -10%, #B86B7E 0%, #8E4C61 55%, #5E2F42 120%);
}

/* ============================================================
   Brand-color full-bleed case hero (ref: Hotspot/Framer)
   Whole hero = brand color; nav adapts; screenshot on a neutral stage
   ============================================================ */
.brandhero-sec {
  --brand: #F7BAB6;
  --brand-ink: #6E2030;       /* deep maroon — Emilia logo tone */
  --brand-ink-soft: #934050;
  --brand-pop: #E94F37;       /* coral accent — "Quiero donar" */
  position: relative;
  background: var(--brand);
  height: 100svh;
  display: flex; flex-direction: column;
  padding-top: clamp(7rem, 15vh, 9.5rem);
  margin-bottom: 0;
  overflow: clip;
}
.brandhero-sec .breadcrumb { color: var(--brand-ink-soft); }
.brandhero-sec > .wrap { width: 100%; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
/* no divider line between the brand hero and the first case section */
body.brandhero main > .wrap > .psec:first-child { border-top: 0; }
.brandhero-sec .breadcrumb:hover { color: var(--brand-ink); }
.brandhero-dot {
  position: absolute; top: clamp(5.4rem, 11vh, 7.6rem); right: var(--gutter);
  width: clamp(20px, 2.4vw, 30px); aspect-ratio: 1; border-radius: 50%;
  background: var(--brand-pop);
}
.brandhero-stage {
  flex: 1 1 auto; min-height: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.brandhero-stage__img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  border-radius: clamp(16px, 2vw, 28px) clamp(16px, 2vw, 28px) 0 0;
  box-shadow: var(--shadow-4);
}
.brandhero-cap {
  flex: none;
  padding-bottom: clamp(2rem, 5vh, 3.2rem);
  display: flex; align-items: end; justify-content: space-between; gap: clamp(1.2rem, 4vw, 3rem);
}
.brandhero-title {
  font-family: var(--serif); font-weight: 400;
  color: var(--brand-ink);
  font-size: clamp(2.1rem, 6vw, 4.5rem); line-height: 0.95; letter-spacing: -0.02em;
  margin: 0;
}
.brandhero-tagline {
  color: var(--brand-ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem); font-weight: 500; line-height: 1.3;
  max-width: 34ch; text-align: right; margin: 0; flex: none;
}
@media (max-width: 760px) {
  .brandhero-cap { flex-direction: column; align-items: start; gap: 0.6rem; }
  .brandhero-tagline { text-align: left; max-width: 54ch; }
}
@media (max-width: 820px) {
  .brandhero-dot { display: none; }
}
@media (max-width: 760px) {
  .brandhero-sec { height: auto; padding-bottom: clamp(1.5rem, 4vh, 2.5rem); }
  .brandhero-sec > .wrap { flex: none; }
  .brandhero-stage {
    flex: none; overflow: visible;
    background: var(--neutral-100);
    border-radius: clamp(16px, 4vw, 24px);
    padding: clamp(0.7rem, 2.5vw, 1.2rem);
  }
  .brandhero-stage__img {
    width: 100%; height: auto; object-fit: contain; object-position: top;
    border-radius: clamp(10px, 2.5vw, 16px);
    border: 1px solid var(--neutral-200);
  }
}

/* Nav adapts to the brand hero while at the top (before .scrolled) */
body.brandhero--emilia .nav:not(.scrolled) .brand,
body.brandhero--emilia .nav:not(.scrolled) .nav__link,
body.brandhero--emilia .nav:not(.scrolled) .nav__burger { color: #6E2030; }
body.brandhero--emilia .nav:not(.scrolled) .nav__link::after { background: #6E2030; }
body.brandhero--emilia .nav.scrolled {
  background: rgba(251, 250, 252, 0.92);
}
body.brandhero--emilia .nav.scrolled .brand,
body.brandhero--emilia .nav.scrolled .nav__link,
body.brandhero--emilia .nav.scrolled .nav__burger { color: #1D1C1F !important; }
@media (hover: hover) {
  body.brandhero--emilia .nav:not(.scrolled) .nav__link:hover { color: #9c4252; }
}

/* LinkedIn brand-blue variant (#0A66C2) — light text on saturated blue */
.brandhero-sec.brandhero--blue {
  --brand: #0A66C2;
  --brand-ink: #FFFFFF;
  --brand-ink-soft: #CFE3F8;
}
.brandhero--blue .breadcrumb { color: #CFE3F8; }
.brandhero--blue .breadcrumb:hover { color: #FFFFFF; }
.brandhero--blue .chip { background: #FFFFFF; color: #0A66C2; }
/* nav over the blue hero: white text while at top */
body.brandhero--linkedin .nav:not(.scrolled) .brand,
body.brandhero--linkedin .nav:not(.scrolled) .nav__link,
body.brandhero--linkedin .nav:not(.scrolled) .nav__burger { color: #FFFFFF; }
body.brandhero--linkedin .nav:not(.scrolled) .nav__link::after { background: #FFFFFF; }
body.brandhero--linkedin .nav.scrolled {
  background: rgba(251, 250, 252, 0.92);
}
body.brandhero--linkedin .nav.scrolled .brand,
body.brandhero--linkedin .nav.scrolled .nav__link,
body.brandhero--linkedin .nav.scrolled .nav__burger { color: #1D1C1F !important; }
@media (hover: hover) {
  body.brandhero--linkedin .nav:not(.scrolled) .nav__link:hover { color: #CFE3F8; }
}

/* WorldsAcross brand-violet variant — deep violet ink on pastel lavender, phone row */
.brandhero-sec.brandhero--peach {
  --brand: #E7DBFF;
  --brand-ink: #3B1E7A;
  --brand-ink-soft: #6647A8;
}
body.brandhero--worlds .nav:not(.scrolled) .brand,
body.brandhero--worlds .nav:not(.scrolled) .nav__link,
body.brandhero--worlds .nav:not(.scrolled) .nav__burger { color: #3B1E7A; }
body.brandhero--worlds .nav:not(.scrolled) .nav__link::after { background: #3B1E7A; }
body.brandhero--worlds .nav.scrolled {
  background: rgba(251, 250, 252, 0.92);
}
body.brandhero--worlds .nav.scrolled .brand,
body.brandhero--worlds .nav.scrolled .nav__link,
body.brandhero--worlds .nav.scrolled .nav__burger { color: #1D1C1F !important; }
@media (hover: hover) {
  body.brandhero--worlds .nav:not(.scrolled) .nav__link:hover { color: #8251F6; }
}

/* ============================================================
   Case rhythm bands — light base + dark / brand full-bleed bands
   ============================================================ */
.caseband { padding-block: clamp(3.75rem, 8vw, 7rem); }
.caseband > .wrap { width: 100%; }
.caseband .psec { border-top: 0; margin-top: 0; padding-top: 0; }
.caseband--tint { background: var(--paper-2); }

/* space below the last case-study section before the project nav */
.wrap:has(> .psec) { padding-bottom: clamp(3rem, 7vw, 6rem); }

/* generic project section grid: label left, content right */
.psec { display: grid; grid-template-columns: minmax(0,0.32fr) minmax(0,0.68fr); gap: clamp(1.5rem,5vw,4rem); padding-top: clamp(3rem,6vw,4.5rem); margin-top: clamp(2.5rem,5vw,4rem); border-top: 1px solid var(--hairline); }
.psec__label { display: flex; flex-direction: column; gap: 0.5rem; }
.psec__label .h2 { position: static; }
@media (max-width: 900px) { .psec__label .h2 { position: static; } }
.psec__num { font-family: var(--serif); color: var(--accent); font-size: 1rem; }

/* Full-width media band — breaks out of the text column to span the whole section */
.psec__full { grid-column: 1 / -1; margin-top: clamp(1.8rem, 4vw, 3rem); }
.psec__full > img { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.psec__full .ph { width: 100%; }
.psec__full--panel { border: 1px solid var(--hairline); border-radius: var(--radius-l); padding: clamp(1.4rem, 4vw, 3rem); }
.psec__figcap { margin-top: 0.9rem; font-size: 0.9rem; color: var(--muted); font-family: var(--sans); }

/* bullet list */
.blist { display: flex; flex-direction: column; gap: 1.1rem; }
.blist li { list-style: none; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: baseline; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.6; }
.blist li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 0.55em; }
.blist--num { counter-reset: bl; }
.blist--num li { grid-template-columns: auto 1fr; }
.blist--num li::before { counter-increment: bl; content: counter(bl, decimal-leading-zero); width: auto; height: auto; border-radius: 0; background: none; font-family: var(--serif); color: var(--accent); margin-top: 0; }

/* metrics */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem,4vw,3rem); margin-top: clamp(2rem,4vw,2.8rem); }
.metric { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.metric__n { font-family: var(--serif); font-size: clamp(2.4rem, 5.5vw, 3.6rem); line-height: 0.95; letter-spacing: -0.03em; }
.metric__l { margin-top: 0.7rem; font-size: 0.95rem; color: var(--muted); line-height: 1.4; }

/* process phases */
.phases { display: flex; flex-direction: column; }
.phase { padding: clamp(1.8rem,3.5vw,2.5rem) 0; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem,3vw,2rem); }
.phase:first-child { border-top: 0; padding-top: 0; }
.phase__k { font-family: var(--serif); color: var(--accent); font-size: 1.05rem; padding-top: 0.15rem; min-width: 2.5rem; }
.phase__h { font-family: var(--serif); font-size: clamp(1.3rem,2.4vw,1.7rem); line-height: 1.1; letter-spacing: -0.015em; }
.phase__p { margin-top: 0.7rem; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.65; }

/* design image grid */
.imggrid { margin-top: clamp(2.5rem,6vw,4rem); display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem,3vw,2.2rem); }
.imgfig figcaption { margin-top: 0.9rem; font-size: 0.9rem; color: var(--muted); font-family: var(--sans); }

/* ---------- Case: small stat cards (Contexto) ---------- */
.statcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.9rem, 1.6vw, 1.1rem); margin-top: clamp(1.8rem, 4vw, 2.4rem); }
.statcard {
  background: var(--paper-2); border: 1px solid var(--hairline);
  border-radius: var(--radius-l); padding: clamp(1.2rem, 2vw, 1.5rem);
}
.statcard__n { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 0.98; letter-spacing: -0.025em; color: var(--ink); }
.statcard__l { margin-top: 0.6rem; font-size: 0.92rem; color: var(--muted); line-height: 1.42; }

/* ---------- Case: persona cards (Desafío) ---------- */
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 3vw, 2.2rem); margin-top: clamp(1.8rem, 4vw, 2.4rem); }
.persona { display: flex; flex-direction: column; align-items: flex-start; gap: 0.95rem; }
.persona__photo { width: clamp(82px, 11vw, 100px); aspect-ratio: 1 / 1; flex: none; }
.persona__photo .ph { width: 100%; height: 100%; border-radius: 50%; }
.persona__photo .ph__inner { padding: 0; }
.persona__name { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1; color: var(--ink); }
.persona__desc { color: var(--muted); font-size: 0.98rem; line-height: 1.5; }

/* ---------- Case: Solución — dark contrast band ---------- */
.sol {
  /* near-black contrast break; redefine tokens locally so child components
     render light-on-dark regardless of page theme */
  --ink: #FBFAFC; --ink-soft: #E7E3EC; --muted: #A8A4B0; --muted-2: #807C8A;
  --hairline: rgba(255,255,255,0.12); --paper-2: #131019;
  --accent: var(--purple-400);
  background: #07060A; color: var(--ink);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-block: clamp(4.5rem, 10vw, 8rem);
}
.sol__head { max-width: 52ch; }
.sol__head .psec__num { color: var(--accent); }
.sol__title { color: var(--ink); margin-top: 0.5rem; }
.sol__intro { color: var(--ink-soft); margin-top: 1.1rem; }

/* marquee + overlaid hero mockup */
.sol__marquee-wrap {
  position: relative; margin-top: clamp(2.5rem, 6vw, 4rem);
  display: flex; align-items: center; justify-content: center;
  min-height: clamp(300px, 40vw, 520px);
}
.marquee {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; white-space: nowrap; animation: marqueeScroll 32s linear infinite; will-change: transform; }
.marquee__item {
  font-family: var(--serif); font-size: clamp(4.5rem, 15vw, 12rem); line-height: 1;
  text-transform: uppercase; letter-spacing: -0.01em;
  color: transparent; -webkit-text-stroke: 2px var(--purple-500);
  padding-inline: 0.18em;
}
.marquee__item .star { color: var(--purple-500); -webkit-text-stroke: 0; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
.sol__heromock { position: relative; z-index: 2; width: min(680px, 82%); }
.sol__heromock .ph { aspect-ratio: 16 / 9; border-radius: var(--radius-l); box-shadow: 0 40px 90px -30px rgba(0,0,0,0.85); }

/* per-MVP alternating block */
.mvp {
  display: grid; grid-template-columns: minmax(0,0.92fr) minmax(0,1.08fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding-top: clamp(3rem, 6vw, 4.5rem); margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--hairline);
}
.mvp--rev .mvp__txt { order: 2; }
.mvp--rev .mvp__media { order: 1; }
.mvp__kicker { font-family: var(--serif); color: var(--accent); font-size: 1rem; }
.mvp__title { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.08; letter-spacing: -0.015em; margin-top: 0.35rem; color: var(--ink); }
.mvp__p { color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.6; margin-top: 1rem; }
.mvp__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); margin-top: 1.9rem; }
.mvp__meta > div { border-top: 1px solid var(--hairline); padding-top: 0.75rem; }
.mvp__meta-k { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.mvp__meta-v { margin-top: 0.5rem; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }
.mvp__media .ph { aspect-ratio: 4 / 3; border-radius: var(--radius-l); box-shadow: 0 30px 70px -34px rgba(0,0,0,0.8); }

/* closing synthesis — inverted funnel */
.funnel { margin-top: clamp(3.5rem, 8vw, 6rem); text-align: center; }
.funnel__title { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.08; color: var(--ink); }
.funnel__stack { margin-top: clamp(1.8rem, 4vw, 2.6rem); display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.funnel__row {
  margin-inline: auto; height: clamp(58px, 7.5vw, 78px);
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
  font-family: var(--sans);
}
.funnel__row--1 { width: min(560px, 92%); background: var(--purple-400); }
.funnel__row--2 { width: min(440px, 73%); background: var(--purple-600); }
.funnel__row--3 { width: min(320px, 54%); background: var(--purple-800); }
.funnel__label { font-size: clamp(0.9rem, 1.4vw, 1.05rem); letter-spacing: 0.01em; }
.funnel__row--1 .funnel__label { color: var(--purple-950); }
.funnel__row--2 .funnel__label, .funnel__row--3 .funnel__label { color: #FBFAFC; }
.funnel__label b { font-weight: 700; }
.funnel__label span { opacity: 0.78; font-weight: 500; }

@media (max-width: 768px) {
  .statcards { grid-template-columns: 1fr; }
  .personas { grid-template-columns: 1fr; }
  .mvp { grid-template-columns: 1fr; gap: 1.6rem; }
  .mvp--rev .mvp__txt { order: 1; }
  .mvp--rev .mvp__media { order: 2; }
  .mvp__meta { grid-template-columns: 1fr 1fr; }
}

/* project CTA + prev/next */
.projcta { padding-block: clamp(4rem,9vw,7rem); }
.projcta__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.8rem; }

/* ============================================================
   Scroll reveal — gated on html.anim (added only when visible)
   ============================================================ */
.anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-slow), transform var(--t-slow); }
.anim .reveal.in { opacity: 1; transform: none; }
.anim .reveal.d1 { transition-delay: 0.08s; }
.anim .reveal.d2 { transition-delay: 0.16s; }
.anim .reveal.d3 { transition-delay: 0.24s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .work__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body { font-size: 17px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: 2; }
  .hero__visual .ph[data-ratio="4:3"] { aspect-ratio: 4 / 3; }
  .about__head { grid-template-columns: 1fr; }
  .about__block { grid-template-columns: 1fr; gap: 1rem; }
  .about { grid-template-columns: 1fr; gap: 2rem; }
  .about__media { max-width: 360px; margin-bottom: 0.5rem; }
  .work__grid { grid-template-columns: 1fr; }
  .psec { grid-template-columns: 1fr; gap: 1.2rem; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .imggrid { grid-template-columns: 1fr; }
  .phase { grid-template-columns: 1fr; gap: 0.4rem; }
}
.fcontact__short { display: none; }
@media (max-width: 460px) {
  .fcontact__full { display: none; }
  .fcontact__short { display: inline; }
  .metrics { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .display { font-size: clamp(2rem, 8vw, 3rem); }
  .btn { padding: 12px 22px; font-size: 0.95rem; }
  .btn--primary { padding: 14px 24px; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn--primary { order: -1; }
  .footer__contacts { gap: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .anim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pcard:hover .pcard__media .ph { transform: none; }
  .pcard { position: static; top: auto; }
}

/* ============================================================
   Loader — pulso simple del wordmark
   ============================================================ */
html.loading, html.loading body { overflow: hidden; }
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--paper); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__pulse-ring {
  position: relative; width: 16px; height: 16px; border-radius: 50%;
  background: var(--purple-300);
  animation: loaderCore 1.15s ease-in-out infinite;
}
.loader__pulse-ring::before,
.loader__pulse-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--purple-300);
  animation: loaderRipple 1.6s cubic-bezier(.2, .6, .3, 1) infinite;
}
.loader__pulse-ring::after { animation-delay: 0.8s; }
@keyframes loaderRipple {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(5);   opacity: 0; }
}
/* throb / titileo — quick blink in brightness + scale */
@keyframes loaderCore {
  0%, 100% { transform: scale(0.72); opacity: 0.45; }
  50%      { transform: scale(1.08); opacity: 1; }
}

/* ============================================================
   PAGE TRANSITION — lilac line sweep for internal navigation
   (independent from the entry Splash above; do not merge)
   ============================================================ */
.page-transition {
  position: fixed; inset: 0; z-index: 9999;
  background: #F7F6F2;
  opacity: 0;
  pointer-events: none;
}
.page-transition__track {
  position: absolute; top: 50%; left: 50%;
  width: 200px; max-width: calc(100vw - 48px); height: 4px;
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  overflow: hidden;
}
.page-transition__line {
  width: 0; height: 100%;
  border-radius: 9999px;
  background: var(--purple-400);
}
.page-transition.is-in {
  opacity: 1;
  transition: opacity 200ms linear;
}
.page-transition.is-in .page-transition__line {
  width: 100%;
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1) 120ms;
}
.page-transition.is-preset,
.page-transition.is-preset .page-transition__line {
  transition: none !important;
}
.page-transition.is-out {
  opacity: 0 !important;
  transition: opacity 200ms linear !important;
}
@media (prefers-reduced-motion: reduce) {
  .page-transition,
  .page-transition .page-transition__line { transition: none !important; }
}

/* Splash — the pulse bursts outward in purple/300 and reveals the home */
.loader__splash {
  position: absolute; top: 50%; left: 50%;
  width: 100vmax; height: 100vmax; margin: -50vmax 0 0 -50vmax;
  border-radius: 50%; background: var(--purple-300);
  transform: scale(0); opacity: 0; will-change: transform;
  pointer-events: none;
}
.loader.is-splash .loader__splash {
  animation: loaderSplash 600ms cubic-bezier(.22,.7,.2,1) forwards;
}
.loader.is-splash .loader__pulse-ring { opacity: 0; transition: opacity 130ms ease; }
@keyframes loaderSplash {
  0%   { transform: scale(0);   opacity: 1; }
  100% { transform: scale(1.6); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .loader__pulse-ring { animation: none; }
  .loader__pulse-ring::before,
  .loader__pulse-ring::after { animation: none; opacity: 0; }
  .loader.is-splash .loader__splash { animation: none; opacity: 0; }
}

/* ============================================================
   Tweaks panel (lightweight, vanilla)
   ============================================================ */
.tw-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; font-family: var(--sans); display: none; }
.tw-root.on { display: block; }
.tw-panel {
  width: 268px; background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 14px; box-shadow: 0 18px 50px -12px rgba(26,24,20,0.28); padding: 1rem 1.1rem 1.15rem;
  opacity: 0; transform: translateY(8px) scale(0.98); transform-origin: bottom right;
  transition: opacity var(--t-fast), transform var(--t-fast); pointer-events: none;
}
.tw-root.open .tw-panel { opacity: 1; transform: none; pointer-events: auto; }
.tw-toggle {
  margin-left: auto; margin-top: 0.7rem; display: flex; align-items: center; gap: 0.5rem;
  background: var(--ink); color: var(--paper); border-radius: 100px; padding: 0.6em 1em;
  font-size: 0.8rem; font-weight: 600; box-shadow: 0 8px 24px -8px rgba(26,24,20,0.4);
}
.tw-title { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.9rem; }
.tw-group { margin-bottom: 1rem; }
.tw-group:last-child { margin-bottom: 0; }
.tw-label { font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.tw-swatches { display: flex; gap: 0.5rem; }
.tw-sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform var(--t-fast); }
.tw-sw:hover { transform: scale(1.12); }
.tw-sw.sel { border-color: var(--ink); }
.tw-seg { display: flex; gap: 0.35rem; }
.tw-seg button { flex: 1; padding: 0.5em; border: 1px solid var(--hairline); border-radius: 8px; font-size: 0.82rem; font-weight: 500; transition: all var(--t-fast); }
.tw-seg button.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tw-seg--stack { flex-direction: column; }
.tw-seg--stack button { flex: none; width: 100%; text-align: left; padding: 0.55em 0.7em; }

.morework-section { background: var(--neutral-200); box-shadow: 0 0 0 100vmax var(--neutral-200); clip-path: inset(0 -100vmax); padding-block: 80px; }
.morework__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 2.4vw, 2rem); max-width: 760px; margin-inline: auto; }
@media (max-width: 640px) { .morework__grid { grid-template-columns: 1fr; } }
