/* ============================================================
   ESSENCE by Gaspar Villarreal — design mockup
   Luxury editorial florist · fixed-viewport stage, scrolls in place
   ============================================================ */

:root {
  --ivory: #f7f3ec;
  --ivory-deep: #efe8db;
  --ink: #1e2b23;
  --ink-deep: #15201a;
  --gold: #b99a5f;
  --gold-soft: #cdb486;
  --blush: #e8d3ca;
  --blush-deep: #d9b8ae;
  --rose: #b07f70;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Futura", sans-serif;

  --pad: clamp(1.5rem, 5vw, 6rem);
  --ease-lux: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: auto; }

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

img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ============ grain & atmosphere ============ */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 200;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ persistent chrome ============ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--pad);
  mix-blend-mode: normal;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ivory);
}

.monogram { width: 34px; height: 34px; color: var(--gold-soft); flex: none; }

.nav-wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-wordmark em {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 300;
  font-size: 0.52rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.nav-locale {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 0.75;
}

.nav-cta {
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  border: 1px solid color-mix(in srgb, var(--gold) 70%, transparent);
  padding: 0.75rem 1.7rem;
  border-radius: 99px;
  transition: background 0.45s var(--ease-lux), color 0.45s var(--ease-lux), border-color 0.45s;
}

.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--ink-deep); }

/* nav recolors over light panels */
body.nav-dark .nav-brand,
body.nav-dark .nav-locale,
body.nav-dark .nav-cta { color: var(--ink); }
body.nav-dark .monogram { color: var(--gold); }
body.nav-dark .nav-cta:hover { color: var(--ivory); }

.site-nav, .rail, .counter { transition: color 0.5s; }

/* progress rail */
.rail {
  position: fixed;
  right: clamp(0.9rem, 2.5vw, 2.4rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.rail-dot {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.4s, transform 0.4s;
}

.rail-dot.is-active { background: var(--gold-soft); transform: scale(1.25); }

.rail-dot span {
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.rail-dot:hover span, .rail-dot.is-active span { opacity: 0.9; }

/* counter, bottom-left */
.counter {
  position: fixed;
  left: var(--pad);
  bottom: 1.6rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  color: var(--ivory);
}

.counter-num { font-size: 1.5rem; font-weight: 400; }
.counter-rule { width: 2.6rem; height: 1px; background: color-mix(in srgb, var(--gold-soft) 65%, transparent); }
.counter-total { font-size: 0.85rem; opacity: 0.55; }

.counter-label {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-left: 0.5rem;
}

body.nav-dark .counter { color: var(--ink); }

/* ============ the stage ============ */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.runway { width: 1px; }

.panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: clip-path;
}

.panel-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
}

.panel-bg { position: absolute; inset: 0; }
.panel-bg img { will-change: transform; }

.veil { position: absolute; inset: 0; }

/* shared type */
.eyebrow {
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.display em { font-style: italic; font-weight: 300; color: var(--gold); }

.body-copy {
  font-weight: 300;
  font-size: clamp(0.88rem, 1.05vw, 1.02rem);
  line-height: 1.85;
  max-width: 42ch;
  opacity: 0.88;
}

/* extra padding keeps italic descenders (g, y, f) inside the reveal mask;
   negative margin cancels it out so line spacing is unchanged */
.line {
  display: block;
  overflow: hidden;
  padding: 0.05em 0.15em 0.18em;
  margin: -0.05em -0.15em -0.18em;
}
.line > span { display: inline-block; will-change: transform; }

/* ---------- 01 hero ---------- */
.panel--hero { background: var(--ink-deep); color: var(--ivory); }

.veil--hero {
  background:
    linear-gradient(to bottom, rgba(21, 32, 26, 0.62), rgba(21, 32, 26, 0.28) 45%, rgba(21, 32, 26, 0.75)),
    radial-gradient(ellipse at center, transparent 30%, rgba(21, 32, 26, 0.45));
}

.panel--hero .panel-bg { background: linear-gradient(160deg, #2a3d31, #15201a); }

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--pad);
}

.hero-eyebrow { overflow: hidden; }
.hero-eyebrow span { display: inline-block; color: var(--gold-soft); }

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.2rem, 12.5vw, 12rem);
  line-height: 0.95;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
  margin: 1.4rem 0 0.6rem;
  text-indent: 0.1em; /* optically recenter for tracking */
}

