/* STUDIO / A — blue-hour hero
   Horizontal positions in vw, vertical in vh (the design is 16:9).
   Type is sized in vw so word widths track the measured spec; each text
   element's top is "measured cap top (vh) − font's cap offset (vw)". */

:root {
  --cream: #EDE5D7;
  --cream-85: rgba(237, 229, 215, 0.80);
  --cream-70: rgba(241, 235, 224, 0.70);
  --cream-30: rgba(241, 235, 224, 0.30);
  --headline: #F2E9DA;
  --serif: "Newsreader", "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --edge: 5.02vw;

  /* type sizes */
  --fs-logo: 0.837vw;
  --fs-nav: 1.133vw;
  --fs-eyebrow: 0.818vw;
  --fs-head: 5.29vw;
  --lh-head: 5.64vw;
  --fs-cta: 1.387vw;
  --fs-label: 0.70vw;
  --fs-project: 1.085vw;
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-x: clip; /* clip, unlike hidden, keeps position: sticky working */
  background: #131B21;
  color: var(--cream);
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
p, h1 { margin: 0; font-weight: inherit; font-size: inherit; }

/* ---------- Hero frame ---------- */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: #2A3344;
  background-image: url("assets/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Readability: subtle left-to-right darkening + soft bottom darkening */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero::before {
  background: linear-gradient(90deg,
    rgba(8, 11, 14, 0.22) 0%,
    rgba(8, 11, 14, 0.20) 20%,
    rgba(8, 11, 14, 0.07) 28%,
    rgba(8, 11, 14, 0) 34%);
}
.hero::after {
  background: linear-gradient(180deg,
    rgba(6, 10, 14, 0) 83%,
    rgba(6, 10, 14, 0.24) 88.7%,
    rgba(6, 10, 14, 0.34) 100%);
}

.topbar,
.intro,
.workbar { position: absolute; inset: 0 0 auto 0; height: 100vh; height: 100svh; z-index: 2; pointer-events: none; }
.topbar a,
.intro a,
.workbar a,
.workbar button { pointer-events: auto; }

/* ---------- Top bar ---------- */
.logo {
  position: absolute;
  left: var(--edge);
  top: calc(3.40vh - 0.145 * var(--fs-logo));
  font-family: var(--sans);
  font-weight: 400;
  font-size: max(9px, var(--fs-logo));
  line-height: 1;
  letter-spacing: 0.42em;
  white-space: nowrap;
}

.nav {
  position: absolute;
  right: 4.1vw;
  top: calc(4.27vh - 0.65 * var(--fs-nav));
  display: flex;
  gap: 2.5vw;
  font-family: var(--serif);
  font-weight: 400;
  font-size: max(13px, var(--fs-nav));
  line-height: 1;
  white-space: nowrap;
}
.nav .arrow,
.cta .arrow {
  display: inline-block;
  width: 0.66em;
  height: 0.66em;
  margin-left: 0.42em;
  vertical-align: 0.04em;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.95;
  overflow: visible;
}

.topbar::after {
  content: "";
  position: absolute;
  left: var(--edge);
  width: 90.88vw;
  top: 7.07vh;
  height: 1px;
  background: var(--cream-30);
}

/* ---------- Intro block ---------- */
.eyebrow {
  position: absolute;
  left: var(--edge);
  top: calc(30.2vh - 0.145 * var(--fs-eyebrow));
  font-family: var(--sans);
  font-weight: 400;
  font-size: max(9px, var(--fs-eyebrow));
  line-height: 1;
  letter-spacing: 0.326em;
  color: var(--cream-85);
  white-space: nowrap;
}

.headline {
  position: absolute;
  left: 4.97vw;
  top: calc(37.24vh - (var(--lh-head) / 2 - 0.298 * var(--fs-head)));
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-head);
  line-height: var(--lh-head);
  letter-spacing: -0.008em;
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  color: var(--headline);
}
.headline .line { display: block; white-space: nowrap; }

.cta {
  position: absolute;
  left: 5.02vw;
  top: calc(70.35vh - 0.855 * var(--fs-cta));
  font-family: var(--serif);
  font-weight: 400;
  font-size: max(14px, var(--fs-cta));
  line-height: 1;
  white-space: nowrap;
}
.cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.13vw;
  top: calc(1.13vh + 0.855 * var(--fs-cta));
  height: 1px;
  background: linear-gradient(90deg, var(--cream-85) 0 89%, rgba(241, 235, 224, 0.5) 89% 100%);
}

/* ---------- Bottom bar ---------- */
.workbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 88.7vh;
  height: 1px;
  background: var(--cream-30);
}

.work-label {
  position: absolute;
  left: var(--edge);
  top: calc(93.6vh - 0.145 * var(--fs-label));
  font-family: var(--sans);
  font-weight: 400;
  font-size: max(8px, var(--fs-label));
  line-height: 1;
  letter-spacing: 0.182em;
  white-space: nowrap;
}

.progress {
  position: absolute;
  left: 19.5vw;
  width: 60.6vw;
  top: 94.15vh;
  height: 1px;
  background: var(--cream-30);
}
.progress-fill {
  position: absolute;
  left: 0;
  top: -1px;
  width: 11.83%;
  height: 2px;
  background: var(--cream);
}

.project-name {
  position: absolute;
  left: 81.76vw;
  top: calc(94.75vh - 0.65 * var(--fs-project));
  font-family: var(--serif);
  font-weight: 400;
  font-size: max(12px, var(--fs-project));
  line-height: 1;
  white-space: nowrap;
}

