/* White Octopus 365 — full-bleed continuous ocean */

:root {
  --foam: #f4fbfd;
  --ink: #0a3040;
  --font-display: "Fraunces", "Palatino Linotype", Palatino, serif;
  --font-body: "Outfit", "Trebuchet MS", sans-serif;
  --ease: cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

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

html {
  scroll-behavior: smooth;
  background: #3a9ec0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--foam);
  /* Continuous full-page water — never a flat panel */
  background:
    radial-gradient(ellipse 110% 50% at 68% -5%, rgba(200, 240, 250, 0.5), transparent 58%),
    radial-gradient(ellipse 70% 45% at 12% 28%, rgba(110, 200, 225, 0.28), transparent 55%),
    radial-gradient(ellipse 80% 40% at 80% 70%, rgba(20, 80, 110, 0.22), transparent 60%),
    linear-gradient(
      180deg,
      #9ad8ec 0%,
      #6fc0d8 22%,
      #4aadc8 48%,
      #3596b4 72%,
      #287ea0 100%
    );
  background-attachment: fixed;
  background-color: #4aadc8;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

main {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* —— Full-bleed atmosphere (fixed over entire scroll) —— */
.sea-atmosphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#caustics,
#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#caustics {
  opacity: 0.42;
  mix-blend-mode: soft-light;
}

#particles {
  opacity: 0.5;
}

.sea-rays {
  position: absolute;
  inset: -30% -5% 0 -5%;
  background:
    linear-gradient(112deg, transparent 18%, rgba(255, 255, 255, 0.28) 27%, transparent 36%),
    linear-gradient(98deg, transparent 40%, rgba(255, 255, 255, 0.16) 49%, transparent 58%),
    linear-gradient(105deg, transparent 58%, rgba(255, 255, 255, 0.11) 67%, transparent 76%),
    linear-gradient(120deg, transparent 8%, rgba(255, 255, 255, 0.08) 14%, transparent 22%);
  animation: rays 18s var(--ease) infinite alternate;
  opacity: 0.95;
}

.parallax-upper {
  position: absolute;
  inset: 0;
  will-change: transform;
  pointer-events: none;
}

@keyframes rays {
  from {
    transform: translateX(-3%) skewX(-1.5deg);
    opacity: 0.65;
  }
  to {
    transform: translateX(4%) skewX(1deg);
    opacity: 1;
  }
}

.depth-haze {
  position: absolute;
  inset: 0;
}

.depth-haze__mist {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 42%;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(20, 70, 95, 0.28), transparent 70%);
  filter: blur(30px);
  opacity: 0.75;
}

.depth-haze__mist--1 {
  top: 16%;
  animation: mist-drift 28s ease-in-out infinite alternate;
}

.depth-haze__mist--2 {
  top: 40%;
  height: 36%;
  opacity: 0.6;
  background: radial-gradient(ellipse 90% 50% at 60% 40%, rgba(15, 55, 75, 0.32), transparent 68%);
  animation: mist-drift 36s ease-in-out infinite alternate-reverse;
}

.depth-haze__mist--3 {
  top: 60%;
  height: 48%;
  opacity: 0.5;
  background: radial-gradient(ellipse 100% 55% at 40% 50%, rgba(12, 48, 68, 0.34), transparent 70%);
  animation: mist-drift 42s ease-in-out infinite alternate;
}

@keyframes mist-drift {
  from {
    transform: translateX(-3%);
  }
  to {
    transform: translateX(4%);
  }
}

/* Shark — far haze silhouette */
.depth-haze__shark {
  position: absolute;
  top: 28%;
  left: 0;
  width: min(18vw, 200px);
  opacity: 0;
  filter: blur(1.6px);
  will-change: transform, opacity;
  pointer-events: none;
}

.depth-haze__shark-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* White shark zip fly-bys — brief streak, not slow swim */
.shark-zips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.shark-zip {
  position: absolute;
  left: 0;
  top: 0;
  width: min(36vw, 420px);
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.35));
  will-change: transform, opacity;
  color: #fff;
}

