/* ------------------------------------------------------------------ *
 * One Fish Two Fish — website styles
 * Palette is lifted straight from the app (src/theme.ts) so the site
 * and the app read as the same thing.
 * ------------------------------------------------------------------ */

:root {
  --ground:      #EEF3F3;
  --ground2:     #E3EBEB;
  --surface:     #FFFFFF;
  --surface2:    #F1F6F6;
  --line:        #D3DEDE;
  --line-soft:   #E3EBEB;
  --ink:         #08222B;
  --ink2:        #476068;
  --ink3:        #7B929A;
  --accent:      #0E8C86;
  --accent-ink:  #FFFFFF;
  --accent-soft: #D6EDEA;
  --good:        #177F55;
  --watch:       #9E6A0F;
  --alert:       #B33D2D;
  --good-soft:   #D6EDE1;
  --watch-soft:  #F6E7C6;
  --alert-soft:  #F5DCD7;
  --shadow:      0 1px 2px rgba(8, 34, 43, .05), 0 12px 32px -12px rgba(8, 34, 43, .14);
  --shadow-lg:   0 2px 6px rgba(8, 34, 43, .06), 0 40px 80px -32px rgba(8, 34, 43, .30);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:      #04141A;
    --ground2:     #07202A;
    --surface:     #0B242E;
    --surface2:    #103240;
    --line:        #1D4451;
    --line-soft:   #153845;
    --ink:         #E8F4F4;
    --ink2:        #9DB8BF;
    --ink3:        #6B888F;
    --accent:      #38C6BB;
    --accent-ink:  #03222A;
    --accent-soft: #0D3B3D;
    --good:        #4FCB93;
    --watch:       #E3B056;
    --alert:       #F0806D;
    --good-soft:   #0C3A2C;
    --watch-soft:  #3B2E0F;
    --alert-soft:  #41211C;
    --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .7);
    --shadow-lg:   0 2px 6px rgba(0, 0, 0, .45), 0 40px 80px -32px rgba(0, 0, 0, .9);
  }
}

/* ------------------------------------------------------------------ *
 * Base
 * ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.022em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.012em; }
p  { margin: 0; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  /* max() keeps clear of the notch when an iPhone is held in landscape. */
  padding-left: max(22px, env(safe-area-inset-left));
  padding-right: max(22px, env(safe-area-inset-right));
}

/* The header is sticky, so an anchor jump would otherwise land the
   heading underneath it. */
[id] { scroll-margin-top: 84px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 50;
}
.skip:focus { left: 0; }

/* Present to a screen reader, absent to everyone else. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* Solid first as the fallback; the mix only wins where it is supported.
     No saturate() — on iOS it was shifting the colours of the header's
     own contents, not just the backdrop. */
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-head.is-stuck { border-bottom-color: var(--line-soft); }

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.02rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: .95rem;
}
.nav a { color: var(--ink2); font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 720px) {
  .nav .nav-hide { display: none; }
}

/* On a 375px iPhone the wordmark and the button together came to a couple
   of pixels more than the bar. */
@media (max-width: 420px) {
  .site-head .wrap { gap: 12px; }
  .brand { font-size: .95rem; gap: 8px; }
  .mark { width: 30px; height: 30px; border-radius: 9px; }
  .mark svg { width: 19px; height: 19px; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: .96rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .62; cursor: default; transform: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface2); }