.next {
  position: absolute;
  left: 92.635vw;
  top: calc(94.2vh - 1.625vw);
  width: 3.25vw;
  height: 3.25vw;
  padding: 0;
  border: 1px solid var(--cream-70);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.2vw;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.next svg { width: 1.15vw; height: 0.96vw; fill: none; stroke: currentColor; stroke-width: 0.9; overflow: visible; }

/* ---------- Portrait / narrow screens ----------
   Same frame, re-scaled so type stays legible and nothing leaves the viewport. */
@media (max-aspect-ratio: 1/1) {
  :root {
    --edge: 6vw;
    --fs-logo: 2.6vw;
    --fs-nav: 3.7vw;
    --fs-eyebrow: 2.4vw;
    --fs-head: 13vw;
    --lh-head: 11.4vw;
    --fs-cta: 4.2vw;
    --fs-label: 2.3vw;
    --fs-project: 3.7vw;
  }
  .nav { right: var(--edge); gap: 4.5vw; }
  .topbar::after { width: 88vw; }
  .headline { left: 5.5vw; }
  .hero::before {
    background: linear-gradient(90deg,
      rgba(8, 11, 14, 0.50) 0%,
      rgba(8, 11, 14, 0.30) 45%,
      rgba(8, 11, 14, 0) 80%);
  }

  .work-label { top: calc(92vh - 0.145 * var(--fs-label)); }
  .progress { left: var(--edge); width: 40vw; top: 96vh; }
  .project-name {
    left: auto;
    right: calc(var(--edge) + 11vw + 3vw);
  }
  .next {
    left: auto;
    right: var(--edge);
    width: 11vw;
    height: 11vw;
    top: calc(94.2vh - 5.5vw);
    font-size: 4vw;
  }
}

.cta .arrow { width: 0.58em; height: 0.58em; vertical-align: 0; }

/* ---------- Scroll film ----------
   The hero is pinned inside a tall track; film.js maps scroll to the
   video's time and sets --film-o / --ui-o and each chapter's opacity. */
.film-track { position: relative; }
.film-on .film-track { height: 530vh; }
.film-on .hero { position: sticky; top: 0; }

.film {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--film-o, 0);
  pointer-events: none;
}
.intro,
.workbar { opacity: var(--ui-o, 1); }

.nav a { transition: none; }
.nav a.is-active {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
}
.nav.has-active a:not(.is-active) { opacity: 0.6; }

.chapters { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.chapter {
  position: absolute;
  left: var(--edge);
  top: 62vh;
  max-width: 30vw;
  opacity: 0;
  visibility: hidden;
}
.chapter a { pointer-events: auto; }
.chapter-num {
  font-family: var(--sans);
  font-size: max(9px, var(--fs-eyebrow));
  letter-spacing: 0.326em;
  text-transform: uppercase;
  color: var(--cream-85);
  margin: 0 0 2.6vh;
}
.chapter-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  font-size: calc(var(--fs-head) * 0.62);
  line-height: 1.08;
  letter-spacing: -0.008em;
  color: var(--headline);
}
.chapter-link {
  display: inline-block;
  margin-top: 4vh;
  padding-bottom: 0.9vh;
  font-family: var(--serif);
  font-size: max(14px, var(--fs-cta));
  border-bottom: 1px solid var(--cream-85);
}
.chapter-link .arrow {
  display: inline-block;
  width: 0.58em;
  height: 0.58em;
  margin-left: 0.42em;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.95;
  overflow: visible;
}

@media (max-aspect-ratio: 1/1) {
  .chapter { top: 60vh; max-width: 86vw; }
  .chapter-title { font-size: calc(var(--fs-head) * 0.7); }
}

/* ---------- Reduced motion: no video, chapters as plain sections ---------- */
@media (prefers-reduced-motion: reduce) {
  .film { display: none; }
  .hero {
    height: auto;
    overflow: visible;
    background-size: max(100vw, 177.78vh) max(56.25vw, 100vh);
    background-position: top center;
  }
  .hero::before,
  .hero::after { bottom: auto; height: 100vh; }
  .chapters {
    position: relative;
    inset: auto;
    margin-top: 100vh;
    background: #131B21;
    pointer-events: auto;
  }
  .chapter {
    position: static;
    opacity: 1;
    visibility: visible;
    max-width: none;
    padding: 14vh var(--edge);
    border-top: 1px solid var(--cream-30);
  }
}

/* Chapter legibility over the bright interior: a soft left scrim that only
   appears once the film has taken over from the still hero. */
.chapters::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(10, 8, 6, 0.55) 0%,
    rgba(10, 8, 6, 0.38) 28%,
    rgba(10, 8, 6, 0) 50%),
    linear-gradient(180deg,
    rgba(10, 8, 6, 0.45) 0%,
    rgba(10, 8, 6, 0) 14%),
    linear-gradient(0deg,
    rgba(10, 8, 6, 0.35) 0%,
    rgba(10, 8, 6, 0) 40%);
  opacity: calc(1 - var(--ui-o, 1));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .chapters::before { display: none; }
}
.topbar { z-index: 3; }

/* =====================================================================
   Pages 2–4: the full funnel, scrolling over the living film scene.
   film.js sets --mx / --my (eased pointer, -1…1) on <html>, --dim-o and
   --nav-shade on the stage, and --vis (0…1) on every .reveal block.
   ===================================================================== */

/* The nav stays pinned above every page. */
.topbar { position: fixed; z-index: 20; }
.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 15vh;
  background: linear-gradient(180deg, rgba(9, 12, 18, 0.62), rgba(9, 12, 18, 0));
  opacity: var(--nav-shade, 0);
  pointer-events: none;
}

/* The film scene stays fixed behind the whole site and follows the pointer. */
.film-on .hero { position: fixed; top: 0; left: 0; }
.film {
  transform:
    translate3d(calc(var(--mx, 0) * -1.1vw * var(--film-o, 0)),
                calc(var(--my, 0) * -1.1vh * var(--film-o, 0)), 0)
    scale(calc(1 + 0.045 * var(--film-o, 0)));
}
.stage-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(8, 11, 17, 0.45);
  opacity: var(--dim-o, 0);
  pointer-events: none;
}

