/*
 * Lowtide landing page. Night palette from the mark (docs/brand): deep blue-black, warm white, tide blue, the moon's gradient.
 * No framework: one stylesheet, system-light motion, everything readable with motion turned off.
 */
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #07090d;
  --night-2: #0b1220;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --edge: rgba(255, 255, 255, 0.085);
  --edge-2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f1;
  --text-2: #c7c6bf;
  --muted: #9c9b94;
  --tide: #2a78d6;
  --tide-bright: #4b93ea;
  --moon-light: #a9d0f9;
  --good: #45c97b;
  --radius: 22px;
  --wrap: 1160px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  background: var(--night);
  color: var(--text);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  font-size: 17px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

::selection {
  background: rgba(75, 147, 234, 0.4);
}

:focus-visible {
  outline: 2px solid var(--tide-bright);
  outline-offset: 3px;
  border-radius: 10px;
}

.wrap {
  width: min(var(--wrap), 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4d95ec 0%, #2a78d6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 0 1px rgba(42, 120, 214, 0.5),
    0 10px 30px -10px rgba(42, 120, 214, 0.75);
  transition:
    transform 160ms var(--ease),
    box-shadow 200ms var(--ease),
    filter 200ms var(--ease);
}
.button:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(75, 147, 234, 0.7),
    0 14px 38px -10px rgba(42, 120, 214, 0.9);
}
.button:active {
  transform: scale(0.97);
}
.button.ghost {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--edge-2);
}
.button.ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  filter: none;
}
.button.ghost svg {
  width: 18px;
  height: 18px;
}
.button.small {
  height: 40px;
  padding: 0 18px;
  font-size: 14.5px;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition:
    background-color 240ms var(--ease),
    box-shadow 240ms var(--ease),
    backdrop-filter 240ms var(--ease);
}
.nav.scrolled {
  background: rgba(7, 9, 13, 0.72);
  box-shadow: 0 1px 0 var(--edge);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.nav-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 640;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.brand img {
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--edge);
}
.nav nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  transition:
    color 160ms,
    background-color 160ms;
}
.nav nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(140px + env(safe-area-inset-top)) 0 0;
  background:
    radial-gradient(60% 55% at 75% 78%, rgba(42, 120, 214, 0.28) 0%, rgba(42, 120, 214, 0) 70%),
    radial-gradient(40% 40% at 15% 0%, rgba(75, 147, 234, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, #0a0f17 0%, var(--night) 100%);
}
.stars {
  position: absolute;
  inset: 0 0 30%;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 27% 42%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1.4px 1.4px at 44% 12%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 58% 30%, rgba(255, 255, 255, 0.3), transparent 60%),
    radial-gradient(1.2px 1.2px at 69% 9%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1px 1px at 83% 22%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1.3px 1.3px at 92% 40%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 6% 55%, rgba(255, 255, 255, 0.25), transparent 60%),
    radial-gradient(1px 1px at 36% 64%, rgba(255, 255, 255, 0.2), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--moon-light), var(--tide));
  box-shadow: 0 0 12px rgba(75, 147, 234, 0.9);
}
h1 {
  margin-top: 26px;
  font-size: clamp(46px, 7.2vw, 88px);
  line-height: 0.98;
  font-weight: 660;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #ffffff 30%, #c9d9ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin-top: 26px;
  max-width: 540px;
  color: var(--text-2);
  font-size: clamp(17px, 1.6vw, 19.5px);
  line-height: 1.6;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.actions.center {
  justify-content: center;
}
.note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14.5px;
}

