/* Beluga pre-release site. Tokens follow docs/DESIGN.md and lib/ui/design.dart. */

@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #202d43;
  --slate: #5e6a7d;
  --frost: #f7f9fc;
  --blue: #455cba;
  --sea: #deebf1;
  --line: #e3e8ef;
  --rule: #d5dce6;
  --ice: #eef2f7;
  --margin: 20px;
  --measure: 34rem;
  color-scheme: light;
}

@media (min-width: 720px) {
  :root { --margin: 40px; }
}

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

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

body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .22em;
  transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: var(--blue); }

/* One focus treatment everywhere: a 2 px sonar-blue keyline. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: .875rem;
}
.skip:focus-visible { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(1120px + 2 * var(--margin));
  margin: 0 auto;
  padding-left: max(var(--margin), env(safe-area-inset-left));
  padding-right: max(var(--margin), env(safe-area-inset-right));
}

/* Header */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  text-decoration: none;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
}
.wordmark svg { width: 36px; height: 36px; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 -12px 0 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--slate);
}
.nav a:hover { color: var(--ink); background: var(--ice); }
.nav a[aria-current="page"] { color: var(--ink); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.4;
  white-space: nowrap;
}
/* An upright sounding line, like the app's seek thumb. */
.badge::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--blue);
}

/* Chart panels */

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  background: var(--sea);
}
.panel > .chart {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Whale marks (inline SVG <use>). Stroke widths are in 40-unit whale space. */

.whale {
  --echo: var(--blue);
  --outline: 1.4;
  overflow: visible;
  color: var(--ink);
}
.whale.calm { --echo: var(--slate); }
.whale.small { --outline: 2.4; }

/* Hero */

.hero {
  display: grid;
  gap: 8px;
  padding: 40px 24px 28px;
}
.hero h1 {
  margin: 18px 0 0;
  max-width: 11.5em;
  font-size: clamp(2.375rem, 1.35rem + 4.3vw, 4.5rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.hero .lede {
  margin: 20px 0 0;
  max-width: 30rem;
  color: var(--slate);
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.hero .lede strong { color: var(--ink); font-weight: 600; }

.pod {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 58 / 44;
  margin: 8px 0 0;
}
.pod .mother { position: absolute; left: 0; top: 0; width: 100%; }
.pod .calf {
  position: absolute;
  left: 2%;
  bottom: -2%;
  width: 34%;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    padding: 72px 56px 72px 56px;
  }
  .hero .pod { order: 2; width: min(100%, 440px); justify-self: end; margin: 0; }
}

/* Facts */

.facts {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.facts b {
  display: block;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -.015em;
}
.facts span { color: var(--slate); }

@media (min-width: 720px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .facts li { padding: 32px 0 28px; }
}

/* Wake divider: a hairline with a small whale swimming at its end. */

.wake {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 72px 0 0;
}
.wake::before {
  content: "";
  flex: 1;
  height: 0;
  border-top: 1.5px dashed var(--rule);
}
.wake svg { width: 34px; height: 34px; flex: none; }

/* Sections */

.section {
  display: grid;
  gap: 32px;
  padding: 48px 0 8px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.625rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.035em;
  text-wrap: balance;
}
h3 {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.section p, .section li { max-width: var(--measure); text-wrap: pretty; }
.section .intro {
  margin: 16px 0 0;
  font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem);
  line-height: 1.5;
}
.muted { color: var(--slate); }
.updated {
  margin: 14px 0 0;
  color: var(--slate);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.points {
  display: grid;
  gap: 28px;
  margin: 8px 0 0;
}
.points > div { padding-top: 20px; border-top: 1px solid var(--line); }
.points p { margin: 0; color: var(--slate); }
.points p + p { margin-top: 10px; }

@media (min-width: 720px) {
  .privacy .points { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}
@media (min-width: 900px) {
  .privacy { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 72px; align-items: end; }
  .privacy .points { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
}

.harbor {
  margin: 0;
}
.harbor .panel {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid var(--line);
}
.harbor .pair {
  position: relative;
  width: 52%;
  aspect-ratio: 58 / 46;
}
.harbor .pair .mother { position: absolute; left: 0; top: 0; width: 100%; }
.harbor .pair .calf { position: absolute; left: 4%; bottom: 0; width: 36%; }
.harbor figcaption {
  margin-top: 12px;
  color: var(--slate);
  font-size: .875rem;
}

/* Footer */

.foot {
  margin-top: 96px;
  padding-top: 28px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--slate);
  font-size: .875rem;
}
.foot .sign { display: inline-flex; align-items: center; gap: 10px; }
.foot .sign svg { width: 44px; height: 30px; }
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 -8px;
  padding: 0;
  list-style: none;
}
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  color: var(--slate);
}
.foot a:hover { color: var(--ink); }

/* Terms */

.dive {
  display: grid;
  gap: 8px;
  padding: 36px 24px 32px;
}
.dive h1 {
  margin: 18px 0 0;
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -.04em;
}
.dive .lede {
  margin: 16px 0 0;
  max-width: 32rem;
  color: var(--slate);
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
}
.dive .diver {
  justify-self: end;
  width: min(48%, 230px);
  margin: -8px 4% 0 0;
  transform: rotate(24deg);
}
@media (min-width: 860px) {
  .dive {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 64px 56px;
  }
  .dive .diver { order: 2; width: 260px; margin: 0 24px 0 0; }
}

.terms {
  counter-reset: term;
  display: grid;
  gap: 0;
  max-width: 44rem;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.terms > li {
  counter-increment: term;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.terms > li::before {
  content: counter(term, decimal-leading-zero);
  padding-top: .15em;
  color: var(--blue);
  font-size: .875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.terms h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.35;
}
.terms p { margin: 8px 0 0; color: var(--slate); max-width: var(--measure); }
.terms p strong { color: var(--ink); font-weight: 600; }

/* Not found */

.lost {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 56px 24px 48px;
  text-align: center;
}
.lost svg { width: min(70%, 260px); }
.lost h1 {
  margin: 28px 0 0;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.04em;
}
.lost p { margin: 12px 0 0; color: var(--slate); max-width: 26rem; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
}
.button:hover { background: #2d3d5a; }
.button:active { background: #151e31; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .panel > .chart, .wake, .harbor, .skip, .nav { display: none; }
  .panel { background: none; }
}
