/* =========================================================
   FONTS — Fraunces (serif display) + Plus Jakarta Sans (clean grotesk)
   Self-hosted for GDPR compliance: no requests to Google Fonts CDN.
   Files in /fonts/ (v38 for Fraunces, v12 for Plus Jakarta Sans, latin only).
   font-display: swap → text stays visible during font load (no invisible flash).
   ========================================================= */

/* Fraunces */
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/fraunces-v38-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/fraunces-v38-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/fraunces-v38-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic; font-weight: 600; font-display: swap;
  src: url('../fonts/fraunces-v38-latin-600italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/fraunces-v38-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/fraunces-v38-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 900; font-display: swap;
  src: url('../fonts/fraunces-v38-latin-900.woff2') format('woff2');
}

/* Plus Jakarta Sans */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/plus-jakarta-sans-v12-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/plus-jakarta-sans-v12-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/plus-jakarta-sans-v12-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/plus-jakarta-sans-v12-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/plus-jakarta-sans-v12-latin-800.woff2') format('woff2');
}

/* =========================================================
   TOKENS
   ========================================================= */
:root {
  --paper:       #F7F5F0;   /* cool off-white base */
  --paper-2:     #FFFFFF;
  --sand:        #ECE8DF;   /* faint warm panel */
  --ink:         #181613;
  --ink-soft:    #4A463F;
  --green:       #3C5247;
  --green-deep:  #28392F;
  --green-soft:  #E2EAE2;
  --lavender:    #ACA3D6;
  --lavender-deep:#7A70AE;
  --orange:      #E8A36C;
  --orange-deep: #D9853D;
  --rose:        #D98C84;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;

  --gap: clamp(1.1rem, 3vw, 2.6rem);
  --container: 1280px;
  --r-xl: 34px;
  --r-lg: 24px;
  --r-md: 16px;
  --shadow: 0 30px 60px -24px rgba(24,22,19,0.30);
  --shadow-sm: 0 14px 30px -16px rgba(24,22,19,0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh; /* iOS Safari: 100vh doesn't account for the address bar showing/hiding, which leaves a gap below the footer. 100dvh tracks the real visible viewport. */
}

main { flex: 1 0 auto; }

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

::selection { background: var(--orange); color: var(--ink); }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* =========================================================
   UTILITIES
   ========================================================= */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gap); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-deep);
  display: block;
  margin: 0 0 1rem;
}

.pill {
  display: inline-block;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--lavender);
  color: var(--ink);
}
.pill.is-green  { background: var(--green); color: var(--paper); }
.pill.is-orange { background: var(--orange); }
.pill.is-rose   { background: var(--rose); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.9rem 1.7rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn.is-ghost { background: transparent; color: var(--ink); box-shadow: none; border: 1.5px solid var(--ink); }
.btn.is-ghost:hover { background: var(--ink); color: var(--paper); }
.btn.is-orange { background: var(--orange); color: var(--ink); }
.btn.is-orange:hover { background: var(--orange-deep); }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,245,240,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(24,22,19,0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.logo img.logo-mark { width: auto; height: 46px; object-fit: contain; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.93rem;
}

.nav-links a:not(.btn) { position: relative; padding: 0.3rem 0; color: var(--ink-soft); }
.nav-links a.active:not(.btn) { color: var(--ink); }
.nav-links a.active:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  border-radius: 4px;
  background: var(--orange);
}
.nav-links a:not(.btn):hover { color: var(--ink); }

.nav-links .btn {
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
}

/* hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
body.dark-page .nav-toggle span { background: #ECEAE4; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: 80px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid rgba(24,22,19,0.08);
    padding: 0.5rem var(--gap) 1.4rem;
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
    z-index: 49;
  }
  body.dark-page .nav-links { background: #0E0F11; }

  .nav-links.open { transform: translateY(0); }

  .nav-links a:not(.btn) {
    padding: 1rem 0.4rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(24,22,19,0.07);
  }
  body.dark-page .nav-links a:not(.btn) { border-color: rgba(255,255,255,0.08); }

  .nav-links a.active:not(.btn)::after { display: none; }
  .nav-links a.active:not(.btn) { color: var(--orange-deep); }

  .nav-links .btn {
    margin-top: 1rem;
    text-align: center;
    justify-content: center;
  }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: clamp(1.4rem, 3vw, 2.2rem) clamp(0.8rem, 2vw, 1.4rem) 0; }

.hero-grid {
  background: var(--green-soft);
  border-radius: var(--r-xl);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2.6rem, 6vw, 4.8rem) clamp(2.4rem, 6vw, 5.5rem);
  max-width: 1480px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; padding: 2.4rem 1.5rem; border-radius: var(--r-lg); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 6.2vw, 4.4rem);
  line-height: 0.96;
  margin: 0;
  letter-spacing: -0.015em;
}

.hero-role {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--green-deep);
  margin: 0.9rem 0 0;
}

.hero-text { margin: 1.1rem 0 1.9rem; max-width: 44ch; font-size: 1.03rem; color: var(--ink-soft); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-art { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; }
.hero-art img { max-width: 380px; width: 100%; height: auto; }

/* whole illustration is the link to the public reel — gentle lift + tilt on hover,
   like the character is reacting to being clicked */
.hero-art-frame {
  position: relative;
  display: block;
  transition: transform 0.25s cubic-bezier(.2,.8,.3,1.3);
}
.hero-art-frame:hover,
.hero-art-frame:focus-visible {
  transform: translateY(-6px) rotate(-1.5deg) scale(1.02);
}
.hero-art-frame:active { transform: translateY(-2px) scale(0.99); }
.hero-art-frame img { display: block; }


/* =========================================================
   PEEK MASCOT CORNER
   ========================================================= */
/* peek illustration — the character clings to the panel's right edge from the
   OUTSIDE, like peeking around a corner (matches the reference). The image is
   shown whole (no clipping), sits on top of everything, and straddles the
   right border: its left side (the gripping hand/shoulder) meets the panel
   edge while the body extends outward into the page margin. */
.peek-corner { position: relative; }
/* the peeking PNG extends past the panel's right edge; clip horizontal overflow
   at the section level so it never creates a horizontal scrollbar on narrow
   viewports (clip, unlike hidden, doesn't create a scroll container) */
.work-section { overflow-x: clip; }
.peek-corner img.peek-img {
  position: absolute;
  /* raised higher up the panel's right edge */
  top: -75px;
  right: -229px;
  /* mirrored horizontally + larger than before */
  width: 375px;
  height: auto;
  transform: scaleX(-1);
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,0.18));
}
@media (max-width: 860px) {
  /* no room for the peeking character on narrow screens — hide it */
  .peek-corner img.peek-img { display: none; }
}

