/* ========================================================================
   NAUTICAL LABS — Site Design System
   Source of truth: brand guide v1.0 (April 2026)
   ======================================================================== */

:root {
  /* Primary palette — derived from the logo */
  --navy-900: #0A1628;
  --navy-800: #0F1F38;
  --navy-700: #152A4A;
  --navy-600: #1B365C;
  --navy-500: #234575;

  --teal-900: #064E5E;
  --teal-800: #0A6E7F;
  --teal-700: #0E8E9F;
  --teal-600: #0891B2;  /* primary brand */
  --teal-500: #14B8D4;
  --teal-400: #22D3EE;  /* accent / highlights */
  --teal-300: #67E8F9;
  --teal-200: #A5F3FC;
  --teal-100: #CFFAFE;

  --lime-900: #3F6212;
  --lime-700: #65A30D;
  --lime-600: #84CC16;  /* secondary accent */
  --lime-500: #A3E635;
  --lime-400: #BEF264;
  --lime-300: #D9F99D;

  --neutral-950: #0A0C10;
  --neutral-900: #171C24;
  --neutral-800: #1E2530;
  --neutral-700: #2D3748;
  --neutral-600: #4A5568;
  --neutral-500: #718096;
  --neutral-400: #A0AEC0;
  --neutral-300: #CBD5E0;
  --neutral-200: #E2E8F0;
  --neutral-100: #EDF2F7;
  --neutral-50:  #F7FAFC;
  --white: #FFFFFF;

  --success: #22C55E;
  --warning: #F59E0B;
  --error:   #EF4444;

  /* Type */
  --font-display: 'DM Serif Display', 'Source Serif Pro', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Easing — "expensive" curves */
  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-overshoot:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --container: 1320px;
  --pad-x: clamp(20px, 4vw, 56px);

  /* Surfaces */
  --surface-1: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --hairline:  rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.14);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--neutral-200);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'cv11';
  cursor: none;
}
@media (max-width: 900px) { body { cursor: auto; } }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--teal-400); color: var(--navy-900); }

/* ---------- background atmosphere ---------- */
.atmos {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.atmos::before, .atmos::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px);
  animation: drift 28s ease-in-out infinite alternate;
}
.atmos::before {
  width: 760px; height: 760px;
  background: radial-gradient(circle, rgba(8,145,178,0.22), transparent 70%);
  top: -180px; left: -120px;
}
.atmos::after {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(132,204,22,0.10), transparent 70%);
  bottom: -160px; right: -80px;
  animation-duration: 36s;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, 30px) scale(1.06); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ---------- custom cursor ---------- */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; pointer-events: none;
  z-index: 1000; mix-blend-mode: difference;
  transition: transform 0.3s var(--ease-out), width 0.3s var(--ease-out), height 0.3s var(--ease-out), opacity 0.2s;
}
.cursor {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor.is-link { width: 56px; height: 56px; border-color: rgba(34,211,238,0.9); }
.cursor.is-text { width: 6px; height: 28px; border-radius: 2px; }
.cursor.is-hidden, .cursor-dot.is-hidden { opacity: 0; }
@media (max-width: 900px), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* ---------- typography ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--white); letter-spacing: -0.01em; line-height: 1.08; }
.display { font-family: var(--font-display); }
.body-lg { font-size: 19px; line-height: 1.65; color: var(--neutral-300); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-400);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.6;
}
.eyebrow.no-rule::before { display: none; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--neutral-400); }
.serif { font-family: var(--font-display); }

