/* ============================================================
   CL4WD — one long dive: sunset sky → shallows → deep → seabed
   ============================================================ */

:root {
  --sky-1: #ffd98a;
  --sky-2: #ffab6b;
  --sky-3: #ff8b6a;
  --water-1: #2bb3c0;
  --water-2: #14808f;
  --water-3: #0b5468;
  --deep: #083d4f;
  --abyss: #052a3a;
  --sand: #ffe3a3;
  --coral: #ff6b5e;
  --foam: #eafbff;
  --ink: #0b3442;
  --font-display: "Baloo 2", "Comic Sans MS", cursive;
  --font-body: "Nunito", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--foam);
  background: var(--abyss);
  overflow-x: hidden;
}

h1, h2, h3, .cta, .marquee { font-family: var(--font-display); }

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 246, 200, 0.9), rgba(255, 246, 200, 0) 34%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 45%, var(--sky-3) 78%, var(--water-1) 100%);
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 9%;
  right: 14%;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d0 0%, #ffd98a 55%, rgba(255, 217, 138, 0) 72%);
  box-shadow: 0 0 90px 45px rgba(255, 230, 160, 0.55);
  animation: sun-breathe 6s ease-in-out infinite;
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.gull {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0.85;
  animation: gull-drift 26s linear infinite;
}
.gull-1 { top: 18%; animation-delay: 0s; }
.gull-2 { top: 30%; font-size: 1.1rem; animation-delay: -13s; }

@keyframes gull-drift {
  0%   { left: -6%;  transform: translateY(0); }
  25%  { transform: translateY(-18px); }
  50%  { transform: translateY(6px); }
  75%  { transform: translateY(-12px); }
  100% { left: 104%; transform: translateY(0); }
}

.hero-cloud {
  position: absolute;
  font-size: 3rem;
  opacity: 0.8;
  animation: cloud-drift 70s linear infinite;
}
.c1 { top: 12%; font-size: 3.4rem; animation-delay: 0s; }
.c2 { top: 26%; font-size: 2.4rem; animation-delay: -28s; }
.c3 { top: 7%;  font-size: 2rem;   animation-delay: -52s; }

@keyframes cloud-drift {
  from { left: -12%; }
  to   { left: 108%; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem 6rem;
}

.wordmark {
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 6px 0 rgba(255, 255, 255, 0.35), 0 14px 30px rgba(120, 40, 20, 0.25);
}

.wordmark span {
  display: inline-block;
  animation: letter-bob 2.6s ease-in-out infinite;
}
.wordmark span:nth-child(1) { animation-delay: 0s;    }
.wordmark span:nth-child(2) { animation-delay: 0.12s; }
.wordmark span:nth-child(3) { animation-delay: 0.24s; color: var(--coral); }
.wordmark span:nth-child(4) { animation-delay: 0.36s; }
.wordmark span:nth-child(5) { animation-delay: 0.48s; }

@keyframes letter-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-2deg); }
}

.tagline {
  margin-top: 1rem;
  font-size: clamp(1.15rem, 3.4vw, 1.7rem);
  font-weight: 600;
  color: var(--ink);
  opacity: 0.85;
}

.sub {
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--ink);
  opacity: 0.6;
}

.cta {
  display: inline-block;
  margin-top: 2.2rem;
  padding: 0.9rem 2.4rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, var(--coral), #e84c3d);
  border-radius: 999px;
  box-shadow: 0 8px 0 #b03a2e, 0 18px 30px rgba(120, 30, 20, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover  { transform: translateY(-3px); box-shadow: 0 11px 0 #b03a2e, 0 22px 34px rgba(120, 30, 20, 0.4); }
.cta:active { transform: translateY(4px);  box-shadow: 0 4px 0 #b03a2e, 0 10px 18px rgba(120, 30, 20, 0.35); }

/* ============ WAVE DIVIDERS ============ */

.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 90px;
  overflow: hidden;
  pointer-events: none;
}

.waves svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  animation: wave-slide 9s linear infinite;
}

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

.waves-hero svg path { fill: var(--water-1); }
.waves-mid  svg path { fill: var(--water-3); }
.waves-mid  svg      { animation-duration: 13s; animation-direction: reverse; }

/* ============ SECTIONS SHARED ============ */

section { position: relative; overflow: hidden; }

.section-title {
  text-align: center;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.section-sub {
  text-align: center;
  margin-top: 0.4rem;
  opacity: 0.8;
  font-style: italic;
}

/* ============ GAME SECTION ============ */

.game-section {
  background: linear-gradient(180deg, var(--water-1) 0%, var(--water-2) 60%, var(--water-3) 100%);
  padding: 4.5rem 1rem 8rem;
}

.cabinet {
  position: relative;
  z-index: 2;
  width: min(520px, 94vw);
  margin: 2.5rem auto 0;
  padding: 1rem 1rem 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 30px 60px rgba(0, 20, 30, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.marquee {
  text-align: center;
  padding: 0.45rem 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sand);
  text-shadow: 0 0 14px rgba(255, 227, 163, 0.7);
}

.marquee span { animation: marquee-glow 2.2s ease-in-out infinite; display: inline-block; }

@keyframes marquee-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid rgba(10, 40, 55, 0.55);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.25);
  background: #7ec8e3;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

.controls-hint {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.85;
}

.key {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.1em 0.35em;
  margin: 0 0.15em;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  text-align: center;
}

.dot { margin: 0 0.5em; opacity: 0.5; }

/* ============ BUBBLES ============ */

.bubbles { position: absolute; inset: 0; pointer-events: none; }

.bubbles i {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.08) 60%);
  animation: bubble-rise linear infinite;
  opacity: 0;
}

