:root {
  --edge-top: #7085b5;    /* sky color at the top of the video */
  --edge-bottom: #3e2c3a; /* flower shade at the bottom of the video */
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.86);
  --ink-mute: rgba(255, 255, 255, 0.68);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --glass-edge: rgba(255, 255, 255, 0.42);
  --gold: #e9b44c;
  --plum: #2a1633;
  --serif: "Instrument Serif", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--edge-top);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

[hidden] { display: none !important; }

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

/* ───────── Background scene ───────── */

/* Absolute, not fixed: iPhone Safari paints a flat color bar over fixed layers
   at the screen edges, but lets normal page content show under its status bar and toolbar */
.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #8fb0dc url("assets/sky-poster.jpg") center / cover no-repeat;
}

.scene__parallax {
  position: absolute;
  inset: -4%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 1.6s var(--ease);
  will-change: transform;
}

.scene__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease;
  animation: drift 60s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: scale(1.03); }
  to   { transform: scale(1.1) translate3d(-1%, -0.5%, 0); }
}

.scene__petals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scene.is-playing .scene__video { opacity: 1; }

/* Soft tint so white type stays legible over the bright center of the image.
   The first and last layers fade the video into the colors Safari paints its bars with. */
.scene__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--edge-top) 0, rgba(112, 133, 181, 0) 90px),
    linear-gradient(0deg, var(--edge-bottom) 0, rgba(62, 44, 58, 0) 120px),
    radial-gradient(120% 70% at 50% 45%, rgba(44, 60, 120, 0.28) 0%, rgba(44, 60, 120, 0) 70%),
    linear-gradient(180deg, rgba(38, 62, 128, 0.30) 0%, rgba(38, 62, 128, 0) 35%, rgba(42, 22, 51, 0) 60%, rgba(42, 22, 51, 0.55) 100%);
}

.edge-tint {
  position: fixed;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 0; /* above the video, beneath the text */
  pointer-events: none;
}

.edge-tint--top    { top: 0;    background: var(--edge-top); }

/* Safari only reads a bottom strip this tall; the mask fades it so it doesn't look like a bar */
.edge-tint--bottom {
  bottom: 0;
  height: 80px;
  background-color: var(--edge-bottom);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000);
  mask-image: linear-gradient(180deg, transparent, #000);
}

/* ───────── Layout ───────── */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    max(28px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  text-align: center;
}

.brand__logo {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 4px 18px rgba(30, 20, 60, 0.35));
}

.hero {
  flex: 1;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0 32px;
}

.eyebrow {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 16px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.headline {
  width: 100%;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(40, 40, 100, 0.35);
  text-wrap: balance;
}

.headline em { font-style: italic; }

.lede {
  max-width: 30em;
  margin: 18px 0 0;
  text-wrap: balance;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
  text-shadow: 0 1px 16px rgba(40, 40, 100, 0.45);
}

/* Soft light sweeping across the "Coming soon" pill every few seconds */
.eyebrow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: pill-sweep 4.5s ease-in-out 2.4s infinite;
  pointer-events: none;
}

@keyframes pill-sweep {
  0%   { transform: translateX(-120%); }
  45%, 100% { transform: translateX(120%); }
}

/* ───────── Rotating headline ───────── */

/* Always two lines tall, so the page never jumps as phrases change */
.headline__stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  column-gap: 0.24em;
  min-height: 1.96em;
}

.headline .word {
  display: inline-block;
  /* "backwards": hidden until its turn, then the animation lets go entirely,
     so no leftover filter stays on the word (that made iPhone Safari flicker) */
  animation: word-in 1.2s var(--ease) backwards;
  animation-delay: calc(var(--start, 0s) + var(--w) * 0.14s);
}

