/* =========================================================
   Hyro Waitlist — cinematic teaser hero + Typeform-style flow
   ========================================================= */
@font-face {
  font-family: "Lemon";
  src: url("https://drinkhyro.com/cdn/shop/t/5/assets/Lemon-Bold.woff2?v=158743598727545153351705899060") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Perfectly Nineties";
  src: url("https://drinkhyro.com/cdn/shop/t/5/assets/PerfectlyNineties-RegularItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #ffffff;
  --fg-cream: #fff4ec;
  --fg-dim: #b8b8b8;
  --fg-mute: #7a7a7a;
  --line: #2a2a2a;
  --line-strong: #4a4a4a;
  --red: #FB0D1B;
  --red-hover: #e00b18;
  --chip-bg: #d4eef9;
  --chip-fg: #1a90c7;
  --radius: 10px;
  --radius-btn: 8px;
  --pad-x: 28px;
  --max: 540px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, system-ui, Arial, sans-serif;
  --font-display: "Lemon", "Trebuchet MS", "Impact", Helvetica, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font-family: var(--font); }
html, body { height: 100%; min-height: 100dvh; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overscroll-behavior-y: contain; }

#app { position: relative; min-height: 100dvh; }

/* =================== SCREENS =================== */
.screen {
  position: absolute;
  inset: 0;
  display: none !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) var(--pad-x) max(28px, env(safe-area-inset-bottom));
  min-height: 100dvh;
}
.screen.is-active { display: flex !important; }
.screen--hero.is-active { display: block !important; }

/* =================== HERO — FULL-BLEED VIDEO STAGE =================== */
.screen--hero {
  background: #000;
  padding: 0;
}
.screen--hero.is-active { display: block !important; }

.hero-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

/* Video sits behind the overlays. object-fit: contain keeps the pouch from
   ever being cropped (the asset has its own black surround, which blends
   into the page background seamlessly). */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 1;
}

/* Top + bottom overlays float above the video. Top holds logo+title (sits
   above the pouch); bottom holds the CTA. Both are pointer-events:none with
   selective :auto on interactive children so the video can still be clicked
   if needed (not really, but keeps behaviour clean). */
.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.hero-overlay > * { max-width: 760px; width: 100%; }
.hero-overlay .btn,
.hero-overlay .meta,
.hero-overlay .name-token { pointer-events: auto; }
.hero-overlay .btn { pointer-events: auto; }

/* TOP overlay: logo + headline anchored in the upper area of the stage.
   Logo sits near the very top, headline tucks just above where the pouch
   begins (~28% from top on portrait, ~22% on landscape). */
.hero-overlay--top {
  top: max(28px, env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 6vh, 64px);
}
.hero-overlay--top .brand-logo {
  /* logo unchanged in size, sits at top */
}

/* BOTTOM overlay: CTA + meta pinned near the page bottom. */
.hero-overlay--bottom {
  bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: clamp(88px, 22vw, 130px);
  height: auto;
  filter: drop-shadow(0 1px 12px rgba(0,0,0,0.6));
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 10.5vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--fg-cream);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* legibility when overlaid on the video */
  text-shadow: 0 2px 18px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.5);
}

.hero__title-line { display: block; }

.hero__title-accent {
  color: var(--red);
  display: inline-block;
}

/* Hero image: a contained, centred element surrounded by black */
.hero__picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

/* .hero__image kept for legacy compatibility (no longer rendered) */
.hero__image {
  display: none;
}

/* Show only the mobile crop on narrow viewports, only the desktop landscape
   on wider viewports. Both <video> elements autoplay; the hidden one is
   pulled out of layout via display:none so it doesn't render. */
.hero__video--desktop { display: none; }
@media (min-width: 640px) {
  .hero__video--mobile { display: none; }
  .hero__video--desktop { display: block; }
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin: 0 auto;
  color: #9a9a9a;
  font-size: 14px;
  font-weight: 500;
}
.meta__icon { opacity: 0.85; }

.stack__bot .btn { margin: 0 auto; }

