/* Nautis — desktop layout stylesheet
   Loaded on /index.html behind media="(min-width:769px)" (the homepage's
   desktop half of its responsive split) and UNCONDITIONALLY on the other
   full-head pages (on-watch, what-is-nautis, 404, error).

   The shared base layer (brand tokens, html/body typographic base, box-sizing,
   img + link resets) now lives in public/base.css, which every page loads with
   no media query. This file keeps only the desktop-specific tokens + responsive
   font-size and the desktop layout/component rules. See base.css for the why.
   Palette + fonts unchanged from the brand: navy, blue, near-white, slate.
*/

:root {
  --container: 1200px;
  --gutter: clamp(24px, 5vw, 80px);
}

/* Responsive body size — desktop. The shared html/body base (font-family,
   colour, background, line-height, smoothing, overflow-x) is in base.css;
   only the width-dependent font-size lives here and in mobile.css. */
html, body {
  font-size: 18px;
}

/* ────────────────────────────────────────────────────────────
   Layout primitives
   ──────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Typography */
h1, h2, h3 {
  color: var(--nautis-navy);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.05;
}

.lede {
  font-size: clamp(1.125rem, 1.4vw, 1.375rem);
  line-height: 1.6;
  color: var(--slate-600);
  margin: 0;
  text-wrap: pretty;
}

.lede + .lede { margin-top: 1.1em; }

h2 + .lede { margin-top: 24px; }

.eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nautis-blue);
  margin-bottom: 22px;
  font-weight: 500;
}

/* ────────────────────────────────────────────────────────────
   Sticky header
   The header (sticky chrome, three-zone desktop grid, mobile hamburger +
   drawer) now lives in src/components/Header.astro with scoped styles, so it
   stays in sync across every page. The base visibility rules are :global in
   that component, so per-page overrides here (e.g. the homepage's hidden-over-
   hero behaviour below) still apply.
   ──────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────
   Hero
   ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--gutter) 64px;
  overflow: hidden;
}

.hero > * { position: relative; z-index: 1; }

.hero .logo {
  width: 96px;
  height: 96px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  margin-top: 28px;
  color: var(--nautis-navy);
  letter-spacing: -0.025em;
}

.hero .lockup {
  font-size: 26px;
  font-weight: 300;
  color: var(--nautis-navy);
  margin-top: 28px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--slate-400);
  z-index: 1;
  animation: bob 2.4s var(--ease-out) infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ────────────────────────────────────────────────────────────
   Feature rows — alternating split layout, full screen width
   ──────────────────────────────────────────────────────────── */
.feature {
  padding: clamp(72px, 11vh, 160px) 0;
}

.feature .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 110px);
}

.feature.reverse .feature-copy { order: 2; }
.feature.reverse .feature-media { order: 1; }

.feature-copy { max-width: 30rem; }

.feature-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stacked phones (light over dark, peeking) */
.devices {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  filter: drop-shadow(0 30px 60px rgba(10, 61, 98, 0.16));
}

.devices img {
  width: clamp(220px, 22vw, 320px);
  position: relative;
}

.devices .front { z-index: 2; }

.devices .behind {
  margin-left: clamp(-110px, -7vw, -86px);
  margin-top: 0;
  z-index: 1;
  opacity: 0.96;
}

/* Single device */
.device-single {
  width: clamp(240px, 24vw, 340px);
  filter: drop-shadow(0 30px 60px rgba(10, 61, 98, 0.16));
}

/* §3 spread — center phone with two peeking behind */
.devices-spread {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 30px 60px rgba(10, 61, 98, 0.16));
}

.devices-spread .center {
  width: clamp(220px, 22vw, 300px);
  position: relative;
  z-index: 3;
}

