:root {
  --bg: #07070f;
  --bg-2: #0d0b1c;
  --ink: #f3f1ea;
  --ink-dim: rgba(243, 241, 234, 0.6);
  --ink-faint: rgba(243, 241, 234, 0.35);
  --teal: #6fe8c4;
  --amber: #f5b877;
  --line: rgba(243, 241, 234, 0.12);
  --maxw: 1280px;
  --ease: cubic-bezier(0.7, 0, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }

/* ---------- Scroll-scrubbed background video (P02) ---------- */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-2), var(--bg) 60%);
}
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.bg-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 60% at 50% 40%, transparent, rgba(7, 7, 15, 0.55) 100%),
    linear-gradient(180deg, rgba(7, 7, 15, 0.4), transparent 30%, rgba(7, 7, 15, 0.6));
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
  mix-blend-mode: difference;
}
.nav__logo {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
}
.nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav__links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  opacity: 0.75;
  transition: opacity 0.4s var(--ease);
}
.nav__links a:hover { opacity: 1; }

/* ---------- Content layer ---------- */
section { position: relative; z-index: 10; }

/* ---------- Hero ---------- */
.hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 2.5rem;
}
.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}
.hero__title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(5rem, 27vw, 26rem);
  line-height: 0.82;
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: flex;
}
.hero__title .char {
  display: inline-block;
  will-change: transform, opacity, filter;
}
.hero__title .char--space { width: 0.2em; }

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  right: clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ink-faint);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 60px; height: 1px;
  background: var(--ink-faint);
  transform-origin: right;
  animation: scrollpulse 2.4s var(--ease) infinite;
}
@keyframes scrollpulse { 0%,100% { transform: scaleX(0.3); opacity: 0.3; } 50% { transform: scaleX(1); opacity: 0.8; } }

/* ---------- Manifest (blur-in lines P04) ---------- */
.manifest {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(8rem, 22vh, 18rem) clamp(1.25rem, 4vw, 3rem);
}
.manifest__tagline {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--teal);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}
.manifest__lines {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 20ch;
}
.manifest__desc {
  margin-top: 2.5rem;
  max-width: 46ch;
  color: var(--ink-dim);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

/* reveal (P04) */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(12px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* ---------- Rising panel (P05) ---------- */
.panel-wrap {
  height: 220vh;
  position: relative;
}
.panel {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0;
  background: linear-gradient(180deg, #0a0818, #060510);
  box-shadow: 0 -40px 120px rgba(0, 0, 0, 0.6);
  transform: translateY(var(--panel-shift, 30vh));
  will-change: transform;
}
/* glowing seam on the panel's rounded top edge */
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(111, 232, 196, 0.7), transparent);
  box-shadow: 0 0 24px rgba(111, 232, 196, 0.5);
  border-radius: 2px;
}
.panel__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Text drum (P01) */
.drum {
  position: relative;
  height: 60vh;
  perspective: 900px;
  overflow: hidden;
}
.drum__row {
  position: absolute;
  top: 50%; left: 0;
  width: 100%;
  transform-style: preserve-3d;
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(1.1rem, 2.1vw, 1.7rem);
  line-height: 1.2;
  color: var(--ink-faint);
  will-change: transform, opacity, filter;
}
.drum__row b { color: var(--ink); font-weight: 600; }
.drum__row em { color: var(--teal); font-style: normal; font-weight: 500; }
.drum__sr { position: absolute; left: -9999px; }

.panel__product { display: flex; align-items: center; justify-content: center; }

/* ---------- Placeholders (swap for Leonardo) ---------- */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(80% 80% at 50% 30%, rgba(111, 232, 196, 0.12), transparent 60%),
    linear-gradient(160deg, #14112a, #0a0817);
  color: var(--ink-faint);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  overflow: hidden;
}
.ph::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 40%, rgba(245, 184, 119, 0.08), transparent 70%);
}
.ph > span { position: relative; z-index: 2; }
.ph--ring { width: 100%; aspect-ratio: 4/5; }
.ph--card { width: 100%; aspect-ratio: 4/3; margin-bottom: 1.25rem; }
.ph--morning { width: 100%; aspect-ratio: 16/9; }

