/*
 * MedFish website styles.
 *
 * Palette is inherited verbatim from the app (src/theme/index.ts) so the site
 * and the product read as one thing. Deliberately restrained: the accent is a
 * single teal used for links and one button, not a gradient smeared over every
 * surface. No glassmorphism, no glow, no animated blobs — the visual interest
 * comes from typography, spacing and the data itself.
 *
 * No build step. No framework. One stylesheet, system fonts, static HTML.
 */

:root {
  /* From src/theme/index.ts — single source of truth. */
  --abyss: #0b141a;
  --deep: #12222b;
  --deep-alt: #1a2e38;
  --seafoam: #2cc4a5;
  --seafoam-dim: #1f8c77;
  --sand: #e8dcc0;
  --sunset: #f4a340;

  --text-primary: #eaf2f1;
  --text-secondary: #9fb3b0;
  --text-muted: #6b807d;
  --border: #22343d;

  --measure: 68ch;
  --page: 1120px;

  /* System stack: renders natively on every device, loads instantly, and
     avoids the generic look of a webfont everyone else is also using. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--abyss);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Skip link ─────────────────────────────────────────────────────────────
   Keyboard users land here first; visually hidden until focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--seafoam);
  color: var(--abyss);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 100;
}
.skip:focus {
  left: 0;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 20, 26, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.brand svg {
  display: block;
}

nav.main {
  display: flex;
  align-items: center;
  gap: 30px;
}
nav.main a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.15s ease;
}
nav.main a:hover,
nav.main a:focus-visible {
  color: var(--text-primary);
}

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.lang a {
  padding: 5px 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.lang a[aria-current="true"] {
  background: var(--deep-alt);
  color: var(--text-primary);
}

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

/* ── Type ─────────────────────────────────────────────────────────────────── */
h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  font-weight: 650;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
h3 {
  font-size: 1.09rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--seafoam);
}
a:hover {
  color: #4fd8bc;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 12px;
  font-weight: 700;
  color: var(--seafoam);
  margin: 0 0 18px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: clamp(64px, 11vw, 116px) 0 clamp(52px, 8vw, 84px);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* A single soft depth wash, low opacity — suggests water without becoming
   the "AI gradient". Sits behind content and never competes with text. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 40%;
  height: 520px;
  background: radial-gradient(
    ellipse at center,
    rgba(44, 196, 165, 0.09),
    transparent 68%
  );
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 17ch;
  margin-bottom: 22px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--seafoam);
  color: #06231d;
}
.btn-primary:hover {
  background: #35d7b6;
  color: #06231d;
}
.btn-secondary {
  border-color: var(--border);
  color: var(--text-primary);
  background: transparent;
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--deep);
  color: var(--text-primary);
}

.note {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 18px;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
section {
  padding: clamp(56px, 8vw, 92px) 0;
  border-bottom: 1px solid var(--border);
}
section.plain {
  border-bottom: none;
}

.section-head {
  max-width: var(--measure);
  margin-bottom: 46px;
}
.section-head p {
  color: var(--text-secondary);
  margin-top: 14px;
  margin-bottom: 0;
}

/* ── Feature grid ─────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}

.card {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px 24px;
}
.card h3 {
  margin-bottom: 9px;
}
.card p {
  color: var(--text-secondary);
  font-size: 15.5px;
  margin: 0;
}

.icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--deep-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 17px;
  color: var(--seafoam);
}
.icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ── Split feature rows ───────────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
}
.split + .split {
  margin-top: clamp(52px, 8vw, 88px);
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split.reverse .split-media {
    order: -1;
  }
}

.split-body h2 {
  margin-bottom: 16px;
}
.split-body p {
  color: var(--text-secondary);
}

ul.checks {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}
ul.checks li {
  position: relative;
  padding-left: 27px;
  margin-bottom: 11px;
  color: var(--text-secondary);
  font-size: 15.5px;
}
ul.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--seafoam-dim);
}

/* A framed panel standing in for a screenshot until real captures exist. */
.panel {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  justify-content: center;
}
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  background: var(--deep-alt);
  border-radius: 10px;
  font-size: 14.5px;
}
.panel-row span:last-child {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}
.panel-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(44, 196, 165, 0.13);
  color: var(--seafoam);
}
.pill.amber {
  background: rgba(244, 163, 64, 0.14);
  color: var(--sunset);
}

/* ── Legal / prose pages ──────────────────────────────────────────────────── */
.prose {
  max-width: var(--measure);
  padding: clamp(46px, 7vw, 74px) 0 90px;
}
.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}
.prose h2 {
  font-size: 1.32rem;
  margin: 44px 0 13px;
}
.prose h3 {
  margin: 28px 0 9px;
}
.prose p,
.prose li {
  color: var(--text-secondary);
  font-size: 16.5px;
}
.prose ul {
  padding-left: 21px;
  margin: 0 0 1.1em;
}
.prose li {
  margin-bottom: 8px;
}
.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}
.updated {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 34px;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 26px;
  font-size: 15px;
}
table.data th,
table.data td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.data td {
  color: var(--text-secondary);
}

.callout {
  border-left: 3px solid var(--seafoam-dim);
  background: var(--deep);
  border-radius: 0 10px 10px 0;
  padding: 17px 20px;
  margin: 26px 0;
}
.callout p {
  margin: 0;
  font-size: 15.5px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--border);
  padding: 46px 0 60px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}
.foot-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--text-primary);
}
footer.site .fine {
  margin-top: 30px;
  font-size: 13.5px;
  color: var(--text-muted);
}

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