.funnel {
  position: relative;
  z-index: 5;
  padding: 16vh 0 4vh;
}
html:not(.film-on) .funnel { background: #10161d; }

.reveal {
  opacity: var(--vis, 1);
  transform: translate3d(0, calc((1 - var(--vis, 1)) * 6vh), 0);
}

.funnel-head {
  max-width: 54vw;
  margin: 0 auto 14vh;
  text-align: center;
}
.funnel-eyebrow {
  margin: 0 0 3vh;
  font-family: var(--sans);
  font-size: max(10px, var(--fs-eyebrow));
  letter-spacing: 0.326em;
  text-transform: uppercase;
  color: var(--cream-85);
}
.funnel-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  font-size: clamp(30px, 3.7vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.008em;
  color: var(--headline);
}
.funnel-sub {
  max-width: 40vw;
  margin: 3.4vh auto 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.15vw, 24px);
  line-height: 1.55;
  color: rgba(237, 229, 215, 0.74);
}

/* ---------- The three stage cards ---------- */
.stage-card {
  position: relative;
  width: 90vw;
  min-height: 76vh;
  margin: 0 auto 16vh;
  padding: 7vh 5vw;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 4vw;
  align-items: center;
  border-radius: max(14px, 1.4vw);
  background: linear-gradient(160deg, rgba(22, 28, 40, 0.80), rgba(11, 15, 22, 0.74));
  border: 1px solid rgba(237, 229, 215, 0.13);
  box-shadow: 0 4vh 12vh rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform:
    perspective(1600px)
    translate3d(0, calc((1 - var(--vis, 1)) * 7vh), 0)
    rotateX(calc(var(--my, 0) * -1.1deg))
    rotateY(calc(var(--mx, 0) * 1.5deg));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.9vw;
  margin: 0;
  padding: 1vh 1.3vw 1vh 0.5vw;
  border: 1px solid var(--cream-30);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: max(10px, 0.68vw);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-85);
}
.pill-num {
  display: inline-grid;
  place-items: center;
  width: max(26px, 2vw);
  height: max(26px, 2vw);
  border-radius: 50%;
  background: rgba(224, 163, 90, 0.18);
  border: 1px solid rgba(224, 163, 90, 0.55);
  color: #F3C789;
  letter-spacing: 0.05em;
}
.card-title {
  margin: 3.4vh 0 2.2vh;
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  font-size: clamp(26px, 2.65vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.008em;
  color: var(--headline);
}
.card-lede {
  max-width: 34vw;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.08vw, 22px);
  line-height: 1.6;
  color: rgba(237, 229, 215, 0.76);
}
.ticks {
  list-style: none;
  max-width: 34vw;
  margin: 4.4vh 0 0;
  padding: 0;
}
.ticks li {
  display: flex;
  align-items: center;
  gap: 1vw;
  padding: 1.35vh 0;
  border-top: 1px solid rgba(237, 229, 215, 0.10);
  font-family: var(--serif);
  font-size: clamp(15px, 1.12vw, 23px);
  color: var(--cream);
}
.ticks li:last-child { border-bottom: 1px solid rgba(237, 229, 215, 0.10); }
.tick {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke-width: 1;
}
.tick circle { stroke: rgba(224, 163, 90, 0.55); }
.tick path { stroke: #F3C789; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

.card-visual {
  position: relative;
  height: 62vh;
}

/* ---------- 01 Awareness: a constellation of channel orbs ---------- */
.visual-orbs::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 163, 90, 0.20), rgba(224, 163, 90, 0));
}
.orbs {
  position: absolute;
  inset: 0;
}
.orb {
  position: absolute;
  width: 5.4vw;
  aspect-ratio: 1;
  margin: -2.7vw 0 0 -2.7vw;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%,
    rgba(255, 251, 243, 0.95) 0 5%,
    rgba(226, 216, 199, 0.62) 24%,
    rgba(122, 112, 102, 0.28) 58%,
    rgba(18, 22, 30, 0.65) 100%);
  box-shadow: inset -0.4vw -0.6vw 1.2vw rgba(0, 0, 0, 0.45), 0 1.2vh 2.6vh rgba(0, 0, 0, 0.35);
  transform:
    translate3d(calc(var(--mx, 0) * var(--d) * 1.5vw), calc(var(--my, 0) * var(--d) * 1.5vh), 0)
    scale(calc(0.84 + var(--d) * 0.1));
  transition: scale 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.orb-label {
  background: radial-gradient(circle at 32% 28%,
    rgba(255, 238, 205, 0.98) 0 6%,
    rgba(243, 199, 137, 0.88) 30%,
    rgba(178, 112, 52, 0.75) 66%,
    rgba(60, 34, 16, 0.85) 100%);
  box-shadow: inset -0.4vw -0.6vw 1.2vw rgba(60, 30, 10, 0.45), 0 0 3vh rgba(224, 163, 90, 0.35);
}
.orb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: max(8px, 0.56vw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2A1B0C;
}
.orb:hover { scale: 1.18; }

/* ---------- 02 Influence: a tilted wall of reels ---------- */
.reels {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7vw;
  translate: -50% -50%;
  transform-style: preserve-3d;
  transform:
    perspective(1300px)
    rotateY(calc(-17deg + var(--mx, 0) * 9deg))
    rotateX(calc(7deg + var(--my, 0) * -6deg));
}
.reel {
  position: relative;
  margin: 0;
  aspect-ratio: 9 / 14;
  overflow: hidden;
  border-radius: max(6px, 0.45vw);
  box-shadow: 0 1.6vh 3.4vh rgba(0, 0, 0, 0.45);
  transition: translate 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reel:nth-child(3n+2) { translate: 0 2.4vh; }
.reel:hover { translate: 0 -1.4vh 2vw; }
.reel:nth-child(3n+2):hover { translate: 0 1vh 2vw; }
.reel img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reel figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.4vw;
  padding: 3vh 0.55vw 0.8vh;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0), rgba(8, 10, 14, 0.78));
  font-family: var(--sans);
  font-size: max(7px, 0.5vw);
  letter-spacing: 0.06em;
  color: var(--cream);
}

