:root {
  --velvet: #0B0B0D;
  --velvet-deep: #070709;
  --ivory: #EEE7D9;
  --ivory-dim: #ABA496;
  --champagne: #CDB88E;
  --champagne-hi: #F2E6C8;
  --hairline: rgba(205, 184, 142, .22);
  --hairline-soft: rgba(238, 231, 217, .09);
  --error: #E9AFA6;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Hoefler Text", "Times New Roman", serif;
  --sans: "Jost", "Futura", "Avenir Next", "Helvetica Neue", system-ui, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --ease-soft: cubic-bezier(.33, 0, .2, 1);

  --gutter: clamp(20px, 5vw, 64px);
  --stage: clamp(200px, min(64vw, 35dvh), 620px);
}

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

html {
  background: var(--velvet);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 70% at 50% 0%, #0E0E12 0%, var(--velvet) 55%, var(--velvet-deep) 100%);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Velvet grain, painted once and composited. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .96 0 0 0 0 .9 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
button, input { font: inherit; color: inherit; }
svg, canvas { display: block; }

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

:focus-visible {
  outline: 1px solid var(--champagne);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 50;
  padding: 12px 18px;
  background: var(--velvet);
  border: 1px solid var(--hairline);
  font: 500 .75rem/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform .4s var(--ease-out);
}
.skip:focus { transform: translate(-50%, 0); }

.label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: .75rem;
  letter-spacing: .3em;
  padding-left: .3em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

/* ---------------------------------------------------------------
   Masthead
   --------------------------------------------------------------- */
.masthead {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 0;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 2px 6px;
  text-decoration: none;
  color: var(--ivory);
}
.monogram { width: 40px; height: 40px; }
.monogram text { font-family: var(--serif); font-style: italic; font-weight: 500; }
/* The name is set as a maison logotype: serif capitals, widely spaced. */
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: .98rem;
  letter-spacing: .24em;
  padding-left: .24em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  color: var(--ivory);
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 100px) var(--gutter) 40px;
  text-align: center;
  overflow: clip;
  isolation: isolate;
}

.stage {
  position: relative;
  width: var(--stage);
  height: var(--stage);
  flex: none;
}
/* The canvas is larger than its layout box: the stone sits in the
   middle and its halo may overlap neighbours without pushing them. */
.stage canvas, .stage .gem-fallback {
  position: absolute;
  left: -16%;
  top: -16%;
  width: 132%;
  height: 132%;
  pointer-events: none;
}
.gem-fallback { display: none; }
.no-webgl .gem-fallback { display: block; }
.no-webgl .stage canvas { display: none; }

/* Spotlight cone falling from the top of the room onto the stone */
.cone {
  position: absolute;
  left: 50%;
  bottom: 42%;
  width: 240%;
  height: 100vh;
  height: 100dvh;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(242, 230, 200, .075), rgba(242, 230, 200, .025) 62%, rgba(242, 230, 200, 0));
  clip-path: polygon(46.5% 0, 53.5% 0, 69% 100%, 31% 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 70%, transparent 100%);
}
/* Pool of light on the velvet */
.pool {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300%;
  height: 220%;
  transform: translate(-50%, -48%);
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(closest-side, rgba(66, 60, 54, .42), rgba(34, 32, 34, .22) 45%, rgba(11, 11, 13, 0) 100%);
}
/* Coloured light that passes through the stone and lands on the velvet */
.caustic {
  position: absolute;
  left: 50%;
  bottom: -7%;
  width: 86%;
  height: 22%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
}
.caustic span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 2.4s var(--ease-soft);
}
.caustic span.on { opacity: .16; }

/* Opening beam */
.beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: 1px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(90deg, rgba(242, 230, 200, 0), rgba(255, 248, 232, .95) 50%, rgba(242, 230, 200, 0));
  box-shadow: 0 0 14px 1px rgba(242, 230, 200, .35);
  opacity: 0;
  transform: translateX(-150%);
}

