/* Pathik Grand | coming soon
   Golden black theme. One accent (gold), one radius rule:
   pill (999px) for anything you click or type in, 20px for panels.
   One authored animation: light rising through the doorway. Everything else that
   moves is feedback (typing errors, loading, success, countdown ticks). */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/outfit-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/outfit-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/outfit-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  --bg: #06231a;
  --ink: #f3ead3;
  --muted: #cdc3a8;
  --soft: #aaa68f;
  --gold: #d7ae60;
  --gold-hi: #e8cb8e;
  --on-gold: #0a2016;
  --line: rgb(215 174 96 / .26);
  --error: #f2a28f;

  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* Side padding grows on notched phones so nothing sits under the notch */
  --pad: clamp(20px, 5vw, 64px);
  --pad-l: max(var(--pad), env(safe-area-inset-left));
  --pad-r: max(var(--pad), env(safe-area-inset-right));
  --bar-h: 72px;

  /* z-index scale: only these layers exist */
  --z-bg: 0;
  --z-page: 1;
  --z-bar: 10;
  --z-skip: 30;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 24px); /* the fixed header never covers a focused field */
  scrollbar-color: #2d5a43 var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--on-gold); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
a, button, input { touch-action: manipulation; }

.skip {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: var(--z-skip);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  transition: top .25s var(--ease);
}
.skip:focus { top: 12px; }

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* ---------- Atmosphere ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  background:
    radial-gradient(900px 640px at 80% 34%, rgb(4 71 43 / .75), transparent 66%),
    radial-gradient(800px 560px at 6% 96%, rgb(215 174 96 / .06), transparent 62%),
    var(--bg);
}

/* ---------- Header ---------- */

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bar);
  height: var(--bar-h);
  padding: 0 var(--pad-r) 0 var(--pad-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgb(6 35 26 / .85), rgb(6 35 26 / 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: color .3s ease;
}
.brand:hover { color: var(--gold-hi); }

.brand__logo { display: block; width: auto; height: 40px; }

.brand__name {
  font: 400 1.05rem/1 var(--display);
  letter-spacing: .3em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  font: 500 14px/1 var(--sans);
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .4s var(--ease), background-color .3s ease, border-color .3s ease, filter .3s ease;
}
.btn:hover { transform: translate3d(0, -1px, 0); }
.btn:active { transform: scale(.98); }

.btn--ghost {
  border: 1px solid rgb(232 203 142 / .4);
  background: transparent;
  color: var(--gold-hi);
}
.btn--ghost:hover {
  border-color: var(--gold-hi);
  background: rgb(215 174 96 / .12);
}

.btn--gold {
  height: 52px;
  padding: 0 8px 0 26px;
  background: linear-gradient(180deg, #ecd29b, #d7ae60);
  color: var(--on-gold);
}
.btn--gold:hover { filter: brightness(1.07); }

.btn__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--on-gold);
  color: var(--gold-hi);
  transition: transform .5s var(--ease);
}
.btn--gold:hover .btn__icon { transform: translate3d(2px, -2px, 0); }

/* Loading: a light sweep across the button instead of a spinner */
.btn.is-loading { pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .45) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sweep 1.1s linear infinite;
}

/* ---------- Layout ---------- */

.page {
  position: relative;
  z-index: var(--z-page);
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* the page never grows wider than the screen */
  grid-template-rows: 1fr auto;
}

.hero {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding: calc(var(--bar-h) + 16px) var(--pad-r) 32px var(--pad-l);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  align-content: center;
}

.hero__copy { max-width: 640px; }

.title {
  margin: 0;
  font: 300 clamp(2.7rem, 5.6vw, 5.3rem)/1.04 var(--display);
  letter-spacing: -.02em;
  text-wrap: balance;
  color: var(--ink);
}
.title .line { display: block; }

/* Each word sits in a mask so it can rise into view. Padding keeps ascenders and
   italic overhang from being clipped by the mask. */
.word {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  padding: .09em .16em .12em 0;
  margin: -.09em -.16em -.12em 0;
}
.word > span { display: inline-block; }
.title em { font-style: italic; font-weight: 300; color: var(--gold-hi); }

.sub {
  margin: 28px 0 0;
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  text-wrap: pretty;
  color: var(--muted);
}

/* ---------- Sign up ---------- */

.signup { margin-top: 36px; max-width: 560px; }

.signup__label {
  display: block;
  margin: 0 0 10px 4px;
  font: 400 13px/1.2 var(--sans);
  letter-spacing: .04em;
  color: var(--muted);
}

.field { display: flex; gap: 10px; align-items: stretch; }

.field__box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 20px;
  border: 1px solid rgb(232 203 142 / .3);
  border-radius: 999px;
  background: rgb(255 255 255 / .035);
  transition: border-color .3s ease, background-color .3s ease;
}
.field__box:hover { border-color: rgb(232 203 142 / .5); }
.field__box:focus-within {
  border-color: var(--gold-hi);
  background: rgb(255 255 255 / .05);
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}
.field__icon { color: var(--gold); font-size: 1.15rem; }
.field__box.is-valid { border-color: rgb(232 203 142 / .62); }

