/* ============================================================
   HOME.CSS — Homepage hero + below-fold sections
   Architecture: stacked full-height sections (Kage pattern)
   Scroll reveal via IntersectionObserver + .rv-in class (Kage pattern)
   ============================================================ */


/* ── Ambient Three.js canvas — fixed behind all sections ── */
#home-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ── Hero wrapper — stacks sections vertically ── */
.hero-wrapper {
  position: relative;
  z-index: 1;
}

/* ============================================================
   HERO SECTION BASE
   Each section = one full viewport height, flows in document
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ── Photo wrap ── */
.hs-photo-wrap {
  position: absolute;
  overflow: visible;
}

.hs-photo {
  width: 100%;
  height: 115%; /* extra for subtle parallax */
  background-size: cover;
  background-position: center 20%;
}

/* ── Placeholder gradients (vivid, clearly distinguishable) ── */
.hs-photo--ph-0 {
  background:
    radial-gradient(ellipse 70% 60% at 65% 35%, rgba(30, 100, 200, 0.85) 0%, transparent 70%),
    linear-gradient(145deg, #0a1a35 0%, #0d2248 50%, #050e20 100%);
}
.hs-photo--ph-1 {
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(80, 40, 180, 0.85) 0%, transparent 70%),
    linear-gradient(160deg, #100820 0%, #1a0f38 50%, #090512 100%);
}
.hs-photo--ph-2 {
  background:
    radial-gradient(ellipse 65% 55% at 35% 55%, rgba(200, 80, 10, 0.85) 0%, transparent 70%),
    linear-gradient(145deg, #200800 0%, #3a1200 50%, #130500 100%);
}

.hs-photo[class*="--ph-"]::after {
  content: 'FOTO SEGERA HADIR';
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
  white-space: nowrap;
  pointer-events: none;
}

.photo-frame {
  position: relative;
  width: 280px;
  height: 360px;
  flex-shrink: 0;
}

.photo-frame::after {
  content: '';
  position: absolute;
  inset: -70px -45px;
  background: url('../assets/glow-frame.png') center center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 2;
  animation: glowPulse 2.25s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 1.0; }
}

.photo-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transform-origin: center center;
  object-position: center top;
  display: block;
}

/* ── Giant dim section number ── */
.hs-num {
  position: absolute;
  left: -6px; top: 50%;
  transform: translateY(-52%);
  font-size: clamp(140px, 26vw, 300px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: rgba(255,255,255,0.025);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ── Shared text elements ── */
.hs-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 22px;
}

.hs-fan-intro {
  width: 100%;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hs-fan-intro p {
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.1em;
  line-height: 2;
  color: var(--color-ash);
  text-align: left;
  margin: 0;
}

.hs-heading {
  margin: 0 0 22px 0;
  font-size: clamp(24px, 4.2vw, 52px);
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--color-pure-white);
  line-height: 1.18;
}

.hs-sub {
  margin: 0;
  font-size: clamp(13px, 1.35vw, 17px);
  font-weight: 400;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.78);
  line-height: 1.9;
}

/* ============================================================
   REVEAL SYSTEM — GSAP owns all animation state
   Only .mask-line overflow:hidden is needed here; GSAP sets
   initial opacity/transform values via gsap.from().
   ============================================================ */
.mask-line {
  display: block;
  overflow: hidden;
}

/* ============================================================
   SECTION READABILITY GRADIENTS
   Sections are transparent — the fixed canvas shows through.
   These gradients darken only the text side for legibility.
   ============================================================ */
.hero-section--split-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.50) 32%,
    rgba(0,0,0,0.08) 58%,
    transparent 75%);
  z-index: 1;
  pointer-events: none;
}

/* Centered section: readability handled by .hs-parallax-wrap::after */

.hero-section--split-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(260deg,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.50) 32%,
    rgba(0,0,0,0.08) 58%,
    transparent 75%);
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   LAYOUT 1: split-left
   Text left | Portrait card right | Canvas visible center-right
   ============================================================ */

/* Portrait card — floats in right zone, does not cover full section */
.hero-section--split-left .hs-photo-wrap {
  position: absolute;
  right: max(60px, 8vw);
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  overflow: visible;
}

.hero-section--split-left .hs-text {
  position: relative;
  z-index: 10;
  width: clamp(380px, 54vw, 740px);
  padding: 0 clamp(28px, 6vw, 80px);
}

/* ============================================================
   LAYOUT 2: centered — full-bleed parallax background
   Image fills section; text centered over it with dark overlay.
   ============================================================ */
.hero-section--centered {
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
}


.photo-frame--side {
  width: 280px;
  height: 360px;
  flex-shrink: 0;
}

/* Full-bleed background for centered section — no clip-path, no glow */
.hs-bg-fill {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  z-index: 0;
}

