/* ============================================================
   SOHNAVRA — cinematic scroll experience
   Palette: deep ink black + champagne gold + ivory
   Type:    Cinzel (display) / Josefin Sans (body)
   ============================================================ */

:root {
  --ink:        #0a0908;
  --ink-2:      #121110;
  --ink-3:      #1a1815;
  --gold:       #c9a227;
  --gold-soft:  #e5c882;
  --gold-deep:  #8a6d1d;
  --ivory:      #f2ede3;
  --ivory-dim:  #b8b0a0;
  --line:       rgba(201, 162, 39, 0.25);

  --font-display: "Cinzel", serif;
  --font-body:    "Josefin Sans", sans-serif;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scrollbar-width: thin; scrollbar-color: var(--gold-deep) var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.loader__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.loader__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(10, 9, 8, 0.55) 100%),
    linear-gradient(180deg, rgba(10, 9, 8, 0.35), transparent 30%, transparent 65%, rgba(10, 9, 8, 0.6));
}
.loader__inner { position: relative; z-index: 1; text-align: center; }
.loader__word {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.45em;
  margin-left: 0.45em; /* balance tracking */
  color: var(--ivory);
}
.loader__word span { display: inline-block; opacity: 0; transform: translateY(0.6em); }
.loader__bar {
  width: min(260px, 50vw); height: 1px;
  background: rgba(242, 237, 227, 0.12);
  margin: 2rem auto 1.2rem;
  overflow: hidden;
}
.loader__bar i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
  transform: scaleX(0); transform-origin: left;
}
.loader__tag {
  font-size: 0.6rem; letter-spacing: 0.4em;
  color: var(--ivory-dim); opacity: 0;
}

/* ============================================================
   ATMOSPHERE — grain, vignette, dust
   ============================================================ */
.grain {
  position: fixed; inset: -10%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 3%); }
  50%  { transform: translate(3%, -2%); }
  75%  { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}
.vignette {
  position: fixed; inset: 0; z-index: 89; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(4, 3, 2, 0.55) 100%);
}
#dust {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  width: 100vw; height: 100vh;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  transform: translateY(-110%);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(10, 9, 8, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: 0.3em;
  font-size: 0.9rem; color: var(--ivory);
}
.nav__logo span { color: var(--gold); font-size: 0.55em; vertical-align: super; }
.nav__meta {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.58rem; letter-spacing: 0.32em; color: var(--ivory-dim);
}
.nav__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ============================================================
   ACT I — HERO
   ============================================================ */
.shake-wrap { position: relative; }

.act-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--ink);
}
.hero__media { position: absolute; inset: 0; will-change: transform; }
.hero__media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero__tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.55) 0%, transparent 30%, transparent 62%, rgba(10, 9, 8, 0.8) 100%);
}
/* darkness that closes in as the title arrives (opacity driven by JS —
   cheaper than a brightness filter on a 4K video) */
.hero__dim {
  position: absolute; inset: 0;
  background: #060504;
  opacity: 0;
}

.bar {
  position: absolute; left: 0; right: 0; z-index: 6;
  height: 7vh; background: #050403;
}
.bar--top { top: 0; transform: translateY(-100%); }
.bar--bottom { bottom: 0; transform: translateY(100%); }

.hero__chrome {
  position: absolute; inset: 0;
  z-index: 7;
  pointer-events: none;
}
.hero__eyebrow {
  position: absolute; top: 12vh; left: 50%; transform: translateX(-50%);
  z-index: 7;
  display: flex; align-items: center; gap: 1.2rem;
  font-size: 0.58rem; letter-spacing: 0.42em;
  color: rgba(242, 237, 227, 0.75);
  white-space: nowrap;
  opacity: 0;
}
.hero__eyebrow .rule { width: 4rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero__eyebrow .rule:last-child { background: linear-gradient(90deg, var(--gold), transparent); }

.hero__scrollcue {
  position: absolute; bottom: 10vh; left: 50%; transform: translateX(-50%);
  z-index: 7; text-align: center;
  font-size: 0.55rem; letter-spacing: 0.5em; color: var(--ivory-dim);
  opacity: 0;
}
.hero__scrollcue i {
  display: block; width: 1px; height: 3.4rem;
  margin: 0.8rem auto 0;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: cueDrop 1.8s var(--ease-expo) infinite;
  transform-origin: top;
}
@keyframes cueDrop {
  0% { transform: scaleY(0); } 45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* total blackout behind the title — owned by the ceremony, nothing else */
.hero__blackout {
  position: absolute; inset: 0; z-index: 7;
  background: #050403;
  opacity: 0;
  pointer-events: none;
}

/* ---- impact fx ---- */
.impact-flash {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, rgba(229, 200, 130, 0.9), rgba(201, 162, 39, 0.25) 35%, transparent 70%);
  opacity: 0;
}
.impact-ring {
  position: absolute; z-index: 8; pointer-events: none;
  top: 46%; left: 50%;
  width: 12vmax; height: 12vmax;
  margin: -6vmax 0 0 -6vmax;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.2);
}