/* ---------- layout ---------- */
.shell { position: relative; z-index: 2; }
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section { padding: clamp(80px, 12vh, 140px) 0; position: relative; }
.section-head { display: grid; grid-template-columns: 280px 1fr; gap: 60px; margin-bottom: 60px; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; } }
.section-head .lead h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 60px);
  letter-spacing: -0.015em;
}
.section-head .lead p {
  margin-top: 20px; max-width: 56ch;
  font-size: 17px; color: var(--neutral-400);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 22, 40, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--hairline);
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--white);
}
.nav-brand img { width: 28px; height: 28px; object-fit: contain; }
.nav-brand b { font-weight: 700; }
.nav-brand span { color: var(--neutral-500); margin-left: 4px; }
.nav-links {
  display: flex; align-items: center; gap: 36px;
}
.nav-links a {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--neutral-300);
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--teal-400);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--white); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--white);
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.nav-cta:hover { border-color: var(--teal-400); background: rgba(34, 211, 238, 0.08); }
.nav-cta::after {
  content: "→"; transition: transform 0.3s var(--ease-overshoot);
}
.nav-cta:hover::after { transform: translateX(4px); }
@media (max-width: 800px) {
  .nav-links { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em;
  position: relative; overflow: hidden;
  transition: transform 0.5s var(--ease-overshoot), box-shadow 0.4s var(--ease-out), background 0.3s;
  will-change: transform;
}
.btn .arrow { transition: transform 0.5s var(--ease-overshoot); display: inline-block; }
.btn:hover .arrow { transform: translateX(6px); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-400));
  color: var(--navy-900);
  box-shadow: 0 0 0 1px rgba(34,211,238,0.3), 0 10px 30px -10px rgba(8,145,178,0.6);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(34,211,238,0.5), 0 18px 50px -12px rgba(8,145,178,0.7); }
.btn-secondary {
  background: transparent; color: var(--white);
  border: 1px solid var(--hairline-strong);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--teal-400); color: var(--teal-200); }
.btn-ghost { padding: 12px 0; color: var(--teal-300); }
.btn-ghost::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; opacity: 0.3; }

/* ---------- card primitives ---------- */
.card {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%),
    rgba(15, 31, 56, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform 0.6s var(--ease-out), border-color 0.4s, background 0.4s;
}
.card.lift:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,0.25);
}

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--hairline);
  padding: 60px var(--pad-x) 40px;
}
.footer-grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--neutral-500); margin-bottom: 20px; font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--neutral-300); font-size: 14px; }
.footer ul a:hover { color: var(--teal-300); }
.footer-meta {
  max-width: var(--container); margin: 50px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--neutral-500);
  letter-spacing: 0.1em;
}
.footer-brand-wordmark {
  font-family: var(--font-display);
  font-size: clamp(60px, 16vw, 220px);
  line-height: 0.85; letter-spacing: -0.04em;
  background: linear-gradient(180deg, rgba(34,211,238,0.18) 0%, rgba(34,211,238,0.02) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-top: 60px; user-select: none;
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.stagger.in > * { opacity: 1; transform: translateY(0); }
.stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.33s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.47s; }
.stagger.in > *:nth-child(8) { transition-delay: 0.54s; }

/* ---------- status badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--hairline-strong);
  color: var(--neutral-300);
  background: var(--surface-1);
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--neutral-500);
}
.badge.live::before { background: var(--success); box-shadow: 0 0 0 4px rgba(34,197,94,0.18); animation: pulse 2.4s ease-in-out infinite; }
.badge.live { color: var(--neutral-100); border-color: rgba(34,197,94,0.4); }
.badge.live-demo::before { background: var(--teal-400); box-shadow: 0 0 0 4px rgba(34,211,238,0.18); animation: pulse 2.4s ease-in-out infinite; }
.badge.live-demo { color: var(--teal-200); border-color: rgba(34,211,238,0.4); }
.badge.shipping-soon::before { background: var(--lime-500); }
.badge.shipping-soon { color: var(--lime-300); border-color: rgba(163,230,53,0.4); }
.badge.in-progress::before { background: var(--warning); }
.badge.in-progress { color: #FCD34D; border-color: rgba(245,158,11,0.4); }
.badge.shipped-nda::before { background: var(--neutral-400); }
.badge.shipped-nda { color: var(--neutral-200); }
.badge.in-house::before { background: var(--teal-300); }
.badge.in-house { color: var(--teal-100); border-color: rgba(103,232,249,0.3); }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* ---------- divider ---------- */
.h-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-strong), transparent);
  margin: 0;
}

/* ---------- form basics ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--neutral-400);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--white);
  font-family: var(--font-body); font-size: 15px;
  transition: border-color 0.3s, background 0.3s;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal-400);
  background: rgba(34, 211, 238, 0.04);
}
.field textarea { min-height: 140px; resize: vertical; }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .atmos::before, .atmos::after { animation: none !important; }
}