/* ---------- 03 Conversion: search, then sample sponsored results ---------- */
.visual-search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4.4vh;
}
.visual-search::before {
  content: "";
  position: absolute;
  inset: 0 10% 30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 163, 90, 0.22), rgba(224, 163, 90, 0));
  pointer-events: none;
}
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1vw;
  padding: 2.2vh 1.8vw;
  border-radius: 999px;
  background: rgba(241, 235, 224, 0.96);
  color: #141A24;
  font-family: var(--serif);
  font-size: clamp(16px, 1.45vw, 30px);
  box-shadow: 0 0 7vh rgba(224, 163, 90, 0.28), 0 2vh 4vh rgba(0, 0, 0, 0.35);
  transform: translate3d(calc(var(--mx, 0) * 0.8vw), calc(var(--my, 0) * 0.8vh), 0);
}
.search-icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: #141A24;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.caret {
  width: 1px;
  height: 1.1em;
  margin-left: -0.6vw;
  background: #141A24;
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.ads {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1vw;
  transform: translate3d(calc(var(--mx, 0) * -0.7vw), calc(var(--my, 0) * -0.7vh), 0);
}
.ad {
  padding: 2.2vh 1.1vw 2.4vh;
  border-radius: max(10px, 0.8vw);
  background: rgba(241, 235, 224, 0.95);
  color: #1A2130;
  font-family: var(--sans);
  font-size: clamp(11px, 0.7vw, 15px);
  line-height: 1.45;
  box-shadow: 0 2vh 4vh rgba(0, 0, 0, 0.35);
  transition: translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ad:nth-child(2) { translate: 0 3vh; }
.ad:hover { translate: 0 -1vh; }
.ad:nth-child(2):hover { translate: 0 2vh; }
.ad p { margin: 0; }
.ad-tag {
  font-size: 0.85em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8A6A44;
}
.ad-head {
  margin: 1.2vh 0 !important;
  font-family: var(--serif);
  font-size: clamp(14px, 1.02vw, 21px);
  line-height: 1.25;
  color: #24365E;
}
.ad-body { color: #434856; }
.ad-links { margin-top: 1.6vh !important; color: #9A5F22; }

/* ---------- Closing ---------- */
.closing {
  padding: 10vh 0 6vh;
  text-align: center;
}
.closing-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 5vh;
  padding: 2vh 2.4vw;
  border: 1px solid var(--cream-70);
  border-radius: 999px;
  font-family: var(--serif);
  font-size: clamp(16px, 1.3vw, 26px);
  color: var(--cream);
  transition: background-color 0.3s, color 0.3s;
}
.closing-cta:hover { background: var(--cream); color: #141A24; }
.closing-cta .arrow {
  width: 0.62em;
  height: 0.62em;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.95;
  overflow: visible;
}
.fineprint {
  margin: 14vh 0 0;
  font-family: var(--sans);
  font-size: max(10px, 0.62vw);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 229, 215, 0.45);
}

/* ---------- Portrait / narrow screens ---------- */
@media (max-aspect-ratio: 1/1), (max-width: 900px) {
  .funnel-head { max-width: 86vw; }
  .funnel-sub { max-width: 80vw; }
  .stage-card {
    width: 92vw;
    grid-template-columns: 1fr;
    gap: 5vh;
    padding: 5vh 6vw 6vh;
  }
  .card-lede,
  .ticks { max-width: none; }
  .ticks li { gap: 3vw; }
  .pill { gap: 2.5vw; padding: 0.8vh 4vw 0.8vh 1.2vw; }
  .card-visual { height: 46vh; }
  .orb { width: 11vw; margin: -5.5vw 0 0 -5.5vw; }
  .orb span { font-size: max(7px, 1.6vw); }
  .reels { width: 64vw; }
  .reel figcaption { font-size: max(7px, 1.6vw); padding: 2vh 1.4vw 0.6vh; }
  .visual-search { height: auto; gap: 3vh; }
  .search { padding: 1.6vh 4vw; gap: 2.5vw; }
  .ads { grid-template-columns: 1fr; gap: 1.6vh; }
  .ad { padding: 1.8vh 4vw; }
  .ad:nth-child(2) { translate: none; }
  .ad:nth-child(3) { display: none; }
  .closing-cta { padding: 1.8vh 7vw; }
}

/* ---------- Reduced motion: everything readable, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .stage-card,
  .orb,
  .search,
  .ads { transform: none; }
  .reels { transform: perspective(1300px) rotateY(-17deg) rotateX(7deg); }
  .caret { animation: none; }
}

/* Fit fixes after the first funnel screenshots */
.closing {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.funnel-head,
.closing { text-shadow: 0 0.2vh 2.4vh rgba(6, 8, 12, 0.75); }
.reels { width: 21.5vw; }
@media (max-aspect-ratio: 1/1), (max-width: 900px) {
  .reels { width: 56vw; }
}
.closing { position: relative; }
.closing::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70vw;
  height: 60vh;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(8, 10, 14, 0.62), rgba(8, 10, 14, 0));
  z-index: -1;
  pointer-events: none;
}
/* Phones: five nav links don't fit beside the logo; keep the logo and Contact. */
@media (max-width: 700px) {
  .nav a[data-chapter] { display: none; }
}

/* Lighter glass: the living room stays visible through the cards while the
   copy side keeps enough density to read comfortably. */
.stage-card {
  background:
    linear-gradient(90deg, rgba(14, 19, 28, 0.62) 0%, rgba(14, 19, 28, 0.50) 45%, rgba(14, 19, 28, 0.30) 100%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border-color: rgba(237, 229, 215, 0.16);
}
.stage-dim { background: rgba(8, 11, 17, 0.30); }
.card-title,
.card-lede,
.ticks li { text-shadow: 0 0.1vh 1.6vh rgba(6, 8, 12, 0.6); }
@media (max-aspect-ratio: 1/1), (max-width: 900px) {
  .stage-card { background: rgba(14, 19, 28, 0.55); }
}

/* =====================================================================
   Services · 360° marketing — a ring of five services that turns with
   the scroll. film.js sets --ring / --tilt on .ring, opacity on each
   .face and .svc-detail, and .is-active on the tabs.
   ===================================================================== */
.services { position: relative; z-index: 5; }
.film-on .services { height: 560vh; }
.film-on .svc-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.svc-head {
  position: absolute;
  left: var(--edge);
  top: 14vh;
  width: 42vw;
  text-shadow: 0 0.2vh 2.4vh rgba(6, 8, 12, 0.7);
}
.svc-head .funnel-title { font-size: clamp(30px, 3.3vw, 76px); }
.svc-sub {
  max-width: 34vw;
  margin: 2.6vh 0 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.08vw, 22px);
  line-height: 1.55;
  color: rgba(237, 229, 215, 0.76);
}

/* The ring */
.ring-wrap {
  position: absolute;
  left: var(--edge);
  top: 39vh;
  width: 47vw;
  height: 46vh;
  perspective: 1700px;
}
.ring-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  font-family: var(--serif);
  font-weight: 300;
  font-variation-settings: "opsz" 72;
  font-size: 11vw;
  letter-spacing: -0.03em;
  color: rgba(243, 199, 137, 0.10);
  white-space: nowrap;
  pointer-events: none;
}
.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13.5vw;
  height: 18vw;
  margin: -9vw 0 0 -6.75vw;
  transform-style: preserve-3d;
  transform: translateZ(-14vw) rotateX(var(--tilt, -6deg)) rotateY(var(--ring, 0deg));
}
.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 2.4vh 1.2vw;
  border-radius: max(12px, 1vw);
  border: 1px solid rgba(237, 229, 215, 0.18);
  background: linear-gradient(165deg, rgba(26, 32, 46, 0.78), rgba(12, 16, 24, 0.70));
  box-shadow: 0 3vh 6vh rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.face:nth-child(1) { transform: rotateY(0deg) translateZ(14vw); }