/* ---- THE TITLE ---- */
.title-stage {
  position: absolute; inset: 0; z-index: 9;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  perspective: 900px;
  pointer-events: none;
}
.title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 11.5vw, 11rem);
  letter-spacing: 0.12em;
  margin-left: 0.12em;
  line-height: 1;
  color: var(--ivory);
  display: flex;
  transform-style: preserve-3d;
  /* one glow for the whole wordmark — per-letter filters are a GPU killer */
  filter: drop-shadow(0 0 26px rgba(201, 162, 39, 0.35));
}
.title__letter {
  display: inline-block;
  opacity: 0;
  background: linear-gradient(180deg, #fffdf6 0%, var(--ivory) 42%, var(--gold-soft) 72%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: transform, opacity;
}
.title__sub {
  margin-top: 2.2rem;
  font-size: clamp(0.55rem, 1vw, 0.75rem);
  letter-spacing: 0.62em;
  color: var(--gold-soft);
  opacity: 0;
}

/* ---- DRIPS off the wordmark ---- */
.drips {
  position: absolute;
  top: 58%;
  left: 50%;
  width: min(78vw, 1100px);
  transform: translateX(-50%);
  height: 0;
}
.drip {
  position: absolute;
  top: 0; left: var(--x);
  width: 3px;
  height: var(--h);
  border-radius: 0 0 999px 999px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.45);
  transform: scaleY(0);
  transform-origin: top;
}
.drip::after {
  /* the bead at the tip of each drip */
  content: "";
  position: absolute; bottom: -4px; left: 50%;
  width: 9px; height: 11px;
  transform: translateX(-50%);
  border-radius: 46% 46% 60% 60% / 38% 38% 66% 66%;
  background: radial-gradient(circle at 32% 28%, #ffe9b0, var(--gold) 58%, var(--gold-deep));
  box-shadow: 0 0 14px rgba(229, 200, 130, 0.7);
}
.drip--main { width: 4px; }

/* ============================================================
   ACT II — THE JOURNEY (follow the drip)
   ============================================================ */
.act-journey {
  position: relative;
  padding: 22vh 0 24vh;
  background:
    radial-gradient(60vw 40vh at 85% 12%, rgba(201, 162, 39, 0.05), transparent 60%),
    radial-gradient(50vw 36vh at 12% 55%, rgba(201, 162, 39, 0.04), transparent 60%),
    var(--ink);
}

/* golden thread down the middle */
.thread {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
}
.thread__line {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 30%, var(--gold-deep) 90%, transparent);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.4);
  transform: scaleY(0);
  transform-origin: top;
}

/* ---- estates along the thread ---- */
.estate {
  position: relative; z-index: 5;
  display: flex;
  padding: 0 clamp(1.2rem, 5vw, 6rem);
  margin-bottom: 20vh;
}
.estate--left  { justify-content: flex-start; }
.estate--right { justify-content: flex-end; }

.estate__node {
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 1px solid var(--gold-deep);
  background: var(--ink);
  transition: all 0.5s var(--ease-expo);
}
.estate__node.is-lit {
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold), 0 0 48px rgba(201, 162, 39, 0.5);
  border-color: var(--gold-soft);
}

.estate__card {
  width: min(480px, 42vw);
  background: linear-gradient(165deg, var(--ink-3), var(--ink-2) 60%);
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  will-change: transform;
  cursor: pointer;
  transition: border-color 0.4s;
}
.estate__card:hover { border-color: rgba(201, 162, 39, 0.55); }

.estate__imgwrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #070605;
}

