:root {
  --sky-top: #16303a;
  --sky-mid: #3c6b6a;
  --sky-horizon: #f2e2ad;
  --water-top: #2c6357;
  --water-deep: #0a2620;
  --bank: #4c7a42;
  --bank-deep: #2e5228;
  --amber: #ffb347;
  --amber-deep: #ff8a2b;
  --foam: #eaf6f8;
  --ink: #0c1e2a;
  --card-bg: rgba(8, 26, 38, 0.55);
  --card-border: rgba(234, 246, 248, 0.14);
  font-size: 16px;
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--foam);
  background: var(--sky-top);
  position: relative;
}

.page {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

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

/* ---------- Background scene ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 58%;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-horizon) 100%);
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 34%;
  left: 62%;
  width: 110px;
  height: 110px;
  margin-left: -55px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,200,0.9) 0%, rgba(242,226,173,0.45) 45%, rgba(242,226,173,0) 72%);
  filter: blur(1px);
  animation: sunPulse 6s ease-in-out infinite;
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.cloud {
  position: absolute;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  filter: blur(1px);
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 100px;
}
.cloud--a { width: 120px; height: 34px; top: 12%; left: -20%; animation: drift 42s linear infinite; }
.cloud--a::before { width: 60px; height: 46px; top: -22px; left: 14px; }
.cloud--a::after { width: 46px; height: 34px; top: -14px; left: 60px; }
.cloud--b { width: 90px; height: 26px; top: 26%; left: -30%; animation: drift 58s linear infinite; animation-delay: -18s; opacity: 0.7; }
.cloud--b::before { width: 44px; height: 30px; top: -14px; left: 10px; }
.cloud--b::after { width: 34px; height: 22px; top: -10px; left: 44px; }
.cloud--c { width: 70px; height: 20px; top: 8%; left: -15%; animation: drift 70s linear infinite; animation-delay: -40s; opacity: 0.5; }
.cloud--c::before { width: 34px; height: 22px; top: -10px; left: 8px; }
.cloud--c::after { width: 26px; height: 16px; top: -6px; left: 34px; }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(160vw); }
}

.water {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 46%;
  background: linear-gradient(180deg, var(--water-top) 0%, var(--water-deep) 100%);
  overflow: hidden;
}

.waves {
  position: absolute;
  left: 0;
  width: 200%;
  height: 60px;
  top: -30px;
}
.waves--back { fill: rgba(234, 246, 248, 0.08); animation: waveMove 14s linear infinite; }
.waves--front { fill: rgba(234, 246, 248, 0.14); top: -20px; animation: waveMove 9s linear infinite reverse; }

@keyframes waveMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.bubbles span {
  position: absolute;
  bottom: -20px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(234, 246, 248, 0.35);
  box-shadow: inset -2px -2px 3px rgba(0,0,0,0.15);
  animation: rise linear infinite;
}
.bubbles span:nth-child(1) { left: 8%;  width: 6px;  height: 6px;  animation-duration: 7s;  animation-delay: 0s; }
.bubbles span:nth-child(2) { left: 18%; width: 10px; height: 10px; animation-duration: 9s;  animation-delay: 1.2s; }
.bubbles span:nth-child(3) { left: 30%; width: 5px;  height: 5px;  animation-duration: 6s;  animation-delay: 2.4s; }
.bubbles span:nth-child(4) { left: 44%; width: 8px;  height: 8px;  animation-duration: 8s;  animation-delay: 0.6s; }
.bubbles span:nth-child(5) { left: 56%; width: 7px;  height: 7px;  animation-duration: 10s; animation-delay: 3s; }
.bubbles span:nth-child(6) { left: 66%; width: 11px; height: 11px; animation-duration: 7.5s; animation-delay: 1.8s; }
.bubbles span:nth-child(7) { left: 76%; width: 6px;  height: 6px;  animation-duration: 6.5s; animation-delay: 2.9s; }
.bubbles span:nth-child(8) { left: 85%; width: 9px;  height: 9px;  animation-duration: 9.5s; animation-delay: 0.3s; }
.bubbles span:nth-child(9) { left: 93%; width: 5px;  height: 5px;  animation-duration: 5.5s; animation-delay: 1.5s; }
.bubbles span:nth-child(10){ left: 50%; width: 6px;  height: 6px;  animation-duration: 8.2s; animation-delay: 4s; }

@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-60vh) translateX(12px); opacity: 0; }
}

/* ---------- Swimming fish ---------- */

.fish {
  position: absolute;
  width: 70px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.fish svg { width: 100%; display: block; }

.fish-body { animation: tailWag 0.9s ease-in-out infinite; transform-origin: 15% 50%; }
.fish-tail { transform-origin: 10px 30px; animation: tailFlick 0.9s ease-in-out infinite; }

@keyframes tailWag {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.5deg); }
}
@keyframes tailFlick {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(18deg); }
}

