/* =========================================================
   Prism Reef — Coming Soon
   Deep-ocean, illustrated coral theme
   ========================================================= */

:root {
  --ink-deep:      #05141b;
  --ink:           #0a2530;
  --ink-soft:      #123c46;
  --teal:          #2bb6a8;
  --teal-light:    #5fe0c7;
  --coral:         #ff6f5b;
  --coral-light:   #ffb27a;
  --gold:          #ffd36e;
  --cream:         #f7efe4;
  --cream-dim:     rgba(247, 239, 228, 0.72);
  --cream-faint:   rgba(247, 239, 228, 0.46);
  --glass-bg:      rgba(10, 37, 48, 0.35);
  --glass-border:  rgba(247, 239, 228, 0.14);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink-deep);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.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;
}

/* subtle film-grain overlay for a refined, non-flat finish */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------------- HERO ---------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  background: var(--ink-deep); /* shows while the poster/video loads */
}

/* darkens + color-balances the footage so the text card stays legible
   regardless of which clip is on screen */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(75% 60% at 50% 20%, rgba(5, 20, 27, 0.25) 0%, rgba(5, 20, 27, 0.55) 55%, rgba(5, 20, 27, 0.82) 100%),
    linear-gradient(180deg, rgba(5, 20, 27, 0.35) 0%, rgba(5, 20, 27, 0.15) 30%, rgba(5, 20, 27, 0.55) 100%);
}

/* soft fade from the video into the section below it */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 20, 27, 0) 0%, var(--ink-deep) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero { background: var(--ink-deep) url("../images/poster.jpg") center/cover no-repeat; }
}

/* ---------------- CONTENT ---------------- */

.content {
  position: relative;
  z-index: 2;
  width: min(640px, 90vw);
  text-align: center;
  padding: 48px 40px 44px;
  border-radius: 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.32em;
  font-weight: 500;
  color: var(--teal-light);
  text-transform: uppercase;
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 84px);
  line-height: 1;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, var(--cream) 0%, var(--gold) 55%, var(--coral-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.6vw, 24px);
  color: var(--cream-dim);
  line-height: 1.4;
}

.lede {
  margin: 22px auto 0;
  max-width: 460px;
  font-size: 15.5px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--cream-dim);
}

/* signup form */
.signup {
  margin: 34px auto 0;
  display: flex;
  gap: 10px;
  max-width: 420px;
  flex-wrap: wrap;
  justify-content: center;
}

.signup input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 15px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(5, 20, 27, 0.45);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.signup input[type="email"]::placeholder {
  color: var(--cream-faint);
}

.signup input[type="email"]:focus {
  border-color: var(--teal-light);
  background: rgba(5, 20, 27, 0.65);
}

.signup input.invalid {
  border-color: var(--coral);
}

.signup button {
  flex: 0 0 auto;
  padding: 15px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  color: var(--ink-deep);
  background: linear-gradient(120deg, var(--gold), var(--coral-light));
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 8px 24px rgba(255, 138, 91, 0.28);
}

.signup button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 30px rgba(255, 138, 91, 0.38);
}

.signup button:active {
  transform: translateY(0);
}

.signup button:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.form-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--cream-dim);
  letter-spacing: 0.01em;
  min-height: 16px;
}

.form-note.success { color: var(--teal-light); }
.form-note.error   { color: var(--coral-light); }
.contact-email {
  margin: 14px 0 0;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.contact-email a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--cream-faint);
}

.contact-email a:hover {
  color: var(--teal-light);
  border-color: var(--teal-light);
}
.contact-email {
  margin: 14px 0 0;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.contact-email a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--cream-faint);
}

.contact-email a:hover {
  color: var(--teal-light);
  border-color: var(--teal-light);
}

/* ---------------- ABOUT (below the hero) ---------------- */

.nowrap { white-space: nowrap; }

.about {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 96px 24px 88px;
  text-align: center;
}

.about h2 {
  margin: 0 auto;
  max-width: 640px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.15;
  color: var(--cream);
}

.about-intro {
  margin: 20px auto 0;
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--cream-dim);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
  text-align: left;
}

.about-item {
  padding: 28px 26px 26px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.about-item h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.3;
  color: var(--cream);
}

.about-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--cream-dim);
}

@media (max-width: 820px) {
  .about { padding: 72px 20px 64px; }
  .about-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 40px; }
}

/* ---------------- FOOTER ---------------- */

.site-footer {
  position: relative;
  z-index: 2;
  background: var(--ink-deep);
  color: var(--cream-faint);
  text-align: center;
  padding: 22px 20px 26px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  border-top: 1px solid rgba(247, 239, 228, 0.08);
}

.site-footer p { margin: 0 0 8px; }

