/* Water Calculator — wave + bubble aesthetic */
:root {
  --bg: #eaf6fb;
  --bg-elev: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-soft: #d9eef6;
  --line: rgba(10, 77, 104, 0.14);
  --text: #0b2c38;
  --muted: #3d5c68;
  --accent: #0d8a9a;
  --accent-2: #2bb3c9;
  --accent-deep: #0a4d68;
  --accent-dim: rgba(13, 138, 154, 0.14);
  --wave-1: #7ec8db;
  --wave-2: #4aa8c0;
  --wave-3: #0a4d68;
  --warn: #b45309;
  --ok: #0f766e;
  --radius: 16px;
  --shadow: 0 14px 44px rgba(10, 77, 104, 0.12);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(43, 179, 201, 0.22), transparent 58%),
    radial-gradient(780px 440px at 96% 4%, rgba(10, 77, 104, 0.12), transparent 52%),
    radial-gradient(600px 360px at 50% 100%, rgba(126, 200, 219, 0.18), transparent 60%),
    linear-gradient(180deg, #f2fafc 0%, var(--bg) 45%, #dceef5 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-deep); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
.wrap { width: min(960px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 2rem)); }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip:focus { left: 0; }

/* Floating bubbles — more visible across full page background */
.water-bubbles {
  pointer-events: none; position: fixed; inset: 0; z-index: 0; overflow: hidden;
}
.water-bubbles span {
  position: absolute; bottom: -5rem; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.55) 22%, rgba(126,200,219,.55) 48%, rgba(74,168,192,.28) 68%, transparent 74%);
  border: 1.5px solid rgba(255,255,255,.65);
  box-shadow:
    inset 0 -3px 6px rgba(10,77,104,.12),
    0 0 10px rgba(126,200,219,.35),
    0 0 2px rgba(255,255,255,.5);
  opacity: .72;
  animation: bubble-rise linear infinite;
  will-change: transform, opacity;
}
.water-bubbles span:nth-child(1)  { left: 4%;  width: 18px; height: 18px; animation-duration: 16s; animation-delay: 0s; }
.water-bubbles span:nth-child(2)  { left: 12%; width: 32px; height: 32px; animation-duration: 22s; animation-delay: -3s; opacity: .62; }
.water-bubbles span:nth-child(3)  { left: 20%; width: 12px; height: 12px; animation-duration: 14s; animation-delay: -7s; }
.water-bubbles span:nth-child(4)  { left: 28%; width: 44px; height: 44px; animation-duration: 28s; animation-delay: -1s; opacity: .55; }
.water-bubbles span:nth-child(5)  { left: 38%; width: 16px; height: 16px; animation-duration: 18s; animation-delay: -9s; }
.water-bubbles span:nth-child(6)  { left: 46%; width: 24px; height: 24px; animation-duration: 20s; animation-delay: -5s; opacity: .68; }
.water-bubbles span:nth-child(7)  { left: 54%; width: 10px; height: 10px; animation-duration: 13s; animation-delay: -11s; }
.water-bubbles span:nth-child(8)  { left: 62%; width: 36px; height: 36px; animation-duration: 25s; animation-delay: -2s; opacity: .58; }
.water-bubbles span:nth-child(9)  { left: 70%; width: 14px; height: 14px; animation-duration: 17s; animation-delay: -8s; }
.water-bubbles span:nth-child(10) { left: 78%; width: 28px; height: 28px; animation-duration: 23s; animation-delay: -6s; opacity: .65; }
.water-bubbles span:nth-child(11) { left: 86%; width: 20px; height: 20px; animation-duration: 19s; animation-delay: -4s; }
.water-bubbles span:nth-child(12) { left: 94%; width: 40px; height: 40px; animation-duration: 27s; animation-delay: -10s; opacity: .5; }
.water-bubbles span:nth-child(13) { left: 8%;  width: 8px;  height: 8px;  animation-duration: 12s; animation-delay: -14s; }
.water-bubbles span:nth-child(14) { left: 33%; width: 22px; height: 22px; animation-duration: 21s; animation-delay: -12s; opacity: .7; }
.water-bubbles span:nth-child(15) { left: 58%; width: 48px; height: 48px; animation-duration: 30s; animation-delay: -15s; opacity: .48; }
.water-bubbles span:nth-child(16) { left: 90%; width: 14px; height: 14px; animation-duration: 15s; animation-delay: -16s; }
@keyframes bubble-rise {
  0%   { transform: translate3d(0, 0, 0) scale(.85); opacity: 0; }
  6%   { opacity: .75; }
  40%  { transform: translate3d(14px, -42vh, 0) scale(1.08); }
  70%  { transform: translate3d(-10px, -78vh, 0) scale(1); opacity: .55; }
  100% { transform: translate3d(8px, -112vh, 0) scale(.88); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .water-bubbles span {
    animation: none !important;
    opacity: .38;
    transform: none;
    will-change: auto;
  }
  .water-bubbles span:nth-child(1)  { bottom: 12%; }
  .water-bubbles span:nth-child(2)  { bottom: 48%; }
  .water-bubbles span:nth-child(3)  { bottom: 28%; }
  .water-bubbles span:nth-child(4)  { bottom: 65%; }
  .water-bubbles span:nth-child(5)  { bottom: 18%; }
  .water-bubbles span:nth-child(6)  { bottom: 55%; }
  .water-bubbles span:nth-child(7)  { bottom: 35%; }
  .water-bubbles span:nth-child(8)  { bottom: 72%; }
  .water-bubbles span:nth-child(9)  { bottom: 22%; }
  .water-bubbles span:nth-child(10) { bottom: 42%; }
  .water-bubbles span:nth-child(11) { bottom: 58%; }
  .water-bubbles span:nth-child(12) { bottom: 30%; }
  .water-bubbles span:nth-child(13) { bottom: 78%; }
  .water-bubbles span:nth-child(14) { bottom: 15%; }
  .water-bubbles span:nth-child(15) { bottom: 50%; }
  .water-bubbles span:nth-child(16) { bottom: 68%; }
  .wave-layer { animation: none !important; }
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(242, 250, 252, 0.88);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -.02em;
  font-size: 1.05rem;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(145deg, #7dd3fc, var(--accent-deep));
  box-shadow: 0 0 0 3px rgba(13, 138, 154, 0.18);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px 9px 9px 9px;
  border-radius: 40% 40% 50% 50%; background: rgba(255,255,255,.55);
}
.site-nav { display: flex; align-items: center; gap: .2rem 1.1rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 600;
  padding: .35rem 0;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent-deep); }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--line);
  border-radius: 10px; width: 44px; height: 44px; padding: 10px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px;
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 60px;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: .75rem 1rem 1rem; gap: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .7rem .4rem; border-bottom: 1px solid var(--line); }
}