.bubbles i:nth-child(1)  { left: 6%;  width: 14px; height: 14px; animation-duration: 11s; animation-delay: 0s; }
.bubbles i:nth-child(2)  { left: 14%; width: 8px;  height: 8px;  animation-duration: 9s;  animation-delay: 3s; }
.bubbles i:nth-child(3)  { left: 22%; width: 18px; height: 18px; animation-duration: 14s; animation-delay: 6s; }
.bubbles i:nth-child(4)  { left: 31%; width: 10px; height: 10px; animation-duration: 10s; animation-delay: 1.5s; }
.bubbles i:nth-child(5)  { left: 42%; width: 6px;  height: 6px;  animation-duration: 8s;  animation-delay: 4.5s; }
.bubbles i:nth-child(6)  { left: 55%; width: 16px; height: 16px; animation-duration: 12s; animation-delay: 2s; }
.bubbles i:nth-child(7)  { left: 63%; width: 9px;  height: 9px;  animation-duration: 9.5s; animation-delay: 7s; }
.bubbles i:nth-child(8)  { left: 72%; width: 13px; height: 13px; animation-duration: 13s; animation-delay: 0.8s; }
.bubbles i:nth-child(9)  { left: 81%; width: 7px;  height: 7px;  animation-duration: 8.5s; animation-delay: 5s; }
.bubbles i:nth-child(10) { left: 88%; width: 15px; height: 15px; animation-duration: 12.5s; animation-delay: 3.6s; }
.bubbles i:nth-child(11) { left: 94%; width: 10px; height: 10px; animation-duration: 10.5s; animation-delay: 6.4s; }
.bubbles i:nth-child(12) { left: 49%; width: 12px; height: 12px; animation-duration: 11.5s; animation-delay: 8s; }

@keyframes bubble-rise {
  0%   { transform: translateY(0) translateX(0);      opacity: 0; }
  8%   { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-105vh) translateX(24px); opacity: 0; }
}

/* ============ FEATURE CARDS ============ */

.features {
  background: linear-gradient(180deg, var(--water-3) 0%, var(--deep) 100%);
  padding: 5rem 1.5rem 6rem;
}

.cards {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  width: min(980px, 100%);
  margin: 2.6rem auto 0;
}

.card {
  padding: 1.8rem 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 16px 34px rgba(0, 12, 20, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-8px) rotate(-0.6deg);
  box-shadow: 0 26px 44px rgba(0, 12, 20, 0.5);
}

.card-emoji { font-size: 2.6rem; margin-bottom: 0.7rem; }

.card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--sand); }

.card p { line-height: 1.55; opacity: 0.88; font-size: 0.98rem; }

/* ============ QUOTE / CARCINIZATION ============ */

.quote-section {
  background: linear-gradient(180deg, var(--deep) 0%, var(--abyss) 100%);
  padding: 6rem 1.5rem 7rem;
  text-align: center;
}

.quote-section blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 700;
  color: var(--foam);
  text-shadow: 0 0 30px rgba(43, 179, 192, 0.4);
}

.quote-section cite {
  display: block;
  margin-top: 1rem;
  font-style: italic;
  opacity: 0.65;
}

.quote-note {
  width: min(560px, 100%);
  margin: 2.2rem auto 0;
  line-height: 1.65;
  opacity: 0.8;
}

.quote-note strong { color: var(--sand); }

.float-crab {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0.35;
  animation: crab-float 7s ease-in-out infinite;
}
.f1 { left: 10%; top: 22%; animation-delay: 0s; }
.f2 { right: 12%; top: 55%; font-size: 2.2rem; animation-delay: -2.5s; }
.f3 { left: 24%; bottom: 12%; font-size: 1.2rem; animation-delay: -5s; }

@keyframes crab-float {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(26px, -18px) rotate(6deg); }
}

/* ============ FOOTER / SEABED ============ */

.seabed {
  background: linear-gradient(180deg, var(--abyss), #031c28);
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
  border-top: 6px solid var(--sand);
}

.sand-line { font-size: 1.3rem; letter-spacing: 1.2em; opacity: 0.8; margin-bottom: 1.6rem; }

.foot-main { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--sand); }

.foot-small { margin-top: 0.4rem; font-size: 0.85rem; opacity: 0.55; }

/* ============ MOTION PREFERENCES ============ */

@media (prefers-reduced-motion: reduce) {
  .wordmark span, .gull, .hero-cloud, .sun, .waves svg,
  .bubbles i, .float-crab, .marquee span {
    animation: none;
  }
}