/* =========================================================
   SECTION HEADINGS
   ========================================================= */
.section-head { padding: clamp(3rem, 7vw, 4.5rem) var(--gap) 0; }
.section-head .wrap { padding: 0; max-width: var(--container); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 0;
  letter-spacing: -0.015em;
}

/* =========================================================
   REEL SECTION
   ========================================================= */
.reel-section { padding: clamp(1.2rem, 3vw, 1.8rem) var(--gap) 0; }
.reel-section .wrap { padding: 0; max-width: var(--container); }

.frame-panel {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.frame-panel .ratio-16-9 { position: relative; aspect-ratio: 16 / 9; }
.frame-panel iframe, .frame-panel video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame-panel .placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
  align-items: center; justify-content: center;
  color: var(--paper); font-size: 0.85rem; text-align: center; padding: 1rem;
}

/* =========================================================
   NDA TEASER BAND
   ========================================================= */
.nda-teaser {
  position: relative;
  margin: clamp(3rem, 7vw, 5rem) var(--gap);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.nda-teaser .bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.nda-teaser .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20,28,24,0.95) 0%, rgba(20,28,24,0.82) 40%, rgba(20,28,24,0.2) 72%, rgba(20,28,24,0.5) 100%);
}
.nda-teaser .wrap {
  position: relative; z-index: 2;
  padding: clamp(3.2rem, 9vw, 6rem) clamp(1.8rem, 5vw, 4.2rem);
  max-width: var(--container); margin: 0 auto;
}
.nda-teaser .lock-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 700; font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  background: var(--lavender); border-radius: 999px;
  padding: 0.4rem 1rem 0.4rem 0.8rem; margin-bottom: 1.3rem;
}
.nda-teaser h2 {
  font-family: var(--font-display); font-weight: 600; color: var(--paper);
  font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.04;
  max-width: 15ch; margin: 0 0 1.1rem; letter-spacing: -0.015em;
}
.nda-teaser p { color: #E6E2D6; max-width: 46ch; font-size: 1.05rem; margin: 0 0 2rem; }

/* =========================================================
   UNDER CONSTRUCTION PANEL
   ========================================================= */
.work-section { padding: clamp(3.5rem, 6vw, 5rem) var(--gap) clamp(2rem, 5vw, 3rem); }
.work-section .wrap { max-width: var(--container); padding: 0; }

.construction-panel {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--lavender);
  box-shadow: var(--shadow-sm);
  padding: clamp(2.6rem, 6vw, 4rem);
  text-align: center;
}
.hazard-strip {
  height: 12px; border-radius: 999px; margin: 0 auto 1.7rem; max-width: 200px;
  background: repeating-linear-gradient(-45deg, var(--ink), var(--ink) 8px, var(--paper) 8px, var(--paper) 16px);
}
/* welcoming badge that replaces the construction hazard strip */
.panel-badge {
  display: inline-block; margin: 0 auto 1.4rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--green-deep);
  background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.7);
  padding: 0.4rem 0.9rem; border-radius: 999px;
}
.construction-panel h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin: 0 0 0.8rem; }
.construction-panel p { max-width: 46ch; margin: 0 auto 1.6rem; color: var(--ink); opacity: 0.85; font-size: 1.02rem; line-height: 1.6; }
.construction-panel .btn { background: var(--ink); color: var(--paper); }