/* Distant haze life — small, soft, never foreground */
.life {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  will-change: transform;
}

.fish {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  will-change: transform, opacity;
  filter: blur(1.4px);
}

.fish--far {
  width: min(5.5vw, 72px);
  filter: blur(1.5px);
}

.fish--mid {
  width: min(4.5vw, 58px);
  filter: blur(1.7px);
}

.fish--school {
  width: min(5vw, 64px);
  filter: blur(1.6px);
}

.fish--a {
  width: min(4.2vw, 54px);
  filter: blur(1.55px);
}

.fish--b {
  width: min(3.8vw, 48px);
  filter: blur(1.7px);
}

.fish--c {
  width: min(3.2vw, 40px);
  filter: blur(1.85px);
}

.fish--d {
  width: min(4vw, 52px);
  filter: blur(1.65px);
}

/* —— First screen: open ocean, NOT cropped —— */
.viewport {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  padding: clamp(0.85rem, 2.2vw, 1.6rem) clamp(0.65rem, 3vw, 2.5rem) clamp(3rem, 8vh, 5rem);
  /* CRITICAL: do not clip ocean / character / haze */
  overflow-x: clip;
  overflow-y: visible;
  background: transparent;
}

.hero__title {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  padding-inline: 0;
  white-space: nowrap;
  overflow: visible;
  box-sizing: border-box;
}

.hero__title-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "wght" 850;
  /* Fluid one-line brand: scales with viewport so full title fits (no sideways scroll) */
  font-size: clamp(1.05rem, 5.9vw + 0.15rem, 7.75rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  margin: 0;
  max-width: 100%;
  text-shadow:
    0 3px 0 rgba(190, 225, 240, 0.65),
    0 14px 42px rgba(10, 48, 64, 0.42),
    0 0 72px rgba(255, 255, 255, 0.28);
  will-change: transform;
}

/* Open water band so first fold isn’t title+cards only */
.ocean-breath {
  position: relative;
  z-index: 1;
  height: clamp(14rem, 36vh, 28rem);
  min-height: 220px;
  pointer-events: none;
}

/* Downloads — each card = one wide window (~2 prior card widths) */
.shop {
  position: relative;
  z-index: 3;
  margin-top: 0;
  padding: 0 clamp(0.75rem, 4vw, 2rem) clamp(2.5rem, 6vh, 4rem);
  background: transparent;
}

.shop__inner {
  position: relative;
  /* One window ≈ prior two windows combined (~1120×2) */
  max-width: min(2240px, 96vw);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.shop__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  margin-bottom: 0.3rem;
  text-shadow: 0 2px 12px rgba(8, 40, 56, 0.28);
}

.shop__lead {
  font-weight: 300;
  color: rgba(244, 251, 253, 0.85);
  margin-bottom: 1.25rem;
  font-size: 0.98rem;
}

.slots {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.slot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
  width: 100%;
  min-height: 88px;
  padding: 1.1rem 1.35rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.slot--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.06);
  min-height: 72px;
}

.slot__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin-bottom: 0.2rem;
}

.slot__body p {
  font-size: 0.92rem;
  font-weight: 300;
  color: rgba(244, 251, 253, 0.78);
  line-height: 1.45;
}

.slot__install-hint {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(244, 251, 253, 0.92);
  line-height: 1.4;
}

.slot__download--install:not(:disabled) {
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(8, 40, 56, 0.22);
}

.slot__download--install:not(:disabled):hover {
  filter: brightness(1.04);
}

.slot__open {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(244, 251, 253, 0.4);
}

.slot__download {
  padding: 0.65rem 1.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: #f4fbfd;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.slot__download:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Footer marquee — domain+QR · domain+QR · Open place, seamless forever */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.site-footer__marquee {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.85rem 0;
}

.site-footer__track {
  display: flex;
  width: max-content;
  animation: footer-marquee 48s linear infinite;
  will-change: transform;
}

