/* ---------- TOKENS ---------- */
:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --gold: #c9a35a;
  --gold-soft: #8a7340;
  --cream: #f3eedf;
  --ink: #ededed;
  --ink-mute: #8b8579;
  --rule: rgba(201, 163, 90, 0.18);
  --max: 1280px;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --pad-y: clamp(3rem, 8vw, 6rem);
  --display: 'Italiana', 'Cormorant Garamond', Georgia, serif;
  --display-mark: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
  overscroll-behavior: none;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior: none;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ---------- TOP BAR ---------- */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad-x);
  background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0));
  pointer-events: none;
}
.top-bar > * { pointer-events: auto; }

.word-mark {
  font-family: var(--display-mark);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--cream);
  opacity: 0.95;
}

.socials-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-mute);
}
.socials-top a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-mute);
  transition: color 220ms var(--ease), border-color 220ms var(--ease), transform 220ms var(--ease);
}
.socials-top a:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.socials-top a:active { transform: translateY(0) scale(0.97); }

/* ---------- HERO STRUCTURE ---------- */
.scroll-hero {
  position: relative;
  height: 220vh;
  background: var(--bg);
}
.sticky-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- HERO CANVAS (FULL BACKGROUND) ---------- */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}
#eggCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- HERO SCRIM (between canvas and content for text legibility) ---------- */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to right,
    var(--bg) 0%,
    rgba(0,0,0,0.92) 22%,
    rgba(0,0,0,0.55) 45%,
    rgba(0,0,0,0.15) 60%,
    transparent 75%);
}

/* ---------- HERO CONTENT (LEFT OVERLAY) ---------- */
.hero-content {
  position: relative;
  z-index: 3;
  width: min(48%, 560px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: 0 var(--pad-x);
  padding-left: max(var(--pad-x), calc((100vw - var(--max)) / 2 + var(--pad-x)));
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw + 0.8rem, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
  color: var(--cream);
}

.lede {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.1rem);
  color: var(--ink-mute);
  line-height: 1.65;
}

/* ---------- FORM ---------- */
.capture {
  display: grid;
  gap: 0.6rem;
  max-width: 460px;
  margin-top: 0.25rem;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1.15rem;
  transition: border-color 220ms var(--ease), background 220ms var(--ease);
}
.field-row:focus-within {
  border-color: var(--gold);
  background: #050505;
}
.field-row input {
  appearance: none;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.75rem 0.25rem;
  min-width: 0;
}
.field-row input::placeholder { color: var(--ink-mute); }

/* Kill browser autofill's white/cream background and dark text override */
.field-row input:-webkit-autofill,
.field-row input:-webkit-autofill:hover,
.field-row input:-webkit-autofill:focus,
.field-row input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-soft) inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}
.field-row button {
  appearance: none;
  border: 0;
  background: var(--gold);
  color: #1a1408;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  transition: transform 180ms var(--ease), background 220ms var(--ease);
  white-space: nowrap;
}
.field-row button:hover { background: #d8b264; }
.field-row button:active { transform: scale(0.97); }
.form-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-mute);
  padding-left: 1.2rem;
}

/* ---------- SUCCESS STATE ---------- */
.capture-success {
  max-width: 460px;
  display: grid;
  gap: 0.4rem;
  animation: successFadeIn 600ms var(--ease) both;
}
.capture-success[hidden] { display: none; }
.success-headline {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 2vw + 0.8rem, 2.2rem);
  line-height: 1.05;
  color: var(--cream);
  letter-spacing: -0.005em;
}
.success-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}
@keyframes successFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- SECONDARY CTA ROW ---------- */
.secondary {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
.inquire {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  display: inline-block;
  padding-bottom: 0.18rem;
}

/* ---------- SLIDE-IN ENTRANCE ---------- */
.hero-content > * {
  opacity: 0;
  transform: translateX(-24px);
  animation: slideInLeft 900ms var(--ease) forwards;
}
.reveal-1 { animation-delay: 150ms; }
.reveal-2 { animation-delay: 320ms; }
.reveal-3 { animation-delay: 490ms; }
.reveal-4 { animation-delay: 660ms; }

@keyframes slideInLeft {
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- MOBILE: no egg, no scroll runway, just static content ---------- */
@media (max-width: 820px) {
  .scroll-hero {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .sticky-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
  .hero-canvas { display: none; }
  .hero-scrim { display: none; }
  .hero-content {
    width: 100%;
    height: auto;
    flex-grow: 1;
    padding: 6rem var(--pad-x) 3rem;
    justify-content: center;
    gap: 1.1rem;
  }
  .display { font-size: clamp(2.4rem, 9vw, 3.6rem); }
  .lede { font-size: 0.95rem; max-width: 38ch; }
  .field-row {
    grid-template-columns: 1fr;
    padding: 0.4rem;
    border-radius: 16px;
  }
  .field-row input { padding: 0.85rem 0.75rem; }
  .field-row button {
    width: 100%;
    border-radius: 12px;
    padding: 0.95rem 1rem;
  }
  .form-meta { padding-left: 0.5rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-content > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
