/* ============================================================
   PRO DIVE — site stylesheet
   Aesthetic: dark dive-computer instrument
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Depth palette */
  --bg:        oklch(0.13 0.025 240);
  --bg-1:      oklch(0.17 0.028 240);
  --bg-2:      oklch(0.21 0.030 240);
  --bg-3:      oklch(0.26 0.030 240);
  --line:      oklch(0.30 0.025 240);
  --line-2:    oklch(0.38 0.025 240);

  --fg:        oklch(0.97 0.005 240);
  --fg-2:      oklch(0.78 0.012 240);
  --fg-3:      oklch(0.58 0.018 240);
  --fg-4:      oklch(0.42 0.020 240);

  /* Single accent — dive amber */
  --accent:    oklch(0.82 0.17 70);
  --accent-2:  oklch(0.72 0.18 70);
  --accent-ink: oklch(0.20 0.05 70);

  /* Telemetry colors echo dive-computer conventions */
  --tel-depth: oklch(0.82 0.17 70);   /* amber */
  --tel-time:  oklch(0.85 0.18 145);  /* green  */
  --tel-ndl:   oklch(0.80 0.13 220);  /* cyan-blue */
  --tel-warn:  oklch(0.72 0.21 28);   /* red  */

  --radius:    14px;
  --radius-sm: 8px;

  --maxw: 1240px;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ============================================================
   Page chrome
   ============================================================ */

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at top, oklch(0.20 0.05 240) 0%, transparent 60%),
    linear-gradient(180deg, oklch(0.13 0.025 240) 0%, oklch(0.10 0.020 240) 100%);
}
.bg-grid::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(oklch(0.30 0.025 240 / 0.18) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.30 0.025 240 / 0.18) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* Top nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: oklch(0.13 0.025 240 / 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 32px;
  height: 64px; max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
.nav-logo .logo-mark {
  width: 26px; height: 26px;
}
.nav-links {
  display: flex; gap: 4px; margin-left: auto;
}
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--fg-2);
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-1); }
.nav-links a.active { color: var(--fg); background: var(--bg-2); }
.nav-cta {
  padding: 9px 16px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: transform .15s, filter .15s;
}
.nav-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* Burger button — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px 16px;
    background: oklch(0.13 0.025 240 / 0.96);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
    z-index: 49;
  }
  .nav.open .nav-links {
    display: flex;
  }
  .nav-links a {
    padding: 13px 14px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--fg-2);
  }
  .nav-links a.active { color: var(--fg); background: var(--bg-2); }
  .nav-burger { display: flex; }
}

/* ============================================================
   Type & utility
   ============================================================ */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  margin-right: 8px; vertical-align: 1px;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow .dot { animation: none; opacity: 1; }
}

.h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-weight: 600;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 16px 0;
  text-wrap: balance;
}
.h3 {
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}
.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-2);
  max-width: 56ch;
  line-height: 1.5;
  text-wrap: pretty;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 10px;
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  border-radius: 6px;
}
.kicker svg { width: 12px; height: 12px; }

.hr-line {
  height: 1px; width: 100%;
  background: var(--line);
}
.lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, filter .15s, background .15s, border-color .15s;
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--fg);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--fg-3); }
.btn-arrow { width: 14px; height: 14px; }

/* App store badge */
.appstore-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: 12px;
  transition: border-color .15s, background .15s, transform .15s;
}
.appstore-badge:hover {
  border-color: var(--fg-3); background: var(--bg-1); transform: translateY(-1px);
}
.appstore-badge svg { width: 26px; height: 26px; }
.appstore-badge .as-top { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--fg-3); text-transform: uppercase; line-height: 1; }
.appstore-badge .as-bot { font-size: 17px; font-weight: 600; line-height: 1.2; margin-top: 3px; letter-spacing: -0.01em; }

/* ============================================================
   Sections
   ============================================================ */

section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }

.section-head {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 48px;
  max-width: 720px;
}
.section-head .h2 { margin: 0; }

/* ============================================================
   Cards / panels (instrument-style)
   ============================================================ */

.panel {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-num {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--fg-3);
}

/* Feature grid */
.fg {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.fg .cell {
  grid-column: span 4;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 200px;
  transition: border-color .15s, background .15s;
}
.fg .cell:hover { border-color: var(--line-2); }
.fg .cell.span6 { grid-column: span 6; }
.fg .cell.span8 { grid-column: span 8; }
.fg .cell.span12 { grid-column: span 12; }

.fg .cell .lbl-row {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--fg-3);
}
.fg .cell .num {
  font-family: var(--mono);
  font-size: 36px; font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1;
}
.fg .cell .num .unit { font-size: 16px; color: var(--fg-3); margin-left: 6px; }
.fg .cell h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.fg .cell p { margin: 0; color: var(--fg-2); font-size: 14.5px; line-height: 1.55; }

@media (max-width: 920px) {
  .fg .cell, .fg .cell.span6, .fg .cell.span8 { grid-column: span 6; }
}
@media (max-width: 600px) {
  .fg .cell, .fg .cell.span6, .fg .cell.span8 { grid-column: span 12; }
}

/* ============================================================
   Footer
   ============================================================ */

footer.site-foot {
  padding: 64px 0 48px 0;
  border-top: 1px solid var(--line);
  margin-top: 60px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.foot-grid h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 16px 0;
  font-weight: 500;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-grid a { color: var(--fg-2); font-size: 14.5px; }
.foot-grid a:hover { color: var(--fg); }
.foot-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-4);
}
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