.hero-title .ltr { display: inline-block; will-change: transform; }

.hero-by {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.1vw, 1.7rem);
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}

.by-rule { width: clamp(2rem, 6vw, 5rem); height: 1px; background: color-mix(in srgb, var(--gold) 55%, transparent); }

.hero-tag {
  margin-top: 2.4rem;
  font-weight: 200;
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero-tag em {
  font-family: var(--serif);
  font-size: 1.25em;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--gold-soft);
}

.scroll-cue {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.56rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.cue-line {
  width: 1px;
  height: 4.2rem;
  background: linear-gradient(to bottom, var(--gold-soft), transparent);
  animation: cue 2.4s var(--ease-lux) infinite;
  transform-origin: top;
}

@keyframes cue {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); transform-origin: top; }
  46% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 02 philosophy ---------- */
.panel--philosophy { background: var(--ivory); color: var(--ink); }

.ghost-word {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(8rem, 26vw, 24rem);
  color: color-mix(in srgb, var(--gold) 11%, transparent);
  white-space: nowrap;
  user-select: none;
}

.philosophy-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--pad);
  gap: 2.2rem;
}

.ornament { width: 40px; height: 40px; color: var(--gold); }
.ornament--lg { width: 54px; height: 54px; }

.statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  line-height: 1.14;
}

.statement em { font-style: italic; font-weight: 300; color: var(--gold); }

.philosophy-copy {
  font-weight: 300;
  font-size: clamp(0.85rem, 1vw, 0.98rem);
  line-height: 1.9;
  max-width: 52ch;
  opacity: 0.8;
}

/* ---------- 03/04 split panels ---------- */
.panel--weddings { background: var(--ink); color: var(--ivory); }
.panel--quince { background: var(--blush); color: var(--ink); }

.split {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding: clamp(5rem, 10vh, 7rem) var(--pad);
}

.split--mirror .split-text { order: 2; }
.split--mirror .split-media { order: 1; }

.split-text { display: flex; flex-direction: column; gap: 1.6rem; max-width: 34rem; }

.panel--weddings .display em { color: var(--gold-soft); }
.panel--quince .eyebrow { color: var(--rose); }
.panel--quince .display em { color: var(--rose); }

.service-list {
  list-style: none;
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
}

.service-list li {
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.85rem 0;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.service-list li::before {
  content: "—";
  color: var(--gold);
  margin-right: 0.9rem;
}

.panel--quince .service-list li::before { color: var(--rose); }

.split-media {
  position: relative;
  height: min(68vh, 620px);
  justify-self: center;
  width: min(100%, 30rem);
}

.split-media img { will-change: transform; }

.frame-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(1.1rem, 1.1rem);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  pointer-events: none;
}

.panel--quince .frame-gold::after { border-color: color-mix(in srgb, var(--rose) 50%, transparent); }

.split-media figcaption {
  position: absolute;
  bottom: -2.2rem;
  left: 0;
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* gradient placeholders behind every photo */
.split-media, .panel-bg, .g-item {
  background: linear-gradient(150deg, #3a4f41, #1e2b23);
}

.panel--quince .split-media { background: linear-gradient(150deg, var(--blush-deep), var(--rose)); }

/* ---------- 05 florals ---------- */
.panel--florals { background: var(--ink-deep); color: var(--ivory); }

.veil--florals {
  background:
    linear-gradient(100deg, rgba(21, 32, 26, 0.88) 18%, rgba(21, 32, 26, 0.45) 55%, rgba(21, 32, 26, 0.2)),
    linear-gradient(to top, rgba(21, 32, 26, 0.55), transparent 40%);
}

.florals-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 0 var(--pad);
  max-width: 46rem;
}

.florals-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 7.2vw, 6.4rem);
  line-height: 1.04;
}

.florals-title em { font-style: italic; font-weight: 300; color: var(--gold-soft); }