.face:nth-child(2) { transform: rotateY(72deg) translateZ(14vw); }
.face:nth-child(3) { transform: rotateY(144deg) translateZ(14vw); }
.face:nth-child(4) { transform: rotateY(216deg) translateZ(14vw); }
.face:nth-child(5) { transform: rotateY(288deg) translateZ(14vw); }
.face-num {
  font-family: var(--sans);
  font-size: max(9px, 0.62vw);
  letter-spacing: 0.22em;
  color: #F3C789;
}
.face-icon {
  display: block;
  width: 5.4vw;
  height: 5.4vw;
  margin: 3.2vh 0 auto;
}
.face-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #F3C789;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1.2vh rgba(224, 163, 90, 0.35));
}
.face-title {
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  font-size: clamp(16px, 1.45vw, 30px);
  line-height: 1.1;
  color: var(--headline);
}
.face-line {
  margin-top: 1.2vh;
  font-family: var(--serif);
  font-size: clamp(11px, 0.78vw, 16px);
  line-height: 1.45;
  color: rgba(237, 229, 215, 0.7);
}

/* Tabs */
.svc-tabs {
  position: absolute;
  left: var(--edge);
  bottom: 6vh;
  width: 48vw;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6vw;
}
.svc-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
  padding: 1vh 1.1vw 1vh 0.9vw;
  border: 1px solid var(--cream-30);
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.45);
  color: var(--cream-85);
  font-family: var(--serif);
  font-size: clamp(12px, 0.86vw, 18px);
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.svc-tab span {
  font-family: var(--sans);
  font-size: 0.72em;
  letter-spacing: 0.15em;
  color: rgba(243, 199, 137, 0.75);
}
.svc-tab:hover,
.svc-tab.is-active {
  border-color: rgba(224, 163, 90, 0.75);
  background: rgba(224, 163, 90, 0.14);
  color: var(--headline);
}

/* Detail panels */
.svc-details {
  position: absolute;
  left: 56vw;
  top: 12vh;
  width: 39vw;
  height: 78vh;
}
.svc-detail {
  position: absolute;
  inset: 0;
  padding: 4.6vh 2.6vw;
  overflow: hidden;
  border-radius: max(14px, 1.4vw);
  border: 1px solid rgba(237, 229, 215, 0.16);
  background: linear-gradient(160deg, rgba(16, 21, 31, 0.70), rgba(12, 16, 24, 0.55));
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 4vh 10vh rgba(0, 0, 0, 0.35);
}
.film-on .svc-detail { opacity: 0; visibility: hidden; }
.svc-title {
  margin: 3vh 0 1.8vh;
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  font-size: clamp(24px, 2.2vw, 48px);
  line-height: 1.1;
  color: var(--headline);
}
.svc-lede {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(14px, 1vw, 21px);
  line-height: 1.6;
  color: rgba(237, 229, 215, 0.78);
}
.svc-detail .ticks { max-width: none; margin-top: 3.4vh; }
.svc-detail .ticks li { font-size: clamp(14px, 1.02vw, 21px); padding: 1.25vh 0; }
.svc-detail-ai { padding-top: 4vh; padding-bottom: 3vh; }
.svc-detail-ai .svc-title { margin: 2.4vh 0 1.4vh; font-size: clamp(22px, 1.95vw, 44px); }
.svc-detail-ai .svc-lede { font-size: clamp(13px, 0.92vw, 19px); }
.ai-steps {
  list-style: none;
  margin: 2.4vh 0 0;
  padding: 0;
}
.ai-steps li {
  display: grid;
  grid-template-columns: 6.2vw 1fr;
  gap: 1vw;
  align-items: baseline;
  padding: 1.05vh 0;
  border-top: 1px solid rgba(237, 229, 215, 0.10);
}
.ai-steps li:last-child { border-bottom: 1px solid rgba(237, 229, 215, 0.10); }
.step-name {
  font-family: var(--sans);
  font-size: max(9px, 0.64vw);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #F3C789;
}
.step-name::before {
  content: counter(list-item, decimal-leading-zero) "  ";
  color: rgba(243, 199, 137, 0.55);
}
.step-text {
  font-family: var(--serif);
  font-size: clamp(13px, 0.9vw, 19px);
  line-height: 1.5;
  color: var(--cream);
}