/* =========================================================
   PROJECT GRID (projects page)
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2rem) var(--gap) 0;
}
@media (max-width: 920px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-lg);
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover, .card:focus-visible { box-shadow: var(--shadow); transform: translateY(-4px); }

.card-media { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-media.is-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--sand); font-size: 0.78rem; color: var(--green-deep);
  text-align: center; padding: 1rem; position: relative;
}
.card-media.is-empty .mini-hazard {
  position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: repeating-linear-gradient(-45deg, var(--ink), var(--ink) 7px, var(--sand) 7px, var(--sand) 14px);
}
.card-tag { position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; background: var(--paper-2); }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; margin: 0 0 0.3rem; }
.card-meta { font-size: 0.82rem; color: var(--green-deep); font-weight: 500; }

/* ArtStation-style overlay card: image fills the whole square, the title band
   is a clean frosted-glass strip sitting on top of the render at the bottom */
.card--overlay { aspect-ratio: 1 / 1; }
.card--overlay .card-media {
  position: absolute; inset: 0; aspect-ratio: auto; height: 100%;
}
.card--overlay .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card--overlay .card-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: rgba(20, 18, 16, 0.42);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 1.2rem 1.3rem 1.4rem;
}
.card--overlay .card-title { color: #fff; font-size: 1.9rem; }
.card--overlay .pill.is-green { background: rgba(255,255,255,0.16); color: #fff; }

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-hero { padding: clamp(1rem, 3vw, 2rem) var(--gap) 0; }
.about-layout {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 3.5rem); align-items: center;
  padding: clamp(2.4rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
  max-width: var(--container); margin: 0 auto;
}
@media (max-width: 860px) { .about-layout { grid-template-columns: 1fr; } }
.about-text p { max-width: 56ch; font-size: 1.04rem; color: var(--ink-soft); }
.about-text p + p { margin-top: 1.1rem; }
.about-photo {
  position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; background: var(--sand);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   CV SECTION
   ========================================================= */
.cv-section { padding: 0 var(--gap) clamp(1rem, 3vw, 2rem); }
.cv-section .wrap { max-width: var(--container); padding: 0; }

.cv-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  border-radius: var(--r-xl);
  background: var(--green-deep);
  color: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(2.4rem, 6vw, 3.6rem);
  overflow: hidden;
  position: relative;
}
/* Subtle decorative circle in the background */
.cv-card::before {
  content: '';
  position: absolute;
  right: 340px; top: -80px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.cv-info { display: flex; flex-direction: column; gap: 1.4rem; }

.cv-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0.3rem 0 0;
  color: var(--paper);
}

.cv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

.cv-stat {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  padding: 0.65rem 1rem;
  min-width: 130px;
}

.cv-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
}

.cv-stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper);
  line-height: 1.3;
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  color: var(--ink);
  font-weight: 700;
  align-self: flex-start;
  padding: 0.9rem 1.8rem;
}
.cv-btn:hover { background: var(--orange-deep); color: var(--paper); }

/* Thumbnail side */
.cv-preview {
  position: relative;
  display: block;
  width: clamp(140px, 18vw, 220px);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 40px -10px rgba(0,0,0,0.5);
  flex-shrink: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}
.cv-preview img {
  width: 100%; height: auto; display: block;
}
.cv-preview-overlay {
  position: absolute; inset: 0;
  background: rgba(24,22,19,0.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem; font-weight: 700; color: #fff; letter-spacing: 0.05em;
  opacity: 0; transition: opacity 0.18s ease;
}
.cv-preview:hover { transform: translateY(-5px) rotate(1deg); box-shadow: 0 32px 50px -10px rgba(0,0,0,0.6); }
.cv-preview:hover .cv-preview-overlay { opacity: 1; }

@media (max-width: 860px) {
  .cv-card {
    grid-template-columns: 1fr;
  }
  .cv-preview {
    width: 110px;
    align-self: flex-end;
    justify-self: flex-end;
    position: absolute;
    bottom: 2rem; right: 2rem;
    border-radius: 12px;
  }
  .cv-card { padding-bottom: clamp(2.4rem, 6vw, 3.6rem); }
}
@media (max-width: 560px) {
  .cv-preview { display: none; }
}

/* TOOLS — logo grid */
.tools-section { padding: 1rem var(--gap) clamp(3rem, 6vw, 4rem); }
.tools-section .wrap { max-width: var(--container); padding: 0; }
.tools-card {
  border-radius: var(--r-xl); background: var(--green); color: var(--paper);
  box-shadow: var(--shadow-sm); padding: clamp(2rem, 5vw, 3rem);
}
.tools-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.9rem;
}
.logo-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  background: var(--paper); border-radius: var(--r-md);
  padding: 1.1rem 0.6rem; min-height: 96px;
  transition: transform 0.18s ease;
}
.logo-chip:hover { transform: translateY(-3px); }
.logo-chip img { width: 38px; height: 38px; object-fit: contain; }
.logo-chip span { font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); text-align: center; line-height: 1.2; }

/* =========================================================
   PROJECT (CASE STUDY) PAGE
   ========================================================= */
.project-hero { padding: clamp(2.4rem, 5vw, 3.8rem) var(--gap) 1.4rem; }
.project-hero .wrap { max-width: var(--container); padding: 0; }
.project-hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0.6rem 0 0; }
.project-meta-row {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2.2rem;
  margin-top: 1.7rem; padding-top: 1.4rem; border-top: 1.5px solid var(--ink);
}
.project-meta-row .label {
  display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--green-deep); margin-bottom: 0.25rem;
}
.project-meta-row .value { font-size: 0.93rem; }
.project-media { display: flex; flex-direction: column; gap: var(--gap); padding: 1.2rem var(--gap) clamp(3rem, 6vw, 4rem); }
.project-media .wrap { max-width: var(--container); padding: 0; }
.project-media .frame-panel .placeholder { color: var(--cream); }

