/* ─── FONTS ─────────────────────────────────── */
@font-face {
  font-family: 'ClashDisplay';
  src: url('../fonts/ClashDisplay-Variable.woff2') format('woff2-variations');
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: 'Roobert';
  src: url('../fonts/RoobertTRIAL-Light.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Roobert';
  src: url('../fonts/RoobertTRIAL-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Roobert';
  src: url('../fonts/RoobertTRIAL-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'PressGothic';
  src: url('../fonts/PressGothic-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Robson';
  src: url('../fonts/Robson-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'GenericG50CC';
  src: url('../fonts/GenericG50CC.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DIN';
  src: url('../fonts/DIN-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DIN';
  src: url('../fonts/DIN-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'DIN';
  src: url('../fonts/DIN-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

/* ─── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  --gutter: 20px;
  background: #000;
  color: #fff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 640px) {
  body { --gutter: 48px; }
}
@media (min-width: 1024px) {
  body { --gutter: 150px; }
}
body.cafler-page {
  background: #f2f2f0;
}

/* ─── NAV — glass blur header ───────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem var(--gutter);
  pointer-events: none;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  background: rgba(0,0,0,0.08);
  transition: background 0.6s ease;
}
body.cafler-preview .site-nav {
  background: rgba(248,255,252,0.15);
}
.site-nav a { pointer-events: all; }

.nav-logo { display: block; width: 28px; text-decoration: none; flex-shrink: 0; }
.nav-logo svg { width: 100%; height: auto; display: block; }
.nav-logo .logo-path { fill: #fff; transition: fill 0.5s ease; }
body.cafler-preview .nav-logo .logo-path { fill: #111; }

.nav-right { display: flex; gap: 2rem; }
.nav-link {
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  font-size: 0.8496rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link.active { color: #fff; }
.nav-link.dim    { color: #444; }
.nav-link:hover  { color: #fff !important; }
body.cafler-preview .nav-link.active { color: #111; transition: color 0.5s ease; }
body.cafler-preview .nav-link.dim    { color: #999; transition: color 0.5s ease; }
body.cafler-preview .nav-link:hover  { color: #000 !important; }

/* ─── Case-study hero link buttons (globe / play) ─────
   Shared circular glass buttons for Cafler/TLOU ES/
   Capoeira/Joanastic/Despierta hero, linking out to an
   external site or a video. Each page includes only the
   button(s) it needs. ───────────────────────────────── */
.cafler-link-buttons {
  position: fixed;
  bottom: 2rem;
  right: var(--gutter);
  z-index: 550;
  display: flex;
  gap: 0.8rem;
}
.cafler-link-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: background 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}
.cafler-link-btn:hover { background: rgba(255,255,255,0.26); transform: scale(1.06); }
.cafler-link-btn svg { width: 22px; height: 22px; color: #fff; }
.cafler-link-btn .icon-play { margin-left: 2px; }

/* ═══════════════════════════════════════════
   HOME PAGE
═══════════════════════════════════════════ */
#page-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 var(--gutter);
  background: #000;
  position: relative;
  overflow: hidden;
}

#page-home::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg at 60% 50%,
    #d8f8ed 0deg,
    #b2f0db 60deg,
    #8de8c8 120deg,
    #a8ecd4 180deg,
    #d8f8ed 240deg,
    #f8fffc 300deg,
    #d8f8ed 360deg
  );
  opacity: 0;
  filter: blur(40px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1);
  animation: none;
  pointer-events: none;
  z-index: 0;
}
#page-home {
  transition: background 0.7s cubic-bezier(0.4,0,0.2,1);
}
body.cafler-preview #page-home {
  background: #f4fdf9;
}
body.cafler-preview #page-home::before {
  opacity: 1;
  animation: gradientDrift 8s ease-in-out infinite;
}
@keyframes gradientDrift {
  0%   { transform: rotate(0deg)   scale(1);    }
  33%  { transform: rotate(8deg)   scale(1.04); }
  66%  { transform: rotate(-6deg)  scale(0.97); }
  100% { transform: rotate(0deg)   scale(1);    }
}

.home-cols, .home-bottom { position: relative; z-index: 1; }

.home-cols {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.home-name {
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  margin-bottom: 0.1rem;
  transition: color 0.5s ease;
  position: relative;
}
body.cafler-preview .home-name { color: #111; }

.home-name .ltr {
  display: inline-block;
  will-change: transform, opacity, filter;
  transition:
    opacity 0.38s cubic-bezier(0.4,0,0.2,1),
    transform 0.38s cubic-bezier(0.4,0,0.2,1),
    filter 0.38s cubic-bezier(0.4,0,0.2,1);
}
.home-name.erofo-on .ltr.to-hide {
  opacity: 0;
  transform: scale(0.1);
  filter: blur(6px);
  pointer-events: none;
}
.home-name.erofo-on .ltr.keep {
  transform: translateX(var(--tx, 0px));
  animation: motionBlurKeep 0.38s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes motionBlurKeep {
  0%   { filter: blur(0px); }
  35%  { filter: blur(4px); }
  100% { filter: blur(0px); }
}

.home-subtitle {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 1.1rem;
  white-space: nowrap;
  transition: color 0.5s ease;
}
body.cafler-preview .home-subtitle { color: #111; }
.home-subtitle-break { white-space: normal; }

.cafler-subtitle-word {
  font-family: 'Roobert', 'Helvetica Neue', sans-serif;
  font-weight: 500;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  background: linear-gradient(90deg, #2BB5D8 0%, #3DD68C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.home-links a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}
.home-links a:hover { color: #fff; }
body.cafler-preview .home-links a { color: #999; }
body.cafler-preview .home-links a:hover { color: #111; }

.home-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.work-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 1.8rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.5504rem 1.5rem;
  background: transparent;
  transition:
    background 0.7s cubic-bezier(0.4,0,0.2,1),
    box-shadow 0.7s cubic-bezier(0.4,0,0.2,1),
    filter 0.35s ease;
}
.work-pill.transitioning {
  filter: blur(2px);
}
body.cafler-preview .work-pill {
  background: linear-gradient(90deg, #28D9C2 0%, #22C4E8 100%);
  box-shadow: 0 8px 40px rgba(34,196,232,0.5), 0 2px 10px rgba(40,217,194,0.35);
  filter: blur(0px);
}

.pill-cafler {
  font-family: 'Roobert', 'Helvetica Neue', sans-serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  letter-spacing: -0.01em;
  color: #fff;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  line-height: 1.1;
}
.pill-year {
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.1;
}

.home-bottom { padding-bottom: 2rem; }
.home-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3504rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 0.7504rem;
  color: #444;
  transition: color 0.5s ease;
}
body.cafler-preview .home-location { color: #888; }
.home-location svg { width: 11px; }

/* ═══════════════════════════════════════════
   PROJECTS PAGE — same shell as Work, but the
   right column is a stack of project rows, each
   name set in its own display typeface
═══════════════════════════════════════════ */
.projects-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.8rem;
}
.project-row {
  display: flex;
  align-items: baseline;
  gap: 1.8rem;
  text-decoration: none;
}
.project-name {
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.1;
}
.project-year {
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.1;
}

.font-pressgothic { font-family: 'PressGothic', 'Helvetica Neue', sans-serif; }
.font-robson       { font-family: 'Robson', 'Helvetica Neue', sans-serif; }
.font-archivo       { font-family: 'Archivo', 'Helvetica Neue', sans-serif; }
.font-genericg50   { font-family: 'GenericG50CC', 'Helvetica Neue', sans-serif; }

/* Reserve the border space up front (transparent) so turning it visible
   on hover/preview never shifts layout. */
.project-row {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.6rem 1.6rem;
  transition: border-color 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
}
body.tlou-preview .project-row:not(#tlouRow),
body.capoeira-preview .project-row:not(#capoeiraRow),
body.joanastic-preview .project-row:not(#joanasticRow),
body.despierta-preview .project-row:not(#despiertaRow) {
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
}

/* Per-project preview — hovering a row swaps the whole page's backdrop
   for that project's key art and replaces the name with its logo,
   mirroring the Cafler preview on Work but with a real image instead
   of a flat gradient. Shared structural rules below, one pair of
   image/logo assets per project. */
.tlou-preview-bg,
.capoeira-preview-bg,
.joanastic-preview-bg,
.despierta-preview-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(0.4,0,0.2,1);
}
body.tlou-preview .tlou-preview-bg { opacity: 1; }
body.capoeira-preview .capoeira-preview-bg { opacity: 1; }
body.joanastic-preview .joanastic-preview-bg { opacity: 1; }
body.despierta-preview .despierta-preview-bg { opacity: 1; }
.tlou-preview-bg img, .capoeira-preview-bg img, .joanastic-preview-bg img, .despierta-preview-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tlou-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0.65) 100%);
}

#tlouRow, #capoeiraRow, #joanasticRow, #despiertaRow { position: relative; z-index: 1; }
#tlouRow::before, #capoeiraRow::before, #joanasticRow::before, #despiertaRow::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  background-size: 100% 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#tlouRow::before { background-image: url('../assets/tlou-pill.webp'); }
#capoeiraRow::before { background-image: url('../assets/capoeira-pill.webp'); }
#joanasticRow::before { background-image: url('../assets/joanastic-pill.webp'); }
#despiertaRow::before { background-image: url('../assets/despierta-pill.webp'); }
body.tlou-preview #tlouRow::before { opacity: 1; }
body.capoeira-preview #capoeiraRow::before { opacity: 1; }
body.joanastic-preview #joanasticRow::before { opacity: 1; }
body.despierta-preview #despiertaRow::before { opacity: 1; }
body.tlou-preview .home-left,
body.capoeira-preview .home-left,
body.joanastic-preview .home-left,
body.despierta-preview .home-left { opacity: 0; filter: blur(10px); pointer-events: none; }

.tlou-logo, .capoeira-logo, .joanastic-logo, .despierta-logo {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 2;
  height: auto;
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s, filter 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s;
}
.tlou-logo { width: min(38vw, 620px); }
.capoeira-logo { width: min(16vw, 260px); }
.joanastic-logo { width: min(34vw, 560px); }
.despierta-logo { width: min(37vw, 610px); }
body.tlou-preview .tlou-logo { opacity: 1; filter: blur(0); }
body.capoeira-preview .capoeira-logo { opacity: 1; filter: blur(0); }
body.joanastic-preview .joanastic-logo { opacity: 1; filter: blur(0); }
body.despierta-preview .despierta-logo { opacity: 1; filter: blur(0); }

/* Joanastic's key art is light, unlike Cafler/TLOU/Capoeira's dark
   backdrops — flip the nav and location text dark to stay legible,
   same treatment as body.cafler-preview further down. */
body.joanastic-preview .nav-logo .logo-path { fill: #111; }
body.joanastic-preview .nav-link.active { color: #111; }
body.joanastic-preview .nav-link.dim { color: #999; }
body.joanastic-preview .nav-link:hover { color: #000 !important; }
body.joanastic-preview .home-name,
body.joanastic-preview .home-subtitle { color: #111; }
body.joanastic-preview .home-links a { color: #999; }
body.joanastic-preview .home-location { color: #888; }

/* Cafler preview mark — replaces the name with the brand "trazo" on
   hover. Progressive blur: the base layer is always crisp, and three
   copies stacked on top get progressively blurrier and are masked to
   fade out by ~15-38% down, so the blur is concentrated where the
   stroke bleeds off the top of the frame and resolves to sharp by the
   time it reaches the bend — a soft focus-pull rather than uniform blur. */
body.cafler-preview .home-left {
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
}
.cafler-trazo {
  position: absolute;
  top: -8vh;
  left: -2vw;
  width: 62vw;
  max-width: 900px;
  aspect-ratio: 1204 / 1080;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(0.4,0,0.2,1);
}
body.cafler-preview .cafler-trazo { opacity: 1; }
.trazo-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.trazo-l1 {
  filter: blur(5px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 8%, transparent 38%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 8%, transparent 38%);
}
.trazo-l2 {
  filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 4%, transparent 26%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 4%, transparent 26%);
}
.trazo-l3 {
  filter: blur(24px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 15%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 15%);
}

/* ═══════════════════════════════════════════
   LANDING (new home) — everything fades in together
   on load: big mark, pill nav and identity
═══════════════════════════════════════════ */
body.landing-page { background: #000; }

#landing {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.hero-logo {
  position: relative;
  z-index: 2;
  width: min(48vw, 640px);
  aspect-ratio: 1560 / 1562;
  opacity: 0;
  filter: blur(20px);
  transition: opacity 1.1s cubic-bezier(0.22,1,0.36,1), filter 1.1s cubic-bezier(0.22,1,0.36,1);
}
.hero-logo-img { width: 100%; height: 100%; display: block; object-fit: contain; }
#landing.revealed .hero-logo { opacity: 1; filter: blur(0); }

/* Bottom vignette — settles in with the rest, gives the identity
   text a clean dark backdrop and darkens the whole footer strip. */
.landing-vignette {
  position: absolute;
  inset: auto 0 0 0;
  height: 38vh;
  z-index: 3;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 70%, #000 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1);
}
#landing.revealed .landing-vignette { opacity: 1; }

.landing-pills {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  gap: 1.2rem;
  opacity: 0;
  filter: blur(14px);
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), filter 0.9s cubic-bezier(0.22,1,0.36,1);
}
#landing.revealed .landing-pills { opacity: 1; filter: blur(0); pointer-events: all; }

.landing-pill {
  background: #f2f2f2;
  color: #111;
  text-align: center;
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.3vw, 2rem);
  letter-spacing: 0.02em;
  padding: 1.1rem 2.2rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}
.landing-pill:hover { background: #fff; transform: translateY(-2px); }

/* Hovering one pill defocuses its siblings (desktop/mouse only —
   :hover bubbles to the container whenever any child pill is hovered) */
@media (hover: hover) and (pointer: fine) {
  .landing-pill { transition: background 0.25s ease, transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease; }
  .landing-pills:hover .landing-pill:not(:hover) { filter: blur(4px); opacity: 0.5; }
}

.landing-identity {
  position: absolute;
  bottom: 8vh;
  left: 50%;
  z-index: 4;
  text-align: center;
  opacity: 0;
  filter: blur(10px);
  transform: translate(-50%, 24px);
  transition:
    opacity 0.9s cubic-bezier(0.22,1,0.36,1) 0.15s,
    filter 0.9s cubic-bezier(0.22,1,0.36,1) 0.15s,
    transform 0.9s cubic-bezier(0.22,1,0.36,1) 0.15s;
}
#landing.revealed .landing-identity { opacity: 1; filter: blur(0); transform: translate(-50%, 0); }

.landing-name {
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
}
/* Same Eric Rodríguez Forés -> EROFO letter-morph as .home-name, but
   the kept letters collapse toward the block's own center instead of
   sliding left — the JS picks the target start-x accordingly. */
.landing-name .ltr {
  display: inline-block;
  will-change: transform, opacity, filter;
  transition:
    opacity 0.38s cubic-bezier(0.4,0,0.2,1),
    transform 0.38s cubic-bezier(0.4,0,0.2,1),
    filter 0.38s cubic-bezier(0.4,0,0.2,1);
}
.landing-name.erofo-on .ltr.to-hide {
  opacity: 0;
  transform: scale(0.1);
  filter: blur(6px);
  pointer-events: none;
}
.landing-name.erofo-on .ltr.keep {
  transform: translateX(var(--tx, 0px));
  animation: motionBlurKeep 0.38s cubic-bezier(0.4,0,0.2,1) forwards;
}
.landing-role {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  color: rgba(255,255,255,0.55);
  margin-top: 0.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo, .landing-pills, .landing-identity, .landing-vignette { transition: none; }
}

/* ═══════════════════════════════════════════
   PLACEHOLDER PAGES (Me, Projects...)
═══════════════════════════════════════════ */
.page-placeholder {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.placeholder-text {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: #555;
}

/* ═══════════════════════════════════════════
   ME PAGE — story videos
═══════════════════════════════════════════ */
body.me-page { background: #000; }

/* Fade + blur everything in gently on page load */
.me-fade-in {
  opacity: 0;
  filter: blur(16px);
  transition: opacity 1.2s ease, filter 1.2s ease;
}
.me-fade-in.in {
  opacity: 1;
  filter: blur(0);
}

.me-video-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* real visible height on mobile Safari, address bar and all */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.me-video-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Video 1 is shown 25% smaller than the viewport, permanently,
   sized to its own 16:9 ratio so it never gets cropped top/bottom */
#frameFeel {
  width: min(75vw, calc(75dvh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
}

.me-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 1.1s ease, transform 1.1s ease;
}
.me-video-frame.pending .me-video {
  filter: blur(28px) brightness(0.55);
  transform: scale(1.08);
}
/* Once a video finishes its first sound playthrough it keeps
   looping muted, blurred again, until the eye button is pressed */
.me-video-frame.settled .me-video {
  filter: blur(24px) brightness(0.6);
}
.me-video-frame.settled.revealed .me-video {
  filter: blur(0) brightness(0.9);
}

.me-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.me-grain.visible { opacity: 0.35; }

.me-intro {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  text-align: center;
  padding: 0 1.5rem;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.me-intro.hidden { opacity: 0; pointer-events: none; }
.me-intro-text {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(0.85rem, 2.2vw, 1.8rem);
  color: #fff;
  white-space: nowrap;
}
.me-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: #fff;
  font-family: 'Roobert', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.play-icon { width: 15px; height: 15px; }

.me-controls {
  position: absolute;
  left: var(--gutter);
  bottom: 2rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.me-skip-btn {
  position: absolute;
  right: var(--gutter);
  bottom: 2rem;
  z-index: 5;
}

.me-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.2s ease;
  cursor: pointer;
}
.me-icon-btn.visible { opacity: 1; transform: none; pointer-events: all; }
.me-icon-btn:hover { background: rgba(255,255,255,0.2); }
.me-icon-btn svg { width: 18px; height: 18px; color: #fff; }

.me-volume-btn .icon-muted { display: none; }
.me-volume-btn.is-muted .icon-unmuted { display: none; }
.me-volume-btn.is-muted .icon-muted { display: block; }

/* Eye button — toggles between the descriptive text (blurred video)
   and the clear video (text hidden); reversible */
.me-eye-btn .icon-eye-open { width: 18px; height: 18px; }
.me-eye-btn .icon-eye-closed { display: none; width: 18px; height: 18px; }
.me-eye-btn.showing-video .icon-eye-open { display: none; }
.me-eye-btn.showing-video .icon-eye-closed { display: block; }

.me-reveal-text {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  text-align: center;
  padding: 0 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.me-reveal-text.showing { opacity: 1; pointer-events: all; }
.me-reveal-text p {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
  max-width: 62ch;
}
.me-reveal-text p strong { font-weight: 700; color: #fff; }
.me-reveal-text .tagline {
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  max-width: none;
}

.me-look-closer {
  position: absolute;
  bottom: 3rem;
  left: 0; right: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  cursor: pointer;
}
.me-look-closer.visible { opacity: 1; transform: none; pointer-events: all; }
.me-look-closer p {
  font-family: 'ClashDisplay', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
}

/* Film / Shots / Graphics selector — looping background video + glass pills */
.me-selector-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
}

.me-pill-stack {
  position: relative;
  z-index: 3;
  width: 420px;
  max-width: 86vw;
  height: 340px;
  perspective: 900px;
}

.me-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  will-change: transform, opacity, filter;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease, filter 0.4s ease;
}
.me-pill img { width: 300px; height: auto; display: block; }

/* ═══════════════════════════════════════════
   FILM / SHOTS / GRAPHICS GALLERIES (masonry)
═══════════════════════════════════════════ */
.masonry-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  padding: calc(1.6rem + 64px + 3rem) var(--gutter) 6rem;
}

.masonry-header {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 3rem;
}
.masonry-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s ease;
}
.masonry-back:hover { color: #fff; }
.masonry-back svg { width: 22px; height: 22px; }

.masonry-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.masonry-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
a.masonry-nav-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.masonry-nav-btn svg { width: 19px; height: auto; display: block; }

/* Floating glass credit pill — backdrop-filter with an SVG feDisplacementMap
   reference to refract/distort what's behind it (real glass), with a plain
   blur as the fallback for engines that reject the url() filter function
   inside backdrop-filter (older Firefox, some WebKit builds). */
.copyright-pill {
  position: fixed;
  left: var(--gutter);
  bottom: 1.6rem;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.75);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4) url(#glass-distortion);
}
.copyright-pill .copyright-icon { font-size: 0.95em; opacity: 0.85; }

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 4px;
  gap: 20px;
}

.masonry-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #0c0c0c;
}
.masonry-inner { position: relative; }
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.masonry-item:hover img { transform: scale(1.045); }

.masonry-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.masonry-item:hover .masonry-play { opacity: 1; }
.masonry-play-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20,20,24,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.masonry-play-circle svg { width: 18px; height: 20px; color: #fff; }

/* ═══════════════════════════════════════════
   CAFLER PAGE
═══════════════════════════════════════════ */
#page-cafler {
  font-family: 'Roobert', 'Helvetica Neue', sans-serif;
}

.cafler-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 var(--gutter) 3rem;
}

.cafler-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 110%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  will-change: transform;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .cafler-bg { transform: none !important; will-change: auto; }
}

.cafler-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.12) 0%,
    rgba(0,0,0,0.08) 50%,
    rgba(0,0,0,0.6) 100%
  );
  pointer-events: none;
}

.cafler-chevron {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.chevron {
  width: 20px; height: 20px;
  border-right: 2px solid rgba(255,255,255,0.65);
  border-bottom: 2px solid rgba(255,255,255,0.65);
  transform: rotate(45deg);
}

.cafler-hero-logo {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cafler-hero-logo svg { width: 180px; height: auto; }

.cafler-body {
  background: #f2f2f0;
  padding: 5rem var(--gutter);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
}

.cafler-sidebar { display: flex; flex-direction: column; }
.back-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: 'Roobert', sans-serif;
  font-weight: 400;
  font-size: 0.7504rem;
  color: #888;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
}
.back-btn:hover { color: #333; }

.role-pill {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.7504rem;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.08),
    0 1px 4px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
  display: inline-block;
  width: fit-content;
}
.role-pill p {
  font-family: 'Roobert', sans-serif;
  font-weight: 600;
  font-size: 0.8496rem;
  color: #111;
  line-height: 1.5;
  font-feature-settings: "liga" 1, "calt" 1;
}

.cafler-skills { list-style: none; }
.cafler-skills li {
  font-family: 'Roobert', sans-serif;
  font-weight: 400;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.cafler-desc p {
  font-family: 'Roobert', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  color: #222;
  line-height: 1.85;
  margin-bottom: 1.4rem;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  text-rendering: optimizeLegibility;
}

.cafler-divider {
  background: #f2f2f0;
  display: flex;
  justify-content: center;
  padding: 0 0 4rem;
}
.divider-mark { width: 36px; height: auto; opacity: 0.85; }

.cafler-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.cafler-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cafler-carousel {
  width: 100%;
  display: block;
}

#nav-cafler {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem var(--gutter);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  background: rgba(0,0,0,0.1);
  pointer-events: none;
}
#nav-cafler a { pointer-events: all; }
#nav-cafler .nav-link.active { color: #fff; }
#nav-cafler .nav-link.dim    { color: rgba(255,255,255,0.4); }
#nav-cafler .nav-link:hover  { color: #fff !important; }

/* ═══════════════════════════════════════════
   THE LAST OF US .ES PROJECT PAGE
   Reuses the whole Cafler case-study shell
   (.cafler-hero/.cafler-body/.role-pill/etc.)
   — only the wrapper id changes, so these rules
   just swap the typeface to DIN without touching
   Cafler's Roobert styling.
═══════════════════════════════════════════ */
body.tloues-page { background: #0e0e0e; }
#page-tloues { font-family: 'DIN', 'Helvetica Neue', sans-serif; }
#page-tloues .back-btn { font-family: 'DIN', sans-serif; }
#page-tloues .role-pill p { font-family: 'DIN', sans-serif; font-weight: 700; }
#page-tloues .cafler-skills li { font-family: 'DIN', sans-serif; font-weight: 500; }
#page-tloues .cafler-desc p { font-family: 'DIN', sans-serif; font-weight: 400; }

/* Cafler's body/divider are light (#f2f2f0) with dark text; this page's
   reference is dark (#0e0e0e), so every color that shell hard-codes for
   the light theme needs flipping here too. */
#page-tloues .cafler-bg { height: 104%; object-position: center 6%; }
#page-tloues .cafler-body { background: #0e0e0e; }
#page-tloues .back-btn { color: rgba(255,255,255,0.4); }
#page-tloues .back-btn:hover { color: #fff; }
#page-tloues .role-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
#page-tloues .role-pill p { color: #fff; }
#page-tloues .cafler-skills li { color: rgba(255,255,255,0.45); }
#page-tloues .cafler-desc p { color: rgba(255,255,255,0.85); }
#page-tloues .cafler-divider { background: #0e0e0e; }

/* Media grid — a curated, Cafler-style stack of full-bleed pieces at
   varying sizes (not a computed masonry): each item gets a manual
   column span and keeps its own natural aspect ratio. */
.tloues-media-section {
  background: #0e0e0e;
  padding: 4rem var(--gutter) 6rem;
}
.tloues-media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tloues-media-item {
  overflow: hidden;
  border-radius: 12px;
  background: #161616;
}
.tloues-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tloues-media-item.span-1 { grid-column: span 1; }
.tloues-media-item.span-2 { grid-column: span 2; }
.tloues-media-item.span-4 { grid-column: span 4; }

/* ═══════════════════════════════════════════
   CAPOEIRA PROJECT PAGE
   Reuses the Cafler case-study shell, just like
   TLOU ES. The one real twist: two stacked
   .cafler-bg images (one per year) cross-fade via
   [data-year] on #page-capoeira, and the same
   attribute flips the body/divider theme between
   the 2024 (warm) and 2025 (dark red) palettes.
═══════════════════════════════════════════ */
body.capoeira-page { transition: background 0.5s ease; }
body[data-year="2024"].capoeira-page { background: #ffc062; }
body[data-year="2025"].capoeira-page { background: #2d0003; }
#page-capoeira { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
#page-capoeira .back-btn,
#page-capoeira .role-pill p,
#page-capoeira .cafler-skills li,
#page-capoeira .cafler-desc p { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }

.cafler-bg[data-year] {
  opacity: 0;
  transition: opacity 0.7s ease;
}
body[data-year="2024"] .cafler-bg[data-year="2024"],
body[data-year="2025"] .cafler-bg[data-year="2025"] {
  opacity: 1;
}

.capoeira-year-toggle {
  position: fixed;
  top: 6.5rem;
  right: var(--gutter);
  z-index: 550;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.year-btn {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  cursor: pointer;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: rgba(255,255,255,0.8);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.year-btn:hover { background: rgba(255,255,255,0.24); color: #fff; }
.year-btn.active { color: #fff; }
body[data-year="2024"] .year-btn.active { background: rgba(230,140,40,0.85); border-color: rgba(230,140,40,0.9); }
body[data-year="2025"] .year-btn.active { background: rgba(216,28,28,0.85); border-color: rgba(216,28,28,0.9); }

/* -- 2024: warm palette, continues Cafler's default light styling --
   The gradient is painted once on <body> (see above) and every
   section below the hero stays transparent, so it flows unbroken
   from the hero all the way to the bottom of the gallery instead of
   restarting/cutting at each section's own box. -- */
body[data-year="2024"] .cafler-body,
body[data-year="2024"] .cafler-divider {
  background: transparent;
}
body[data-year="2024"] .role-pill p,
body[data-year="2024"] .cafler-desc p { color: #360000; }
body[data-year="2024"] .cafler-skills li { color: rgba(54,0,0,0.28); }

/* -- 2025: dark red palette, mirrors TLOU ES's dark-glass override -- */
body[data-year="2025"] .cafler-body,
body[data-year="2025"] .cafler-divider {
  background: transparent;
}
body[data-year="2025"] .back-btn { color: rgba(255,255,255,0.4); }
body[data-year="2025"] .back-btn:hover { color: #fff; }
body[data-year="2025"] .role-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
body[data-year="2025"] .role-pill p { color: #fff; }
body[data-year="2025"] .cafler-skills li { color: rgba(255,255,255,0.45); }
body[data-year="2025"] .cafler-desc p { color: rgba(255,255,255,0.85); }
body[data-year="2025"] .divider-mark { filter: invert(1); }

#page-capoeira .cafler-body,
#page-capoeira .cafler-divider,
#page-capoeira .role-pill,
#page-capoeira .back-btn,
#page-capoeira .cafler-skills li,
#page-capoeira .cafler-desc p {
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.capoeira-media-section { padding: 0 var(--gutter) 6rem; background: transparent; }
.capoeira-media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.capoeira-media-item {
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0,0,0,0.08);
}
.capoeira-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.capoeira-media-item.span-1 { grid-column: span 1; }
.capoeira-media-item.span-2 { grid-column: span 2; }
body[data-year="2024"] .capoeira-media-item[data-year="2025"] { display: none; }
body[data-year="2025"] .capoeira-media-item[data-year="2024"] { display: none; }

/* ═══════════════════════════════════════════
   JOANASTIC PROJECT PAGE
   Reuses the Cafler case-study shell as-is —
   the reference design matches Cafler's default
   light theme exactly, so only the typeface
   changes (Archivo instead of Roobert).
═══════════════════════════════════════════ */
#page-joanastic { font-family: 'Archivo', 'Helvetica Neue', sans-serif; }
#page-joanastic .back-btn { font-family: 'Archivo', sans-serif; font-weight: 400; }
#page-joanastic .role-pill p { font-family: 'Archivo', sans-serif; font-weight: 600; }
#page-joanastic .cafler-skills li { font-family: 'Archivo', sans-serif; font-weight: 500; }
#page-joanastic .cafler-desc p { font-family: 'Archivo', sans-serif; font-weight: 400; }

.joanastic-media-section { padding: 0 var(--gutter) 6rem; }
.joanastic-media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.joanastic-media-item {
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0,0,0,0.05);
}
.joanastic-media-item img,
.joanastic-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.joanastic-media-item.span-1 { grid-column: span 1; }
.joanastic-media-item.span-2 { grid-column: span 2; }
.joanastic-media-item.span-3 { grid-column: span 3; }
.joanastic-media-item.span-4 { grid-column: span 4; }

/* ═══════════════════════════════════════════
   DESPIERTA PROJECT PAGE
   Reuses the Cafler case-study shell as-is —
   only the typeface changes (GenericG50CC).
   The gallery is split into labelled groups
   (posters / trailer / stills / rodaje) instead
   of one continuous grid, per explicit request
   not to mix categories.
═══════════════════════════════════════════ */
body.despierta-page { background: #0e0e0e; }
#page-despierta { font-family: 'GenericG50CC', 'Helvetica Neue', sans-serif; }
#page-despierta .back-btn,
#page-despierta .role-pill p,
#page-despierta .cafler-skills li,
#page-despierta .cafler-desc p { font-family: 'GenericG50CC', 'Helvetica Neue', sans-serif; }

#page-despierta .cafler-body { background: #0e0e0e; }
#page-despierta .back-btn { color: rgba(255,255,255,0.4); }
#page-despierta .back-btn:hover { color: #fff; }
#page-despierta .role-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
#page-despierta .role-pill p { color: #fff; }
#page-despierta .cafler-skills li { color: rgba(255,255,255,0.45); }
#page-despierta .cafler-desc p { color: rgba(255,255,255,0.85); }
#page-despierta .cafler-divider { background: #0e0e0e; }

.despierta-media-section { padding: 0 var(--gutter) 6rem; background: #0e0e0e; }
.despierta-group-label {
  font-family: 'GenericG50CC', 'Helvetica Neue', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin: 3rem 0 1rem;
}
.despierta-media-section .despierta-group-label:first-child { margin-top: 0; }
.despierta-media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.despierta-media-item {
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
}
.despierta-media-item img,
.despierta-trailer-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.despierta-media-item.span-1 { grid-column: span 1; }
.despierta-media-item.span-2 { grid-column: span 2; }
.despierta-media-item.span-3 { grid-column: span 3; }
.despierta-media-item.span-4 { grid-column: span 4; }

.despierta-trailer-wrap { position: relative; }
.despierta-trailer-controls {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  gap: 0.6rem;
}
.despierta-sound-btn .icon-muted { display: none; }
.despierta-sound-btn.is-muted .icon-unmuted { display: none; }
.despierta-sound-btn.is-muted .icon-muted { display: block; }
.despierta-fullscreen-btn .icon-collapse { display: none; }
.despierta-fullscreen-btn.is-fullscreen .icon-expand { display: none; }
.despierta-fullscreen-btn.is-fullscreen .icon-collapse { display: block; }

/* ═══════════════════════════════════════════
   PROFILE PAGE
   Reuses the Cafler shell (sidebar/role-pill/
   desc) but with no hero above it, so the
   sidebar column needs its own top-clearance
   under the fixed nav — plus a masonry gallery
   below, reusing the film/shots/graphics grid.
═══════════════════════════════════════════ */
body.profile-page { background: #0e0e0e; }
#page-profile { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }

#page-profile .cafler-body {
  background: #0e0e0e;
  padding-top: calc(1.6rem + 64px + 3rem);
}

#page-profile .role-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
#page-profile .role-pill p {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: #fff;
}
.profile-role-dim {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
}

.profile-links { list-style: none; }
.profile-links li { margin-bottom: 0.5rem; }
.profile-links a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}
.profile-links a:hover { color: #fff; }

#page-profile .profile-desc p {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}

.profile-gallery { padding: 2rem var(--gutter) 6rem; background: #0e0e0e; }

/* SCROLL REVEAL — opacity + motion blur (shared) */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(4px);
  transition:
    opacity 1.4s cubic-bezier(0.22,1,0.36,1),
    transform 1.4s cubic-bezier(0.22,1,0.36,1),
    filter 1.2s cubic-bezier(0.22,1,0.36,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0px);
}
.reveal-d1 { transition-delay: 0.18s; }
.reveal-d2 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { filter: none; transform: none; opacity: 1; transition: none; }
}

/* ═══════════════════════════════════════════
   MOBILE / SMALL SCREENS
   (only applies below 768px — the desktop
   layout above is never touched by this block)
═══════════════════════════════════════════ */
@media (max-width: 767px) {

  /* -- nav -- */
  .nav-right { gap: 1rem; }
  .nav-link { font-size: 0.72rem; letter-spacing: 0.05em; }

  /* -- home page -- */
  .home-cols {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: calc(1.6rem + 64px + 1.5rem);
    padding-bottom: 0;
  }
  .home-name { justify-content: center; }
  .home-links { justify-content: center; }
  .home-right { justify-content: center; margin-top: 16vh; }

  .home-subtitle { white-space: normal; }

  .home-name,
  .home-subtitle,
  .pill-cafler,
  .pill-year {
    font-size: clamp(1.3rem, 7vw, 2rem);
  }
  .work-pill { gap: 1rem; padding: 0.5rem 1.1rem; }

  /* -- projects page -- */
  .projects-list { align-items: center; gap: 1.1rem; }
  .project-row { gap: 1rem; }
  .project-name { font-size: clamp(1.1rem, 6vw, 1.7rem); }
  .project-year { font-size: clamp(1.1rem, 6vw, 1.7rem); }

  /* -- landing (new home) -- */
  .hero-logo { width: min(85vw, 620px); }
  .landing-pills { flex-direction: column; }
  .landing-name {
    white-space: nowrap;
    font-size: clamp(0.95rem, 6vw, 1.25rem);
  }

  /* -- cafler page -- */
  .cafler-body {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem var(--gutter);
  }

  /* -- profile page -- */
  #page-profile .cafler-body { padding-top: calc(1.6rem + 64px + 2rem); }
  .profile-gallery { padding: 1.5rem var(--gutter) 4rem; }

  /* -- tloues media grid -- */
  .tloues-media-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tloues-media-item.span-1 { grid-column: span 1; }
  .tloues-media-item.span-2,
  .tloues-media-item.span-4 { grid-column: span 2; }

  /* -- capoeira media grid + year toggle -- */
  .capoeira-media-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .capoeira-media-item.span-2 { grid-column: span 2; }
  .capoeira-year-toggle { top: 5.5rem; gap: 0.5rem; }
  .year-btn { padding: 0.65rem 1.3rem; font-size: 0.8rem; }

  /* -- hero link buttons -- */
  .cafler-link-buttons { bottom: 1.2rem; gap: 0.5rem; }
  .cafler-link-btn { width: 42px; height: 42px; }
  .cafler-link-btn svg { width: 18px; height: 18px; }

  /* -- joanastic media grid -- */
  .joanastic-media-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .joanastic-media-item.span-1 { grid-column: span 1; }
  .joanastic-media-item.span-2,
  .joanastic-media-item.span-3,
  .joanastic-media-item.span-4 { grid-column: span 2; }

  /* -- despierta media grid -- */
  .despierta-media-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .despierta-media-item.span-1 { grid-column: span 1; }
  .despierta-media-item.span-2,
  .despierta-media-item.span-3,
  .despierta-media-item.span-4 { grid-column: span 2; }
  .despierta-trailer-controls { right: 0.6rem; bottom: 0.6rem; gap: 0.4rem; }

  /* -- me page: video 1 switches to a vertical source on mobile
     (see the <source media="(max-width:767px)"> in me.html), so the
     frame needs a matching tall aspect ratio instead of 16:9.
     height must be reset to auto — otherwise it keeps the 100dvh
     from .me-video-frame and aspect-ratio has no effect, which was
     stretching/cropping the video badly. */
  #frameFeel {
    width: min(88vw, calc(88dvh * 9 / 16));
    height: auto;
    aspect-ratio: 9 / 16;
  }

  /* -- film/shots/graphics galleries -- */
  .masonry-page { padding: calc(1.6rem + 64px + 2rem) var(--gutter) 4rem; }
  .masonry-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .masonry-item { border-radius: 8px; }
  .masonry-nav { gap: 0.5rem; }
  .masonry-nav-btn { width: 38px; height: 38px; }
  .masonry-nav-btn svg { width: 16px; }
  .copyright-pill { padding: 0.5rem 0.85rem; font-size: 0.68rem; gap: 0.35rem; }
}