/* Phones, portrait screens and reduced motion: five readable stacked cards. */
@media (max-aspect-ratio: 1/1), (max-width: 900px) {
  .film-on .services { height: auto; }
  .film-on .svc-stage { position: relative; height: auto; overflow: visible; }
  .svc-stage { padding: 12vh 0 6vh; }
  .svc-head { position: static; width: auto; padding: 0 6vw; }
  .svc-sub { max-width: none; }
  .ring-wrap,
  .svc-tabs { display: none; }
  .svc-details { position: static; width: 92vw; height: auto; margin: 6vh auto 0; }
  .svc-detail,
  .film-on .svc-detail {
    position: relative;
    inset: auto;
    margin-bottom: 4vh;
    padding: 5vh 6vw;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .ai-steps li { grid-template-columns: 1fr; gap: 0.6vh; }
}
@media (prefers-reduced-motion: reduce) {
  .services { height: auto; }
  .svc-stage { position: relative; height: auto; overflow: visible; padding: 12vh 0 6vh; background: #10161d; }
  .svc-head { position: static; width: auto; padding: 0 var(--edge); }
  .ring-wrap,
  .svc-tabs { display: none; }
  .svc-details { position: static; width: 90vw; height: auto; margin: 6vh auto 0; }
  .svc-detail { position: relative; inset: auto; margin-bottom: 4vh; }
}

/* Ring, second pass: bigger faces, a visible orbit, correct step numbers. */
.ring {
  width: 15vw;
  height: 20vw;
  margin: -10vw 0 0 -7.5vw;
  transform: translateZ(-16vw) rotateX(var(--tilt, -10deg)) rotateY(var(--ring, 0deg));
}
.face:nth-child(2) { transform: rotateY(0deg) translateZ(16vw); }
.face:nth-child(3) { transform: rotateY(72deg) translateZ(16vw); }
.face:nth-child(4) { transform: rotateY(144deg) translateZ(16vw); }
.face:nth-child(5) { transform: rotateY(216deg) translateZ(16vw); }
.face:nth-child(6) { transform: rotateY(288deg) translateZ(16vw); }
.ring-orbit {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 36vw;
  height: 36vw;
  margin: -18vw 0 0 -18vw;
  border-radius: 50%;
  border: 1px solid rgba(243, 199, 137, 0.28);
  background: radial-gradient(closest-side, rgba(224, 163, 90, 0.10), rgba(224, 163, 90, 0) 70%);
  box-shadow: 0 0 4vh rgba(224, 163, 90, 0.12);
  transform: rotateX(90deg) translateZ(1.2vw);
  pointer-events: none;
}
.ring-wrap { top: 37vh; height: 50vh; }
.ai-steps { counter-reset: step; }
.ai-steps li { counter-increment: step; }
.step-name::before { content: counter(step, decimal-leading-zero) "\00a0\00a0"; }
@media (max-aspect-ratio: 1/1), (max-width: 900px), (prefers-reduced-motion: reduce) {
  .ring-hint { display: none; }
}

/* The hero film lives only in the hero: it stays pinned for its own track,
   ends on the olive tree with the RealTech chapter, then scrolls away. The
   sections below sit on their own dark background. */
.film-on .hero { position: fixed; top: 0; left: 0; }
.funnel { background: #0D1219; }

/* Services ride on the second half of the film (the turn past the olive tree
   and the corridor). The stage dims a little behind them for legibility. */
.stage-dim { background: rgba(8, 11, 17, 0.42); }
.svc-head { text-shadow: 0 0.2vh 2.6vh rgba(6, 8, 12, 0.85); }
.film-on .hero.is-gone { visibility: hidden; }

/* ---------- Brand motto on the hero ---------- */
.headline .line { display: flex; align-items: baseline; }
.headline .word { display: inline-block; width: 21.5vw; }
.promise {
  display: inline-flex;
  align-items: baseline;
  gap: 0.9vw;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 370;
  font-variation-settings: "opsz" 24;
  font-size: max(14px, 1.42vw);
  letter-spacing: 0;
  color: rgba(241, 233, 220, 0.9);
  text-shadow: 0 0.1vh 1.4vh rgba(6, 8, 12, 0.85);
}
.promise::before {
  content: "";
  width: 2.4vw;
  height: 1px;
  align-self: center;
  background: rgba(243, 199, 137, 0.75);
}
.tagline {
  position: absolute;
  left: var(--edge);
  top: 66.6vh;
  margin: 0;
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 48;
  font-size: max(16px, 1.75vw);
  line-height: 1.2;
  color: var(--headline);
  white-space: nowrap;
  text-shadow: 0 0.1vh 1.6vh rgba(6, 8, 12, 0.8);
}
.tagline em { font-style: italic; color: #F3C789; }
.cta { top: calc(76.2vh - 0.855 * var(--fs-cta)); }
@media (max-aspect-ratio: 1/1) {
  .headline .line { display: block; }
  .headline .word { display: block; width: auto; }
  .promise { display: flex; margin: -0.6vh 0 2.2vh; font-size: 3.6vw; gap: 2.4vw; line-height: 1.2; }
  .promise::before { width: 6vw; }
  .headline { line-height: 1.02; top: 25vh; }
  .tagline { top: auto; bottom: 21vh; font-size: 4.6vw; white-space: normal; max-width: 86vw; }
  .cta { top: auto; bottom: 15vh; }
}

/* ---------- Services → funnel: the film recedes into an AI field ---------- */
.film-on .hero {
  transform-origin: 50% 46%;
  transform:
    perspective(1500px)
    translate3d(calc(var(--out, 0) * 6vw), calc(var(--out, 0) * -3vh), calc(var(--out, 0) * -1100px))
    rotateX(calc(var(--out, 0) * 16deg))
    rotateY(calc(var(--out, 0) * -26deg))
    rotateZ(calc(var(--out, 0) * 4deg));
  border-radius: calc(var(--out, 0) * 3vw);
  opacity: var(--out-o, 1);
  box-shadow: 0 0 calc(var(--out, 0) * 14vh) rgba(224, 163, 90, calc(var(--out, 0) * 0.35));
}
.ai-field {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
}
.film-on .ai-field { display: block; opacity: var(--field-o, 0); }
.film-on .funnel { background: transparent; }
.ai-bridge { position: relative; z-index: 5; height: 170vh; }
html:not(.film-on) .ai-bridge { display: none; }
.bridge-copy {
  position: sticky;
  top: 36vh;
  text-align: center;
  opacity: var(--bridge-copy, 0);
  transform: translate3d(0, calc((1 - var(--bridge-copy, 0)) * 3vh), 0) scale(calc(0.96 + var(--bridge-copy, 0) * 0.04));
  text-shadow: 0 0.2vh 3vh rgba(6, 8, 12, 0.9);
}
.bridge-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  font-size: clamp(28px, 3.4vw, 76px);
  line-height: 1.12;
  color: var(--headline);
}
/* Motto: keep the headline's own line pitch */
.headline .line { height: var(--lh-head); }
.promise { line-height: 1; }
.tagline { top: 68.2vh; }
.cta { top: calc(76.4vh - 0.855 * var(--fs-cta)); }
@media (max-aspect-ratio: 1/1) { .headline .line { height: auto; } }
@media (max-aspect-ratio: 1/1) {
  .eyebrow { top: 24vh; white-space: normal; max-width: 86vw; line-height: 1.6; }
  .headline { top: 30vh; }
}

/* PropAIQ wordmark (reversed for the dark site; original kept in assets/brand) */
.logo { top: 2.05vh; letter-spacing: 0; line-height: 0; }
.logo img { display: block; height: max(22px, 1.62vw); width: auto; }
@media (max-aspect-ratio: 1/1) { .logo { top: 2.2vh; } .logo img { height: 6vw; } }
.logo { top: 1.85vh; }
.logo img { height: max(22px, 1.78vw); }
@media (max-aspect-ratio: 1/1) { .logo { top: 2.2vh; } .logo img { height: 6vw; } }

/* ---------- Courtyard: clip 3 (left turn → the bronze sphere) ---------- */
.courtyard { position: relative; z-index: 5; height: 420vh; }
html:not(.film-on) .courtyard { display: none; }
.court-copy {
  position: sticky;
  top: 9vh;
  text-align: center;
  opacity: var(--court-copy, 0);
  transform: translate3d(0, calc((1 - var(--court-copy, 0)) * 2.5vh), 0);
  text-shadow: 0 0.2vh 3vh rgba(6, 8, 12, 0.9);
}
.court-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 370;
  font-variation-settings: "opsz" 72;
  font-size: clamp(26px, 3vw, 66px);
  line-height: 1.12;
  color: var(--headline);
}

/* ---------- Funnel pages ride the courtyard clip ----------
   Stronger 3D scroll: each block tilts up into place from below and tilts
   away as it leaves, on top of the pointer tilt. */
.film-on .funnel { padding-top: 22vh; }
.film-on .stage-card {
  transform:
    perspective(1600px)
    translate3d(0, calc((1 - var(--vis, 1)) * 9vh), calc((1 - var(--vis, 1)) * -220px))
    rotateX(calc((1 - var(--vis, 1)) * 16deg + var(--my, 0) * -1.1deg))
    rotateY(calc(var(--mx, 0) * 1.5deg));
  transform-origin: 50% 100%;
}
.film-on .funnel-head,
.film-on .closing {
  transform:
    perspective(1400px)
    translate3d(0, calc((1 - var(--vis, 1)) * 6vh), calc((1 - var(--vis, 1)) * -160px))
    rotateX(calc((1 - var(--vis, 1)) * 12deg));
}
.closing::before { width: 60vw; height: 46vh; top: 30%; }
/* Closing sits in the open sky above the sphere, so the sphere stays the hero of the last frame */
.film-on .closing { justify-content: flex-start; padding-top: 13vh; }
.film-on .closing .fineprint { margin-top: auto; }
.film-on .closing::before { top: 24%; height: 40vh; }

/* =====================================================================
   Portfolio · Brochures and Advertisements (portfolio.js)
   ===================================================================== */
.portfolio {
  position: relative;
  width: 90vw;
  margin: 0 auto 16vh;
  padding: 7vh 5vw 8vh;
  border-radius: max(14px, 1.4vw);
  border: 1px solid rgba(237, 229, 215, 0.16);
  background: linear-gradient(90deg, rgba(14, 19, 28, 0.66), rgba(14, 19, 28, 0.46));
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 4vh 12vh rgba(0, 0, 0, 0.38);
}
.film-on .portfolio {
  transform:
    perspective(1600px)
    translate3d(0, calc((1 - var(--vis, 1)) * 9vh), calc((1 - var(--vis, 1)) * -220px))
    rotateX(calc((1 - var(--vis, 1)) * 16deg));
  transform-origin: 50% 100%;
}
.pf-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2vh 3vw; margin-bottom: 5vh; }
.pf-head .funnel-eyebrow { grid-column: 1 / -1; margin: 0; }
.pf-head .funnel-title { font-size: clamp(28px, 3vw, 66px); }
.pf-tabs {
  display: inline-flex;
  padding: 0.45vh;
  border: 1px solid var(--cream-30);
  border-radius: 999px;
  background: rgba(8, 11, 16, 0.5);
}
.pf-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
  padding: 1.3vh 1.6vw;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cream-85);
  font-family: var(--serif);
  font-size: clamp(14px, 1vw, 21px);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.pf-tab.is-active { background: var(--cream); color: #141A24; }
.pf-count { font-family: var(--sans); font-size: 0.72em; letter-spacing: 0.12em; opacity: 0.7; }

.pf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6vw;
  perspective: 1400px;
  transition: opacity 0.22s, transform 0.22s;
}
.pf-grid.is-switching { opacity: 0; transform: translateY(1.5vh) rotateX(6deg); }
.pf-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid rgba(237, 229, 215, 0.14);
  border-radius: max(10px, 0.9vw);
  overflow: hidden;
  background: rgba(10, 13, 19, 0.6);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  transform: rotateX(calc(var(--ty, 0) * -7deg)) rotateY(calc(var(--tx, 0) * 9deg)) translateZ(0);
  transition: transform 0.25s ease-out, border-color 0.3s, box-shadow 0.3s;
  animation: pf-in 0.6s calc(var(--d) * 70ms) both cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pf-card:hover { border-color: rgba(224, 163, 90, 0.6); box-shadow: 0 2.4vh 5vh rgba(0, 0, 0, 0.45), 0 0 4vh rgba(224, 163, 90, 0.12); }