/* =========================================================
   NDA PAGE
   ========================================================= */
.nda-section { padding: clamp(2.4rem, 6vw, 4rem) var(--gap); }
.nda-section .wrap { max-width: var(--container); padding: 0; }
.nda-layout {
  max-width: var(--container); margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: 1fr 280px;
  gap: clamp(1.6rem, 4vw, 2.6rem); align-items: start;
}
@media (max-width: 820px) { .nda-layout { grid-template-columns: 1fr; } }
.nda-side { text-align: center; }
.nda-side img { max-width: 220px; margin: 0 auto; }
.nda-side .caption { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.2rem; color: var(--green-deep); margin-top: 0.7rem; }
.gate-note {
  border: 1.5px dashed var(--green-deep); border-radius: var(--r-md); background: var(--paper-2);
  padding: 1.4rem 1.6rem; font-size: 0.92rem; color: var(--green-deep); line-height: 1.7; margin-top: 1.7rem;
}
.gate-note strong { color: var(--ink); }

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
  padding: 1.2rem var(--gap) clamp(3rem, 6vw, 4rem);
  max-width: var(--container); margin: 0 auto;
}
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  display: flex; align-items: flex-start; gap: 1.1rem;
  border-radius: var(--r-lg); background: var(--green); color: var(--paper);
  box-shadow: var(--shadow-sm); padding: 1.8rem 1.9rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.contact-card:nth-child(2) { background: var(--lavender-deep); }
.contact-card:nth-child(3) { background: var(--orange-deep); }
.contact-card:nth-child(4) { background: var(--green-deep); }
.contact-card.is-link:hover, .contact-card.is-link:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-card .icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(247,245,240,0.18); display: flex; align-items: center; justify-content: center; flex: none;
}
.contact-card .icon svg path, .contact-card .icon svg rect { stroke: var(--paper); }
.contact-card .label { display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.78; margin: 0 0 0.25rem; }
.contact-card .value { display: block; font-size: 1.08rem; font-weight: 600; word-break: break-word; }
.wip-ribbon { display: block; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.04rem; opacity: 0.9; margin-bottom: 0.3rem; }

/* =========================================================
   FOOTER  — sticky to bottom, never floating
   ========================================================= */
.site-footer {
  flex-shrink: 0;
  margin: clamp(2.5rem, 5vw, 4rem) var(--gap) 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.2rem, 5vw, 3rem) clamp(1.8rem, 5vw, 3rem);
  padding-bottom: max(clamp(2.2rem, 5vw, 3rem), env(safe-area-inset-bottom));
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem 1.5rem; max-width: var(--container); margin: 0 auto;
}
.footer-text { display: flex; flex-direction: column; gap: 0.6rem; flex: 1 1 auto; min-width: 0; }
.social-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; font-weight: 600; font-size: 0.95rem; }
.social-links a:hover { color: var(--orange); }
.copyright { font-size: 0.8rem; opacity: 0.6; margin: 0; }
.footer-mascot { flex: none; width: auto; height: 76px; opacity: 0.95; }
@media (max-width: 540px) { .footer-mascot { display: none; } }

/* About photo empty fallback */
.about-photo.photo-empty {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(-45deg, var(--sand), var(--sand) 12px, var(--paper) 12px, var(--paper) 24px);
}
.about-photo.photo-empty::after {
  content: "Your photo here"; font-weight: 600; font-size: 0.9rem; color: var(--green-deep); opacity: 0.7;
}

/* =========================================================
   ENTRANCE ANIMATIONS + POLISH (v4 "wow" pass)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); }
  .reveal.in { opacity: 1; transform: none; transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
  .reveal.d1 { transition-delay: 0.08s; }
  .reveal.d2 { transition-delay: 0.16s; }
  .reveal.d3 { transition-delay: 0.24s; }
}

/* animated grain/gradient living inside the hero block */
.hero-grid::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  right: -120px; top: -120px;
  background: radial-gradient(circle, rgba(232,163,108,0.5), transparent 68%);
  filter: blur(10px);
  border-radius: 50%;
  pointer-events: none;
  animation: float-orb 9s ease-in-out infinite alternate;
}
.hero-grid::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  left: -110px; bottom: -130px;
  background: radial-gradient(circle, rgba(172,163,214,0.55), transparent 68%);
  filter: blur(10px);
  border-radius: 50%;
  pointer-events: none;
  animation: float-orb 11s ease-in-out infinite alternate-reverse;
}
@media (prefers-reduced-motion: reduce) {
  .hero-grid::before, .hero-grid::after { animation: none; }
}
@keyframes float-orb {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-26px, 30px) scale(1.12); }
}
.hero-copy, .hero-art { position: relative; z-index: 1; }

/* the hero illustration: parallax handled in JS; transition for smooth return */
.hero-art-frame img { transition: transform 0.3s ease-out; }

/* section title gets an animated underline accent */
.section-title { position: relative; display: inline-block; }
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  height: 5px; width: 0;
  border-radius: 5px;
  background: var(--orange);
  transition: width 0.7s cubic-bezier(.2,.7,.2,1);
}
.section-title.in::after { width: 56px; }

