/* VOLNA coming-soon page (style.css)
   One bottle on a dark stage. The type around it stays quiet: ivory, with gold for the small
   labels, so the light on the bottle is the only bright thing on the page. */

:root {
  --ivory: #F4EEE3;
  --night: #0E0907;
  --gold-light: #D9B67E;
  --text-soft: rgba(244, 238, 227, 0.72);
  --text-faint: rgba(244, 238, 227, 0.46);
  --rule: rgba(244, 238, 227, 0.2);

  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --pad-x: max(28px, 3.6vw);
  --pad-y: max(24px, 3.4vh);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ivory);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}
p, h1 { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.cs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 1.5px solid var(--gold-light); outline-offset: 4px; }

/* ---------- stage ---------- */
.cs-stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
/* without WebGL: the packshot instead of the 3D bottle */
.no-webgl .cs-stage { display: none; }
.no-webgl body {
  background: radial-gradient(60% 55% at 50% 45%, #2a1c14 0%, var(--night) 70%) var(--night);
}
.no-webgl body::before {
  content: ""; position: fixed; inset: 10vh 0 18vh;
  background: url("../assets/img/fallback.jpg") center / contain no-repeat;
  mix-blend-mode: screen; opacity: 0.9;
}
.cs-vignette {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 46%, transparent 55%, rgba(6, 4, 3, 0.55) 100%),
    linear-gradient(to top, rgba(6, 4, 3, 0.7), transparent 30%);
}
.cs-grain {
  position: fixed; inset: -50%; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- top bar ---------- */
.cs-top {
  position: fixed; inset: 0 0 auto; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--pad-y) + env(safe-area-inset-top, 0px)) var(--pad-x) 0;
}
.cs-logo { width: clamp(112px, 9vw, 138px); height: auto; display: block; --sym: url(#volna-gold); --word: var(--ivory); }
.cs-status {
  display: flex; align-items: center; gap: 10px;
  font: 600 0.6875rem/1 var(--font-text); letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-soft);
}

/* ---------- bottom row: intro, formula, sign-up ---------- */
.cs-main {
  position: fixed; inset: auto 0 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 32px;
  padding: 0 var(--pad-x) calc(var(--pad-y) + 40px + env(safe-area-inset-bottom, 0px));
}
.cs-eyebrow {
  font: 600 0.6875rem/1 var(--font-text); letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold-light);
  margin-bottom: 16px;
}
.cs-lede {
  max-width: 30ch;
  font: 400 clamp(1.05rem, 1.25vw, 1.3rem)/1.45 var(--font-display); letter-spacing: -0.01em; color: var(--text-soft);
}

.cs-formula { display: grid; justify-items: center; gap: 14px; }
.cs-formula__row { display: flex; align-items: center; gap: 18px; }
.cs-formula__text {
  display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 190px;
}
.cs-formula__num { font: 500 0.6875rem/1 var(--font-text); letter-spacing: 0.24em; color: var(--text-faint); }
.cs-formula__name {
  font: 560 clamp(1.5rem, 2vw, 1.9rem)/1.05 var(--font-display); letter-spacing: -0.03em;
}
.cs-formula__flavour { font: 500 0.6875rem/1.2 var(--font-text); letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-soft); }
.cs-formula__text > * { transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), filter 0.45s var(--ease); }
.cs-formula.is-swapping .cs-formula__text > * { opacity: 0; transform: translateY(8px); filter: blur(4px); }

/* previous and next: quiet rings either side of the name */
.cs-arrow {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--rule); background: rgba(244, 238, 227, 0.04); color: var(--text-soft);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease), transform 0.2s var(--ease);
}
.cs-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cs-arrow:hover { color: var(--ivory); border-color: rgba(217, 182, 126, 0.6); background: rgba(244, 238, 227, 0.08); }
.cs-arrow:active { transform: scale(0.94); }

/* the four bars: buttons with a tall tap area; the one that is on fills while the bottle holds */
.cs-formula__dots { display: flex; gap: 4px; }
.cs-formula__dots button {
  display: block; padding: 10px 2px; border: 0; background: none; cursor: pointer;
}
.cs-formula__dots span {
  position: relative; display: block; width: 18px; height: 2px; border-radius: 2px; overflow: hidden;
  background: var(--rule); transition: width 0.6s var(--ease), background 0.3s var(--ease);
}
.cs-formula__dots button:hover span { background: rgba(244, 238, 227, 0.45); }
.cs-formula__dots .is-on span { width: 40px; background: rgba(244, 238, 227, 0.22); }
.cs-formula__dots span::after {
  content: ""; position: absolute; inset: 0; background: var(--c, var(--gold-light));
  transform-origin: left; transform: scaleX(0); opacity: 0;
}
.cs-formula__dots .is-on span::after { opacity: 1; transform: scaleX(var(--p, 0)); }

/* the bottle can be dragged round */
.cs-stage { cursor: grab; touch-action: pan-y; }
.cs-stage.is-dragging { cursor: grabbing; }
.no-webgl .cs-arrow, .no-webgl .cs-formula__dots { display: none; }

