/* Water °C website. Palette follows the water column: foam at the surface, deep water as ink. */
:root {
  --foam: #EAF6F8;
  --shallows: #7FD3DC;
  --midwater: #1E7F99;
  --deep: #0A2B3D;
  --ink: #0A2B3D;
  --ink-soft: #3F6274;
  --surface: #FFFFFF;
  --line: rgba(10, 43, 61, 0.12);
  --bg: var(--foam);
  --accent: var(--midwater);
  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --measure: 34rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061C28;
    --ink: #E3F3F6;
    --ink-soft: #9BBFCB;
    --surface: #0C2A3A;
    --line: rgba(227, 243, 246, 0.14);
    --accent: var(--shallows);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:focus-visible, .store:focus-visible, .get:focus-visible {
  outline: 3px solid var(--shallows);
  outline-offset: 3px;
  border-radius: 10px;
}
h1, h2 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 700; }
p { margin: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 19px var(--display); }
.brand img { border-radius: 9px; }
.get {
  font: 600 15px var(--text); text-decoration: none;
  color: var(--ink); padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line);
}
.get:hover { border-color: var(--accent); }

main { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* Hero: the reading with the waterline through it */
.hero { padding: clamp(8px, 3vw, 32px) 0 clamp(56px, 9vw, 112px); }
.reading { margin: 0; }
.waterline { width: min(100%, 980px); height: auto; overflow: visible; }
.num {
  font-family: var(--display);
  font-size: 380px;
  font-weight: 700;
  letter-spacing: -18px;
  font-variant-numeric: tabular-nums;
}
.num-dry { fill: var(--ink); }
.num-wet { opacity: .92; }
.reading figcaption { color: var(--ink-soft); font-size: 15px; margin-top: 4px; max-width: var(--measure); }

.pitch { max-width: var(--measure); margin-top: clamp(28px, 5vw, 48px); }
.pitch h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.02; font-weight: 800; }
.pitch > p { margin-top: 18px; color: var(--ink-soft); font-size: 19px; }
.pitch .fine { font-size: 14px; margin-top: 12px; }

