/* Fishdexia — fishdexia.neveroverfit.com
   Palette follows the app's V3 design system (plans/00-DESIGN-SYSTEM.md). */

:root {
  --bg-top: #f4f7f9;
  --bg-bottom: #e9f0f4;
  --card: #ffffff;
  --ink: #16242e;
  --text: #101d25;
  --text-2: #5b7382;
  --text-3: #93a7b3;
  --teal: #14b8a6;
  --aqua: #0e86a8;
  --deep-teal: #0e7490;
  --seafoam: #99f6e4;
  --orange: #f4520d;
  --orange-2: #ff7a3d;
  --cream: #faedd1;
  --line: rgba(16, 36, 46, 0.09);
  --shadow: 0 16px 34px -14px rgba(16, 36, 46, 0.24);
  --shadow-lg: 0 26px 50px -18px rgba(16, 36, 46, 0.3);
  --gutter: 24px;
  --max: 1120px;
  --r-lg: 28px;
  --r-md: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.stuck {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -14px rgba(16, 36, 46, 0.5);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--text-2); font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(244, 82, 13, 0.62);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(244, 82, 13, 0.7); }
.btn-ghost { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
#ocean { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(72% 46% at 50% 45%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 62%, var(--bg-top) 100%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 120px 0 90px; width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 17px; border-radius: 999px;
  background: #fff; color: var(--deep-teal);
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  box-shadow: var(--shadow);
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(20, 184, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

.hero h1 {
  font-size: clamp(36px, 8.5vw, 92px);
  font-weight: 700;
  margin: 26px auto 0;
  max-width: 14ch;
  color: var(--text);
}
.shimmer {
  background: linear-gradient(100deg, var(--deep-teal) 8%, var(--teal) 32%, var(--aqua) 58%, var(--deep-teal) 90%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -250% 0; } }

.hero p.lede {
  margin: 22px auto 0; max-width: 52ch;
  font-size: clamp(16px, 2.2vw, 19px); color: var(--text-2);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--text-3); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
}
.scroll-hint .line {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, transparent, var(--aqua));
  animation: drift 2.2s var(--ease) infinite;
}
@keyframes drift { 0%, 100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- sections ---------- */
section { position: relative; padding: clamp(80px, 12vw, 140px) 0; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--aqua); font-weight: 600; margin-bottom: 14px;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(29px, 4.6vw, 48px); }
.section-head p { margin-top: 16px; color: var(--text-2); font-size: 17px; }
.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.step {
  position: relative; padding: 30px 28px 32px;
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step .n { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--teal); margin-bottom: 18px; }
.step h3 { font-size: 21px; margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: 15.5px; }
.step-art { height: 118px; margin-bottom: 22px; display: grid; place-items: center; }

/* step 1: shutter */
.shutter { width: 76px; height: 76px; border-radius: 22px; border: 2px solid rgba(16, 36, 46, 0.22); display: grid; place-items: center; position: relative; }
.shutter::after { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--aqua); }
.shutter .flash { position: absolute; inset: -2px; border-radius: 22px; background: var(--cream); opacity: 0; }
.step.in .shutter .flash { animation: flash 3.4s var(--ease) infinite; }
@keyframes flash { 0%, 82% { opacity: 0; } 86% { opacity: 0.9; } 100% { opacity: 0; } }

