/* Diver's marketing pages.
 *
 * The palette is the app's night ramp — the mark's slate-ocean ground taken
 * below its darkest stop, with the core as the voice and the rings as the
 * accent. The site commits to that one brightness rather than following the
 * visitor's: the product's own surfaces are what the screenshots show, and a
 * page that flipped to white around them would sit them on a ground the app
 * never uses. Every colour below is therefore stated once, on :root.
 */

:root {
  --bg: #03060B;             /* nightBackground */
  --surface: #0E131E;        /* nightSurface */
  --surface-2: #151D2A;      /* nightSurfaceVariant */
  --ink: #E2E8F0;            /* nightInk */
  --muted: #94A3B8;          /* nightInkMuted — 7.92:1 on the ground */
  --line: #1B2337;           /* nightLineSubtle */
  --line-strong: #2F3D52;    /* nightLine */
  --rust: #F97316;           /* orange500 — the mark's core */
  --rust-subtle: rgba(249, 115, 22, .14);
  --ocean: #5EAECF;          /* ocean300 — the mark's rings */
  --ok: #4ADE80;

  --radius: 8px;
  --radius-lg: 16px;
  --max: 1120px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

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

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

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
}

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

header.site {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(3, 6, 11, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 17px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

nav.site { margin-left: auto; display: flex; align-items: center; gap: 22px; }
nav.site a { color: var(--muted); font-size: 15px; }
nav.site a:hover { color: var(--ink); text-decoration: none; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }

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

.btn[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
}

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

section { padding-block: 72px; }
section + section { border-top: 1px solid var(--line); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(34px, 5.5vw, 56px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }

p { margin: 0; }

.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ocean);
}

.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }

.mono {
  font-family: var(--mono);
  font-size: .92em;
  /* A URI has no spaces in it, so on a phone it has to be allowed to break
     anywhere rather than push the page sideways. */
  overflow-wrap: anywhere;
}
.muted { color: var(--muted); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 84px 0;
  border-bottom: 1px solid var(--line);
}

/* The mark's own ground, bled behind the fold. */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto 50%;
  width: 1100px;
  height: 1100px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(18, 48, 71, .85) 0%, rgba(7, 20, 31, .35) 45%, transparent 70%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.hero-copy { max-width: 720px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .rings { color: var(--ocean); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.shot-frame {
  margin-top: 56px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 8px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9);
}
.shot-frame img { display: block; border-radius: 10px; }
.hero .shot-frame { margin-bottom: -70px; }

/* --- Collage ------------------------------------------------------------ */

/* A handset held over the right edge of the window, so the hero carries both
   builds rather than only the one with room for a dock. The phone is placed in
   percentages of the collage, not pixels, so the composition holds its
   proportions as the container narrows. */
.collage { position: relative; }

.collage .collage-phone {
  position: absolute;
  top: 21%;
  /* Far enough out that the window's edge runs behind it — an overlap that
     stops short of the frame reads as a phone dropped on top of a screenshot,
     rather than one held in front of it — but no further than the page's own
     24px gutter, which is all the room there is once the container stops
     growing. At 2% of a container that tops out at 1120, the overhang peaks
     at 22px and the hero never has to clip the phone to keep it in. */
  right: -2%;
  width: 17%;
  border-radius: 22px;
  padding: 5px;
  /* Deeper than the window's own shadow, because it is nearer. */
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, .95), 0 0 0 1px var(--line-strong);
}
.collage .collage-phone img { border-radius: 18px; }

/* Below this the window is small enough that a phone over it would be a
   thumbnail on a thumbnail. The phone build gets a frame of its own further
   down the page, at a size worth looking at. */
@media (max-width: 760px) {
  .collage .collage-phone { display: none; }
}

/* --- Feature grid ------------------------------------------------------- */

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

.card .glyph {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--rust-subtle);
  color: var(--rust);
  margin-bottom: 16px;
}
.card .glyph svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* --- Alternating feature rows ------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split + .split { margin-top: 72px; }
.split.flip .split-media { order: -1; }

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

.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.ticks strong { color: var(--ink); font-weight: 600; }
.ticks svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; stroke: var(--rust); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- Phone pair --------------------------------------------------------- */

.phones {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.phone-frame {
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 7px;
  background: var(--surface);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .9);
  max-width: 280px;
}
.phone-frame img { display: block; border-radius: 22px; }

figure { margin: 0; }
figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* --- Table -------------------------------------------------------------- */

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}
caption { text-align: left; color: var(--muted); font-size: 15px; padding-bottom: 16px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
tbody th { font-weight: 600; }
td.yes { color: var(--ok); }
td.no { color: var(--muted); }
td small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* --- Download ----------------------------------------------------------- */

.download-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.download-card .head { display: flex; align-items: center; gap: 12px; }
.download-card svg.platform { width: 24px; height: 24px; stroke: var(--ocean); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.download-card p { color: var(--muted); font-size: 15px; flex: 1; }
.download-card .btn { width: 100%; }
.download-card .state { font-size: 13px; color: var(--muted); text-align: center; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ocean);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 10px;
}

/* A shipped build, against one that is still TBD. */
.badge.live { color: var(--ok); border-color: rgba(74, 222, 128, .4); }

.download-card .head .badge { margin-left: auto; }

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

footer.site {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  color: var(--muted);
  font-size: 14px;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
footer.site nav { margin-left: auto; display: flex; gap: 24px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--ink); }

/* --- Prose (the privacy policy) ----------------------------------------- */

.prose { max-width: 760px; }
.prose h2 { margin-top: 48px; margin-bottom: 12px; font-size: 26px; scroll-margin-top: 84px; }
.prose h3 { margin-top: 28px; margin-bottom: 8px; }
.prose p, .prose li { color: var(--muted); }
/* CommonMark emits a flat run of siblings, so the spacing is stated between
   them rather than on a wrapper: a paragraph after a list or a table is a new
   thought, not a continuation of the last item. */
.prose p + p,
.prose ul + p,
.prose ol + p,
.prose table + p,
.prose blockquote + p { margin-top: 14px; }
.prose ul { padding-left: 20px; margin: 14px 0 0; display: grid; gap: 10px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose table { min-width: 0; }
/* The policy is Markdown, so these style what CommonMark emits rather than
   classes the document carries: the opening blockquote is the summary, the
   list under the "On this page" heading is the contents. */
.prose blockquote {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--rust);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0 0;
}
.prose blockquote p { color: var(--ink); }

.prose h3.toc {
  margin-top: 40px;
  /* The heading and the list that follows it are one card, so no gap between
     them may show the page through. */
  margin-bottom: 0;
  padding: 20px 24px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.prose h3.toc + ol {
  margin: 0 0 8px;
  padding: 12px 24px 20px 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  gap: 8px;
}

.prose ol { padding-left: 20px; margin: 14px 0 0; display: grid; gap: 10px; color: var(--muted); }
.prose ul + h2, .prose ol + h2, .prose table + h2 { margin-top: 48px; }
.prose em { color: var(--ink); font-style: italic; }
.prose code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* --- Narrow ------------------------------------------------------------- */

@media (max-width: 860px) {
  section { padding-block: 56px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.flip .split-media { order: 0; }
  nav.site { gap: 16px; }
  nav.site a.hide-sm { display: none; }
}

@media (max-width: 560px) {
  .hero { padding-top: 56px; }
  .hero .shot-frame { margin-bottom: -40px; }
  .btn { width: 100%; }
  footer.site nav { margin-left: 0; }
}

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