/* ============================================================
   HAPPY GREEN — Luxury Emerald Gallery
   750 S. Vermont Ave, Los Angeles
   ============================================================ */

:root {
  /* World palette — sampled from the emerald gallery imagery */
  --emerald-abyss: #031711;
  --emerald-deep:  #04231a;
  --emerald:       #0a3d2c;
  --jade:          #2fbf8f;
  --lime:          #a7ffbd;
  --cyan-soft:     #7de6e0;
  --turquoise:     #2dd4bf;
  --royal:         #33509e;
  --violet:        #8b6cd9;
  --lavender:      #c4b5fd;
  --champagne:     #f4e9cf;
  --gold-warm:     #d9bc85;
  --ivory:         #f5f1e6;

  --font-script:  'Yellowtail', cursive;
  --font-display: 'Archivo', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-serif:   'Cormorant Garamond', 'Georgia', serif;
  --font-grotesk: 'Space Grotesk', sans-serif;

  --ease-lux: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--emerald-abyss);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: rgba(47, 191, 143, .35); color: var(--ivory); }

/* ---------- AURORA BLUR — persistent background ---------- */
#aurora {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  filter: blur(70px) saturate(1.15);
  transform: scale(1.15);          /* hide blur edge falloff */
  opacity: .55;
  pointer-events: none;
}

/* Film grain — material character over the whole world */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  animation: grainShift 9s steps(6) infinite;
}
@keyframes grainShift {
  0%,100% { transform: translate(0,0) }
  20% { transform: translate(-3%,2%) }
  40% { transform: translate(2%,-3%) }
  60% { transform: translate(-2%,-2%) }
  80% { transform: translate(3%,3%) }
}

main, .hero, .footer, .textloop { position: relative; z-index: 1; }

/* ---------- Shared typography ---------- */
.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--champagne);
  text-shadow: 0 2px 24px rgba(4, 35, 26, .6), 0 0 60px rgba(244, 233, 207, .18);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: clamp(.65rem, .9vw, .78rem);
  font-weight: 600;
  letter-spacing: .38em;
  color: var(--jade);
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.big-head {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  letter-spacing: -0.015em;
  color: var(--ivory);
  line-height: .95;
}

.support {
  font-size: clamp(.95rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  color: rgba(245, 241, 230, .72);
  max-width: 34em;
}

.star { color: var(--gold-warm); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--emerald-abyss);
  background: linear-gradient(135deg, var(--champagne), var(--gold-warm));
  padding: 1.05rem 2.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .5s var(--ease-lux), box-shadow .5s var(--ease-lux);
  box-shadow: 0 6px 30px rgba(217, 188, 133, .22);
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(217, 188, 133, .35), 0 0 70px rgba(167, 255, 189, .12);
}
.btn-ghost {
  background: transparent;
  color: var(--champagne);
  border: 1px solid rgba(244, 233, 207, .35);
  box-shadow: none;
}
.btn-ghost:hover { box-shadow: 0 10px 36px rgba(4, 35, 26, .5); border-color: rgba(244, 233, 207, .7); }

/* ============================================================
   ELEMENT 1 · HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-media { position: absolute; inset: 0; background: var(--emerald-abyss); }

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;                /* film always above the blur-pad */
}

/* Blur-pad behind the film on tall screens (mobile band pattern) */
.hero-pad {
  position: absolute;
  inset: 0;
  background: url('../assets/hero-poster.jpg') center / cover no-repeat;
  filter: blur(40px) brightness(.5) saturate(1.2);
  transform: scale(1.2);
  display: none;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to top, rgba(3, 23, 17, .92) 0%, rgba(3, 23, 17, .45) 22%, rgba(3, 23, 17, 0) 48%),
    linear-gradient(to bottom, rgba(3, 23, 17, .35), rgba(3, 23, 17, 0) 25%),
    radial-gradient(120% 90% at 50% 100%, rgba(10, 61, 44, .25), transparent 60%);
  pointer-events: none;
}