.btn-sm { padding: 9px 16px; font-size: .9rem; }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 92px) 0 clamp(56px, 8vw, 100px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 720px;
  background:
    radial-gradient(58% 52% at 22% 30%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(46% 46% at 82% 8%, color-mix(in srgb, #2E9BD6 16%, transparent), transparent 72%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

@media (max-width: 900px) {
  /* minmax(0, …), never a bare 1fr: a bare 1fr floors at min-content, and
     the sign-up row (a no-wrap button beside an input) is wider than a
     phone — which pushed the whole column past the viewport edge. */
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
}

/* .phone declares container-type, so it contributes nothing to an
   intrinsic width calculation. It needs a definite width to resolve
   against — a shrink-to-fit parent collapses it to a sliver. */
.hero-art { width: 100%; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--ink2);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: var(--shadow);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
}

.hero h1 { margin-top: 22px; }
/* ink3 on the hero ground is about 2.8:1 — under the 3:1 that large text
   needs. ink2 still reads as the quieter half of the headline. */
.hero h1 .soft { color: var(--ink2); }

.lede {
  margin-top: 20px;
  font-size: clamp(1.06rem, 1.7vw, 1.22rem);
  color: var(--ink2);
  max-width: 30em;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 26px;
  list-style: none;
  padding: 0;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--ink2);
  font-size: .86rem;
  font-weight: 550;
}
.hero-facts svg { color: var(--accent); flex: none; }

/* ------------------------------------------------------------------ *
 * Waitlist form
 * ------------------------------------------------------------------ */

.signup { margin-top: 30px; max-width: 470px; width: 100%; }

.signup-row {
  display: flex;
  gap: 9px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.signup-row:focus-within { border-color: var(--accent); }

.signup input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  padding: 0 8px 0 16px;
}
.signup input::placeholder { color: var(--ink3); }
.signup input:focus { outline: none; }

.signup-note {
  margin-top: 11px;
  padding-left: 18px;
  font-size: .84rem;
  color: var(--ink3);
}

.signup-said {
  margin-top: 11px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--good-soft);
  color: var(--good);
  font-size: .88rem;
  font-weight: 600;
}
.signup-said[hidden] { display: none; }

/* On a phone the pill layout stops working: stack, and let the button
   run full width so it is a proper thumb target. */
@media (max-width: 580px) {
  .signup-row {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--r-lg);
    padding: 8px;
  }
  .signup input {
    padding: 12px 14px;
    min-height: 44px;
  }
  .signup-row .btn { width: 100%; }
  .signup-note { padding-left: 6px; }
}

/* ------------------------------------------------------------------ *
 * Phone mock
 *
 * The frame keeps a fixed aspect ratio, so everything inside is sized
 * against the frame's own width (cqw / em) rather than in fixed pixels.
 * Otherwise the screen shrinks on a narrow phone while the text does
 * not, and the bottom of the mock gets clipped.
 * ------------------------------------------------------------------ */

.phone {
  width: 100%;
  max-width: 358px;
  margin-inline: auto;
  aspect-ratio: 358 / 730;
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(170deg, #4a5a60, #16232a 42%, #2c3a41);
  box-shadow: var(--shadow-lg);
  position: relative;
  container-type: inline-size;
}
.phone::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, .1);
  pointer-events: none;
}

.screen {
  height: 100%;
  border-radius: 36px;
  background: var(--ground);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.notch {
  position: absolute;
  top: 2.5cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 25.7cqw;
  height: 7.3cqw;
  border-radius: 999px;
  background: #0b1216;
  z-index: 4;
}

.screen-body {
  flex: 1;
  overflow: hidden;
  padding: 3.85em 1.25em 1.15em;
  display: flex;
  flex-direction: column;
  gap: .92em;
  /* 12px at the frame's full 358px width, never smaller than legible. */
  font-size: clamp(9px, 3.35cqw, 12px);
  line-height: 1.45;
}

.screen-title { font-size: 1.75em; font-weight: 800; letter-spacing: -0.03em; }
.screen-sub { color: var(--ink3); font-size: .875em; margin-top: .1em; }

.mock-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 1.17em;
  padding: .92em;
}
.mock-card.watch { background: var(--watch-soft); border-color: var(--watch); }

.mock-trend { display: flex; gap: .75em; align-items: flex-start; font-size: .92em; }
.mock-trend svg {
  flex: none;
  width: 1.36em; height: 1.36em;
  margin-top: .1em;
  color: var(--watch);
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .67em;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 1.17em;
  padding: .83em .83em .92em;
}
.tile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5em;
}
.tile-name {
  font-size: .79em;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink3);
}
.tile-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.67em;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: .2em;
}
.tile-val small { font-size: .5em; font-weight: 600; color: var(--ink3); margin-left: .2em; }
.tile-meta { font-size: .79em; color: var(--ink3); margin-top: .1em; }

.ramp {
  height: .42em;
  border-radius: 999px;
  margin-top: .67em;
  position: relative;
}
.ramp i {
  position: absolute;
  top: 50%;
  width: .67em; height: .67em;
  border-radius: 50%;
  background: var(--surface);
  border: .17em solid var(--ink);
  transform: translate(-50%, -50%);
}