/* ---------- 06 gallery ---------- */
.panel--gallery { background: var(--ivory-deep); color: var(--ink); }

.gallery-head {
  position: absolute;
  top: clamp(5.4rem, 12vh, 8rem);
  left: var(--pad);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.gallery-head .display { font-size: clamp(2rem, 4.2vw, 3.6rem); }

.gallery-track {
  position: absolute;
  bottom: clamp(4.5rem, 11vh, 7rem);
  left: 0;
  display: flex;
  align-items: flex-end;
  gap: clamp(1.4rem, 3vw, 3rem);
  padding-left: var(--pad);
  padding-right: var(--pad);
  will-change: transform;
}

.g-item {
  position: relative;
  flex: none;
  width: clamp(240px, 26vw, 400px);
  height: clamp(300px, 38vh, 420px);
}

.g-item--tall { height: clamp(360px, 48vh, 520px); }

.g-item figcaption {
  position: absolute;
  bottom: -1.9rem;
  left: 0;
  font-size: 0.56rem;
  font-weight: 300;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.6;
  white-space: nowrap;
}

.g-end {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
}

.g-end p {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.3;
}

.g-end em { color: var(--gold); font-weight: 300; }

/* ---------- 07 contact ---------- */
.panel--contact { background: var(--ink-deep); color: var(--ivory); }

.panel--contact .panel-inner {
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, color-mix(in srgb, var(--gold) 14%, transparent), transparent),
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(58, 79, 65, 0.55), transparent);
}

.contact-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--pad);
  gap: 2.2rem;
}

.contact-content .ornament--lg { color: var(--gold-soft); }

.contact-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 1.08;
}

.contact-title em { font-style: italic; font-weight: 300; color: var(--gold-soft); }

.contact-cta {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-deep);
  background: var(--gold);
  padding: 1.15rem 2.8rem;
  border-radius: 99px;
  transition: background 0.45s var(--ease-lux), transform 0.45s var(--ease-lux);
}

.contact-cta:hover { background: var(--gold-soft); transform: translateY(-2px); }

.contact-meta {
  display: flex;
  gap: clamp(1.6rem, 5vw, 4.5rem);
  margin-top: 0.6rem;
}

.contact-meta p {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.meta-label {
  font-family: var(--sans);
  font-size: 0.56rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.colophon {
  position: absolute;
  bottom: 1.7rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.38;
  white-space: nowrap;
}

/* ============ static fallback (no JS / reduced motion) ============ */
body.static .stage { position: static; overflow: visible; }
body.static .panel { position: relative; min-height: 100vh; clip-path: none !important; }
body.static .panel-inner,
body.static .hero-content,
body.static .philosophy-content,
body.static .florals-content,
body.static .contact-content,
body.static .split { position: relative; inset: auto; min-height: 100vh; }
body.static .panel-bg { position: absolute; }
body.static .runway, body.static .scroll-cue { display: none; }
body.static .gallery-track { position: relative; bottom: auto; overflow-x: auto; padding-bottom: 4rem; }
body.static .gallery-head { position: relative; top: auto; padding: 7rem var(--pad) 3rem; }
body.static .rail, body.static .counter { display: none; }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .nav-locale { display: none; }
  .nav-wordmark { font-size: 1.05rem; }
  .rail-dot span { display: none; }
  .counter-label { display: none; }

  .split {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 2.4rem;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .split--mirror .split-text { order: 1; }
  .split--mirror .split-media { order: 2; }

  .split-media { height: 32vh; width: 100%; }
  .split-media figcaption { display: none; }
  .service-list li { padding: 0.6rem 0; font-size: 0.66rem; }
  .body-copy { font-size: 0.84rem; line-height: 1.7; }

  .gallery-head { top: 5.4rem; }
  .gallery-track { bottom: 4rem; }
  .g-item { width: 64vw; height: 38vh; }
  .g-item--tall { height: 44vh; }

  .contact-meta { flex-direction: column; gap: 1.2rem; }
  .colophon { white-space: normal; width: 88%; }
}

@media (prefers-reduced-motion: reduce) {
  .cue-line { animation: none; }
}