.devices-spread .side {
  width: clamp(160px, 16vw, 220px);
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

.devices-spread .left { margin-right: clamp(-110px, -9vw, -80px); }
.devices-spread .right { margin-left: clamp(-110px, -9vw, -80px); }

.caption {
  margin-top: 18px;
  text-align: center;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.7rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}

/* ────────────��───────────────────────────────────────────────
   Dark full-bleed band — The Radar
   ──────────────────────────────────────────────────────────── */
.band-dark {
  background:
    radial-gradient(120% 120% at 80% 0%, var(--nautis-navy) 0%, var(--nautis-navy-deep) 60%);
  color: #EAF2F8;
  padding: clamp(80px, 12vh, 160px) 0;
}

.band-dark h2 { color: #FFFFFF; }
.band-dark .eyebrow { color: #7FB2F5; }
.band-dark .lede { color: #B9CCDC; }

.band-head {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(48px, 7vh, 88px);
  align-items: end;
}

.radar-grid .radar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.radar-grid img {
  width: 100%;
  max-width: 300px;
  filter: drop-shadow(0 26px 50px rgba(0, 0, 0, 0.45));
  transition: transform 0.5s var(--ease-out);
}

.radar-grid .radar-item:hover img { transform: translateY(-10px); }

/* Lift the middle phone so the trio reads as a fanned set */
.radar-grid .radar-item.feature-phone { margin-bottom: 28px; }

.band-dark .caption { color: #8FA6B8; }

/* ────────────────────────────────────────────────────────────
   On Watch — full-width showcase (MacBook + phone overlap)
   ──────────────────────────────────────────────────────────── */
.onwatch {
  padding: clamp(80px, 12vh, 160px) 0 clamp(120px, 16vh, 200px);
}

.onwatch .band-head { text-align: center; max-width: 44rem; }

.showcase {
  position: relative;
  max-width: 1000px;
  margin: clamp(56px, 8vh, 100px) auto 0;
}

.showcase .showcase-mac {
  width: 100%;
  filter: drop-shadow(0 40px 80px rgba(10, 61, 98, 0.22));
}

.showcase .showcase-phone {
  position: absolute;
  bottom: -14%;
  right: -2%;
  width: 27%;
  filter: drop-shadow(0 24px 48px rgba(10, 61, 98, 0.28));
}

/* ────────────────────────────────────────────────────────────
   Offline-first — sync diagram
   ──────────────────────────────────────────────────────────── */
.offline {
  padding: clamp(72px, 11vh, 160px) 0;
  border-top: 1px solid var(--nautis-border-subtle);
}

.offline .band-head { text-align: center; max-width: 44rem; }

.sync-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  margin: clamp(56px, 8vh, 90px) auto 0;
  flex-wrap: wrap;
  background: var(--nautis-surface);
  border: 1px solid var(--nautis-border-subtle);
  border-radius: 24px;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 56px);
  max-width: 960px;
  box-shadow: 0 24px 60px rgba(10, 61, 98, 0.06);
}

.sync-diagram .audience-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex-shrink: 0;
}

.diagram-node { text-align: center; flex-shrink: 0; }

.diagram-node.compact .diagram-label { font-size: 0.85rem; margin-top: 8px; }
.diagram-node.compact .diagram-sublabel { font-size: 0.7rem; }

.diagram-label {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nautis-navy);
}

.diagram-sublabel {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-top: 2px;
}

.diagram-arrow {
  text-align: center;
  flex-shrink: 0;
  padding: 0 4px;
}

.arrow-caption {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-500);
  margin-bottom: 6px;
  font-weight: 600;
}

/* ────────────────────────────────────────────────────────────
   Footer
   The footer now lives in src/components/Footer.astro with scoped styles, so
   it stays in sync across every page.
   ──────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────
   Scroll-reveal motion
   ──────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.in { opacity: 1; transform: none; }

.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-left.in, .reveal-right.in { transform: none; }

/* Stagger helpers */
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; transition: none; }
  .scroll-cue { animation: none; }
}

/* ────────────────────────────────────────────────────────────
   Responsive — stack the split rows below tablet width.
   (≤768px is redirected to /m, so this only covers ~769–960.)
   ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .feature .container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .feature-copy { max-width: 36rem; margin: 0 auto; }
  .feature.reverse .feature-copy { order: 1; }
  .feature.reverse .feature-media { order: 2; }
  .radar-grid { grid-template-columns: 1fr; gap: 56px; }
  .radar-grid .radar-item.feature-phone { margin-bottom: 0; }
  .showcase .showcase-phone { width: 32%; bottom: -10%; }
}

/* The old narrow-width header fallback (a cramped two-zone row that squeezed
   the nav + social top-right) has been removed — the responsive header,
   including the mobile hamburger + slide-in drawer, now lives in
   src/components/Header.astro. */