/* Opening brand overlay — fades in as the film begins,
   fades away before the storefront/logo phase */
.hero-brand {
  position: absolute;
  top: 7svh;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  padding: 0 1.5rem;
  pointer-events: none;
  opacity: 0;               /* GSAP owns the entrance/exit */
}
.hero-brand-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 5.2vw, 4.2rem);
  letter-spacing: .3em;
  text-indent: .3em;        /* balance the tracking */
  color: var(--champagne);
  text-shadow:
    0 0 34px rgba(47, 191, 143, .38),
    0 0 90px rgba(47, 191, 143, .18),
    0 2px 18px rgba(3, 23, 17, .7);
}
.hero-brand-sub {
  margin-top: .9rem;
  font-family: var(--font-grotesk);
  font-weight: 300;
  font-size: clamp(.62rem, 1.05vw, .82rem);
  letter-spacing: .52em;
  text-indent: .52em;
  color: rgba(244, 233, 207, .82);
  text-shadow: 0 0 24px rgba(47, 191, 143, .3), 0 1px 12px rgba(3, 23, 17, .7);
}

.hero-copy {
  position: relative;
  text-align: center;
  padding: 0 1.5rem calc(9svh + 1rem);
  max-width: 46rem;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .45em;
  color: var(--lime);
  margin-bottom: 1.2rem;
  text-shadow: 0 0 24px rgba(167, 255, 189, .4);
}

.hero-title {
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  line-height: 1.15;
  margin-bottom: 1.1rem;
}

.hero-sub {
  color: rgba(245, 241, 230, .82);
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  margin-bottom: 2.1rem;
  text-shadow: 0 1px 12px rgba(3, 23, 17, .8);
}

.hero-hint {
  position: absolute;
  bottom: 2.2svh;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 44px;
  overflow: hidden;
}
.hero-hint span {
  position: absolute;
  top: -44px; left: 0;
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--champagne));
  animation: hintDrop 2.6s var(--ease-lux) infinite;
}
@keyframes hintDrop { 60%, 100% { transform: translateY(88px) } }

/* ============================================================
   ELEMENT 2 · PARTICLETEXT
   ============================================================ */
.particle-sec {
  position: relative;
  padding: clamp(6rem, 14vh, 10rem) 1.5rem clamp(4rem, 9vh, 7rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.4rem;
}

#particleText {
  width: min(92vw, 1100px);
  height: clamp(180px, 34vw, 360px);
  cursor: pointer;
  touch-action: manipulation;
}

.particle-after {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: rgba(244, 233, 207, .85);
  opacity: 0;
  transform: translateY(14px);
}

/* ============================================================
   ELEMENT 3 · TEXTLOOP
   ============================================================ */
.textloop {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 0;
  margin: clamp(2rem, 6vh, 4rem) 0;
  background: linear-gradient(90deg, rgba(10, 61, 44, .0), rgba(10, 61, 44, .55) 18%, rgba(10, 61, 44, .55) 82%, rgba(10, 61, 44, 0));
  border-top: 1px solid rgba(47, 191, 143, .16);
  border-bottom: 1px solid rgba(47, 191, 143, .16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: rotate(-1.2deg) scale(1.02);
}
.textloop-alt { transform: rotate(1deg) scale(1.02); background: linear-gradient(90deg, rgba(51, 80, 158, 0), rgba(23, 48, 84, .45) 18%, rgba(23, 48, 84, .45) 82%, rgba(51, 80, 158, 0)); border-color: rgba(125, 230, 224, .14); }

.textloop-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.textloop-track span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(.85rem, 1.5vw, 1.15rem);
  letter-spacing: .34em;
  white-space: nowrap;
  color: var(--champagne);
  opacity: .85;
  padding-right: 2rem;
}

/* ============================================================
   ELEMENT 4 · INFINITESPIRAL
   ============================================================ */
.spiral-sec { position: relative; }