.hero-tool {
  padding: 1.75rem 0 2.5rem;
  position: relative; z-index: 1;
}
.hero-tool h1 {
  margin: 0 0 .4rem; font-size: clamp(1.65rem, 4vw, 2.15rem);
  letter-spacing: -.03em; line-height: 1.2; color: var(--accent-deep);
}
.hero-tool .lead {
  margin: 0 0 1.25rem; color: var(--muted); font-size: 1.05rem; max-width: 42rem;
}
.eyebrow {
  display: inline-block; margin: 0 0 .5rem; font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.calc-card {
  background: var(--bg-card); border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.8);
  padding: 1.25rem 1.35rem 1.4rem;
  backdrop-filter: blur(8px);
  position: relative; z-index: 2;
}
.calc-grid {
  display: grid; gap: 1rem; grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
  .calc-grid { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 700; font-size: .9rem; color: var(--accent-deep); }
.field .hint { font-size: .8rem; color: var(--muted); margin: 0; }
.field input[type="number"], .field select {
  appearance: none; -webkit-appearance: none;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: .7rem .85rem; font: inherit; font-size: 1.05rem; font-weight: 600;
  background: #f7fcfd; color: var(--text); width: 100%;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: .35rem; background: var(--bg-soft);
  padding: .3rem; border-radius: 999px; border: 1px solid var(--line);
}
.segmented button {
  border: 0; background: transparent; color: var(--muted); font: inherit;
  font-weight: 700; font-size: .88rem; padding: .45rem .85rem; border-radius: 999px;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--accent-deep); color: #fff; box-shadow: 0 2px 8px rgba(10,77,104,.25);
}
.field-span { grid-column: 1 / -1; }
.result-panel {
  margin-top: 1.15rem; padding: 1.15rem 1.2rem; border-radius: 14px;
  background: linear-gradient(145deg, #e8f8fc, #d4eef6);
  border: 1px solid rgba(13, 138, 154, 0.28);
}
.result-panel[hidden] { display: none !important; }
.result-main {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem;
  margin-bottom: .65rem;
}
.result-main .amount {
  font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -.03em;
  color: var(--accent-deep); line-height: 1.1;
}
.result-main .unit-label { font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.result-breakdown {
  display: grid; gap: .55rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: .75rem 0;
}
.chip {
  background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 12px;
  padding: .65rem .8rem;
}
.chip strong { display: block; font-size: 1.15rem; color: var(--accent-deep); }
.chip span { font-size: .82rem; color: var(--muted); }
.formula {
  margin: .75rem 0 0; font-size: .88rem; color: var(--muted); line-height: 1.5;
}
.disclaimer {
  margin: .85rem 0 0; font-size: .82rem; color: var(--warn);
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: .65rem .8rem;
}
.section { padding: 2rem 0; position: relative; z-index: 1; }
.section h2 {
  margin: 0 0 .75rem; font-size: 1.35rem; letter-spacing: -.02em; color: var(--accent-deep);
}
.faq details {
  background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 12px;
  padding: .85rem 1rem; margin-bottom: .6rem;
  box-shadow: 0 4px 16px rgba(10,77,104,.04);
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--accent-deep); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--accent); font-weight: 800; }
.faq details[open] summary::before { content: "− "; }
.faq details p { margin: .55rem 0 0; color: var(--muted); font-size: .95rem; }