/* Dark overlay for text readability */
.hs-bg-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 40%, rgba(0,0,0,0.55) 100%),
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 30%, rgba(0,0,0,0.40) 100%);
}

/* ── Parallax background ── */
.hs-parallax-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;  /* clips the taller-than-section image */
  z-index: 0;
}

.hs-parallax-img {
  position: absolute;
  left: 0; right: 0;
  /* 30% extra height gives ±60px of travel without showing edges */
  top: -15%; bottom: -15%;
  background-size: cover;
  will-change: transform;
}

/* Dark gradient over the image for text readability */
.hs-parallax-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 40%, rgba(0,0,0,0.55) 100%),
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 30%, rgba(0,0,0,0.40) 100%);
  z-index: 1;
}

.hero-section--centered .hs-text--center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(28px, 8vw, 120px);
  max-width: 760px;
}

.hero-section--centered .hs-heading {
  font-size: clamp(28px, 4.8vw, 58px);
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.18;
}

.hero-section--centered .hs-sub {
  max-width: 480px;
  text-align: center;
}

/* ============================================================
   LAYOUT 3: split-right
   Portrait card left | Text right | Canvas visible center-left
   ============================================================ */
/* Portrait card in left zone */
.hero-section--split-right .hs-photo-wrap--left {
  position: absolute;
  left: max(60px, 8vw);
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  overflow: visible;
}

.hero-section--split-right .hs-text--right {
  position: relative;
  z-index: 10;
  margin-left: auto;
  width: clamp(380px, 54vw, 740px);
  padding: 0 clamp(28px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Vertical title — left edge variant (section 1) */
.hs-vert--left {
  right: auto;
  left: 0;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
}

/* Vertical title — right edge */
.hs-vert {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  font-size: clamp(9px, 1.1vw, 12px);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.13);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  user-select: none;
}

/* ============================================================
   PHOTO COLLAGE — multi-image card stack animation
   Cards fly in from different positions, land as a stacked deck.
   Container gets .rv-in → triggers per-card CSS transitions.
   ============================================================ */
.hs-photo-collage {
  position: absolute;
  right: max(60px, 8vw);
  top: 0; bottom: 0;
  margin: auto;
  width: clamp(200px, 22vw, 280px);
  height: clamp(280px, 32vw, 400px);
  overflow: visible; /* cards fly in from outside the container */
  z-index: 5;
}

.hs-collage-card {
  position: absolute;
  inset: 0;
  background-size: cover;
  overflow: hidden; /* crop image to card */
  will-change: transform, opacity;
  /* Highlight: 1px inset border like a photograph edge */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}

/* Dark gradient overlay — depth on each card */
.hs-collage-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(0,0,0,0.45) 100%
  );
  pointer-events: none;
}

/* ── Starting positions — scattered off-position before reveal ── */
.hs-collage-card--back {
  z-index: 1;
  opacity: 0;
  transform: translate(90px, 120px) rotate(8deg) scale(0.90);
  transition:
    transform 1.3s var(--ease-out),
    opacity   0.7s var(--ease-out);
  transition-delay: 0s; /* arrives first → goes to back */
}
.hs-collage-card--mid {
  z-index: 2;
  opacity: 0;
  transform: translate(-110px, 70px) rotate(-11deg) scale(0.88);
  transition:
    transform 1.3s var(--ease-out),
    opacity   0.7s var(--ease-out);
  transition-delay: 0.16s;
}
.hs-collage-card--front {
  z-index: 3;
  opacity: 0;
  transform: translate(130px, -100px) rotate(14deg) scale(0.86);
  transition:
    transform 1.3s var(--ease-out),
    opacity   0.7s var(--ease-out);
  transition-delay: 0.32s; /* arrives last → lands on top */
  /* Brighter edge on the portrait card */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}

/* ── Revealed state — cards land as a stacked deck ── */
.hs-photo-collage.rv-in .hs-collage-card--back {
  opacity: 1;
  transform: rotate(-4deg) translate(-8px, 6px);
}
.hs-photo-collage.rv-in .hs-collage-card--mid {
  opacity: 1;
  transform: rotate(2.5deg) translate(5px, -4px);
}
.hs-photo-collage.rv-in .hs-collage-card--front {
  opacity: 1;
  transform: rotate(-0.5deg); /* nearly flat — portrait on top */
}

/* ── Reduced motion: skip card-flying, show stack immediately ── */
@media (prefers-reduced-motion: reduce) {
  .hs-collage-card {
    transition: none !important;
    opacity: 1 !important;
  }
  .hs-collage-card--back  { transform: rotate(-4deg) translate(-8px, 6px) !important; }
  .hs-collage-card--mid   { transform: rotate(2.5deg) translate(5px, -4px) !important; }
  .hs-collage-card--front { transform: rotate(-0.5deg) !important; }
}

/* ============================================================
   SCROLL HINT (section 0, bottom center)
   ============================================================ */
