/* ==========================================================================
   Waterbounce – styles
   ========================================================================== */

:root {
  /* Pure black so the video edges blend invisibly into the page */
  --black: #000000;
  --dim: #8C8A99;
  --text: #FFFFFF;

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- Hero: the first screen, one big checkout link ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  background: var(--black);
  container-type: size;
  -webkit-tap-highlight-color: transparent;
}

/* Soft shade at the bottom: keeps the button readable on bright scenes and
   fades the video seamlessly into the black details section below */
.stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.6) 25%, transparent);
  pointer-events: none;
}

/* Landscape: the video spans the full width (never wider, so no side crop
   or zoom), pinned to the top. On wide windows only the bottom is trimmed,
   behind the button; on taller windows it fades out into black below.
   Ultra-wide screens are capped so the bottom isn't cut away entirely.
   Portrait fills the phone screen, zooming at most 15 % past "contain".
   The poster is the element background, so poster and video line up. */
.stage-video {
  --w: min(100vw, 100vh * 16 / 9 * 1.25);
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--w);
  height: auto;
  aspect-ratio: 16 / 9;
  translate: -50% 0;
  object-fit: cover;
  background: url("../img/poster-desktop.jpg?v=f01a166f") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
  pointer-events: none;
}

@media (orientation: portrait) {
  .stage-video {
    --w: min(max(100vw, 100vh * 9 / 16), min(100vw, 100vh * 9 / 16) * 1.15);
    top: 50%;
    aspect-ratio: 9 / 16;
    translate: -50% -50%;
    background-image: url("../img/poster-mobile.jpg?v=68a5a763");
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* Measure the actual stage instead of the viewport where supported */
@supports (width: 1cqw) {
  .stage-video {
    --w: min(100cqw, 100cqh * 16 / 9 * 1.25);
  }
  @media (orientation: portrait) {
    .stage-video {
      --w: min(max(100cqw, 100cqh * 9 / 16), min(100cqw, 100cqh * 9 / 16) * 1.15);
    }
  }
}

/* ---------- Buy button: transparent, with a light sweeping round the edge ---------- */
@property --cta-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.stage-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: clamp(0.7rem, 2.5vw, 1rem);
  padding: clamp(0.55rem, 1.2vh, 0.7rem) clamp(1.15rem, 4vw, 1.6rem);
  border-radius: 999px;
  line-height: 1.2;
  background: rgb(255 255 255 / 0.04);
  color: var(--text);
  white-space: nowrap;
  text-shadow: 0 1px 6px rgb(0 0 0 / 0.7);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
}

/* Border: hairline plus a bright highlight travelling around it */
.stage-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--cta-angle),
    rgb(255 255 255 / 0.35) 0deg,
    rgb(255 255 255 / 0.35) 250deg,
    #fff 300deg,
    rgb(255 255 255 / 0.35) 350deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.cta-label {
  font-weight: 700;
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.1rem);
  letter-spacing: 0.01em;
}

.cta-price {
  padding-left: clamp(0.7rem, 2.5vw, 1rem);
  border-left: 1px solid rgb(255 255 255 / 0.3);
  font-weight: 700;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
}

/* ---------- Logo ---------- */
.brand-logo { display: block; height: auto; color: var(--text); }
/* ---------- Note below the button ---------- */
.stage-note {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.5rem;
  margin-top: 0.7rem;
  /* Bottom spacing lives here, not as .stage padding, so the video's
     container units measure the full screen. Leaves room for the scroll cue. */
  margin-bottom: calc(clamp(3.5rem, 8vh, 4.5rem) + var(--safe-bottom));
  line-height: 1.5;
  color: rgb(255 255 255 / 0.45);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgb(0 0 0 / 0.8);
}

/* Phones: stack the note lines */
@media (max-width: 600px) {
  .stage-note {
    flex-direction: column;
    align-items: center;
  }
  .note-sep { display: none; }
}

/* Small arrow at the bottom edge hinting at the details below */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(0.6rem + var(--safe-bottom));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  translate: -50% 0;
  color: rgb(255 255 255 / 0.45);
  transition: color 0.2s ease;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue svg { width: 1.25rem; height: 1.25rem; }

/* The whole screen is clickable, so the button reacts to hover anywhere. */
.stage:hover .stage-cta,
.cta-link:hover {
  background: rgb(255 255 255 / 0.1);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.35),
    0 0 32px rgb(255 255 255 / 0.18);
}
.stage:active .stage-cta,
.cta-link:active { transform: scale(0.97); }

/* Focus ring on the button instead of the screen edge */
.stage:focus-visible { outline: none; }
.stage:focus-visible .stage-cta {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .stage-cta, .stage-note { animation: cta-in 0.8s 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .stage-cta::before { animation: cta-shine 4s linear infinite; }
  .scroll-cue svg { animation: cue-bob 2.4s ease-in-out infinite; }
}
@keyframes cta-in {
  from { opacity: 0; translate: 0 12px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes cta-shine {
  to { --cta-angle: 360deg; }
}
@keyframes cue-bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 4px; }
}

/* ---------- Product details below the hero ---------- */
.details {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) 1.25rem clamp(3rem, 8vw, 5rem);
}
.details-kicker {
  margin: 0 0 0.75rem;
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.details-title {
  max-width: 22ch;
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.details-text {
  max-width: 40rem;
  margin: 0 0 1rem;
  color: rgb(255 255 255 / 0.7);
}
.details-text strong { color: var(--text); font-weight: 700; }

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 3rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid rgb(255 255 255 / 0.12);
}
.details-grid h3 {
  margin: 0 0 0.75rem;
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.details-grid p,
.details-grid ul { margin: 0 0 0.75rem; }
.details-grid ul { padding: 0; list-style: none; }
.details-grid li {
  position: relative;
  margin: 0 0 0.4rem;
  padding-left: 1rem;
}
.details-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.4rem;
  height: 1px;
  background: var(--dim);
}
.details-small { color: var(--dim); font-size: 0.875rem; }

.details-buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  text-align: center;
}
.details-buy .stage-note { margin: 0; }
.cta-link { text-decoration: none; }

/* Solid white variant for the second buy button */
.cta-solid {
  background: #fff;
  color: #000;
  text-shadow: none;
  box-shadow: 0 0 0 rgb(255 255 255 / 0);
}
.cta-solid::before { display: none; }
.cta-solid .cta-price { border-left-color: rgb(0 0 0 / 0.2); }
.cta-solid:hover {
  background: #fff;
  box-shadow: 0 0 36px rgb(255 255 255 / 0.35);
}

.details-social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
}
.details-social a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--dim);
  transition: color 0.2s ease;
}
.details-social a:hover { color: var(--text); }
.details-social svg { width: 1.1rem; height: 1.1rem; }
.details-social a[href*="tiktok"] svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem calc(1.5rem + var(--safe-bottom));
  border-top: 1px solid rgb(255 255 255 / 0.12);
  color: var(--dim);
  font-size: 0.8rem;
}
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer-logo { width: 1.2rem; color: var(--dim); }
@media (max-width: 600px) {
  .footer-logo { order: -1; }
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 1.25rem calc(4rem + var(--safe-bottom));
}
.legal .legal-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--dim);
  font-size: 0.9rem;
  text-decoration: none;
}
.legal .legal-back:hover { color: var(--text); }
.legal h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 2rem;
}
.legal h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
}
.legal p, .legal address { margin: 0 0 1rem; }
.legal address { font-style: normal; }
.legal a { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