/* Leaving: the form steps aside before the thank-you appears */
.signup.is-leaving { opacity: 0; transform: translate3d(0, -8px, 0); transition: opacity .32s ease, transform .32s ease; pointer-events: none; }
.done__email { color: var(--gold-hi); overflow-wrap: anywhere; }

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--gold-hi);
  font: 300 16px/1 var(--sans);
  letter-spacing: .01em;
}
.field input::placeholder { color: #a39f89; opacity: 1; }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 40px #0a2c20 inset;
}

.signup.is-invalid .field__box {
  border-color: var(--error);
  outline: 2px solid var(--error);
  outline-offset: 3px;
}

.signup__help { margin: 12px 0 0 4px; font: 400 13px/1.5 var(--sans); color: var(--soft); }

/* The icon means the error is not carried by colour alone */
.signup__error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0 4px;
  font: 400 14px/1.5 var(--sans);
  color: var(--error);
}
.signup__error .icon { margin-top: .2em; }

/* Spam trap, kept off-screen rather than display:none so naive bots still fill it */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.done {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 560px;
  margin-top: 36px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(215 174 96 / .06);
  outline: 0;
}
.done__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ecd29b, #d7ae60);
  color: var(--on-gold);
  font-size: 1.35rem;
}
.done__title { margin: 0; font: 400 1.6rem/1.15 var(--display); color: var(--ink); }
.done__text { margin: 4px 0 0; font: 300 .98rem/1.5 var(--sans); color: var(--muted); }

/* ---------- Doorway visual ---------- */

.hero__visual { display: flex; justify-content: center; align-items: center; }

.arch {
  position: relative;
  height: min(calc(100dvh - 200px), 620px);
  min-height: 380px;
  aspect-ratio: 4 / 5.35;
  max-width: 100%;
}

.arch__shell {
  position: absolute;
  inset: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px 999px 28px 28px;
  background: linear-gradient(180deg, rgb(215 174 96 / .08), rgb(215 174 96 / .02));
}

.arch__core {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  container-type: size;
  border-radius: 999px 999px 20px 20px;
  background: radial-gradient(120% 85% at 50% 100%, #0d6a40 0%, #04472b 42%, #052a1c 100%);
}

.arch__photo {
  position: absolute;
  inset: -14px; /* a little spare picture, so the depth shift never shows an edge */
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 1.2s ease, transform 2.6s var(--ease);
}
.arch.has-photo .arch__photo { opacity: 1; transform: scale(1); }

.arch__logo {
  position: absolute;
  z-index: 3;
  top: 15%;
  left: 50%;
  width: 58%;
  height: auto;
  translate: -50% 0;
  filter: drop-shadow(0 6px 22px rgb(6 35 26 / .55));
  pointer-events: none;
}

.arch__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgb(6 35 26 / .28) 0%, rgb(6 35 26 / 0) 36%, rgb(6 35 26 / 0) 54%, rgb(6 35 26 / .8) 100%);
}

.arch__glow {
  position: absolute;
  left: 50%;
  bottom: -14%;
  z-index: 2;
  width: 125%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(236 206 140 / .46), rgb(215 174 96 / .16) 46%, transparent 70%);
  mix-blend-mode: screen;
  transform: translateX(-50%);
}
.arch.has-photo .arch__glow { mix-blend-mode: soft-light; }

/* A single bright pass that opens the doorway when someone joins the list */
.arch__flare {
  position: absolute;
  left: 50%;
  bottom: -10%;
  z-index: 2;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(247 230 186 / .8), rgb(232 203 142 / .25) 50%, transparent 72%);
  mix-blend-mode: screen;
  opacity: 0;
  translate: -50% 0;
  pointer-events: none;
}
.arch__shell { transition: border-color 1.2s ease; }
.arch.is-lit .arch__shell { border-color: rgb(232 203 142 / .55); }

/* Arch outlines that rise and fade, like light coming through a doorway */
.arch__rings { position: absolute; inset: 0; z-index: 2; }
.arch__rings i {
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 78%;
  height: 72%;
  border: 1px solid rgb(232 203 142 / .62);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  opacity: 0;
  transform: translateX(-50%) scale(.2);
  transform-origin: 50% 100%;
}

/* Dust catching the light. They drift upward (movement, not status), and stop with the rest. */
.arch__motes { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.arch__motes i {
  position: absolute;
  bottom: -8px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--gold-hi);
  opacity: 0;
}