/* contact cards: subtle arrow that slides on hover */
.contact-card.is-link { position: relative; }
.contact-card.is-link::after {
  content: "\2197";
  position: absolute;
  right: 1.4rem; top: 1.4rem;
  font-size: 1.1rem;
  opacity: 0;
  transform: translate(-4px,4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.contact-card.is-link:hover::after { opacity: 0.85; transform: translate(0,0); }

/* logo chips stagger-pop on hover of the card */
.logo-chip { will-change: transform; }
.logo-chip:hover img { transform: scale(1.12) rotate(-4deg); transition: transform 0.2s ease; }

/* =========================================================
   PRIVATE REEL — dark "secret" page
   ========================================================= */
body.dark-page {
  background: #0E0F11;
  color: #ECEAE4;
}
body.dark-page .site-header {
  background: rgba(14,15,17,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
body.dark-page .logo { color: #ECEAE4; }
body.dark-page .nav-links a:not(.btn) { color: #9A988F; }
body.dark-page .nav-links a.active:not(.btn) { color: #fff; }
body.dark-page .nav-links .btn { background: var(--orange); color: var(--ink); }
body.dark-page .eyebrow { color: var(--orange); }
body.dark-page .hero-title { color: #fff; }
body.dark-page .hero-text { color: #B8B6AD; }

.nda-dark-section { padding: clamp(2.4rem, 6vw, 4rem) var(--gap); position: relative; }
.nda-dark-section .wrap { max-width: var(--container); padding: 0; }

.nda-dark-layout {
  max-width: var(--container); margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: 1fr 520px;
  gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
}
@media (max-width: 860px) { .nda-dark-layout { grid-template-columns: 1fr; } }

body.dark-page .frame-panel {
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.08);
}

.cat-torch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cat-torch img {
  max-width: 460px;
  width: 100%;
  height: auto;
  display: block;
}

/* Vertically center the gate (locked or unlocked state) within the leftover
   viewport space instead of leaving it pinned to the top with a large empty
   gap before the footer — main stretches to fill the viewport (flex:1 0
   auto) when content is shorter than the screen, so centering its child
   here spreads that leftover space evenly above/below instead of only below. */
body.nda-page main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}


body.dark-page .gate-note {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: #B8B6AD;
}
body.dark-page .gate-note strong { color: #fff; }

body.dark-page .site-footer { background: #000; }

/* =========================================================
   CONTACT v3 — cards + form stacked in one left column,
   illustration fills the entire right column at large scale
   ========================================================= */
.contact-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--gap) clamp(3rem, 6vw, 5rem);
}
@media (max-width: 900px) { .contact-main-grid { grid-template-columns: 1fr; } }

.contact-left {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 2.5vw, 1.6rem);
  min-width: 0;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-radius: var(--r-lg);
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.7rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
a.c-card:hover, a.c-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }

.c-card .c-icon {
  width: 52px; height: 52px; flex: none;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-soft);
}
.c-card:nth-child(1) .c-icon { background: #DCE5DA; }
.c-card:nth-child(2) .c-icon { background: #C9DDF1; }
.c-card:nth-child(3) .c-icon { background: #E2F1FD; }
.c-card .c-icon svg { width: 24px; height: 24px; }
.c-card .c-icon img { width: 24px; height: auto; object-fit: contain; }

.c-card .c-label {
  display: inline-block;
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  margin: 0 0 0.4rem;
}
.c-card .c-value { display: block; font-size: 1.12rem; font-weight: 600; color: var(--ink); line-height: 1.25; overflow-wrap: anywhere; }
.c-card .c-arrow { margin-left: auto; opacity: 0.4; transition: opacity 0.18s ease, transform 0.18s ease; align-self: center; flex: none; }
a.c-card:hover .c-arrow { opacity: 0.9; transform: translateX(3px); }
/* the text block must be allowed to shrink below its content's natural width,
   otherwise a long unbroken string (like an email address) pushes the card
   wider than the viewport on mobile */
.c-card > span:nth-child(2) { min-width: 0; flex: 1 1 auto; }

.c-card.is-wip { opacity: 0.92; }
.c-card.is-wip .c-tag {
  margin-left: auto;
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: 0.95rem; color: var(--orange-deep);
}

/* QR illustration side — fills the ENTIRE right column at large scale.
   The QR is baked directly into img/hero-idea-qr.png (centred pixel-perfect
   inside the drawn frame), so no CSS overlay is needed here anymore.
   Sticky on desktop so it stays in view alongside the taller left column. */
.contact-illo { position: relative; display: flex; justify-content: center; }
.contact-illo .illo-frame { position: relative; width: 100%; max-width: 640px; }
.contact-illo img.person { width: 100%; height: auto; display: block; }
@media (min-width: 901px) {
  .contact-illo { position: sticky; top: 104px; align-self: start; }
}

/* =========================================================
   HOME HERO — larger presentation scale
   ========================================================= */
.hero .hero-title {
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 0.95;
}
.hero .hero-role {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  margin-top: 1.1rem;
}
.hero .hero-text {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  margin: 1.3rem 0 2.1rem;
  max-width: 46ch;
}
.hero .hero-actions .btn {
  font-size: 1.02rem;
  padding: 1rem 1.9rem;
}

/* =========================================================
   PASSWORD GATE (Private Reel)
   ========================================================= */
.gate-overlay {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 8vw, 5rem) var(--gap);
}
.gate-box {
  max-width: 440px;
  width: 100%;
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3rem);
}
.gate-box .gate-lock {
  width: 56px; height: 56px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.gate-box h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: #fff;
  margin: 0 0 0.6rem;
}
.gate-box p { color: #B8B6AD; font-size: 0.98rem; margin: 0 0 1.6rem; }
.gate-form { display: flex; flex-direction: column; gap: 0.8rem; }
.gate-form input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
  text-align: center;
  outline: none;
  transition: border-color 0.18s ease;
}
.gate-form input:focus { border-color: var(--orange); }
.gate-form input::placeholder { color: #7A7870; }
.gate-form button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease;
}
.gate-form button:hover { background: var(--orange-deep); }
.gate-error {
  color: #E89A8A;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-top: 0.2rem;
}
.gate-hint {
  margin-top: 1.4rem;
  font-size: 0.86rem;
  color: #8A887F;
}
.gate-hint a { color: var(--orange); text-decoration: underline; }
.gate-protected { display: none; }
.gate-protected.unlocked { display: block; }

/* =========================================================
   MOBILE OPTIMISATION
   ========================================================= */
@media (max-width: 880px) {
  /* hero stacks: text first, illustration below, centered */
  .hero-grid { text-align: center; gap: 0.5rem; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero .hero-text { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { margin-top: 1rem; }
  .hero-art img { max-width: 320px; }
}

@media (max-width: 560px) {
  .hero-art img { max-width: 270px; }
  /* tools logo grid: tighter on phones */
  .logo-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.6rem; }
  .logo-chip { min-height: 82px; padding: 0.8rem 0.4rem; }
  .logo-chip img { width: 32px; height: 32px; }
  .logo-chip span { font-size: 0.68rem; }
  /* contact: left column (cards+form) already comes first in the DOM,
     illustration follows naturally when the grid collapses to 1 column */
  .contact-illo .illo-frame { max-width: 400px; margin: 0 auto; }
  /* nda dark page: stack cat under reel */
  .nda-dark-layout { text-align: center; }
  .cat-torch img { max-width: 320px; }
  /* hero text scale a touch smaller so it fits */
  .hero .hero-title { font-size: clamp(2.6rem, 11vw, 3.4rem); }
  /* footer mascot hidden already <540; keep footer tidy */
  .footer-row { flex-direction: column; align-items: flex-start; }
}

/* prevent any horizontal overflow on small screens */
@media (max-width: 880px) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }
}

/* =========================================================
   MOBILE FIXES — footer flush + full-width
   ========================================================= */
@media (max-width: 880px) {
  /* footer goes full-width and flush to the bottom edge on mobile */
  .site-footer {
    margin-left: 0;
    margin-right: 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
}

/* =========================================================
   COOKIE BANNER + VIMEO PLACEHOLDER (GDPR)
   ========================================================= */

/* Cookie banner: fixed bottom, in palette col resto del sito. */
#lm-cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem clamp(1rem, 4vw, 2rem);
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
  animation: lm-cc-in 0.35s cubic-bezier(.2,.7,.2,1);
}
@keyframes lm-cc-in { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.lm-cc-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; align-items: center; gap: 1.2rem;
  flex-wrap: wrap;
}
.lm-cc-text {
  flex: 1 1 300px;
  font-size: 0.9rem; line-height: 1.55;
  color: rgba(247,245,240,0.88);
}
.lm-cc-text strong { color: var(--paper); }
.lm-cc-text a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.lm-cc-text a:hover { color: var(--paper); }
.lm-cc-buttons { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.lm-cc-btn {
  font: inherit; font-weight: 700; font-size: 0.86rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lm-cc-reject { background: transparent; color: var(--paper); border-color: rgba(247,245,240,0.35); }
.lm-cc-reject:hover { border-color: var(--paper); background: rgba(255,255,255,0.05); }
.lm-cc-accept { background: var(--orange); color: var(--ink); }
.lm-cc-accept:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 620px) {
  .lm-cc-inner { flex-direction: column; align-items: stretch; }
  .lm-cc-buttons { justify-content: stretch; }
  .lm-cc-btn { flex: 1; }
}

/* Vimeo gate: keeps the same aspect-ratio the iframe had. */
.vimeo-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #111;
}
.vimeo-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.vimeo-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(180deg, rgba(24,22,19,0.55), rgba(24,22,19,0.9)),
    radial-gradient(circle at 30% 30%, var(--green) 0%, var(--green-deep) 60%, #1a1614 100%);
  color: var(--paper);
  text-align: center;
  padding: clamp(1.2rem, 4vw, 2rem);
}
.vimeo-placeholder-inner { max-width: 34ch; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.vimeo-placeholder-icon {
  font-size: 2rem;
  width: 3.2rem; height: 3.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.25);
  padding-left: 0.3rem;
}
.vimeo-placeholder-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.vimeo-placeholder-text { font-size: 0.9rem; line-height: 1.55; color: rgba(247,245,240,0.8); margin: 0; }
.vimeo-placeholder-btn {
  font: inherit; font-weight: 700; font-size: 0.9rem;
  background: var(--orange); color: var(--ink);
  border: 0; border-radius: 999px;
  padding: 0.75rem 1.6rem; cursor: pointer;
  margin-top: 0.3rem;
  transition: background 0.15s ease;
}
.vimeo-placeholder-btn:hover { background: var(--paper); }
.vimeo-placeholder-links { font-size: 0.78rem; opacity: 0.75; }
.vimeo-placeholder-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Footer legal links row */
.footer-legal {
  font-size: 0.8rem;
  opacity: 0.6;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  margin: 0.2rem 0 0;
}
.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--orange); opacity: 1; }
.footer-legal button {
  font: inherit; font-size: inherit; color: inherit;
  background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  opacity: inherit;
}
.footer-legal button:hover { color: var(--orange); opacity: 1; }

/* Legal pages (privacy / cookie policy) — simple readable prose layout */
.legal-page { padding: clamp(2rem, 5vw, 4rem) var(--gap) clamp(3rem, 6vw, 5rem); }
.legal-page .wrap { max-width: 780px; padding: 0; }
.legal-page h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 0.4rem; line-height: 1.05; }
.legal-page .legal-sub { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 2.2rem; }
.legal-page h2 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin: 2rem 0 0.6rem; }
.legal-page h3 { font-size: 1rem; font-weight: 700; margin: 1.4rem 0 0.4rem; color: var(--green-deep); }
.legal-page p, .legal-page li { font-size: 0.98rem; line-height: 1.7; color: var(--ink); }
.legal-page ul { padding-left: 1.2rem; margin: 0.4rem 0 1rem; list-style: disc; }
.legal-page li { margin: 0.25rem 0; }
.legal-page a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }
.legal-page a:hover { color: var(--orange); }
.legal-page table { width: 100%; border-collapse: collapse; margin: 0.6rem 0 1.4rem; font-size: 0.9rem; }
.legal-page th, .legal-page td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--sand); vertical-align: top; }
.legal-page th { font-weight: 700; background: var(--sand); }
.legal-page .updated-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--sand); }