.spiral-head {
  text-align: center;
  padding: clamp(4rem, 10vh, 8rem) 1.5rem 0;
}
.spiral-head .support { margin: 1.6rem auto 0; }

/* Elegant serif headline for the collection section */
.elegant-head {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.5vw, 4.6rem);
  letter-spacing: .18em;
  text-indent: .18em;
  line-height: 1.25;
  color: var(--champagne);
  text-shadow: 0 0 44px rgba(47, 191, 143, .22), 0 2px 20px rgba(3, 23, 17, .6);
  margin-top: .4rem;
}
.elegant-support {
  font-family: var(--font-grotesk);
  font-weight: 300;
  letter-spacing: .08em;
}

.spiral-stage {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  overflow: hidden;
}

.spiral-center {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.5vw, 3.4rem);
  letter-spacing: .5em;
  text-align: center;
  line-height: 1.7;
  color: rgba(167, 255, 189, .1);
  text-shadow: 0 0 80px rgba(167, 255, 189, .12);
  user-select: none;
}

.spiral-ring {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.spiral-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(210px, 24vw, 340px);
  aspect-ratio: 3 / 4;
  margin: 0;
  transform-style: preserve-3d;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(10, 61, 44, .8), rgba(3, 23, 17, .9));
  border: 1px solid rgba(47, 191, 143, .22);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(244, 233, 207, .1);
  will-change: transform, opacity, filter;
}
.spiral-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spiral-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.2rem .95rem;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--champagne);
  background: linear-gradient(to top, rgba(3, 23, 17, .85), transparent);
}

/* Empty slot styling — elegant frame while awaiting the real image */
.slot-empty img { display: none; }
.slot-empty::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(167, 255, 189, .25);
  border-radius: 10px;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(47, 191, 143, .12), transparent 70%);
}

/* ============================================================
   PRODUCT DISCOVERY
   ============================================================ */
.products {
  display: flex;
  flex-direction: column;
  gap: clamp(5rem, 12vh, 9rem);
  padding: clamp(4rem, 10vh, 8rem) clamp(1.5rem, 6vw, 5rem);
  max-width: 1300px;
  margin: 0 auto;
}

.product-moment {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.product-moment.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.product-moment.flip .product-frame { order: 2; }
.product-moment.flip .product-copy { order: 1; text-align: right; }
.product-moment.flip .product-copy .support { margin-left: auto; }

.product-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, rgba(10, 61, 44, .7), rgba(3, 23, 17, .95));
  border: 1px solid rgba(47, 191, 143, .18);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
}
.product-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }

/* spotlight + champagne sweep */
.product-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 55% at 50% 8%, rgba(244, 233, 207, .14), transparent 60%),
    linear-gradient(to top, rgba(3, 23, 17, .35), transparent 40%);
  pointer-events: none;
}
.product-moment[data-tone="violet"] .product-frame::after {
  background:
    radial-gradient(80% 55% at 50% 8%, rgba(196, 181, 253, .16), transparent 60%),
    linear-gradient(to top, rgba(3, 23, 17, .35), transparent 40%);
}
.product-moment[data-tone="smoke"] .product-frame::after {
  background:
    radial-gradient(80% 55% at 50% 8%, rgba(125, 230, 224, .13), transparent 60%),
    linear-gradient(to top, rgba(3, 23, 17, .4), transparent 40%);
}

.product-copy h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  letter-spacing: -.01em;
  margin-bottom: 1rem;
  color: var(--ivory);
}

/* ============================================================
   FINAL VISIT
   ============================================================ */
.visit {
  position: relative;
  margin-top: clamp(4rem, 10vh, 8rem);
  min-height: 90svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.visit-media { position: absolute; inset: 0; }
.visit-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.5) saturate(1.15);
}
.visit-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(3, 23, 17, .93) 0%, rgba(3, 23, 17, .72) 45%, rgba(3, 23, 17, .25) 100%),
    radial-gradient(90% 70% at 85% 20%, rgba(244, 233, 207, .08), transparent 60%);
}
.visit-media.slot-empty::after {
  background: linear-gradient(120deg, var(--emerald-deep), var(--emerald-abyss) 70%);
}
.visit-media.slot-empty::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 70% 30%, rgba(47, 191, 143, .18), transparent 65%);
}