.hero-copy {
  /* Keeps the copy above the horizon, which sits in the bottom of the grid. */
  padding-bottom: 170px;
}
.hero-visual {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 640px;
}
/* The moon and the phone both rise out of the sea: the sea (z 3) is drawn over their lower part. */
.moon {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 134px;
  width: min(760px, 150%);
  aspect-ratio: 1;
  translate: -50% 50%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #b3d6fa 0%, #6ca8ee 38%, #2a78d6 72%);
  box-shadow:
    0 0 120px 30px rgba(42, 120, 214, 0.35),
    0 0 260px 90px rgba(42, 120, 214, 0.16);
}
.phone {
  position: relative;
  z-index: 2;
  width: min(312px, 74vw);
  margin-bottom: -60px;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(160deg, #2a2b2e 0%, #121314 40%, #0b0b0c 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 50px 100px -30px rgba(0, 0, 0, 0.9),
    0 30px 60px -30px rgba(42, 120, 214, 0.45);
}
.phone img {
  border-radius: 44px;
}
.float {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(16, 20, 28, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 20px 40px -14px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.float-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.float-value {
  font-size: 30px;
  font-weight: 660;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.float-meta {
  color: var(--muted);
  font-size: 12.5px;
}
/* The 8 am notification, as it lands on the lock screen. */
.float-push {
  left: -12%;
  top: 19%;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  width: min(330px, 92vw);
  padding: 12px 16px 12px 12px;
  border-radius: 22px;
  background: rgba(30, 34, 42, 0.62);
}
.float-push img {
  border-radius: 9px;
}
.push-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.push-top b {
  color: var(--text-2);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 11.5px;
}
.push-title,
.push-body {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}
.push-title {
  margin-top: 2px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.push-body {
  color: var(--text-2);
}
.float-low {
  right: -4%;
  bottom: 22%;
}
.tide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tide-bright);
  box-shadow: 0 0 0 3px rgba(75, 147, 234, 0.25);
}

.sea {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  height: 200px;
  margin-top: -170px;
}
.sea .wave {
  fill: none;
  stroke: #f4f4f1;
  stroke-linecap: round;
}
.sea .w1 {
  stroke-width: 2.6;
  opacity: 0.8;
}
.sea .w2 {
  stroke-width: 2;
  opacity: 0.28;
}
.sea .w3 {
  stroke-width: 1.6;
  opacity: 0.12;
}

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

.section {
  padding: clamp(90px, 12vw, 150px) 0 0;
}
#why {
  padding-top: clamp(40px, 6vw, 70px);
}
.kicker {
  color: var(--tide-bright);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.05;
  font-weight: 640;
  letter-spacing: -0.04em;
}
.section-lead {
  margin-top: 20px;
  max-width: 640px;
  color: var(--text-2);
  font-size: 18.5px;
}
.more {
  margin-top: 28px;
  font-weight: 560;
}
.more a {
  color: var(--tide-bright);
  text-decoration: none;
}
.more a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cards {
  display: grid;
  gap: 16px;
  margin-top: 52px;
}
.cards.three {
  grid-template-columns: repeat(3, 1fr);
}
.cards.four {
  grid-template-columns: repeat(4, 1fr);
}
.card {
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.card h3 {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}
.card p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
}
.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 13px;
  background: rgba(42, 120, 214, 0.14);
  box-shadow: inset 0 0 0 1px rgba(75, 147, 234, 0.3);
}
.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--moon-light);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 52px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.step {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.step-n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--moon-light), var(--tide));
  color: #04101f;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 0 24px rgba(75, 147, 234, 0.45);
}
.step h3 {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}
.step p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 16px;
}

/* ---------- Features ---------- */

.feature {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 56px;
  margin-top: 72px;
}
.feature.flip {
  grid-template-columns: 1.2fr 0.8fr;
}
.feature.flip .feature-copy {
  order: 2;
}
.feature h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.12;
  font-weight: 640;
  letter-spacing: -0.035em;
}
.feature p {
  margin-top: 16px;
  color: var(--text-2);
}
.ticks {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 16px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(42, 120, 214, 0.18)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a9d0f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(75, 147, 234, 0.35);
}
.shot {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 120px -40px rgba(42, 120, 214, 0.5);
}
.shot img {
  width: 100%;
}

.phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 96px;
}
.mini img {
  width: 100%;
  border-radius: 34px;
  box-shadow:
    0 0 0 8px #141416,
    0 0 0 9px rgba(255, 255, 255, 0.12),
    0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.mini figcaption {
  margin-top: 30px;
  color: var(--text-2);
  font-size: 16px;
}
.mini figcaption b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

/* ---------- Under the hood ---------- */

.build {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
  padding: clamp(32px, 5vw, 56px);
  border-radius: 28px;
  background:
    radial-gradient(70% 120% at 100% 100%, rgba(42, 120, 214, 0.18) 0%, transparent 70%),
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.stack li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
}

/* ---------- Closing ---------- */

.closing {
  position: relative;
  margin-top: clamp(30px, 5vw, 60px);
  padding: 120px 0 130px;
  text-align: center;
  background: radial-gradient(50% 70% at 50% 100%, rgba(42, 120, 214, 0.3) 0%, transparent 70%);
}
.closing-mark {
  margin: 0 auto;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px var(--edge-2),
    0 0 60px rgba(42, 120, 214, 0.55);
}
.closing h2 {
  margin-top: 30px;
  font-size: clamp(36px, 5.4vw, 64px);
}

/* The 404 page: the closing block, alone on the screen (no inline styles: the CSP allows none). */
.closing.lost {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  margin-top: 0;
}

/* ---------- Footer ---------- */

.footer {
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
  box-shadow: 0 -1px 0 var(--edge);
  color: var(--muted);
  font-size: 14.5px;
}
.footer-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer .brand {
  color: var(--text);
  font-size: 17px;
}
.footer p {
  margin-right: auto;
}
.footer a {
  color: var(--text-2);
}
.footer nav {
  display: flex;
  gap: 20px;
}
.footer nav a {
  text-decoration: none;
}
.footer nav a:hover {
  color: var(--text);
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .moon {
    animation: rise 2.2s 0.2s cubic-bezier(0.16, 0.84, 0.3, 1) both;
  }
  .phone {
    animation: lift 1.4s 0.35s cubic-bezier(0.16, 0.84, 0.3, 1) both;
  }
  .float-push {
    animation:
      lift 1.2s 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) both,
      bob 6s 2.2s ease-in-out infinite alternate;
  }
  .float-low {
    animation:
      lift 1.2s 1.1s cubic-bezier(0.16, 0.84, 0.3, 1) both,
      bob 7s 2.4s ease-in-out infinite alternate-reverse;
  }
  .hero-copy > * {
    animation: lift 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) both;
  }
  .hero-copy > :nth-child(2) {
    animation-delay: 0.08s;
  }
  .hero-copy > :nth-child(3) {
    animation-delay: 0.16s;
  }
  .hero-copy > :nth-child(4) {
    animation-delay: 0.24s;
  }
  .hero-copy > :nth-child(5) {
    animation-delay: 0.32s;
  }
  .sea .w1 {
    animation: drift 9s ease-in-out infinite alternate;
  }
  .sea .w2 {
    animation: drift 11s ease-in-out infinite alternate-reverse;
  }
  .sea .w3 {
    animation: drift 13s ease-in-out infinite alternate;
  }
  .stars {
    animation: twinkle 6s ease-in-out infinite alternate;
  }
  /* Hidden only once main.js has run (it marks <html class="js">), so the page never depends on it. */
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.9s var(--ease),
      transform 0.9s var(--ease);
  }
  .js .reveal.shown {
    opacity: 1;
    transform: none;
  }
  @keyframes rise {
    from {
      transform: translateY(26%);
      opacity: 0.4;
    }
  }
  @keyframes lift {
    from {
      opacity: 0;
      transform: translateY(22px);
    }
  }
  @keyframes bob {
    to {
      transform: translateY(-8px);
    }
  }
  @keyframes drift {
    to {
      transform: translateX(-60px);
    }
  }
  @keyframes twinkle {
    to {
      opacity: 0.55;
    }
  }
}

/* ---------- Smaller screens ---------- */

@media (max-width: 980px) {
  .hero-grid,
  .feature,
  .feature.flip,
  .build {
    grid-template-columns: 1fr;
  }
  .feature.flip .feature-copy {
    order: 0;
  }
  .hero-copy {
    padding-bottom: 0;
  }
  .hero-visual {
    min-height: 600px;
    margin-top: 10px;
  }
  .cards.four {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav nav {
    display: none;
  }
  .nav .button {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .hero {
    padding-top: calc(112px + env(safe-area-inset-top));
  }
  .cards.three,
  .cards.four,
  .steps {
    grid-template-columns: 1fr;
  }
  .phones {
    grid-template-columns: 1fr;
    gap: 56px;
    width: min(320px, 100%);
    margin-inline: auto;
  }
  .float-push {
    left: 0;
    top: 12%;
  }
  /* Above the horizon: the sea is drawn over the whole hero grid. */
  .float-low {
    right: 0;
    bottom: 34%;
  }
  .float {
    padding: 12px 14px;
  }
  .float-value {
    font-size: 24px;
  }
  .hero-visual {
    min-height: 560px;
  }
  .moon {
    width: 150%;
  }
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