.social {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.social-link {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.social-link:hover {
  color: var(--teal-light);
  border-color: var(--teal-light);
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 560px) {
  .content {
    padding: 38px 24px 34px;
    border-radius: 18px;
  }
  .signup {
    flex-direction: column;
  }
  .signup input[type="email"] {
    flex: 0 0 auto;
    width: 100%;
  }
  .signup button {
    width: 100%;
    flex: 0 0 auto;
  }
  .br-mobile { display: none; }
}

@media (min-height: 900px) {
  .content { padding-top: 56px; padding-bottom: 52px; }
}


/* ---------------- COOKIE BANNER ---------------- */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(680px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px 14px 22px;
  border-radius: 16px;
  background: rgba(5, 20, 27, 0.82);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  color: var(--cream-dim);
  font-size: 13.5px;
  line-height: 1.5;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner p { margin: 0; flex: 1; }

.cookie-banner a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--cream-faint);
}

.cookie-banner a:hover {
  color: var(--teal-light);
  border-color: var(--teal-light);
}

.cookie-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.cookie-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cookie-btn:hover { border-color: var(--teal-light); color: var(--teal-light); }

.cookie-btn.cookie-accept { background: rgba(247, 239, 228, 0.1); }

.cookie-btn:focus-visible,
.cookie-banner a:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 18px;
    bottom: 12px;
  }
  .cookie-actions .cookie-btn { flex: 1; }
}

/* ---------------- PRIVACY PAGE ---------------- */

.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  line-height: 1.7;
  font-size: 16px;
  color: var(--cream-dim);
}

.legal .back {
  display: inline-block;
  margin-bottom: 36px;
  color: var(--teal-light);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.1;
  color: var(--cream);
}

.legal .updated { margin: 0 0 40px; font-size: 13px; color: var(--cream-faint); }

.legal h2 {
  margin: 40px 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--cream);
}

.legal p, .legal ul { margin: 0 0 16px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }

.legal a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--cream-faint);
}

.legal a:hover { color: var(--teal-light); border-color: var(--teal-light); }

.legal .cookie-btn { margin-top: 4px; }

/* ---------------- TANK PARAMETERS (demo, below About) ---------------- */

.tank-demo {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 104px;
  text-align: center;
  --tank-surface:  rgba(10, 20, 48, 0.72);
  --tank-hairline: #1b2748;
  --tank-tide:     #8fbde0;
  --tank-muted:    #7f93ae;
  --tank-green:    #6fd3a6;
  --tank-mono:     ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.tank-card {
  text-align: left;
  background: var(--tank-surface);
  border: 1px solid var(--tank-hairline);
  border-radius: 2px;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.tank-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
}

.tank-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 36px;
  color: var(--cream);
}

.tank-mono {
  font-family: var(--tank-mono);
  font-size: 13px;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}

.tank-layer {
  border-top: 1px solid var(--tank-hairline);
  padding-top: 16px;
}

.tank-layer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tank-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tank-tide);
}

.tank-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tank-green);
  box-shadow: 0 0 0 4px rgba(111, 211, 166, 0.18);
  flex: none;
  animation: tank-pulse 2.4s ease-in-out infinite;
}

@keyframes tank-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(111, 211, 166, 0.10); }
  50%      { box-shadow: 0 0 0 6px rgba(111, 211, 166, 0.24); }
}

.tank-readings { display: grid; gap: 16px; }
.tank-readings-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tank-readings-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

.tank-reading { min-width: 0; }

.tank-v {
  font-family: var(--tank-mono);
  font-size: 22px;
  line-height: 28px;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tank-v-sm { font-size: 16px; }

.tank-k {
  font-family: var(--tank-mono);
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tank-muted);
}

/* "pH" stays lower-case p */
.tank-reading[data-p="ph"] .tank-k { text-transform: none; }

@media (max-width: 820px) {
  .tank-demo { padding: 0 20px 72px; }
  .tank-card { padding: 20px; }
  .tank-card h3 { font-size: 24px; line-height: 32px; }
  .tank-readings-3 { gap: 8px; }
  .tank-v { font-size: 18px; line-height: 24px; }
  .tank-v-sm { font-size: 14px; }
  .tank-readings-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
}

.tank-note { font-size: 13px; line-height: 20px; color: var(--tank-muted); }

.cycle { position: relative; margin: 18px 0 0; padding-bottom: 22px; }
.cycle-svg { display: block; width: 100%; height: 56px; }
.cycle-svg .cycle-line { stroke: var(--tank-tide); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.cycle::after { content: ""; position: absolute; left: 0; right: 0; top: 56px; border-top: 1px solid var(--tank-hairline); }
.cycle-now {
  position: absolute; top: -4px; height: 64px; width: 0;
  border-left: 1px dashed var(--cream-dim);
}
.cycle-now::before {
  content: ""; position: absolute; top: -3px; left: -4px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--cream);
}
.cycle-ticks { position: absolute; left: 0; right: 0; top: 62px; height: 16px; }
.cycle-ticks span {
  position: absolute; transform: translateX(-50%);
  font-family: var(--tank-mono); font-size: 11px; line-height: 16px;
  color: var(--tank-muted); white-space: nowrap;
}
.cycle-ticks span:first-child { transform: none; }
.cycle-ticks span:last-child { transform: translateX(-100%); }
.tank-cal {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 15px;
  color: var(--tank-muted);
  opacity: 0.85;
}
.tank-foot { margin: 12px 0 0; font-size: 13px; line-height: 20px; color: var(--tank-muted); }

@media (max-width: 820px) {
  .cycle-ticks span:nth-child(5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tank-dot { animation: none; }
}