.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-hint__line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.5));
  animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-hint__label {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.15; }
  50%       { opacity: 1; }
}

/* ============================================================
   INTRO SECTION
   ============================================================ */
.intro-section {
  background: var(--surface-carbon-panel, #111);
  padding: 100px clamp(28px, 5vw, 72px);
  display: flex;
  gap: 80px;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.intro-section__label-col {
  flex-shrink: 0;
  width: 160px;
}

.intro-section__content {
  flex: 1;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.intro-section__body {
  font-size: var(--text-body, 15px);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-fog, #f5f5f7);
  line-height: 1.95;
}

.intro-section__cta {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   BIO STATS
   ============================================================ */
.bio-stats {
  background: var(--surface-void-canvas, #000);
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 2;
}

.bio-stat {
  padding: 44px clamp(28px, 4vw, 56px);
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bio-stat:last-child { border-right: none; }

.bio-stat__value {
  font-size: var(--text-display, 38px);
  font-weight: 100;
  letter-spacing: 0.06em;
  color: var(--color-pure-white, #fff);
  line-height: 1;
}

.bio-stat__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-ash, #cfcfcf);
}

/* ============================================================
   JOURNEY TEASER
   ============================================================ */
.journey-teaser {
  background: var(--surface-void-canvas, #000);
  padding: 100px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
  z-index: 2;
}

.journey-teaser__heading {
  margin: 0;
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 100;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-pure-white, #fff);
  line-height: 1.25;
  max-width: 680px;
}

.journey-teaser__sub {
  margin: 0;
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--color-ash, #cfcfcf);
  line-height: 1.85;
  max-width: 460px;
}

/* ============================================================
   INTRO SECTION — CENTERED QUOTE VARIANT
   ============================================================ */
.intro-section--centered {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px clamp(28px, 10vw, 160px);
}

/* shared quote block — used in intro section + journey teaser */
.intro-quote {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 760px;
}

.intro-quote__text {
  font-size: clamp(22px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: 0.055em;
  color: var(--color-pure-white, #fff);
  line-height: 1.22;
  font-style: italic;
  text-transform: uppercase;
}

.intro-quote__author {
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-style: normal;
}

/* ============================================================
   MILESTONES
   ============================================================ */
.milestones {
  background: var(--surface-carbon-panel, #111);
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.milestone {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 40px);
  padding: 28px clamp(28px, 5vw, 72px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.milestone:last-child { border-bottom: none; }

.milestone__year {
  font-size: clamp(22px, 3.2vw, 38px);
  font-weight: 100;
  letter-spacing: 0.08em;
  color: var(--color-pure-white, #fff);
  line-height: 1;
  flex-shrink: 0;
  width: clamp(80px, 10vw, 120px);
}

.milestone__dash {
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.milestone__label {
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-ash, #cfcfcf);
  line-height: 1.4;
}

/* journey teaser heading removed — section now uses .intro-quote directly */

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--surface-carbon-panel, #111);
  padding: 36px clamp(28px, 5vw, 72px) 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
  z-index: 2;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__disclaimer {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.18);
  line-height: 1.8;
  max-width: 520px;
  display: block;
}

.footer__brand {
  font-size: var(--text-caption, 12px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-pure-white, #fff);
}

.footer__copy {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--color-ash, #cfcfcf);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .bio-stats { grid-template-columns: repeat(2, 1fr); }
  .bio-stat:nth-child(2) { border-right: none; }
  .bio-stat:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.07); }
  .intro-section { flex-direction: column; gap: 32px; }
  .intro-section__label-col { width: auto; }

  /* Hide portrait frames — 3D canvas provides the visual background */
  .hs-photo-wrap,
  .hs-photo-wrap--left,
  .photo-frame--side { display: none; }

  /* S1 split-left: text full width, centered vertically */
  .hero-section--split-left { justify-content: center; }
  .hero-section--split-left .hs-text {
    width: 100%;
    padding: 0 clamp(28px, 5vw, 72px);
  }

  /* S3 split-right: text full width */
  .hero-section--split-right { justify-content: center; }
  .hero-section--split-right .hs-text--right {
    margin-left: 0;
    width: 100%;
    padding: 0 clamp(28px, 5vw, 72px);
    position: relative;
    bottom: auto;
  }

  /* S2 centered: keep layout, just tighten gap */
  .hero-section--centered { gap: 16px; }
}

@media (max-width: 600px) {
  .bio-stats { grid-template-columns: 1fr; }
  .bio-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .bio-stat:last-child { border-bottom: none; }
  .hs-num { display: none; }
  .hs-vert { display: none; }
  .hero-section--split-left .hs-text,
  .hero-section--split-right .hs-text--right { padding: 0 24px; }
  .hero-section--centered .hs-text--center { padding: 0 24px; }
}