.fish--1 { top: 22%; width: 60px; opacity: 0.9; animation-name: swimRight; animation-duration: 16s; animation-delay: -2s; }
.fish--2 { top: 52%; width: 46px; opacity: 0.75; animation-name: swimLeft; animation-duration: 21s; animation-delay: -9s; }
.fish--3 { top: 70%; width: 36px; opacity: 0.6; animation-name: swimRight; animation-duration: 26s; animation-delay: -15s; }
.fish--4 { top: 38%; width: 30px; opacity: 0.55; animation-name: swimLeft; animation-duration: 18s; animation-delay: -4s; }

@keyframes swimRight {
  0%   { left: -12%; transform: translateY(0) scaleX(1); }
  48%  { transform: translateY(-14px) scaleX(1); }
  50%  { left: 55%; transform: translateY(0) scaleX(1); }
  50.01% { transform: translateY(0) scaleX(-1); }
  98%  { transform: translateY(-10px) scaleX(-1); }
  100% { left: -12%; transform: translateY(0) scaleX(-1); }
}
@keyframes swimLeft {
  0%   { left: 108%; transform: translateY(0) scaleX(-1); }
  48%  { transform: translateY(-12px) scaleX(-1); }
  50%  { left: 30%; transform: translateY(0) scaleX(-1); }
  50.01% { transform: translateY(0) scaleX(1); }
  98%  { transform: translateY(-16px) scaleX(1); }
  100% { left: 108%; transform: translateY(0) scaleX(1); }
}

/* ---------- Bank & reeds ---------- */

.bank {
  position: absolute;
  left: 0; right: 0;
  top: 51%;
  height: 7%;
  background: linear-gradient(180deg, var(--bank) 0%, var(--bank-deep) 100%);
  z-index: 1;
}

.bank-edge {
  position: absolute;
  left: 0;
  top: -22px;
  width: 200%;
  height: 34px;
  fill: var(--bank);
  animation: waveMove 50s linear infinite;
}

.reeds {
  position: absolute;
  bottom: 0;
  width: 46px;
  transform-origin: 50% 100%;
  animation: reedSway 4.5s ease-in-out infinite;
  z-index: 1;
}
.reeds svg { width: 100%; display: block; }
.reeds--a { left: 6%; width: 38px; animation-delay: -1s; }
.reeds--b { left: 15%; width: 26px; animation-delay: -2.6s; opacity: 0.85; }
.reeds--c { left: 74%; width: 40px; animation-delay: -0.5s; }
.reeds--d { left: 84%; width: 24px; animation-delay: -3.2s; opacity: 0.8; }

@keyframes reedSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ---------- Angler, rod, line, bobber, splash ---------- */

