@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Space+Grotesk:wght@300..700&display=swap");

:root {
  --brine: #0d1b26;        /* deep brine */
  --brine-2: #12293a;
  --kelp: #1e4d4b;
  --algae: #7fd1a8;        /* living green */
  --bone: #f4ead8;         /* salt bone */
  --salt: #fdfbf4;
  --coral: #ff8f7b;        /* bloom coral */
  --orchid: #c9a7eb;       /* meridian orchid */
  --gold: #e8c468;
  --ink: #0a141d;
  --radius-blob: 38% 62% 55% 45% / 48% 42% 58% 52%;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--bone);
  background:
    radial-gradient(1200px 700px at 85% -10%, #1c3a4d 0%, transparent 60%),
    radial-gradient(1000px 800px at -10% 110%, #25324a 0%, transparent 55%),
    linear-gradient(160deg, var(--brine) 0%, #0a1620 70%, #080f16 100%);
  overflow-x: hidden;
}

/* ambient drifting blobs behind everything */
.ooze {
  position: fixed; z-index: 0; pointer-events: none;
  filter: blur(70px); opacity: 0.35;
  animation: ooze 26s ease-in-out infinite alternate;
}
.ooze-a { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: #1e5d55; border-radius: var(--radius-blob); }
.ooze-b { width: 42vmax; height: 42vmax; right: -10vmax; bottom: -12vmax; background: #4a2f5e; border-radius: 62% 38% 45% 55% / 55% 60% 40% 45%; animation-delay: -13s; }
@keyframes ooze {
  from { transform: translate(0, 0) scale(1) rotate(0deg); }
  to   { transform: translate(4vmax, 3vmax) scale(1.15) rotate(25deg); }
}

#app {
  position: relative; z-index: 1;
  max-width: 920px; margin: 0 auto;
  padding: 40px 20px 64px;
}

.masthead { text-align: left; margin-bottom: 22px; }
.kicker {
  margin: 0 0 8px; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--algae);
}
h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: clamp(44px, 9vw, 84px);
  line-height: 0.95; margin: 0 0 12px; color: var(--salt);
  letter-spacing: -0.01em;
}
h1 em { font-style: italic; font-weight: 300; color: var(--coral); }
.lede { max-width: 56ch; margin: 0; color: #c9d6cf; font-size: 15px; line-height: 1.65; font-weight: 300; }

/* ---- lagoon ---- */
.lagoon-wrap { margin-top: 8px; }
.lagoon-frame {
  position: relative; padding: 10px;
  background: linear-gradient(150deg, rgba(244,234,216,0.14), rgba(244,234,216,0.03));
  border: 1px solid rgba(244,234,216,0.16);
  border-radius: 46% 54% 52% 48% / 9% 10% 8% 9%;
  border-bottom-left-radius: 120px 40px;
  border-bottom-right-radius: 120px 40px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(253,251,244,0.15);
}
#lagoon {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10;
  border-radius: 44% 56% 50% 50% / 7% 8% 6% 7%;
  border-bottom-left-radius: 110px 34px;
  border-bottom-right-radius: 110px 34px;
  background: #0b1a28;
  cursor: pointer;
  touch-action: manipulation;
}
.hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  margin: 0; padding: 6px 16px; font-size: 13px; letter-spacing: 0.08em;
  color: var(--salt); background: rgba(10,20,29,0.55); backdrop-filter: blur(6px);
  border: 1px solid rgba(253,251,244,0.25); border-radius: 999px;
  pointer-events: none; transition: opacity 0.8s ease;
}
.hint.fade { opacity: 0; }

/* ---- stats ---- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 14px 0 0;
}
.stat {
  background: rgba(244,234,216,0.06);
  border: 1px solid rgba(244,234,216,0.14);
  border-radius: 22px 26px 24px 28px;
  padding: 12px 14px 10px;
  display: flex; flex-direction: column; gap: 2px;
  transition: transform 0.25s ease, background 0.25s ease;
}
.stat:hover { transform: translateY(-2px); background: rgba(244,234,216,0.1); }
.stat-num { font-family: "Fraunces", serif; font-size: 24px; color: var(--salt); line-height: 1; }
.stat-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #9db8ad; }
.sal-bar { display: block; height: 6px; margin-top: 6px; border-radius: 99px; background: rgba(253,251,244,0.12); overflow: hidden; }
.sal-bar span { display: block; height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--algae), var(--gold), var(--coral)); transition: width 0.6s ease; }

/* ---- control panel ---- */
.panel {
  margin-top: 16px; padding: 18px 18px 14px;
  background: rgba(18, 41, 58, 0.6); backdrop-filter: blur(10px);
  border: 1px solid rgba(244,234,216,0.14);
  border-radius: 28px 34px 30px 36px;
}
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.row + .row { border-top: 1px dashed rgba(244,234,216,0.14); }
.row-label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--orchid); min-width: 108px;
}
.pill {
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink); background: linear-gradient(160deg, var(--algae), #a8e6c5);
  border: none; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 18px rgba(127,209,168,0.25);
}
.pill:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.06); }
.pill:active { transform: scale(0.96); }
.pill.ghost {
  background: transparent; color: var(--bone);
  border: 1px solid rgba(244,234,216,0.35); box-shadow: none;
}
.pill.ghost:hover { border-color: var(--coral); color: var(--coral); }
.pill.soft {
  background: rgba(201,167,235,0.14); color: var(--orchid);
  border: 1px solid rgba(201,167,235,0.4); box-shadow: none;
}
.pill.soft:hover { background: rgba(201,167,235,0.28); }
.pill.warm { background: linear-gradient(160deg, var(--coral), var(--gold)); box-shadow: 0 4px 18px rgba(255,143,123,0.3); }
.toast { min-height: 22px; margin: 8px 0 0; font-size: 13px; color: var(--gold); letter-spacing: 0.03em; }

.foot { margin-top: 18px; color: #8ba39a; font-size: 12.5px; }
.foot code { color: var(--algae); font-size: 12px; }

@media (max-width: 560px) {
  #app { padding: 28px 14px 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .row-label { min-width: 100%; }
  .pill { font-size: 13px; padding: 9px 15px; }
}