@keyframes pf-in { from { opacity: 0; transform: translateY(3vh) rotateX(14deg); } }
.pf-thumb { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #121821; }
.pf-thumb img,
.pf-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s; }
.pf-card:hover .pf-thumb img,
.pf-card:hover .pf-thumb video { transform: scale(1.04); }
.pf-doc {
  position: absolute; inset: 12% 16%;
  display: grid; place-items: end start;
  padding: 8%;
  border-radius: 6px;
  background: linear-gradient(160deg, #EDE5D7, #c9b49a);
  box-shadow: 1.2vh 1.2vh 0 rgba(237, 229, 215, 0.18);
}
.pf-doc span { font-family: var(--sans); font-size: max(10px, 0.8vw); letter-spacing: 0.3em; color: #5a4430; }
.pf-badge {
  position: absolute; left: 0.8vw; top: 0.8vw;
  padding: 0.5vh 0.7vw;
  border-radius: 999px;
  background: rgba(10, 13, 19, 0.75);
  font-family: var(--sans); font-size: max(9px, 0.55vw); letter-spacing: 0.18em; text-transform: uppercase;
  color: #F3C789;
}
.pf-info { display: flex; flex-direction: column; gap: 0.5vh; padding: 1.8vh 1.1vw 2vh; }
.pf-title { font-family: var(--serif); font-size: clamp(15px, 1.05vw, 22px); line-height: 1.25; }
.pf-client { font-family: var(--sans); font-size: max(10px, 0.62vw); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(237, 229, 215, 0.6); }
.pf-empty {
  grid-column: 1 / -1;
  padding: 9vh 2vw;
  border: 1px dashed rgba(237, 229, 215, 0.22);
  border-radius: max(10px, 0.9vw);
  text-align: center;
}
.pf-empty-title { margin: 0; font-family: var(--serif); font-size: clamp(18px, 1.5vw, 32px); color: var(--headline); }
.pf-empty-sub { margin: 1.4vh 0 0; font-family: var(--serif); font-size: clamp(14px, 1vw, 20px); color: rgba(237, 229, 215, 0.65); }

/* Viewer */
.pf-lock, .pf-lock body { overflow: hidden; }
.pf-viewer {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-columns: 6vw 1fr 6vw; grid-template-rows: 1fr auto;
  align-items: center;
  padding: 6vh 2vw 3vh;
  background: rgba(6, 8, 12, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pf-viewer[hidden] { display: none; }
.pf-stage { height: 100%; min-height: 0; display: grid; place-items: center; }
.pf-stage img, .pf-stage video { max-width: 100%; max-height: 78vh; border-radius: 8px; box-shadow: 0 3vh 8vh rgba(0, 0, 0, 0.6); }
.pf-stage iframe { width: min(100%, 1100px); height: 80vh; border: 0; border-radius: 8px; background: #fff; }
.pf-nav, .pf-close {
  justify-self: center;
  width: max(40px, 3vw); height: max(40px, 3vw);
  border: 1px solid var(--cream-70); border-radius: 50%;
  background: transparent; color: var(--cream);
  font-size: max(16px, 1.2vw); cursor: pointer;
}
.pf-close { position: absolute; top: 2.4vh; right: 2vw; }
.pf-meta { grid-column: 1 / -1; text-align: center; padding-top: 2vh; }
.pf-meta-title { margin: 0; font-family: var(--serif); font-size: clamp(16px, 1.3vw, 28px); color: var(--headline); }
.pf-meta-sub { margin: 0.8vh 0 0; font-family: var(--serif); font-size: clamp(13px, 0.95vw, 19px); color: rgba(237, 229, 215, 0.7); }
.pf-open { display: inline-block; margin-top: 1.2vh; font-family: var(--sans); font-size: max(11px, 0.7vw); letter-spacing: 0.14em; text-transform: uppercase; color: #F3C789; }

@media (max-aspect-ratio: 1/1), (max-width: 900px) {
  .portfolio { width: 92vw; padding: 5vh 6vw 6vh; }
  .pf-head { grid-template-columns: 1fr; }
  .pf-tab { padding: 1.1vh 4vw; gap: 2vw; }
  .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 3vw; }
  .pf-info { padding: 1.4vh 3vw 1.6vh; }
  .pf-badge { left: 2vw; top: 2vw; padding: 0.4vh 2vw; }
  .pf-viewer { grid-template-columns: 1fr; padding: 8vh 4vw 3vh; }
  .pf-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-card { animation: none; transform: none; }
  .pf-grid.is-switching { transform: none; }
}
@media (max-width: 430px) { .nav a[href="#services"] { display: none; } }