/* =========================================================
   CONTACT FORM (mailto: fallback — see js/contact-form.js)
   ========================================================= */
.cf-card {
  background: var(--paper-2);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.6rem, 3.5vw, 2.2rem);
}
.cf-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  margin: 0.3rem 0 0.4rem;
  color: var(--ink);
}
.cf-sub {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

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

.cf-field { display: flex; flex-direction: column; gap: 0.4rem; }
.cf-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.cf-field input,
.cf-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--sand);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  resize: vertical;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.cf-field input:focus,
.cf-field textarea:focus { border-color: var(--orange); background: var(--paper-2); }
.cf-field input::placeholder,
.cf-field textarea::placeholder { color: #9A988F; }

.cf-submit {
  align-self: flex-start;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
}
.cf-submit:disabled { opacity: 0.6; cursor: default; }

/* form submission feedback */
.cf-status {
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0.2rem 0 0;
}
.cf-status:empty { display: none; }
.cf-status.is-ok { color: var(--green-deep); font-weight: 600; }
.cf-status.is-error { color: #B4443A; font-weight: 600; }

/* =========================================================
   PAGE LOADER — shown while the page (incl. images/fonts) loads.
   Critical positioning/background also duplicated as inline <style> in each
   <head> so the loader still works before this external stylesheet arrives
   on a slow connection. See js/page-loader.js for the show/hide + blink logic.
   ========================================================= */
.page-loader {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  opacity: 1; visibility: visible;
  transition: opacity 0.4s ease, visibility 0s linear 0s;
}
body.dark-page .page-loader { background: #0E0F11; }
.page-loader.is-hidden {
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
  pointer-events: none;
}

.page-loader-inner {
  position: relative;
  width: 84px; height: 84px;
  animation: pl-swing 1.7s ease-in-out infinite;
  transform-origin: 50% 88%;
}
@keyframes pl-swing {
  0%, 100% { transform: rotate(-9deg); }
  50%      { transform: rotate(9deg); }
}
.pl-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity 0.12s ease;
}
.pl-img.pl-closed { opacity: 0; }
.page-loader.is-blinking .pl-img.pl-open   { opacity: 0; }
.page-loader.is-blinking .pl-img.pl-closed { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .page-loader-inner { animation: none; }
}

/* =========================================================
   PROJECT PAGE (e.g. matcha.html)
   ========================================================= */
.project-hero { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1rem, 3vw, 2rem); }
.back-link {
  display: inline-block; margin-bottom: 1.4rem;
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; transition: color 0.18s ease;
}
.back-link:hover { color: var(--orange-deep); }
.project-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3rem, 7.5vw, 5rem); line-height: 1.02;
  margin: 0.2rem 0 0.3rem; color: var(--ink);
}
.project-sub {
  font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--green-deep);
  font-weight: 600; margin: 0 0 1.8rem;
}
.project-intro { max-width: 60ch; margin: 0 0 2rem; }
.project-intro p { margin: 0 0 1rem; color: var(--ink); opacity: 0.9; line-height: 1.65; font-size: 1.15rem; }

