/* ═══════════════════════════════════════════════════════════════════════
   Flownautic — stylesheet

   Palette sampled directly from the brand identity artwork:
     background   #000513   near-black navy
     wave         #17599d → #5fa8dd → #7c83d3 → #9f6fe5  (ocean → violet)
     tagline      #5d98d6 → #9f6fe5
     star / foam  #ffffff, #e8ecf4, #abc7e9

   The identity is built for deep space, so this is a dark-only design.
   The visual story: you ride the wave, the North Star is the destination.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* depths */
  --abyss:      #000513;
  --deep:       #03081a;
  --bg:         #060c1c;
  --bg-2:       #0a1226;
  --surface:    #0c1630;
  --surface-2:  #111d3c;
  --border:     #1b2a4e;
  --border-lit: #2c4074;

  /* text */
  --ink:   #f0f4fa;
  --body:  #b3c1d9;
  --muted: #8290ac;

  /* brand */
  --ocean:     #17599d;
  --deepblue:  #1a357a;
  --blue:      #3481c2;
  --sky:       #5fa8dd;
  --pale:      #abc7e9;
  --indigo:    #5349a9;
  --violet:    #8d6cd4;
  --violet-lt: #9f6fe5;
  --foam:      #e8ecf4;
  --star:      #ffffff;
  --star-glow: #cfe4ff;

  --wave-grad: linear-gradient(100deg, var(--ocean) 0%, var(--sky) 34%, #7c83d3 66%, var(--violet-lt) 100%);
  --text-grad: linear-gradient(96deg, #6fb2e2 0%, #7c83d3 52%, var(--violet-lt) 100%);

  --radius: 12px;
  --radius-lg: 18px;
  --maxw: 1120px;
  --measure: 36rem;
  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  color: var(--body);
  background-color: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── the night sky: starfield over an ocean-depth gradient ─────────────── */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(83,73,169,0.20), transparent 68%),
    radial-gradient(900px 560px at 12% 8%, rgba(23,89,157,0.16), transparent 70%),
    linear-gradient(180deg, var(--abyss) 0%, var(--bg) 42%, var(--deep) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("stars.svg");
  background-size: 1600px 1200px;
  opacity: 0.55;
  pointer-events: none;
}

/* ── type ──────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  font-weight: 600;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 5.4vw, 3.6rem); letter-spacing: -0.034em; }
h2 { font-size: clamp(1.55rem, 3.1vw, 2.25rem); letter-spacing: -0.028em; }
h3 { font-size: 1.14rem; letter-spacing: -0.012em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--star-glow); }
strong { color: var(--ink); font-weight: 600; }

.grad-text {
  background: var(--text-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── layout ────────────────────────────────────────────────────────────── */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
section { position: relative; padding: clamp(3.75rem, 8vw, 6.5rem) 0; }
section.tight { padding: clamp(2.5rem, 5vw, 3.75rem) 0; }
.measure { max-width: var(--measure); }
.lede { font-size: clamp(1.08rem, 1.9vw, 1.28rem); color: var(--body); max-width: 40rem; }

/* a panel that sits slightly above the sky */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(12,22,48,0.72), rgba(6,12,28,0.55));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--text-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

/* ── header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(3, 8, 26, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 38px;
  height: 31px;
  object-fit: contain;
  mix-blend-mode: screen;   /* the artwork's near-black sky drops out */
  flex: none;
}
.brand-name {
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 1.9rem); flex-wrap: wrap; }
.nav a { color: var(--body); text-decoration: none; font-size: 0.95rem; transition: color 0.15s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.nav .btn { padding: 0.52rem 1.05rem; font-size: 0.92rem; }

/* on small screens the header CTA is redundant — every page carries one in
   the body — and dropping it keeps the header to two rows instead of three */
@media (max-width: 600px) {
  .nav .btn { display: none; }
  .site-header .wrap { min-height: 3.5rem; gap: 0.5rem 1rem; padding-bottom: 0.5rem; }
  .nav { gap: 1.1rem; }
}

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 100px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn-primary {
  background: var(--wave-grad);
  color: #04101f;
  font-weight: 600;
  box-shadow: 0 4px 22px -6px rgba(95,168,221,0.5);
}
.btn-primary:hover {
  color: #04101f;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -6px rgba(140,110,220,0.62);
}

.btn-ghost {
  border-color: var(--border-lit);
  color: var(--ink);
  background: rgba(12,22,48,0.5);
}
.btn-ghost:hover { border-color: var(--sky); color: var(--star-glow); transform: translateY(-1px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.15rem; }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(3.25rem, 7vw, 5.25rem) 0 clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
}
/* inner pages: same sky, less altitude */
.hero-compact { padding: clamp(2.75rem, 6vw, 4.25rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.hero-compact h1 { max-width: 26ch; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

.hero h1 { max-width: 22ch; }
.hero .lede { margin-top: 1.5rem; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img {
  width: min(100%, 30rem);
  height: auto;
  mix-blend-mode: screen;
  animation: drift 14s ease-in-out infinite;
}
.hero-art::before {   /* the star's halo, bleeding past the artwork */
  content: "";
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  top: 2%;
  right: 2%;
  background: radial-gradient(circle, rgba(207,228,255,0.20), transparent 62%);
  filter: blur(14px);
  pointer-events: none;
}

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(-0.6deg); }
}

.tagline {
  display: block;
  margin-top: 1.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  background: var(--text-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── wave divider ──────────────────────────────────────────────────────── */

.wave-edge {
  display: block;
  width: 100%;
  height: clamp(60px, 9vw, 120px);
  margin-bottom: -1px;
}
.wave-edge path { vector-effect: non-scaling-stroke; }

/* ── the journey: four stages rising toward the star ───────────────────── */

.journey { position: relative; margin-top: 3rem; }

.journey-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.stages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage {
  position: relative;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17,29,60,0.82), rgba(8,15,34,0.62));
  border: 1px solid var(--border);
  backdrop-filter: blur(3px);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.stage:hover { border-color: var(--border-lit); transform: translateY(-4px); }

/* the staircase — each stage sits higher than the last */
@media (min-width: 861px) {
  .stage:nth-child(1) { transform: translateY(3.75rem); }
  .stage:nth-child(2) { transform: translateY(2.5rem); }
  .stage:nth-child(3) { transform: translateY(1.25rem); }
  .stage:nth-child(4) { transform: translateY(0); }
  .stage:nth-child(1):hover { transform: translateY(3.15rem); }
  .stage:nth-child(2):hover { transform: translateY(1.9rem); }
  .stage:nth-child(3):hover { transform: translateY(0.65rem); }
  .stage:nth-child(4):hover { transform: translateY(-0.6rem); }
  .stages { margin-bottom: 3.75rem; }
}
@media (max-width: 860px) {
  .stages { grid-template-columns: 1fr; gap: 1rem; }
  .journey-track { display: none; }
}

.journey-star {
  position: absolute;
  top: -1.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  animation: twinkle 4.5s ease-in-out infinite;
  pointer-events: none;
  /* halo via box-shadow rather than an oversized pseudo-element — box-shadow
     paints outside the box without contributing to document scroll width */
  border-radius: 50%;
  box-shadow: 0 0 34px 16px rgba(207, 228, 255, 0.13),
              0 0 12px 4px rgba(207, 228, 255, 0.16);
}
@media (max-width: 860px) { .journey-star { display: none; } }

.stage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--star-glow);
  background: rgba(83,73,169,0.28);
  border: 1px solid var(--border-lit);
  margin-bottom: 0.9rem;
}
.stage h3 { margin-bottom: 0.4rem; }
.stage p { font-size: 0.95rem; margin: 0; color: var(--body); }

/* ── cards ─────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 1.25rem; }
/* 26rem keeps this a true two-up at desktop widths instead of wrapping to 3+1 */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.card {
  position: relative;
  padding: 1.7rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13,23,48,0.78), rgba(7,13,30,0.58));
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.card::before {   /* a cresting wave along the top edge */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--wave-grad);
  opacity: 0.5;
  transition: opacity 0.22s var(--ease);
}
.card:hover { border-color: var(--border-lit); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }

.card h3 { margin-bottom: 0.55rem; }
.card p { color: var(--body); font-size: 0.97rem; }
.card .eyebrow { margin-bottom: 0.7rem; }

.card ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.card li {
  font-size: 0.94rem;
  padding: 0.32rem 0 0.32rem 1.15rem;
  position: relative;
  color: var(--body);
}
.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 7px rgba(95,168,221,0.8);
}

.card-plain { padding: 1.35rem 1.5rem; }
.card-plain h3 { margin: 0; font-size: 1.02rem; }

/* ── framework strip ───────────────────────────────────────────────────── */

.framework {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.05rem;
  margin: 0; padding: 0;
  list-style: none;
}
.framework li {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  font-size: clamp(1rem, 2.3vw, 1.3rem);
  letter-spacing: -0.02em;
}
.framework li:not(:last-child)::after {
  content: "→";
  font-weight: 400;
  background: var(--text-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── north star callout ────────────────────────────────────────────────── */

.northstar {
  position: relative;
  margin: 0;
  padding: 1.9rem 2rem 1.9rem 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-lit);
  background:
    radial-gradient(520px 220px at 88% -30%, rgba(207,228,255,0.14), transparent 70%),
    linear-gradient(180deg, rgba(16,28,60,0.8), rgba(7,13,30,0.6));
  color: var(--ink);
  font-size: clamp(1.16rem, 2.4vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  overflow: hidden;
}
.northstar::before {
  content: "";
  position: absolute;
  left: 0; top: 1.5rem; bottom: 1.5rem;
  width: 2px;
  border-radius: 2px;
  background: var(--wave-grad);
}
.northstar .star {
  position: absolute;
  top: 1rem; right: 1.4rem;
  width: 22px; height: 22px;
  opacity: 0.9;
  animation: twinkle 4.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

/* ── voice chips ───────────────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.chips li {
  font-size: 0.9rem;
  padding: 0.36rem 0.85rem;
  border-radius: 100px;
  border: 1px solid var(--border-lit);
  color: var(--ink);
  background: rgba(13,23,48,0.7);
}
.chips.is-not li {
  color: var(--muted);
  border-color: var(--border);
  text-decoration: line-through;
  text-decoration-color: rgba(130,144,172,0.55);
}

.label-sm {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
}

/* ── form ──────────────────────────────────────────────────────────────── */

.form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.42rem; }
.field label { font-size: 0.92rem; font-weight: 500; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(6,12,28,0.75);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(95,168,221,0.18);
}
.field .hint { font-size: 0.85rem; color: var(--muted); }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem; top: 1rem; z-index: 60;
  background: var(--surface);
  color: var(--ink);
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
}

/* ── footer ────────────────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(3,8,26,0.5), rgba(0,5,19,0.9));
  padding: 3.25rem 0 2.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer a { color: var(--body); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.footer-brand { max-width: 22rem; }
.footer-brand .brand { margin-bottom: 0.85rem; }
.footer-brand p { color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ── motion & contrast preferences ─────────────────────────────────────── */

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

@media (prefers-contrast: more) {
  :root { --body: #d7e2f2; --muted: #a9b7d0; --border: #35496f; --border-lit: #5470a8; }
  body::after { opacity: 0.3; }
}