.visit-copy {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.5rem, 7vw, 6rem);
  max-width: 640px;
}

.visit-title { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.2; margin-bottom: 1.2rem; }

.visit-facts {
  font-style: normal;
  margin: 2.4rem 0;
  display: grid;
  gap: 1.05rem;
}
.fact {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.55;
  color: rgba(245, 241, 230, .88);
  letter-spacing: .02em;
}
.fact a { text-decoration: none; border-bottom: 1px solid rgba(244, 233, 207, .35); transition: border-color .4s; }
.fact a:hover { border-color: var(--champagne); }

.visit-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: clamp(4rem, 9vh, 6rem) 1.5rem 3rem;
  border-top: 1px solid rgba(47, 191, 143, .12);
  background: linear-gradient(to bottom, transparent, rgba(3, 23, 17, .85));
}
.footer-brand { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1.2rem; }
.footer-meta { font-size: .95rem; color: rgba(245, 241, 230, .7); margin-bottom: .5rem; letter-spacing: .04em; }
.footer-meta a { text-decoration: none; }
.footer-legal {
  margin-top: 2.4rem;
  font-size: .72rem;
  letter-spacing: .05em;
  color: rgba(245, 241, 230, .35);
}

/* ============================================================
   REVEAL STATES (GSAP owns the transitions)
   ============================================================ */
.reveal-blur { opacity: 0; filter: blur(14px); transform: translateY(36px); }
.hero-copy > * { opacity: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  /* Mobile hero — film as a full-width 16:9 band with blur-pad
     so the signage lands whole */
  .hero-video {
    top: 34%;
    bottom: auto;
    height: auto;
    aspect-ratio: 16 / 9;
    transform: translateY(-50%);
    object-fit: cover;
    box-shadow: 0 0 60px rgba(0, 0, 0, .45);
  }
  .hero-pad { display: block; }
  .hero-copy { padding-bottom: calc(6svh + 1rem); }

  /* Keep the brand overlay above the film band */
  .hero-brand { top: 4.5svh; }
  .hero-brand-title { font-size: clamp(1.6rem, 7.5vw, 2rem); }
  .hero-brand-sub { margin-top: .55rem; font-size: .58rem; letter-spacing: .42em; text-indent: .42em; }

  .product-moment, .product-moment.flip { grid-template-columns: 1fr; }
  .product-moment.flip .product-frame { order: 1; }
  .product-moment.flip .product-copy { order: 2; text-align: left; }
  .product-moment.flip .product-copy .support { margin-left: 0; }
  .product-frame { aspect-ratio: 4 / 5; max-width: 480px; }

  .spiral-card { width: clamp(180px, 56vw, 240px); }
  .spiral-stage { min-height: 540px; }

  .visit { min-height: 100svh; }
  .visit-copy { padding-top: 40svh; }
  .visit-media::after {
    background: linear-gradient(to top, rgba(3, 23, 17, .95) 45%, rgba(3, 23, 17, .3) 75%, rgba(3, 23, 17, .15) 100%);
  }

  #aurora { filter: blur(50px) saturate(1.15); opacity: .45; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero-hint { display: none; }
  .textloop-track { transform: none !important; }
  .reveal-blur, .hero-copy > * { opacity: 1 !important; filter: none !important; transform: none !important; }
  .particle-after { opacity: 1 !important; transform: none !important; }

  /* Spiral falls back to a calm grid */
  .spiral-stage { height: auto; min-height: 0; perspective: none; display: block; padding: 3rem 1.5rem; }
  .spiral-center { display: none; }
  .spiral-ring {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
    max-width: 1100px;
    margin: 0 auto;
  }
  .spiral-card { position: static; transform: none !important; opacity: 1 !important; filter: none !important; width: auto; }
}