.project-meta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem; padding: 1.6rem 0; border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand); max-width: 900px;
}
.project-meta-grid--two { grid-template-columns: repeat(2, 1fr); max-width: 640px; border-bottom: 0; padding-bottom: 0.6rem; }
@media (max-width: 700px) { .project-meta-grid { grid-template-columns: 1fr; gap: 1rem; } }
.project-meta-item { display: flex; flex-direction: column; gap: 0.35rem; }

/* awards row with festival logos */
.project-awards {
  max-width: 900px; padding: 1.4rem 0 1.6rem;
  border-bottom: 1px solid var(--sand);
  display: flex; flex-direction: column; gap: 1rem;
}
.award-logos { display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap; }
.award-logos img { height: 90px; width: auto; display: block; }
@media (max-width: 560px) { .award-logos img { height: 70px; } }
.pm-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--orange-deep);
}
.pm-value { font-size: 1.1rem; color: var(--ink); font-weight: 500; line-height: 1.45; }

/* gallery — wider than the text column so the videos feel large */
.project-gallery { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.project-gallery .wrap { max-width: 1500px; }
.media-block { margin: 0 0 clamp(2rem, 4vw, 3.2rem); }
.media-block:last-child { margin-bottom: 0; }
.video-wrap {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: #000; box-shadow: var(--shadow-sm); cursor: pointer;
  line-height: 0;
}
.project-video, .project-still {
  width: 100%; height: auto; display: block;
}
.project-still { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

/* control bar: play/pause · scrubber · mute — appears on hover */
.video-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
  opacity: 0; transition: opacity 0.2s ease;
}
.video-wrap:hover .video-controls, .video-wrap.is-paused .video-controls { opacity: 1; }

.vc-play, .vc-mute {
  flex: none; width: 34px; height: 34px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,0.15); cursor: pointer; position: relative;
  transition: background 0.18s ease;
}
.vc-play:hover, .vc-mute:hover { background: rgba(255,255,255,0.3); }