.countdown {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 14px 28px;
  text-align: center;
}
.countdown > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.countdown__n {
  display: inline-block;
  font: 400 clamp(1.7rem, 3vw, 2.5rem)/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.countdown__l {
  font: 400 11px/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.foot {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding: 12px var(--pad-r) calc(16px + env(safe-area-inset-bottom)) var(--pad-l);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 20px;
  font: 400 13px/1.4 var(--sans);
  color: var(--soft);
}
.foot p { margin: 0; }

.motion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font: 400 13px/1 var(--sans);
  cursor: pointer;
  transition: color .3s ease, background-color .3s ease;
}
.motion:hover { color: var(--gold-hi); background: rgb(215 174 96 / .1); }

/* ---------- Motion (only when the visitor has not asked for less) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .bar { animation: fade-down 1s var(--ease) .1s both; }

  .rv { animation: rise .95s var(--ease) both; animation-delay: calc(var(--d, 0) * 1ms); }

  .word > span {
    animation: word-up 1.1s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 110ms + 250ms);
  }

  .arch { animation: arch-in 1.4s var(--ease) .35s both; }
  html:not(.is-still) .arch__glow { animation: breathe 7s ease-in-out infinite; }
  html:not(.is-still) .arch__rings i { animation: ring 10s linear infinite; animation-delay: calc(var(--k) * -2.5s); }
  html:not(.is-still) .arch__motes i { animation: mote var(--d) linear infinite; animation-delay: var(--dl); }

  .arch.is-lit .arch__flare { animation: flare 2.2s var(--ease) both; }
  .arch.is-lit .arch__glow { filter: brightness(1.35); }
  .arch__glow { transition: filter 1.6s ease; }

  /* Depth: on a mouse, the layers of the doorway drift a few pixels at different speeds */
  html:not(.is-still) .arch__photo,
  html:not(.is-still) .arch__glow,
  html:not(.is-still) .arch__rings,
  html:not(.is-still) .arch__motes {
    translate: calc(var(--px, 0) * var(--depth) * 1px) calc(var(--py, 0) * var(--depth) * 1px);
    transition: translate .9s var(--ease);
  }
  .arch__photo { --depth: -6; }
  .arch__glow { --depth: 10; }
  .arch__rings { --depth: 14; }
  .arch__motes { --depth: 20; }

  .done { animation: pop .7s var(--ease) both; }
  .done__icon { animation: pop .8s var(--ease) .15s both; }
  .field.is-shaking { animation: shake .45s ease; }
}

/* Still version of the doorway: used when the visitor asks for less motion, or presses
   "Pause animation". The arches stay as quiet concentric lines so the picture keeps its meaning. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arch__photo { transition: none; }
  .arch__rings i { opacity: .38; transform: translateX(-50%) scale(calc(.45 + var(--k) * .18)); }
}
html.is-still .arch__rings i { opacity: .38; transform: translateX(-50%) scale(calc(.45 + var(--k) * .18)); }

@keyframes flare { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fade-down { from { opacity: 0; transform: translate3d(0, -12px, 0); } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes word-up { from { transform: translate3d(0, 110%, 0); } }
@keyframes arch-in { from { opacity: 0; transform: translate3d(0, 36px, 0) scale(.965); } }
@keyframes breathe {
  0%, 100% { opacity: .72; transform: translateX(-50%) scale(.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}
@keyframes ring {
  0% { opacity: 0; transform: translateX(-50%) scale(.2); }
  14% { opacity: .7; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.05); }
}
@keyframes mote {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: .85; }
  85% { opacity: .45; }
  100% { opacity: 0; transform: translate3d(var(--dx), -105cqh, 0); }
}
@keyframes sweep { to { transform: translateX(100%); } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
@keyframes shake {
  20% { transform: translate3d(-6px, 0, 0); }
  40% { transform: translate3d(5px, 0, 0); }
  60% { transform: translate3d(-3px, 0, 0); }
  80% { transform: translate3d(2px, 0, 0); }
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 960px) {
  :root { --bar-h: 64px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    align-content: start;
    padding-top: calc(var(--bar-h) + 28px);
    padding-bottom: 48px;
  }
  .hero__copy { max-width: none; }
  .title { font-size: clamp(2.5rem, 10.5vw, 4.4rem); }

  .arch {
    height: auto;
    min-height: 0;
    width: min(84vw, 400px);
    aspect-ratio: 4 / 5.2;
  }
}

@media (max-width: 560px) {
  .brand__name { font-size: 1.02rem; letter-spacing: .2em; }
  .btn--ghost { height: 44px; padding: 0 18px; }

  .field { flex-direction: column; }
  .field__box { flex: none; } /* in a column, flex:1 would collapse the 52px height */
  .btn--gold { width: 100%; justify-content: space-between; padding-left: 24px; }

  .done { align-items: flex-start; }
  .countdown { padding: 0 8px 22px; }
}

/* Smallest phones: keep the wordmark on one line next to the header button */
@media (max-width: 380px) {
  .brand { gap: 10px; }
  .brand__name { font-size: .92rem; letter-spacing: .14em; white-space: nowrap; }
  .btn--ghost { padding: 0 14px; }
}