.headline__stage.is-out .word {
  animation: word-out 0.6s var(--ease) forwards;
  animation-delay: calc(var(--w) * 0.04s);
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.35em) rotate(2deg); filter: blur(12px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes word-out {
  from { opacity: 1; transform: none; filter: blur(0); }
  to   { opacity: 0; transform: translateY(-0.25em); filter: blur(10px); }
}

/* Champagne-gold light slowly travelling through "awaits." */
/* The word itself stays plain white text (with the headline's shadow);
   a copy of it on top carries only the travelling gold band. No filters involved. */
.shimmer {
  position: relative;
  display: inline-block;
  padding-right: 0.08em; /* keep the italic tail from being clipped */
}

.shimmer::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding-right: 0.08em;
  background: linear-gradient(100deg, transparent 0%, transparent 38%, #ffe2a6 48%, transparent 58%, transparent 100%);
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  pointer-events: none;
  animation: shimmer 3.2s ease-in-out 1.2s infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  60%, 100% { background-position: 0% 0; }
}

/* ───────── Gentle float ───────── */

.float { animation: float 7s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ───────── Signup ───────── */

.signup {
  width: 100%;
  max-width: 480px;
  margin-top: 40px;
}

.signup__form {
  --form-r: 999px;
  position: relative;
  overflow: hidden; /* keeps the light sweep inside the field */
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 20px 50px -20px rgba(42, 22, 51, 0.55);
  transition: border-color 0.3s, box-shadow 0.3s;
  /* Animated entry: the pill opens out from a thin line in the center */
  opacity: 0;
  clip-path: inset(0 50% 0 50% round var(--form-r));
  animation: form-open 1.3s var(--ease) 1.75s forwards;
}

/* A single light sheen sweeps across once the field has opened */
.signup__form::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
  transform: translateX(-110%);
  animation: sheen 1.5s ease-in-out 2.8s forwards;
  pointer-events: none;
}

/* "backwards" hides them until their turn, then hands control back so hover effects still work */
.signup__form input[type="email"],
.signup__form button {
  animation: settle 0.9s var(--ease) 2.4s backwards;
}

.signup__form button { animation-delay: 2.55s; }

@keyframes form-open {
  0%   { opacity: 0; clip-path: inset(0 50% 0 50% round var(--form-r)); }
  12%  { opacity: 1; }
  100% { opacity: 1; clip-path: inset(0 0 0 0 round var(--form-r)); }
}

@keyframes sheen {
  to { transform: translateX(110%); }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.signup__form:focus-within {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 50px -20px rgba(42, 22, 51, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.signup__form.is-error { animation: shake 0.4s; opacity: 1; clip-path: none; border-color: #ffb4b4; }

.signup__form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 16px/1 var(--sans); /* 16px+ stops iPhone from zooming on focus */
  outline: none;
}

.signup__form input::placeholder { color: rgba(255, 255, 255, 0.72); }

.signup__form button {
  position: relative;
  overflow: hidden;
  flex: none;
  height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--plum);
  font: 500 15px/1 var(--sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.signup__form button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(233, 180, 76, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: pill-sweep 5s ease-in-out 4s infinite;
}

.signup__form button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(42, 22, 51, 0.5); }
.signup__form button:active { transform: translateY(0) scale(0.98); }
.signup__form button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.signup__form.is-loading button { opacity: 0.7; pointer-events: none; }
.signup__form.is-loading .signup__btn-text::after { content: "…"; }

.signup__note {
  opacity: 0;
  animation: settle 0.9s var(--ease) 2.8s forwards;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-mute);
  text-shadow: 0 1px 10px rgba(42, 22, 51, 0.5);
}

.signup__note.is-error { color: #fff; font-weight: 500; }

.signup__success {
  padding: 26px 24px 24px;
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  animation: rise 0.9s var(--ease) both;
}

.signup__success-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
}

.signup__success-text {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}

/* ───────── Socials ───────── */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  transition: background 0.25s, transform 0.25s var(--ease), border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}

.socials a:hover { background: var(--glass-strong); border-color: rgba(255, 255, 255, 0.7); transform: translateY(-2px); }
.socials a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.socials svg { width: 19px; height: 19px; fill: currentColor; }

/* ───────── Entrance ───────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  animation: rise 1.4s var(--ease) forwards;
  animation-delay: calc(0.25s + var(--d, 0) * 0.14s);
}

@keyframes rise {
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* ───────── Mobile ───────── */

@media (max-width: 699px) {
  /* matches the portrait-cropped phone video picked in script.js */
  .scene { background-image: url("assets/sky-poster-mobile.jpg"); }
}

@media (max-width: 560px) {
  .brand__logo { height: 52px; }

  .hero { padding: 28px 0 24px; }
  .eyebrow { margin-bottom: 18px; font-size: 11px; }
  .headline { font-size: 50px; }
  .lede { margin-top: 14px; }

  .signup { margin-top: 32px; }
  .signup__form {
    --form-r: 22px;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
  }
  .signup__form input[type="email"] { height: 50px; padding: 0 14px; text-align: center; }
  .signup__form button { width: 100%; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene__parallax { transition: none; transform: none; }
}