.specimen {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--stage) * -.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: opacity .7s var(--ease-soft), transform .9s var(--ease-out);
}
.specimen.is-out { opacity: 0; transform: translateY(5px); }
.specimen-name {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--champagne);
  white-space: nowrap;
}
/* Shimmer: a soft window travels across the name while its contents
   counter-travel, so the light moves and the letters stay put.
   Transform only. */
.shine {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 34%;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 50%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 50%, transparent);
}
.shine-inner {
  position: absolute;
  top: 0; left: 0;
  width: 294.1176%;
  color: var(--champagne-hi);
  transform: translateX(34%);
}
@keyframes shine-window {
  0% { transform: translateX(-100%); }
  26%, 100% { transform: translateX(294.1176%); }
}
@keyframes shine-text {
  0% { transform: translateX(34%); }
  26%, 100% { transform: translateX(-100%); }
}
.specimen-facts {
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .26em;
  padding-left: .26em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.headline {
  position: relative;
  z-index: 2;
  margin-top: clamp(18px, 3dvh, 36px);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -.005em;
  color: var(--ivory);
}
.hl-line { display: block; }
.hl-line + .hl-line {
  font-style: italic;
  color: var(--champagne-hi);
}
.word { display: inline-block; white-space: nowrap; }
.char { display: inline-block; }

.lede {
  position: relative;
  z-index: 2;
  max-width: 31em;
  margin-top: clamp(12px, 2dvh, 22px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.12rem, 1.02rem + .35vw, 1.3rem);
  line-height: 1.42;
  color: var(--ivory-dim);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------
   Invitation form
   --------------------------------------------------------------- */
.access {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 540px;
  margin-top: clamp(18px, 3dvh, 34px);
}
.signup {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity .6s var(--ease-soft), transform .8s var(--ease-out);
}
.signup.is-leaving { opacity: 0; transform: translateY(-6px); }
.signup[hidden] { display: none; }
.field {
  position: relative;
  flex: 1;
  text-align: left;
}
.field::before, .field::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
}
.field::before { background: rgba(238, 231, 217, .26); }
.field::after {
  background: var(--champagne);
  transform: scaleX(0);
  transition: transform .8s var(--ease-out);
}
.field:focus-within::after { transform: scaleX(1); }
.field.has-error::before, .field.has-error::after { background: var(--error); }
.field input {
  display: block;
  width: 100%;
  height: 48px;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: .02em;
  color: var(--ivory);
  caret-color: var(--champagne);
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: rgba(171, 164, 150, .72); opacity: 1; }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ivory);
  -webkit-box-shadow: 0 0 0 100px var(--velvet) inset;
  transition: background-color 9999s;
}

.cta {
  position: relative;
  min-height: 48px;
  padding: 0 30px;
  border: 1px solid rgba(205, 184, 142, .6);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  color: var(--champagne-hi);
  font-family: var(--sans);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  white-space: nowrap;
  isolation: isolate;
  transition: color .5s var(--ease-soft), border-color .5s var(--ease-soft);
}
.cta span { position: relative; padding-left: .26em; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, #BFA877, #EADBB6 55%, #C8B284);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .7s var(--ease-out);
}
.cta:hover, .cta:focus-visible { color: var(--velvet); border-color: var(--champagne); }
.cta:hover::before, .cta:focus-visible::before { transform: scaleX(1); }
.cta[aria-busy="true"] { cursor: progress; }
.cta[aria-busy="true"] span { opacity: .7; }

.signup-msg {
  min-height: 1.4em;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--ivory-dim);
  text-align: left;
}
.signup-msg.is-error { color: var(--error); }