/* play icon = two bars (playing state), triangle (paused state) */
.vc-play::before, .vc-play::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 3.5px; height: 12px; background: #fff; border-radius: 1px;
}
.vc-play::before { left: 12px; }
.vc-play::after { right: 12px; }
.video-wrap.is-paused .vc-play::before {
  left: 13px; width: 0; height: 0; background: transparent;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
  border-left: 10px solid #fff; border-radius: 0;
}
.video-wrap.is-paused .vc-play::after { display: none; }

/* mute icon = speaker; a slash overlay when muted */
.vc-mute::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  background: #fff;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3z'/%3E%3C/svg%3E");
}
.vc-mute::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 20px; height: 2px; background: #fff; border-radius: 2px;
  transform: translate(-50%, -50%) rotate(-45deg);
  opacity: 0; transition: opacity 0.15s ease;
}
.video-wrap.is-muted .vc-mute::after { opacity: 1; }

/* scrubber */
.vc-scrub {
  flex: 1 1 auto; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.3);
}
.vc-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.vc-scrub::-moz-range-thumb {
  width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff;
  cursor: pointer;
}

.media-caption {
  margin: 0.9rem 0 0; font-size: 1.02rem; color: var(--ink-soft);
  line-height: 1.55; max-width: 70ch;
}

/* credits */
.project-credits { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); }
.credits-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.6rem; color: var(--ink);
}
.credits-intro { color: var(--ink-soft); margin: 0 0 1.8rem; font-size: 1.15rem; }
.credits-list {
  list-style: none; padding: 0; margin: 0 0 1.6rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 0.9rem 2.5rem;
}
@media (max-width: 560px) { .credits-list { grid-template-columns: 1fr; } }
.credits-list li {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--sand);
}
.cr-role {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--orange-deep);
}
.cr-name { font-size: 1.25rem; color: var(--ink); font-weight: 500; }
.credits-note { max-width: 65ch; color: var(--ink); opacity: 0.85; line-height: 1.65; font-size: 1.1rem; }

/* =========================================================
   PROJECT PAGE on dark background (matcha.html is .dark-page)
   ========================================================= */
body.dark-page .project-title { color: #fff; }
body.dark-page .project-sub { color: var(--orange); }
body.dark-page .project-intro p { color: #D8D5CE; opacity: 1; }
body.dark-page .back-link { color: #9A988F; }
body.dark-page .back-link:hover { color: var(--orange); }
body.dark-page .project-meta-grid { border-color: rgba(255,255,255,0.12); }
body.dark-page .project-awards { border-color: rgba(255,255,255,0.12); }
body.dark-page .pm-label { color: var(--orange); }
body.dark-page .pm-value { color: #ECEAE4; }
body.dark-page .credits-title { color: #fff; }
body.dark-page .credits-intro { color: #9A988F; }
body.dark-page .cr-role { color: var(--orange); }
body.dark-page .cr-name { color: #ECEAE4; }
body.dark-page .credits-list li { border-color: rgba(255,255,255,0.12); }
body.dark-page .credits-note { color: #C8C5BE; opacity: 1; }
body.dark-page .media-caption { color: #9A988F; }
body.dark-page .btn.is-ghost { border-color: rgba(255,255,255,0.4); color: #ECEAE4; }
body.dark-page .btn.is-ghost:hover { background: #fff; color: var(--ink); }