/* real Leonardo shots — inside parallax frames */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(243, 241, 234, 0.06);
}
.frame--card { aspect-ratio: 4/3; margin-bottom: 1.35rem; }
.frame--ring { aspect-ratio: 4/5; box-shadow: 0 50px 120px rgba(0, 0, 0, 0.6); }
.frame--morning { aspect-ratio: 4/3; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55); }
.shot {
  position: absolute;
  top: -9%; left: 0;
  width: 100%; height: 118%;
  object-fit: cover;
  will-change: transform;
  transform: translateY(var(--py, 0px));
}
.frame {
  transition: transform 0.7s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
/* soft inner vignette so the images melt into the dark instead of hard edges */
.frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 60px 10px rgba(7, 7, 15, 0.55);
  pointer-events: none;
}
.frame--ring .frame__glow {
  position: absolute; inset: 0;
  background: radial-gradient(60% 55% at 50% 55%, rgba(111, 232, 196, 0.16), transparent 70%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  box-shadow: 0 0 12px rgba(111, 232, 196, 0.6);
  transition: width 0.1s linear;
}

/* ---------- Film grain ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 55;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(4) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -2%); }
}

/* ---------- Ambient drifting glow orbs ---------- */
.orb {
  position: fixed;
  z-index: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  will-change: transform;
}
.orb--teal {
  width: 46vw; height: 46vw;
  top: -8vw; left: -6vw;
  background: radial-gradient(circle, rgba(111, 232, 196, 0.28), transparent 68%);
  animation: drift1 26s var(--ease) infinite;
}
.orb--amber {
  width: 40vw; height: 40vw;
  bottom: -10vw; right: -8vw;
  background: radial-gradient(circle, rgba(245, 184, 119, 0.22), transparent 68%);
  animation: drift2 32s var(--ease) infinite;
}
@keyframes drift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(12vw, 8vh) scale(1.15); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0,0) scale(1.1); }
  50% { transform: translate(-10vw, -6vh) scale(0.9); }
}

/* ---------- Cards ---------- */
.cards {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(6rem, 16vh, 12rem) clamp(1.25rem, 4vw, 3rem);
}
.cards__head {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  margin-bottom: 3rem;
  max-width: 16ch;
}
.cards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.card h3 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.card p { color: var(--ink-dim); font-size: 0.95rem; max-width: 32ch; }
.card[data-reveal] { transition-delay: calc(var(--i, 0) * 0.12s); }
.card h3 { transition: color 0.4s var(--ease); }
.card:hover h3 { color: var(--teal); }
.card:hover .frame {
  transform: scale(1.025);
  border-color: rgba(111, 232, 196, 0.28);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 40px rgba(111, 232, 196, 0.08);
}

/* ---------- Morning payoff ---------- */
.morning {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(6rem, 16vh, 12rem) clamp(1.25rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.morning__copy h2 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.morning__copy p { color: var(--ink-dim); margin-bottom: 2rem; }
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 100px;
  background: linear-gradient(120deg, var(--amber), var(--teal));
  color: #08070f;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(245, 184, 119, 0.25); }

/* ---------- Footer ---------- */
.foot {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.foot span:first-child { font-family: "Fraunces", serif; letter-spacing: 0.14em; }

/* ---------- Accents ---------- */
.hero__title { text-shadow: 0 0 60px rgba(111, 232, 196, 0.12); }
.nav__logo { text-shadow: 0 0 20px rgba(111, 232, 196, 0.25); }

/* eyebrow / tagline leading line */
.hero__eyebrow, .manifest__tagline { display: flex; align-items: center; gap: 0.75rem; }
.hero__eyebrow::before, .manifest__tagline::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* soft gradient seams so sections melt instead of cutting */
.manifest::before, .cards::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120%; height: 40vh;
  background: radial-gradient(60% 100% at 50% 0%, rgba(111, 232, 196, 0.05), transparent 70%);
  pointer-events: none;
}

/* CTA glow pulse */
.btn { position: relative; }
.btn::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--amber), var(--teal));
  filter: blur(16px);
  opacity: 0.35;
  z-index: -1;
  transition: opacity 0.4s var(--ease);
}
.btn:hover::after { opacity: 0.7; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .panel__inner { grid-template-columns: 1fr; gap: 2rem; }
  .drum { height: 44vh; }
  .cards__grid { grid-template-columns: 1fr; }
  .morning { grid-template-columns: 1fr; }
  .nav__links { gap: 1rem; }
  .nav__links a:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title .char { transform: none !important; opacity: 1 !important; filter: none !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .panel { transform: none; }
  .hero__scroll-line { animation: none; }
  .orb, .grain { animation: none; }
  .shot { transform: none; }
}