.reserved {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 0 4px;
  outline: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1s var(--ease-soft), transform 1.2s var(--ease-out);
}
.reserved.is-in { opacity: 1; transform: none; }
.reserved[hidden] { display: none; }
.reserved-mark { width: 34px; height: 34px; margin-bottom: 6px; }
.reserved-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  line-height: 1.15;
  color: var(--champagne-hi);
}
.reserved-note { font-size: .9375rem; color: var(--ivory-dim); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.status {
  position: relative;
  z-index: 2;
  margin-top: clamp(24px, 4dvh, 48px);
  display: flex;
  align-items: center;
  gap: 14px;
}
.status::before, .status::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--hairline);
}
@media (max-width: 479px) {
  .status { letter-spacing: .22em; padding-left: .22em; white-space: nowrap; }
  .status::before, .status::after { display: none; }
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 36px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 32px);
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 8px;
}
.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-dim);
  transition: color .4s var(--ease-soft);
}
.footer a:hover { color: var(--champagne); }
.footer .mail {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--ivory);
}
.copyright { font-size: .75rem; color: var(--ivory-dim); letter-spacing: .06em; }

/* ---------------------------------------------------------------
   Opening sequence, timed from page load in CSS alone so the words
   never wait for script.js. The stone's light ramps in script.js on
   the same clock.
   0.15s beam sweeps · 0.65s light falls · 0.9s headline, letter by
   letter · 1.55s to 2.0s caption, text, form and masthead settle.
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .beam { animation: sweep 1.25s var(--ease-inout) .15s forwards; }
  .cone { animation: fade-in 1.8s var(--ease-soft) .65s backwards; }
  .pool { animation: fade-in 2.2s var(--ease-soft) .75s backwards; }
  .caustic { animation: fade-in 2.2s var(--ease-soft) .95s backwards; }
  .char { animation: rise-char 1.3s var(--ease-out) calc(.9s + var(--i) * 34ms) backwards; }
  .specimen-wrap { animation: rise 1.4s var(--ease-out) 1.55s backwards; }
  .lede { animation: rise 1.4s var(--ease-out) 1.67s backwards; }
  .access { animation: rise 1.4s var(--ease-out) 1.79s backwards; }
  .status { animation: rise 1.4s var(--ease-out) 1.93s backwards; }
  .masthead { animation: rise 1.4s var(--ease-out) 2.05s backwards; }
  .shine { animation: shine-window 9s var(--ease-inout) 3.4s infinite; }
  .shine-inner { animation: shine-text 9s var(--ease-inout) 3.4s infinite; }
}
@keyframes sweep {
  0% { transform: translateX(-150%); opacity: 0; }
  18% { opacity: 1; }
  78% { opacity: .9; }
  100% { transform: translateX(50%); opacity: 0; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise-char { from { opacity: 0; transform: translateY(.32em); } }

/* ---------------------------------------------------------------
   Larger screens
   --------------------------------------------------------------- */
@media (min-width: 560px) {
  .signup { flex-direction: row; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
  .signup-msg { flex-basis: 100%; margin-top: -4px; }
  .cta { flex: none; }
}
@media (min-width: 720px) {
  .brand { gap: 13px; }
  .monogram { width: 48px; height: 48px; }
  .wordmark { font-size: 1.18rem; letter-spacing: .3em; padding-left: .3em; }
}
@media (min-width: 900px) {
  :root { --stage: clamp(260px, min(46vw, 43dvh), 600px); }
  .masthead { padding-top: 28px; }
  .hero { padding-top: 132px; padding-bottom: 56px; }
  .specimen-name { font-size: 1.6rem; }
}
/* Short phones: tighten so gem, headline and form stay above the fold. */
@media (max-width: 559px) and (max-height: 700px) {
  :root { --stage: clamp(176px, min(62vw, 31dvh), 400px); }
  .hero { padding-top: calc(env(safe-area-inset-top, 0px) + 92px); padding-bottom: 28px; }
  .lede { font-size: 1.06rem; line-height: 1.36; }
  .signup { gap: 10px; }
  .specimen { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .shine { display: none; }
}