/* sealed panel — pure black, the estate is hidden until launch */
.estate__lockplate {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.1rem;
  background:
    radial-gradient(55% 70% at 50% 42%, rgba(201, 162, 39, 0.08), transparent 70%),
    #070605;
}
.estate__soon {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: 0.38em;
  margin-left: 0.38em; /* balance tracking */
  background: linear-gradient(180deg, var(--ivory) 8%, var(--gold-soft) 58%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.85;
  transition: opacity 0.4s var(--ease-expo);
}
.estate__card:hover .estate__soon { opacity: 1; }
.lock {
  width: clamp(30px, 3vw, 42px); height: auto;
  color: var(--gold-soft);
  filter: drop-shadow(0 0 12px rgba(201, 162, 39, 0.55));
  transition: transform 0.3s var(--ease-expo);
}
.estate__card:hover .lock { animation: lockShake 0.55s var(--ease-expo); }
@keyframes lockShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); }
}
/* shimmer sweep on hover */
.estate__shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(229, 200, 130, 0.18) 48%, rgba(255, 240, 200, 0.32) 50%, rgba(229, 200, 130, 0.18) 52%, transparent 70%);
  transform: translateX(-130%);
  pointer-events: none;
}
.estate__card:hover .estate__shimmer {
  transition: transform 1.1s var(--ease-expo);
  transform: translateX(130%);
}

.estate__body { padding: 1.6rem 1.7rem 1.8rem; }
.estate__index {
  font-size: 0.58rem; letter-spacing: 0.4em;
  color: var(--gold); margin-bottom: 0.7rem;
}
.estate__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.estate__loc {
  font-size: 0.72rem; letter-spacing: 0.22em;
  color: var(--ivory-dim);
  margin-bottom: 1.1rem;
}
.estate__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.14);
}
.estate__spec { font-size: 0.6rem; letter-spacing: 0.2em; color: var(--ivory-dim); }
.estate__status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.58rem; letter-spacing: 0.3em; color: var(--gold-soft);
}
.estate__status i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 2s ease-in-out infinite;
}
.estate__price {
  margin-top: 0.8rem;
  font-size: 0.62rem; letter-spacing: 0.3em;
  color: rgba(242, 237, 227, 0.35);
}

/* ============================================================
   ACT III — FINAL
   ============================================================ */
.act-final {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 18vh 1.5rem 0;
  background:
    radial-gradient(70vw 50vh at 50% 30%, rgba(201, 162, 39, 0.07), transparent 65%),
    var(--ink);
  overflow: hidden;
}
.final__seal {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  margin-bottom: 2.4rem;
  color: var(--gold-soft);
}
.final__seal svg { width: 22px; }
.final__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
}
.final__line { display: block; }
.final__line--em {
  background: linear-gradient(180deg, var(--ivory) 20%, var(--gold-soft) 65%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.final__copy {
  max-width: 34rem;
  margin: 2rem auto 2.8rem;
  color: var(--ivory-dim);
  line-height: 1.75;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
}
.final__form {
  display: flex; gap: 0;
  width: min(430px, 88vw);
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(18, 17, 16, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.final__form input {
  flex: 1;
  min-width: 0;
  padding: 1.05rem 1.2rem 0.95rem;
  background: transparent; border: 0; outline: none;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.85rem; letter-spacing: 0.08em;
}
.final__form input::placeholder { color: rgba(242, 237, 227, 0.35); }
.final__form input:focus-visible { box-shadow: inset 0 -2px 0 var(--gold); }
.final__form button {
  padding: 0 1.6rem;
  border: 0; cursor: pointer;
  background: linear-gradient(120deg, var(--gold-deep), var(--gold) 55%, var(--gold-soft));
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.62rem; letter-spacing: 0.32em;
  transition: filter 0.3s;
}
.final__form button:hover { filter: brightness(1.15); }
.final__form button:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }
.final__done {
  margin-top: 1.2rem;
  font-size: 0.72rem; letter-spacing: 0.24em;
  color: var(--gold-soft);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.6s var(--ease-expo);
}
.final__done.is-on { opacity: 1; transform: none; }

.footer {
  width: 100%;
  margin-top: 14vh;
  padding: 2rem clamp(1.2rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(201, 162, 39, 0.12);
  font-size: 0.58rem; letter-spacing: 0.32em;
  color: var(--ivory-dim);
}
.footer div:first-child { font-family: var(--font-display); color: var(--ivory); letter-spacing: 0.3em; }
.footer div:first-child span { color: var(--gold); font-size: 0.6em; vertical-align: super; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .estate { justify-content: center !important; margin-bottom: 14vh; }
  .estate__card { width: min(480px, 92vw); }
  .estate__node { top: -5vh; }
  .nav__meta span:last-child { display: none; }
  .hero__eyebrow { font-size: 0.5rem; gap: 0.7rem; }
  .hero__eyebrow .rule { width: 2rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .grain, .nav__dot, .estate__status i, .hero__scrollcue i { animation: none !important; }
}