.angler {
  position: absolute;
  left: 3%;
  top: 0;
  width: 26%;
  max-width: 230px;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.angler-svg { width: 100%; height: 100%; overflow: visible; }

.angler-figure { transition: transform 0.25s ease; transform-origin: 190px 515px; }
.angler:hover .angler-figure,
.angler:focus-visible .angler-figure { transform: translateY(-4px); }

.angler-rod-arm {
  transform-origin: 225px 375px;
  animation: rodTwitch 3.6s ease-in-out infinite;
}
@keyframes rodTwitch {
  0%, 90%, 100% { transform: rotate(0deg); }
  94% { transform: rotate(-2.5deg); }
}
.angler.is-caught .angler-rod-arm {
  animation: rodLift 2.2s cubic-bezier(.3,1.6,.4,1) forwards;
}
@keyframes rodLift {
  0%   { transform: rotate(0deg); }
  12%  { transform: rotate(-26deg); }
  22%  { transform: rotate(-19deg); }
  32%  { transform: rotate(-23deg); }
  82%  { transform: rotate(-22deg); }
  100% { transform: rotate(0deg); }
}

.angler-idle { opacity: 1; }
.angler.is-caught .angler-idle {
  animation: idleFade 2.2s ease forwards;
}
@keyframes idleFade {
  0%   { opacity: 1; }
  16%  { opacity: 0; }
  84%  { opacity: 0; }
  100% { opacity: 1; }
}

.angler-bobber {
  transform-origin: 322px 650px;
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.ripple-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: rippleOut 3.2s ease-out infinite;
}
.ripple-ring--2 { animation-delay: 1.07s; }
.ripple-ring--3 { animation-delay: 2.14s; }

@keyframes rippleOut {
  0%   { transform: scale(0.3); opacity: 0.6; }
  100% { transform: scale(4.5); opacity: 0; }
}

.caught-fish {
  opacity: 0;
}
.angler.is-caught .caught-fish {
  animation: caughtFishFade 2.2s ease forwards;
}
@keyframes caughtFishFade {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  84%  { opacity: 1; }
  100% { opacity: 0; }
}

.caught-fish-wriggle {
  transform-origin: 0 0;
  animation: fishWriggle 0.45s ease-in-out infinite;
}
@keyframes fishWriggle {
  0%, 100% { transform: rotate(92deg); }
  50% { transform: rotate(108deg); }
}

.splash-burst {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}
.angler.is-caught .splash-burst--1 {
  animation: splashBurst 0.6s ease-out forwards;
}
.angler.is-caught .splash-burst--2 {
  animation: splashBurst 0.6s ease-out 0.12s forwards;
}
@keyframes splashBurst {
  0%   { opacity: 0.9; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(3.2); }
}

/* ---------- Content ---------- */

.content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1.5rem 0.5rem;
  gap: 1.1rem;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 179, 71, 0.14);
  border: 1px solid rgba(255, 179, 71, 0.35);
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: riseIn 0.8s ease forwards;
}
.badge-hook { width: 14px; height: 14px; }

.brand {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 700;
  margin: 0.2rem 0 0;
  line-height: 1.05;
  color: var(--foam);
  text-shadow: 0 6px 30px rgba(0,0,0,0.35);
  opacity: 0;
  animation: riseIn 0.8s ease 0.12s forwards;
}
.brand .amp {
  color: var(--amber);
  font-style: italic;
}

.tagline {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(234, 246, 248, 0.82);
  opacity: 0;
  animation: riseIn 0.8s ease 0.24s forwards;
}

.countdown {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.6rem;
  opacity: 0;
  animation: riseIn 0.8s ease 0.36s forwards;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.4rem;
  padding: 0.7rem 0.4rem;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
}
.countdown .num {
  font-family: 'Fraunces', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}
.countdown .label {
  margin-top: 0.3rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 246, 248, 0.65);
}

.signup {
  margin-top: 0.8rem;
  width: 100%;
  max-width: 26rem;
  opacity: 0;
  animation: riseIn 0.8s ease 0.48s forwards;
  pointer-events: auto;
}
.signup-field {
  display: flex;
  gap: 0.6rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.4rem;
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.signup-field input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--foam);
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  outline: none;
}
.signup-field input::placeholder { color: rgba(234, 246, 248, 0.45); }

.signup-field button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.signup-field button:hover,
.signup-field button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 138, 43, 0.35);
}
.signup-field button:active { transform: translateY(0); }
.btn-hook {
  width: 16px;
  height: 16px;
  transition: transform 0.35s ease;
}
.signup-field button:hover .btn-hook {
  transform: translateY(3px) rotate(20deg);
}

.signup.is-success .signup-field { border-color: rgba(94, 201, 192, 0.6); }
.signup.is-error .signup-field { border-color: rgba(255, 99, 99, 0.6); }

.signup-note {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: rgba(234, 246, 248, 0.55);
}

.socials {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.9rem;
  opacity: 0;
  animation: riseIn 0.8s ease 0.6s forwards;
  pointer-events: auto;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--foam);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-link svg { width: 17px; height: 17px; fill: currentColor; }
.social-link:hover {
  transform: translateY(-3px);
  background: var(--amber);
  color: var(--ink);
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.footer {
  flex: 0 0 auto;
  text-align: center;
  padding: 0 1rem 1.2rem;
  font-size: 0.78rem;
  color: rgba(234, 246, 248, 0.45);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .angler { width: 40%; max-width: 160px; }
  .countdown { gap: 0.5rem; }
  .countdown-unit { min-width: 3.6rem; padding: 0.55rem 0.3rem; }
  .countdown .num { font-size: 1.3rem; }
  .signup-field { flex-direction: column; }
  .signup-field button { justify-content: center; }
  .content { gap: 0.8rem; }
}

@media (max-width: 420px) {
  .angler { width: 34%; left: 2%; }
  .reeds--b, .reeds--d { display: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