/* Hero wave under calculator */
.hero-waves {
  position: relative; height: 72px; margin-top: -0.5rem; margin-bottom: -1px;
  z-index: 0; overflow: hidden; pointer-events: none;
}
.hero-waves svg { width: 100%; height: 100%; display: block; }
.hero-waves .w1 { fill: rgba(126, 200, 219, 0.45); }
.hero-waves .w2 { fill: rgba(74, 168, 192, 0.4); }
.hero-waves .w3 { fill: rgba(10, 77, 104, 0.18); }

/* Bottom page waves */
.wave-band {
  position: relative; z-index: 1; margin-top: 1rem; height: 120px;
  overflow: hidden; pointer-events: none; line-height: 0;
}
.wave-band svg { width: 100%; height: 120px; display: block; }
.wave-layer { animation: wave-drift 12s ease-in-out infinite alternate; }
.wave-layer.w-slow { animation-duration: 18s; animation-delay: -3s; }
.wave-layer.w-mid { animation-duration: 14s; animation-delay: -6s; }
@keyframes wave-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-3%); }
}

.page-hero { padding: 1.75rem 0 0.5rem; position: relative; z-index: 1; }
.page-hero h1 { margin: 0 0 .4rem; color: var(--accent-deep); letter-spacing: -.02em; }
.prose p, .prose li { color: var(--muted); }
.prose h2 { color: var(--accent-deep); font-size: 1.15rem; margin-top: 1.5rem; }
.prose address { color: var(--muted); }
.callout {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: .9rem 1rem; color: var(--muted); font-size: .95rem;
}
.site-footer {
  margin-top: 0; padding: 2rem 0 2.5rem; border-top: none;
  background: linear-gradient(180deg, #0a4d68 0%, #083d52 100%);
  color: rgba(255,255,255,.88);
  position: relative; z-index: 2;
}
.footer-grid {
  display: grid; gap: 1.5rem; grid-template-columns: 1.4fr 1fr 1fr;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  margin: 0 0 .5rem; font-size: .85rem; text-transform: uppercase;
  letter-spacing: .05em; color: #a8e0ef;
}
.site-footer a {
  display: block; color: rgba(255,255,255,.82); text-decoration: none;
  margin: .25rem 0; font-size: .92rem;
}
.site-footer a:hover { color: #fff; }
.footer-tag { color: rgba(255,255,255,.72); font-size: .9rem; margin: .4rem 0 0; }
.footer-brand { font-weight: 800; color: #fff !important; margin-bottom: .25rem; }
.footer-meta { margin-top: 1.5rem; font-size: .8rem; color: rgba(255,255,255,.55); }
main { position: relative; z-index: 1; }
