/* ── Brand tokens ── */
:root {
  --champagne: #f0e6d6;
  --champagne-deep: #e8dcc8;
  --midnight: #0f1a2e;
  --midnight-70: rgba(15, 26, 46, 0.7);
  --midnight-50: rgba(15, 26, 46, 0.5);
  --midnight-40: rgba(15, 26, 46, 0.4);
  --midnight-30: rgba(15, 26, 46, 0.3);
  --midnight-10: rgba(15, 26, 46, 0.1);
  --gold: #c9a55c;
  --gold-rich: #b8923f;
  --gold-light: #e2c98a;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
}

/* ── Reset & base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--champagne);
  color: var(--midnight);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Preloader ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--champagne);
  transition: opacity 0.8s ease;
  overflow: hidden;
}

.preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader__visual {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 1.25rem;
}

.preloader__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader__glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 146, 63, 0.3) 0%, transparent 70%);
  opacity: 0;
  will-change: transform, opacity;
}

.preloader__rings {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(184, 146, 63, 0.45);
  opacity: 0;
}

.preloader__ring:nth-child(1) { width: 3.5rem; height: 3.5rem; }
.preloader__ring:nth-child(2) { width: 4.5rem; height: 4.5rem; }
.preloader__ring:nth-child(3) { width: 5.5rem; height: 5.5rem; }

.preloader__particles {
  position: absolute;
  width: 4.5rem;
  height: 4.5rem;
  pointer-events: none;
}

.preloader__particles span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: #b8923f;
  opacity: 0;
  box-shadow: 0 0 4px rgba(184, 146, 63, 0.8);
}

.preloader__icon {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  will-change: transform;
}

.preloader__progress {
  width: 8rem;
  height: 2px;
  margin-bottom: 1.25rem;
  background: rgba(15, 26, 46, 0.08);
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
}

.preloader__progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold-rich));
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(201, 165, 92, 0.5);
}

.preloader__label {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--midnight);
  opacity: 0;
}

/* ── Main layout ── */
.main {
  position: relative;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.main.is-visible {
  opacity: 1;
}

/* ── Parallax orbs ── */
.parallax {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.parallax__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  will-change: transform;
}

.parallax__orb--1 {
  top: -25%;
  left: -25%;
  width: 60vh;
  height: 60vh;
  background: rgba(201, 165, 92, 0.05);
}

.parallax__orb--2 {
  top: 33%;
  right: -25%;
  width: 50vh;
  height: 50vh;
  background: rgba(15, 26, 46, 0.03);
}

.parallax__orb--3 {
  bottom: -25%;
  left: 33%;
  width: 45vh;
  height: 45vh;
  background: rgba(226, 201, 138, 0.08);
}

/* ── Film grain ── */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.035;
  mix-blend-mode: multiply;
  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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 4rem 1.5rem 8rem;
}

.hero__logo {
  width: 100%;
  max-width: 280px;
}

.hero__tagline {
  margin-top: 2rem;
  max-width: 28rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--midnight-70);
  opacity: 0;
}

.hero__tagline span {
  color: var(--midnight-50);
}

.hero__cta {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 28rem;
  opacity: 0;
}

/* ── Subscribe form ── */
.subscribe__label {
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--midnight-50);
}

.subscribe__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.subscribe__input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--midnight-10);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--midnight);
  font-size: 0.875rem;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.subscribe__input::placeholder {
  color: rgba(15, 26, 46, 0.35);
}

.subscribe__input:focus {
  outline: none;
  border-color: rgba(201, 165, 92, 0.5);
  box-shadow: 0 0 0 3px rgba(201, 165, 92, 0.2);
}

.subscribe__input:disabled {
  opacity: 0.6;
}

.subscribe__btn {
  padding: 0.75rem 2rem;
  border: 1px solid rgba(201, 165, 92, 0.4);
  border-radius: 9999px;
  background: transparent;
  color: var(--midnight);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.subscribe__btn:hover:not(:disabled) {
  border-color: var(--gold-rich);
  background: var(--gold-rich);
  color: #fff;
}

.subscribe__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.subscribe__message {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
}

.subscribe__message.is-success {
  color: var(--gold-rich);
}

.subscribe__message.is-error {
  color: rgba(220, 38, 38, 0.8);
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 10;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(15, 26, 46, 0.05);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

.footer__copy {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--midnight-40);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.footer__social a {
  color: var(--midnight-30);
  transition: color 0.3s;
}

.footer__social a:hover {
  color: var(--gold);
}

.footer__social svg {
  width: 1rem;
  height: 1rem;
}

/* ── Scroll spacer for parallax ── */
.scroll-spacer {
  height: 30vh;
}

/* ── Responsive ── */
@media (min-width: 640px) {
  .hero__logo {
    max-width: 320px;
  }

  .hero__tagline {
    font-size: 1.5rem;
  }

  .subscribe__form {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .hero__logo {
    max-width: 360px;
  }

  .footer__inner {
    flex-direction: row;
  }
}

/* ── Floating animation fallback (before GSAP loads) ── */
.logo-pill-anim,
.logo-leaf-anim {
  will-change: transform;
}

/* ── Hero sparkle burst ── */
.hero__sparkles {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.hero__sparkles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0;
  box-shadow: 0 0 6px rgba(201, 165, 92, 0.8);
}
