/* ============================================================
   AquaGuru — marketing site
   Tokens mirror the app theme (design_handoff_aquaguru/aquaguru.css)
   ============================================================ */

:root {
  --bg: #0A141A;
  --bg-deep: #071014;
  --card: #10202A;
  --card-2: #152935;
  --card-3: #1A3140;
  --line: rgba(141, 211, 235, 0.10);
  --line-strong: rgba(141, 211, 235, 0.18);
  --text: #E9F3F6;
  --text-2: #93ACB7;
  --text-3: #5D7682;
  --mint: #3BE0B0;
  --mint-dim: rgba(59, 224, 176, 0.14);
  --cyan: #56C9F0;
  --cyan-dim: rgba(86, 201, 240, 0.13);
  --amber: #E9B45C;
  --amber-dim: rgba(233, 180, 92, 0.13);
  --coral: #F27A6E;
  --coral-dim: rgba(242, 122, 110, 0.13);
  --purple: #9B7FE8;
  --purple-dim: rgba(155, 127, 232, 0.13);
  --lime: #6CD86C;
  --lime-dim: rgba(108, 216, 108, 0.13);
  --orange: #E8A05C;
  --orange-dim: rgba(232, 160, 92, 0.13);

  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(120% 50% at 50% 0%, #0E1D26 0%, #0A141A 55%);
  pointer-events: none;
  z-index: -1;
}

::selection { background: rgba(59, 224, 176, 0.25); }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--mono); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Nav ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 20, 26, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--card-3), var(--card));
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.logo-mark svg { display: block; }
.logo-mark img { display: block; }
.logo .guru { color: var(--mint); }

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.btn-mint, .nav-links a.btn-mint:hover { color: #06231A; }

@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  padding: 11px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-mint {
  background: var(--mint);
  color: #06231A;
}
.btn-mint:hover { box-shadow: 0 6px 24px rgba(59, 224, 176, 0.28); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(141, 211, 235, 0.06); }

.btn-sm { padding: 8px 15px; font-size: 14px; border-radius: 10px; }

/* App Store badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 10px 20px 10px 16px;
  color: #fff;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.appstore-badge:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(141, 211, 235, 0.35);
}
.appstore-badge .txt { line-height: 1.15; text-align: left; }
.appstore-badge .txt small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: #B9C4C9;
  letter-spacing: 0.02em;
}
.appstore-badge .txt strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 148px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(86, 201, 240, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 22px;
}
h1 .accent { color: var(--mint); }

.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 520px;
  margin-bottom: 34px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-ctas {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.03em;
}

/* ---------------- Phone mockup ---------------- */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.phone {
  width: 302px;
  border-radius: 46px;
  background: #0D181F;
  border: 1px solid var(--line-strong);
  box-shadow:
    0 0 0 10px #060D11,
    0 0 0 11px rgba(141, 211, 235, 0.14),
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(59, 224, 176, 0.07);
  padding: 12px;
  position: relative;
  z-index: 2;
}
.screen {
  border-radius: 36px;
  background: radial-gradient(120% 40% at 50% 0%, #0E1D26 0%, #0A141A 55%);
  border: 1px solid var(--line);
  padding: 18px 16px 20px;
  overflow: hidden;
}
.screen-status {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  padding: 2px 6px 14px;
}

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.screen-head h4 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.chip {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-mint { color: var(--mint); background: var(--mint-dim); }
.chip-cyan { color: var(--cyan); background: var(--cyan-dim); }
.chip-amber { color: var(--amber); background: var(--amber-dim); }
.chip-coral { color: var(--coral); background: var(--coral-dim); }

.ag-card {
  background: linear-gradient(180deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
}
.screen .ag-card + .ag-card { margin-top: 10px; }

.card-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.readout {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.readout .unit {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  margin-left: 4px;
}
.readout-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 8px;
}

.dose-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.dose-row + .dose-row { border-top: 1px solid var(--line); }
.dose-check {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 12px;
}
.dose-check.done {
  background: var(--mint-dim);
  border-color: rgba(59, 224, 176, 0.4);
  color: var(--mint);
}
.dose-name { font-size: 13px; font-weight: 500; flex: 1; }
.dose-ml {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--mint);
}
.dose-row.pending .dose-ml { color: var(--text-2); }

.spark-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.spark-val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
}
.spark-val .down { color: var(--mint); font-size: 11px; }

/* Floating cards around the phone */
.float-card {
  position: absolute;
  background: linear-gradient(180deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 13px 15px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  z-index: 3;
  max-width: 220px;
}
.float-ai {
  top: 6%;
  right: max(calc(50% - 320px), -8px);
  overflow: hidden;
}
.float-wc {
  bottom: 0;
  left: max(calc(50% - 330px), -8px);
}
@media (max-width: 1060px) and (min-width: 921px) {
  .float-ai { right: -12px; }
  .float-wc { left: -12px; }
}
@media (max-width: 480px) {
  .float-card { display: none; }
}

.float-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}
.float-title .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.float-main { font-size: 13.5px; font-weight: 600; }
.float-main .pct {
  font-family: var(--mono);
  color: var(--mint);
}
.float-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 3px;
}
.float-sub b { color: var(--cyan); font-weight: 600; }

/* AquaAI scan line — the one looping animation */
.scanline {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mint), transparent);
  opacity: 0.75;
  animation: scan 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scan {
  0%, 100% { top: 12%; }
  50% { top: 88%; }
}