.store {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px; padding: 10px 20px 10px 16px;
  border-radius: 14px; background: var(--deep); color: #fff; text-decoration: none;
}
@media (prefers-color-scheme: dark) { .store { background: #fff; color: #000; } }
.store svg { width: 26px; height: 26px; fill: currentColor; }
.store span { display: flex; flex-direction: column; font: 600 21px/1.05 var(--text); }
.store small { font-size: 11px; font-weight: 500; opacity: .85; }

/* Live scale */
.now { padding: clamp(40px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.now-head { max-width: var(--measure); }
.now-head p { color: var(--ink-soft); margin-top: 10px; }
.scale { position: relative; margin-top: 56px; padding: 92px 0 96px; }
.scale-track {
  position: relative; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, var(--cold), var(--warm));
}
.tick {
  position: absolute; top: 18px; transform: translateX(-50%);
  font: 600 12px var(--display); color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.spots { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.spot { position: absolute; left: var(--x); top: 97px; transform: translateX(-50%); }
.dot {
  display: block; width: 18px; height: 18px; margin-top: -4px; border-radius: 50%;
  background: var(--c); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line);
}
.label {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 150px; text-align: center;
  font-size: 13px; line-height: 1.3; color: var(--ink);
}
.label b { display: block; font: 700 22px var(--display); color: var(--c); font-variant-numeric: tabular-nums; }
.label em { display: block; font-style: normal; color: var(--ink-soft); font-size: 12px; }
.label .nm { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot.up .label { bottom: 26px; }
.spot.down .label { top: 30px; }
.spot::before {
  content: ""; position: absolute; left: 50%; width: 1px; background: var(--line);
}
.spot.up::before { bottom: 18px; height: 10px; }
.spot.down::before { top: 18px; height: 14px; }

/* Features: copy beside a real screenshot */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: clamp(48px, 8vw, 104px) 0; border-top: 1px solid var(--line);
}
.feature.flip { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
.feature.flip .copy { order: 2; }
.feature .copy { max-width: var(--measure); }
.feature .copy p { margin-top: 16px; color: var(--ink-soft); font-size: 18px; }
.phone {
  width: 100%; max-width: 320px; justify-self: center;
  border-radius: 44px; border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(10, 43, 61, .45);
}

.wide { padding: clamp(48px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.wide p { color: var(--ink-soft); margin-top: 12px; font-size: 18px; max-width: var(--measure); }
.wide img {
  margin-top: 40px; width: 100%; max-width: 900px;
  border-radius: 28px; border: 1px solid var(--line);
  box-shadow: 0 40px 90px -50px rgba(10, 43, 61, .5);
}

.closing { padding: clamp(56px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.closing h2 { font-size: clamp(32px, 5vw, 52px); max-width: 16ch; }

/* Footer */
.foot {
  max-width: 1200px; margin: 0 auto; padding: 40px var(--gutter) 56px;
  border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px;
}
.foot p { max-width: var(--measure); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 18px 0; }
.foot nav a { color: var(--ink); text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot .copy { font-size: 13px; }

/* Licences page */
.doc-main { max-width: 760px; padding-top: 32px; padding-bottom: 64px; }
.doc-main h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; }
.lede { color: var(--ink-soft); margin-top: 14px; max-width: var(--measure); }
.lede.small { font-size: 14px; margin-top: 32px; }
.credits { list-style: none; margin: 32px 0 0; padding: 0; }
.credits li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.credits li:last-child { border-bottom: 1px solid var(--line); }
.credits a { font-weight: 600; color: var(--ink); text-decoration: none; }
.credits a:hover { color: var(--accent); }
.credits span { color: var(--ink-soft); font-size: 15px; }

/* Narrow screens */
@media (max-width: 760px) {
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .copy { order: 0; }
  .phone { max-width: 300px; }

  /* The live scale becomes a list ordered cold to warm, each spot with its own bar. */
  .scale { padding: 0; margin-top: 32px; }
  .scale-track { display: none; }
  .spots { position: static; display: grid; gap: 14px; }
  .spot { position: relative; left: auto; top: auto; transform: none; display: grid; grid-template-columns: 1fr; }
  .spot::before { display: none; }
  .dot { display: none; }
  .label {
    position: static; transform: none; width: auto; max-width: none; text-align: left;
    display: grid; grid-template-columns: 4.2em 1fr; column-gap: 12px; align-items: baseline;
  }
  .label b { grid-row: span 2; font-size: 24px; }
  .label .nm { white-space: normal; }
  .spot::after {
    content: ""; grid-row: 2; height: 6px; margin-top: 6px; border-radius: 999px;
    width: var(--x); background: linear-gradient(90deg, var(--cold), var(--c));
  }
}

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

/* Spot pages */
.spot-hero .pitch h1 { font-size: clamp(32px, 5vw, 52px); }
.history { padding: clamp(40px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.history > p { margin-top: 12px; color: var(--ink-soft); font-size: 18px; max-width: var(--measure); }
.chart { margin: 36px 0 0; max-width: 900px; }
.chart-plot { position: relative; padding-left: 2.6em; }
.chart-area { position: relative; }
.chart-area svg { display: block; width: 100%; height: clamp(140px, 22vw, 220px); overflow: visible; }
.chart-area::before, .chart-area::after {
  content: ""; position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line);
}
.chart-area::before { top: 0; }
.chart-area::after { bottom: 0; }
.chart-y {
  position: absolute; left: 0; font: 600 13px var(--display); color: var(--ink-soft);
  font-variant-numeric: tabular-nums; transform: translateY(-50%);
}
.chart-y.top { top: 0; }
.chart-y.bottom { top: 100%; }
.chart-dot {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--c); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line);
}
.chart figcaption {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding-left: 2.6em;
  color: var(--ink-soft); font-size: 13px;
}
.facts {
  margin: 36px 0 0; display: grid; gap: 0 32px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.facts div { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; }
.facts dd { order: -1; }
.facts dd { margin: 0; font: 700 28px/1.1 var(--display); color: var(--c, var(--ink)); font-variant-numeric: tabular-nums; }
.facts dt { margin-top: 4px; color: var(--ink-soft); font-size: 14px; }
.nearby { padding: clamp(40px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.nearby ul {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0 32px;
}
.nearby li { border-top: 1px solid var(--line); }
.nearby a {
  display: grid; grid-template-columns: 4.2em 1fr; column-gap: 12px; align-items: baseline;
  padding: 14px 0; color: var(--ink); text-decoration: none;
}
.nearby a:hover span { color: var(--accent); }
.nearby b { grid-row: span 2; font: 700 24px var(--display); color: var(--c); font-variant-numeric: tabular-nums; }
.nearby span { font-weight: 600; overflow-wrap: anywhere; }
.nearby em { font-style: normal; color: var(--ink-soft); font-size: 14px; }
a.label { text-decoration: none; }
a.label:hover .nm { color: var(--accent); }

/* Terms of use and safety notice */
.terms h2 { font-size: 1.15rem; line-height: 1.3; margin: 2rem 0 .5rem; letter-spacing: -.01em; }
.terms p, .terms li { font-size: 1rem; line-height: 1.6; margin: 0 0 .75rem; }
.terms ul { padding-left: 1.25rem; margin: 0 0 .75rem; }
.terms li { margin-bottom: .4rem; }
.terms .lede { margin-bottom: 1rem; }
.terms .notice { background: color-mix(in srgb, currentColor 7%, transparent); border-radius: 14px; padding: 14px 16px; margin: 0 0 1.5rem; }