/* step 2: cut-out */
.cutout { position: relative; width: 120px; height: 90px; border-radius: 14px; background: #eef6f9; border: 1px dashed rgba(14, 134, 168, 0.45); display: grid; place-items: center; overflow: hidden; }
.cutout img { width: 74px; }
.cutout .scan { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--teal), transparent); top: 0; }
.step.in .cutout .scan { animation: scan 2.8s var(--ease) infinite; }
@keyframes scan { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* step 3: tank */
.mini-tank { width: 130px; height: 92px; border-radius: 16px; background: linear-gradient(180deg, #a8e4ef 0%, #cfeef3 60%, #e7e2cf 100%); overflow: hidden; position: relative; }
.mini-tank img { position: absolute; width: 40px; top: 26%; left: 8%; }
.step.in .mini-tank img { animation: tankswim 9s ease-in-out infinite; }
.step.in .mini-tank img:nth-child(2) { width: 26px; top: 58%; opacity: .6; animation-duration: 12s; animation-delay: -5s; }
/* the art faces left, so flip while heading right; turn at each end, never leave the tank */
@keyframes tankswim {
  0%   { left: 8%;  transform: scaleX(-1); }
  46%  { left: 58%; transform: scaleX(-1); }
  50%  { left: 60%; transform: scaleX(1); }
  96%  { left: 10%; transform: scaleX(1); }
  100% { left: 8%;  transform: scaleX(-1); }
}

/* ---------- showcase ---------- */
.showcase { display: grid; grid-template-columns: 1fr 380px; gap: clamp(40px, 6vw, 80px); align-items: center; }
.phone {
  position: relative; width: 300px; aspect-ratio: 9 / 19.2; margin: 0 auto;
  border-radius: 46px; padding: 11px;
  background: linear-gradient(160deg, #f2f6f8, #ccd8de);
  box-shadow: 0 40px 70px -26px rgba(16, 36, 46, 0.45), 0 0 0 1px rgba(16, 36, 46, 0.08);
}
.phone::before {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 24px; border-radius: 999px; background: var(--ink); z-index: 3;
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: linear-gradient(180deg, #1ca6c9 0%, #47c9d8 45%, #cfdcc9 100%); }
.phone-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone-ui { position: absolute; inset: 0; z-index: 2; padding: 52px 16px 18px; display: flex; flex-direction: column; }
.phone-title { font-size: 24px; font-weight: 700; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.22); }
.phone-chips { display: flex; gap: 6px; margin-top: 12px; }
.phone-chips span { font-size: 10.5px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.3); color: #fff; backdrop-filter: blur(6px); }
.phone-chips span.on { background: var(--cream); color: var(--ink); font-weight: 600; }
.phone-bar {
  margin-top: auto; height: 46px; border-radius: 23px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: space-around;
  box-shadow: 0 8px 20px -8px rgba(16, 36, 46, 0.4);
}
.phone-bar i { width: 15px; height: 15px; border-radius: 4px; background: #c2d4dd; display: block; }
.phone-bar i.on { background: var(--orange); }
.phone-fab {
  position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%);
  width: 50px; height: 50px; border-radius: 50%; background: var(--ink); z-index: 3;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px -4px rgba(16, 36, 46, 0.5);
}
.phone-fab img { width: 24px; }

.showcase-list { display: grid; gap: 26px; }
.sc-item { display: flex; gap: 16px; }
.sc-item .ic {
  flex: 0 0 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: #fff; color: var(--aqua); box-shadow: var(--shadow);
}
.sc-item h3 { font-size: 18px; margin-bottom: 5px; }
.sc-item p { color: var(--text-2); font-size: 15.5px; }

/* ---------- features ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 28px 26px 30px; border-radius: var(--r-md);
  background: var(--card); box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s var(--ease);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(20, 184, 166, 0.13), transparent 45%);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card .ic { color: var(--teal); margin-bottom: 16px; display: block; }
.card h3 { font-size: 18.5px; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 15px; }

/* ---------- cta band ---------- */
.band {
  position: relative; border-radius: 36px; overflow: hidden;
  padding: clamp(50px, 8vw, 86px) var(--gutter); text-align: center;
  background: linear-gradient(140deg, #e3f7f4 0%, #ffffff 48%, #dcf0f6 100%);
  box-shadow: var(--shadow);
}
.band canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.band > * { position: relative; z-index: 2; }
.band h2 { font-size: clamp(27px, 4.4vw, 44px); max-width: 18ch; margin: 0 auto; }
.band p { color: var(--text-2); margin: 18px auto 0; max-width: 46ch; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0 56px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--text-2); text-decoration: none; font-size: 14.5px; transition: color 0.2s; }
footer a:hover { color: var(--aqua); }
.copy { font-size: 14px; color: var(--text-3); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.1s; }
.reveal[data-d="2"] { transition-delay: 0.2s; }
.reveal[data-d="3"] { transition-delay: 0.3s; }
.reveal[data-d="4"] { transition-delay: 0.4s; }
.reveal[data-d="5"] { transition-delay: 0.5s; }

/* ---------- legal / prose pages ---------- */
.page-top {
  position: relative; padding: 150px 0 60px; overflow: hidden;
  background: linear-gradient(180deg, #d8eef5 0%, var(--bg-top) 100%);
  border-bottom: 1px solid var(--line);
}
.page-top .wrap { max-width: 720px; }
.page-top h1 { font-size: clamp(34px, 6vw, 56px); }
.page-top .updated { margin-top: 14px; color: var(--text-2); font-size: 15px; }

.prose { max-width: 720px; padding-top: 56px; padding-bottom: 96px; }
.prose > p, .prose > ul { color: var(--text-2); font-size: 16.5px; }
.prose > p { margin-top: 18px; }
.prose h2 { font-size: 22px; margin-top: 46px; color: var(--text); }
.prose ul { margin: 16px 0 0; padding-left: 22px; }
.prose li { margin-bottom: 9px; }
.prose li strong, .prose p strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--aqua); text-underline-offset: 3px; }
.prose a:hover { color: var(--deep-teal); }
.prose .lead {
  font-size: 18px; color: var(--text);
  padding: 24px 26px; margin-top: 8px;
  border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow);
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; }
  .showcase-list { order: 2; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 110px 0 100px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .band { border-radius: 26px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* The fish/logo art ships as white-on-transparent (it lives on the app's dark
   splash and aquarium). brightness(0) recolours it to ink for light surfaces. */
.brand img { border-radius: 7px; box-shadow: 0 4px 10px -4px rgba(0, 80, 180, 0.5); }
.cutout img { filter: brightness(0); opacity: 0.85; }
.mini-tank img { filter: brightness(0); opacity: 0.72; }
.phone-fab img { filter: none; }

/* ---------- screenshots gallery ---------- */
.shots {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* align the first card with the content column, then let cards run to the edge */
  --shots-inset: max(var(--gutter), calc(50vw - var(--max) / 2 + var(--gutter)));
  scroll-padding-inline-start: var(--shots-inset);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 36, 46, 0.18) transparent;
}
.shots-track {
  display: flex; gap: 24px;
  width: max-content;
  list-style: none; margin: 0;
  padding: 10px var(--shots-inset) 30px;
}
.shot { flex: 0 0 auto; scroll-snap-align: start; }
.shot img {
  display: block; height: 560px; width: auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.shot:hover img { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
@media (max-width: 640px) {
  .shot img { height: 520px; }
}