.pill {
  font-size: .71em;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .3em .82em;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.good  { background: var(--good-soft);  color: var(--good); }
.pill.watch { background: var(--watch-soft); color: var(--watch); }
.pill.alert { background: var(--alert-soft); color: var(--alert); }

.mock-advice { font-size: .92em; color: var(--ink2); }
.mock-advice b { color: var(--ink); font-weight: 700; }

.tabbar {
  display: flex;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  padding: 2.5cqw 0 5.6cqw;
}
.tabbar div {
  flex: 1;
  display: grid;
  place-items: center;
  gap: .8cqw;
  font-size: 2.4cqw;
  font-weight: 600;
  color: var(--ink3);
}
.tabbar div svg { width: 4.7cqw; height: 4.7cqw; }
.tabbar div.on { color: var(--accent); }

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

section { padding: clamp(56px, 8vw, 96px) 0; }
section.tint { background: var(--ground2); }

.sec-head { max-width: 42rem; margin-bottom: clamp(32px, 5vw, 52px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.kicker {
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.sec-head p { margin-top: 16px; color: var(--ink2); font-size: 1.06rem; }

/* Feature grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 9px; }
.card p { color: var(--ink2); font-size: .97rem; }

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}

/* Split feature blocks */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.split.flip > :first-child { order: 2; }
@media (max-width: 780px) {
  .split.flip > :first-child { order: 0; }
}
.split h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); }
.split p { margin-top: 16px; color: var(--ink2); }

.bullets { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.bullets li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink2); font-size: .97rem; }
.bullets svg { flex: none; margin-top: 4px; color: var(--accent); }

/* Ammonia demo */

.demo {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: var(--shadow);
}
.demo-title {
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
}
.demo-same {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: -0.02em;
}
.demo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}
@media (max-width: 460px) { .demo-pair { grid-template-columns: 1fr; } }

.demo-case {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--surface2);
}
.demo-case .cond { font-size: .82rem; color: var(--ink2); font-weight: 600; }
.demo-case .free {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: 10px;
  letter-spacing: -0.03em;
}
.demo-case .unit { font-size: .74rem; color: var(--ink3); }
.demo-case .verdict { margin-top: 12px; }
.demo-foot { margin-top: 18px; font-size: .88rem; color: var(--ink3); }

/* Profiles */

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  font-size: .93rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.chip i {
  width: 9px; height: 9px; border-radius: 50%;
  background: currentColor;
  flex: none;
}
.chip span { color: var(--ink); }

/* Privacy strip */

.privacy-strip {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.privacy-strip .lead { grid-column: 1 / -1; }
.privacy-strip h3 { margin-bottom: 7px; }
.privacy-strip p { color: var(--ink2); font-size: .95rem; }

/* FAQ */

.faq { max-width: 46rem; margin-inline: auto; }
.faq details {
  border-bottom: 1px solid var(--line-soft);
  padding: 6px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 34px 18px 0;
  font-weight: 650;
  font-size: 1.03rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink3);
  border-bottom: 2px solid var(--ink3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq .answer { padding: 0 8px 20px 0; color: var(--ink2); font-size: .99rem; }
.faq .answer p + p { margin-top: 12px; }

/* Final CTA */

.cta {
  text-align: center;
  background:
    radial-gradient(70% 100% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--ground2);
}
.cta .signup { margin-inline: auto; }
.cta .signup-note, .cta .signup-said { text-align: center; padding-left: 0; }

/* Footer */

.site-foot {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0 56px;
  background: var(--ground);
  font-size: .9rem;
  color: var(--ink3);
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.foot-links a { color: var(--ink2); }

/* ------------------------------------------------------------------ *
 * Legal / support pages
 * ------------------------------------------------------------------ */

.doc { padding: clamp(48px, 7vw, 80px) 0 clamp(64px, 9vw, 110px); }
.doc-inner { max-width: 44rem; margin-inline: auto; }
.doc h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); }
.doc .updated { margin-top: 14px; color: var(--ink3); font-size: .9rem; }
.doc h2 {
  font-size: 1.3rem;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.doc h3 { margin-top: 30px; }
.doc p, .doc li { color: var(--ink2); }
.doc p { margin-top: 16px; }
.doc ul, .doc ol { margin-top: 16px; padding-left: 22px; display: grid; gap: 10px; }
.doc .callout {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.doc .callout p:first-child { margin-top: 0; }
.doc .callout strong { color: var(--ink); }