.site-footer__group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: clamp(0.35rem, 1vw, 0.65rem);
}

.site-footer__domain,
.site-footer__item {
  flex: 0 0 auto;
  padding-inline: clamp(0.2rem, 0.6vw, 0.45rem);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(8, 40, 56, 0.35);
  white-space: nowrap;
}

.site-footer__domain {
  cursor: default;
  user-select: text;
}

.site-footer__qr-btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
  line-height: 0;
  border-radius: 0.4rem;
}

.site-footer__qr-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.site-footer__qr {
  width: clamp(2.15rem, 5vw, 2.85rem);
  height: clamp(2.15rem, 5vw, 2.85rem);
  display: block;
  border-radius: 0.3rem;
  background: #fff;
  padding: 0.15rem;
  box-sizing: border-box;
  pointer-events: none;
}

.site-footer__qr-btn:hover .site-footer__qr {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.site-footer__item--open {
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.22em;
}

a.site-footer__item--open:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.85);
}

.site-footer__dot {
  flex: 0 0 auto;
  padding-inline: clamp(1rem, 3vw, 2.25rem);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  user-select: none;
}

@keyframes footer-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* QR lightbox — fixed lower zone (scan-friendly) */
.site-footer__lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 clamp(0.75rem, 3vw, 1.5rem) clamp(1.25rem, 4vh, 2.5rem);
  box-sizing: border-box;
}

.site-footer__lightbox[hidden] {
  display: none;
}

.site-footer__lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(4, 22, 34, 0.62);
  cursor: pointer;
}

.site-footer__lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 22rem);
  padding: 1.15rem 1.15rem 1rem;
  border-radius: 1rem 1rem 0.75rem 0.75rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 40px rgba(4, 22, 34, 0.35);
}

.site-footer__lightbox-qr {
  width: min(72vw, 16.5rem);
  height: auto;
  aspect-ratio: 1;
  display: block;
  border-radius: 0.4rem;
  background: #fff;
}

.site-footer__lightbox-caption {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #16384a;
}

.site-footer__lightbox-close {
  appearance: none;
  border: 0;
  margin: 0.15rem 0 0;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: #16384a;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.site-footer__lightbox-close:hover {
  background: #0f2a38;
}

.site-footer__lightbox-close:focus-visible {
  outline: 2px solid #5eb8d4;
  outline-offset: 2px;
}

body.footer-qr-open {
  overflow: hidden;
}

body.footer-qr-open .site-footer__track {
  animation-play-state: paused;
}

@media (max-width: 900px) {
  .hero__title {
    padding-inline: 0;
  }

  .hero__title-text {
    /* ~17 uppercase glyphs + tracking must fit in ~100vw minus viewport pad */
    font-size: clamp(1rem, 5.45vw + 0.2rem, 3.1rem);
    letter-spacing: 0.012em;
  }

  .ocean-breath {
    height: clamp(8rem, 22vh, 14rem);
  }

  .shop {
    padding-inline: 0.85rem;
  }

  .shop__inner {
    max-width: 100%;
  }

  .depth-haze__shark {
    width: min(22vw, 140px);
    top: 36%;
  }

  .slot {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .slot__download {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sea-rays,
  .depth-haze__mist,
  .site-footer__track {
    animation: none !important;
  }

  .hero__title-text,
  .depth-haze__shark,
  .fish,
  .shark-zip {
    transform: none !important;
  }

  .depth-haze__shark,
  .fish {
    opacity: 0.35 !important;
  }

  .shark-zip {
    opacity: 0 !important;
  }

  .site-footer__track {
    transform: none !important;
  }

  .site-footer__group:last-child {
    display: none;
  }

  .site-footer__marquee {
    display: flex;
    justify-content: center;
  }

  .site-footer__group {
    justify-content: center;
    flex-wrap: wrap;
  }

  .site-footer__group [aria-hidden="true"] {
    display: none;
  }
}