/* =================== FORM =================== */
.screen--form .form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 140px;
}
.form__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.form__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: #fff;
}
.form__desc {
  margin: 0;
  font-size: 15px;
  color: var(--fg-mute);
  font-style: italic;
  font-weight: 400;
}
/* Riddle hint uses Perfectly Nineties italic, slightly larger and lighter
   in colour so the riddle reads like a literary tease. */
.form__desc--riddle {
  font-family: "Perfectly Nineties", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.45;
  color: var(--fg-dim);
  max-width: 480px;
  margin: 6px 0 0;
  text-align: left;
}
.req { color: var(--fg); font-weight: 700; margin-left: 1px; }

/* Inline dynamic name in the question ("...riddle, Nathan?"). Plain text,
   no chip / no blue background — just inherits the title styling. */
.name-token {
  display: inline;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  background: transparent;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-style: normal;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.005em;
}
.field__input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 17px;
  padding: 10px 0 8px;
  border-radius: 0;
  outline: none;
  transition: border-color 160ms ease;
}
.field__input::placeholder { color: #5e5e5e; font-weight: 400; }
.field__input:focus { border-bottom-color: #fff; }
.field__input:focus::placeholder { color: #4a4a4a; }
.field__input--lg { font-size: 19px; padding: 14px 0 10px; }

.field__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-strong);
}
.field__phone:focus-within { border-bottom-color: #fff; }
.field__input--phone {
  flex: 1 1 auto;
  border-bottom: 0;
  padding-left: 4px;
}
.phone__country {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 8px 4px 8px 0;
  color: #fff;
  cursor: pointer;
}
.phone__flag {
  display: inline-flex;
  width: 26px; height: 18px;
  border-radius: 3px;
  overflow: hidden;
  background: #111;
}
.phone__chev { color: #cfcfcf; }

.field__error {
  min-height: 18px;
  margin: -6px 0 0;
  color: #ff5560;
  font-size: 13px;
  font-weight: 500;
}

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 16px 22px;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 140ms ease, transform 120ms ease;
}
.btn:hover { background: var(--red-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }


/* =================== FOOT NAV =================== */
.footnav {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  padding: 14px var(--pad-x) max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 35%, #000 90%);
  pointer-events: none;
}
.footnav[hidden] { display: none; }
.footnav > * { pointer-events: auto; }
.progress { display: flex; gap: 8px; }
.progress__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3a3a3a;
  transition: background-color 200ms ease, transform 200ms ease;
}
.progress__dot.is-on { background: var(--red); transform: scale(1.15); }
.btn--next { max-width: 360px; }

/* =================== SUCCESS =================== */
.hero__title--success {
  /* longer single-line headline; slightly smaller so it fits on one line */
  font-size: clamp(28px, 8vw, 56px);
  color: var(--fg) !important;
}
.hero__title--success .name-token,
.hero__title--success .hero__title-accent {
  color: var(--fg) !important;
}
.success__sub {
  margin: 0;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 500;
  color: var(--fg-dim);
  line-height: 1.5;
  text-align: center;
  max-width: 460px;
}
.btn--shop {
  /* keep the cinematic look: same red pill as intro, slightly narrower */
  max-width: 320px;
}

/* =================== UTIL =================== */
.is-loading .btn[data-action="next"] { pointer-events: none; opacity: 0.55; }

/* =================== TABLET / DESKTOP =================== */
@media (min-width: 640px) {
  :root { --pad-x: 48px; }
  .hero-overlay--top { gap: clamp(32px, 6vh, 64px); }
  .brand-logo { width: clamp(100px, 9vw, 130px); }
  .hero__title { font-size: clamp(44px, 5vw, 68px); }
  .form__title { font-size: 26px; }
}

@media (min-width: 1100px) {
  .hero__title { font-size: clamp(52px, 4.4vw, 80px); }
}

/* =================== SHORT VIEWPORTS =================== */
@media (max-height: 720px) {
  .hero-overlay--top { gap: clamp(20px, 4vh, 40px); }
  .hero__title { font-size: clamp(30px, 9vw, 50px); }
  .brand-logo { width: clamp(72px, 18vw, 100px); }
}