/* ---------------- Sections ---------------- */

section { padding: 92px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 16px;
}
.section-head p { color: var(--text-2); font-size: 16.5px; }

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 920px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features-grid { grid-template-columns: 1fr; } }

.feature {
  background: linear-gradient(180deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.feature h3 {
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature p { font-size: 14.5px; color: var(--text-2); }
.feature p b { color: var(--text); font-weight: 600; }

/* ---------------- Math section ---------------- */

.math-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 52px;
}
@media (max-width: 880px) {
  .math-panel { grid-template-columns: 1fr; padding: 34px 26px; }
}
.math-copy .kicker { color: var(--cyan); }
.math-copy p { color: var(--text-2); font-size: 16px; margin-bottom: 14px; }
.math-copy p b { color: var(--text); }

.codeblock {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 24px 22px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.85;
  overflow-x: auto;
  white-space: pre;
}
.codeblock .c { color: var(--text-3); }   /* comment */
.codeblock .k { color: var(--cyan); }     /* keyword/var */
.codeblock .n { color: var(--mint); }     /* number */
.codeblock .o { color: var(--text-2); }   /* operator */

/* ---------------- AquaAI section ---------------- */

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) { .ai-grid { grid-template-columns: 1fr; gap: 44px; } }

.chat-mock {
  background: linear-gradient(180deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 15px;
  font-size: 13.5px;
  line-height: 1.55;
}
.bubble.user {
  align-self: flex-end;
  background: var(--card-3);
  border: 1px solid var(--line);
  border-bottom-right-radius: 5px;
}
.bubble.ai {
  align-self: flex-start;
  background: var(--bg-deep);
  border: 1px solid rgba(59, 224, 176, 0.22);
  border-bottom-left-radius: 5px;
  color: var(--text-2);
}
.bubble.ai b { color: var(--text); font-weight: 600; }
.bubble.ai .m { font-family: var(--mono); color: var(--mint); font-weight: 600; font-size: 12.5px; }
.chat-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-left: 4px;
}

.ai-points { list-style: none; display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }
.ai-points li { display: flex; gap: 16px; }
.ai-points .pt-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.ai-points h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.ai-points p { font-size: 14.5px; color: var(--text-2); }

/* ---------------- Estimate strip ---------------- */

.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 32, 42, 0.45);
  padding: 44px 0;
}
.strip-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.strip h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.strip p { color: var(--text-2); font-size: 15px; max-width: 560px; }
.strip .chip { font-size: 12px; padding: 6px 13px; }

/* ---------------- CTA ---------------- */

.cta-card {
  text-align: center;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(59, 224, 176, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  padding: 72px 32px;
}
.cta-card h2 { margin-bottom: 14px; }
.cta-card p { color: var(--text-2); font-size: 16.5px; margin-bottom: 34px; }

/* ---------------- Footer ---------------- */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner .logo { font-size: 16px; }
.footer-links {
  margin-left: auto;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.copyright {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}

/* ---------------- Scroll reveal ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Legal pages (privacy / terms)
   ============================================================ */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 24px 96px;
}
.legal-head { margin-bottom: 44px; }
.legal-head .kicker { color: var(--cyan); }
.legal-head h1 { font-size: clamp(32px, 4.5vw, 44px); margin-bottom: 12px; }
.legal-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
}
.legal-meta b { color: var(--text-2); font-weight: 500; }

.legal-card {
  background: linear-gradient(180deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 0 0 40px;
  color: var(--text-2);
  font-size: 15px;
}
.legal-card b { color: var(--text); }

.legal h2 {
  font-size: 22px;
  margin: 44px 0 14px;
  padding-top: 8px;
  letter-spacing: -0.015em;
}
.legal h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin: 26px 0 8px;
  color: var(--text);
}
.legal p { color: var(--text-2); font-size: 15.5px; margin-bottom: 14px; }
.legal p b, .legal li b { color: var(--text); font-weight: 600; }
.legal ul { margin: 0 0 16px 22px; }
.legal li { color: var(--text-2); font-size: 15.5px; margin-bottom: 8px; }
.legal .small { font-size: 13.5px; color: var(--text-3); }

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 14px;
}
.legal th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-strong);
}
.legal td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: top;
}
.legal td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