.cs-form { justify-self: end; width: min(100%, 360px); }
.cs-form__label {
  display: block; margin-bottom: 14px;
  font: 600 0.6875rem/1 var(--font-text); letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-light);
}
.cs-form__row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 5px 5px 20px; border-radius: 999px;
  background: rgba(244, 238, 227, 0.06); border: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.cs-form__row:focus-within { border-color: rgba(217, 182, 126, 0.7); background: rgba(244, 238, 227, 0.09); }
.cs-form input {
  flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; outline: none;
  font: 400 0.95rem/1.2 var(--font-text); color: var(--ivory);
}
.cs-form input::placeholder { color: var(--text-faint); }
.cs-form button {
  flex: none; padding: 12px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ivory); color: #1A120E;
  font: 600 0.8125rem/1 var(--font-text); letter-spacing: 0.02em;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease);
}
.cs-form button:hover { background: #fff; }
.cs-form button:active { transform: scale(0.97); }
.cs-form__note { min-height: 1.4em; margin-top: 10px; padding-left: 20px; font-size: 0.8125rem; color: var(--text-soft); }
.cs-form__note.is-error { color: #E9A58F; }
.cs-form.is-done .cs-form__row { border-color: rgba(217, 182, 126, 0.5); }

.cs-foot {
  position: fixed; inset: auto 0 0; z-index: 2;
  display: flex; justify-content: space-between;
  padding: 0 var(--pad-x) calc(var(--pad-y) * 0.7 + env(safe-area-inset-bottom, 0px));
  font: 500 0.6875rem/1 var(--font-text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint);
}

/* ---------- entrance: the type arrives once the bottle is lit ---------- */
.cs-top, .cs-intro, .cs-formula, .cs-form, .cs-foot {
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.is-loading .cs-top, .is-loading .cs-intro, .is-loading .cs-formula, .is-loading .cs-form, .is-loading .cs-foot {
  opacity: 0; transform: translateY(14px);
}
.cs-intro { transition-delay: 0.1s; }
.cs-formula { transition-delay: 0.25s; }
.cs-form { transition-delay: 0.4s; }
.cs-foot { transition-delay: 0.55s; }

/* ---------- phones and narrow windows ---------- */
@media (max-width: 819px) {
  :root { --pad-x: 20px; --pad-y: 20px; }
  .cs-main { grid-template-columns: 1fr; gap: 22px; justify-items: center; padding-bottom: calc(var(--pad-y) + 30px + env(safe-area-inset-bottom, 0px)); }
  .cs-intro { display: none; }
  .cs-formula { order: -1; }
  .cs-form { justify-self: stretch; width: 100%; }
  .cs-form__label { text-align: center; }
  .cs-form__note { text-align: center; padding-left: 0; }
  .cs-status { letter-spacing: 0.2em; }
}
/* the smallest phones (iPhone SE and similar) */
@media (max-width: 360px) {
  .cs-formula__row { gap: 10px; }
  .cs-formula__text { min-width: 150px; }
  .cs-arrow { width: 32px; height: 32px; }
  .cs-arrow svg { width: 14px; height: 14px; }
  .cs-foot { font-size: 0.5625rem; letter-spacing: 0.1em; }
  .cs-status { letter-spacing: 0.16em; }
}
@media (max-width: 819px) and (max-height: 640px) and (orientation: portrait) {
  .cs-main { gap: 14px; }
  .cs-form__label { margin-bottom: 10px; }
  .cs-form__note { margin-top: 4px; }
}
@media (max-height: 640px) and (min-width: 820px) {
  .cs-lede { display: none; }
}
/* short, wide screens (a phone held sideways): the bottle on the left, the formula and the
   sign-up stacked on the right. js/main.js moves the bottle with the same query. */
@media (max-height: 560px) and (orientation: landscape) {
  :root { --pad-y: 16px; }
  .cs-main {
    inset: 0 0 0 auto; width: 52%;
    grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: 18px;
    padding: 56px var(--pad-x) 44px 0;
  }
  .cs-intro { display: none; }
  .cs-formula { order: -1; gap: 8px; max-width: 100%; }
  .cs-formula__row { gap: 10px; }
  .cs-formula__text { min-width: 150px; }
  .cs-formula__name { font-size: 1.5rem; }
  .cs-arrow { width: 32px; height: 32px; }
  .cs-arrow svg { width: 14px; height: 14px; }
  .cs-form { justify-self: stretch; width: 100%; max-width: 380px; margin-inline: auto; }
  .cs-form__label { text-align: center; margin-bottom: 10px; }
  .cs-form__note { text-align: center; padding-left: 0; margin-top: 6px; }
  .cs-form__row { padding: 4px 4px 4px 18px; }
  .cs-form input { padding: 8px 0; }
  .cs-form button { padding: 10px 16px; }
  .cs-foot { font-size: 0.625rem; letter-spacing: 0.12em; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-grain { animation: none; }
  .cs-top, .cs-intro, .cs-formula, .cs-form, .cs-foot, .cs-formula__text > * { transition: none; }
}
