/* =========================================================
   VitaPilot AI — "dusk flight" navigation identity
   ========================================================= */
:root {
  --ink:      #0C1826;
  --ink-2:    #101F31;
  --ink-3:    #17293E;
  --line:     rgba(147, 166, 190, 0.16);
  --line-2:   rgba(147, 166, 190, 0.28);
  --glow:     #F6A860;   /* horizon amber — primary accent */
  --glow-2:   #FFC98B;
  --sky:      #7ED0D6;   /* calm teal — secondary accent   */
  --text:     #EAF1F8;
  --muted:    #93A6BE;
  --muted-2:  #6E829B;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle starfield / instrument grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.10) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 65%, rgba(255,255,255,0.07) 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 85%, rgba(255,255,255,0.06) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 18%, rgba(255,255,255,0.08) 50%, transparent 51%);
  background-size: 480px 480px, 620px 620px, 540px 540px, 700px 700px;
}

img, svg { max-width: 100%; }

a { color: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--glow);
  color: #14110b;
  padding: .6rem 1rem;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- shared layout ---------- */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad);
}

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sky);
  margin: 0 0 1.4rem;
}
.eyebrow .tick {
  width: 22px; height: 1px;
  background: var(--sky);
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}

.section-lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  margin: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .98rem;
  letter-spacing: -0.01em;
  padding: .82rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn-primary {
  background: var(--glow);
  color: #14110b;
  box-shadow: 0 8px 30px -12px rgba(246, 168, 96, 0.7);
}
.btn-primary:hover { background: var(--glow-2); transform: translateY(-2px); }
.btn-ghost {
  color: var(--text);
  border-color: var(--line-2);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: var(--sky); color: var(--sky); transform: translateY(-2px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
  background: rgba(12, 24, 38, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--glow);
  font-family: var(--font-display);
  font-weight: 700;
}
.brand-mark { width: 26px; height: 26px; }
.brand-name { color: var(--text); font-size: 1.12rem; letter-spacing: -0.02em; }
.brand-ai { color: var(--glow); margin-left: 2px; }

.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: .95rem;
  transition: color .16s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--line-2);
  padding: .5rem 1.05rem;
  border-radius: 999px;
}
.nav-cta:hover { border-color: var(--glow); color: var(--glow) !important; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--pad) 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow { animation: rise .7s ease both; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 6.4vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 1.4rem;
  animation: rise .7s ease .05s both;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  max-width: 34ch;
  margin: 0 0 2.2rem;
  animation: rise .7s ease .12s both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; animation: rise .7s ease .2s both; }

.hero-instrument {
  position: relative;
  display: flex;
  justify-content: center;
}
.flightpath { width: 100%; max-width: 460px; height: auto; }

/* instrument typography */
.readout {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  fill: var(--muted);
}
.node-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  fill: var(--muted);
}
.horizon-line { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; }
.node.origin { fill: var(--sky); }

/* flight-path draw-in */
.route {
  stroke-dashoffset: 0;
  animation: dash 2.6s linear infinite;
}
.marker {
  offset-path: path("M70 350 C 150 330, 210 250, 250 190 S 340 90, 400 96");
  offset-rotate: auto;
  offset-distance: 0%;
  animation: fly 4.2s cubic-bezier(.5, 0, .3, 1) infinite;
}
@keyframes dash { to { stroke-dashoffset: -60; } }
@keyframes fly {
  0%   { offset-distance: 0%;   opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* readout strip */
.readout-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(3rem, 6vw, 5rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}
.readout-item {
  background: var(--ink-2);
  padding: 1.35rem 1.5rem;
}
.readout-key {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--glow);
  margin-bottom: .4rem;
}
.readout-val { color: var(--muted); font-size: .95rem; }

/* ---------- capabilities grid ---------- */
.grid { list-style: none; margin: 0; padding: 0; }
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.card {
  background: var(--ink-2);
  padding: 1.75rem 1.6rem 1.9rem;
  transition: background .2s ease, transform .2s ease;
}
.card:hover { background: var(--ink-3); }
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.1rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line-2);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.14rem;
  letter-spacing: -0.01em;
  margin: 0 0 .55rem;
}
.card p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- approach / steps ---------- */
.approach { border-top: 1px solid var(--line); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 2rem;
  border-top: 2px solid var(--line-2);
}
.step-no {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--glow);
  letter-spacing: .05em;
}
.step-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  margin: 1rem 0 .6rem;
}
.step-body p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ---------- who we help ---------- */
.who { border-top: 1px solid var(--line); }
.audience {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}
.audience li {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: .55rem 1.25rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text);
  transition: border-color .18s ease, color .18s ease;
}
.audience li:hover { border-color: var(--glow); color: var(--glow); }

/* ---------- mission ---------- */
.mission {
  border-top: 1px solid var(--line);
  text-align: center;
}
.mission-quote { margin: 0 auto; max-width: 800px; }
.mission-quote p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.35rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  margin: 0 0 1.6rem;
}
.mission-quote em { color: var(--glow); font-style: normal; }
.mission-quote footer {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- contact ---------- */
.contact {
  text-align: center;
  border-top: 1px solid var(--line);
}
.contact-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem);
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(246,168,96,0.14), transparent 60%),
    var(--ink-2);
  overflow: hidden;
}
.contact .eyebrow { justify-content: center; }
.contact-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.contact-lead { color: var(--muted); max-width: 46ch; margin: 0 auto 2rem; }
.contact-email { margin: 1.5rem 0 0; }
.contact-email a {
  font-family: var(--font-mono);
  color: var(--sky);
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .04em;
}
.contact-email a:hover { text-decoration: underline; }
.contact-address {
  font-style: normal;
  color: var(--muted-2);
  font-size: .9rem;
  line-height: 1.55;
  margin-top: 1.1rem;
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.footer-mid { flex: 1 1 240px; }
.footer-tag { color: var(--muted); margin: 0; }
.footer-address {
  font-style: normal;
  color: var(--muted-2);
  font-size: .82rem;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  margin-top: .4rem;
}
.footer-legal {
  color: var(--muted-2);
  font-size: .85rem;
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: .03em;
}
.footer-legal a { color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--sky); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-instrument { order: -1; max-width: 420px; margin: 0 auto; }
  .hero-sub { max-width: 46ch; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { border-top: none; border-left: 2px solid var(--line-2); padding: 0 0 2rem 1.5rem; }
  .step:last-child { padding-bottom: 0; }
}

@media (max-width: 560px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .readout-strip { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}

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