/* ==========================================================================
   navi-theme.css — shared tokens & base chrome for the Navi marketing site.
   Load first, then chrome.css, then the page stylesheet.
   Brand: Navi by Darkroom Studio — premium, architectural, calm futuristic warmth.
   ========================================================================== */

/* Fonts loaded per-concept via Google Fonts <link> (Outfit + Space Mono). */

:root {
  /* --- Brand palette --- */
  --navi-blue:        #172987;
  --navi-dark-blue:   #161638;
  --navi-deep:        #101029;
  --navi-light-blue:  #639fff;
  --navi-pastel-blue: #dce6fd;
  --navi-off-white:   #fafafa;
  --navi-white:       #ffffff;

  /* --- Plan accents (app designer stars) --- */
  --navi-plan-compas:  #5177FF;
  --navi-plan-voyager: #A855F7;
  --navi-plan-polaris: #F97316;

  /* --- Derived / support tones --- */
  --navi-ink:         #0e0e26; /* near-black text on light */
  --navi-muted:       #5b6079; /* secondary text on light */
  --navi-muted-dark:  #a6acd6; /* secondary text on dark */
  --navi-line:        rgba(22, 22, 56, 0.10);
  --navi-line-dark:   rgba(220, 230, 253, 0.14);

  /* --- Signature gradient: pastel -> blue -> dark blue --- */
  --navi-gradient: linear-gradient(135deg, #dce6fd 0%, #639fff 42%, #172987 78%, #161638 100%);
  --navi-gradient-soft: linear-gradient(180deg, #fafafa 0%, #eef3fe 55%, #dce6fd 100%);
  --navi-gradient-text: linear-gradient(92deg, #172987 0%, #639fff 100%);

  /* --- Melt section ramp (desaturated — no vivid mid-blue stripe) --- */
  --melt-deep:  #101029;
  --melt-navy:  #1d2a66;
  --melt-mid:   #5677b1;
  --melt-sky:   #b5cbe8;
  --melt-mist:  #e4ebf7;
  --melt-white: #fafafa;
  --melt-runway-min: clamp(360px, 48vh, 640px);

  /* --- Type --- */
  --navi-font: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --navi-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- Rhythm / shape --- */
  --navi-radius:   18px;
  --navi-radius-lg: 28px;
  --navi-maxw: 1440px;
  --navi-pad: clamp(20px, 5vw, 64px);
  --navi-shadow: 0 30px 80px -30px rgba(22, 22, 56, 0.35);
  --navi-shadow-soft: 0 20px 60px -28px rgba(22, 22, 56, 0.28);
  --navi-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: var(--navi-font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--navi-ink);
  background: var(--navi-off-white);
}

/* Display / heading defaults — Outfit Medium display, Light H2 */
h1, .navi-display { font-weight: 500; letter-spacing: -0.025em; line-height: 1.03; margin: 0; }
h2 { font-weight: 300; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h3 { font-weight: 500; letter-spacing: -0.01em; margin: 0; }
p  { margin: 0; }

a { color: inherit; text-decoration: none; }

.navi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--navi-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navi-blue);
}
.navi-eyebrow::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: none;
  background: currentColor;
  -webkit-mask: url(../assets/navi-star-clean.svg) center / contain no-repeat;
  mask: url(../assets/navi-star-clean.svg) center / contain no-repeat;
}

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

/* Buttons */
.navi-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--navi-font); font-weight: 500; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .35s var(--navi-ease), box-shadow .35s var(--navi-ease), background .35s var(--navi-ease);
  white-space: nowrap;
}
.navi-btn--primary { background: var(--navi-blue); color: var(--navi-off-white); box-shadow: var(--navi-shadow-soft); }
.navi-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -20px rgba(23,41,135,.6); }
.navi-btn--ghost { background: transparent; color: var(--navi-ink); border-color: var(--navi-line); }
.navi-btn--ghost:hover { border-color: var(--navi-blue); transform: translateY(-2px); }
.navi-btn--light { background: var(--navi-off-white); color: var(--navi-dark-blue); }
.navi-btn--light:hover { transform: translateY(-2px); }

/* Brand logo — real Navi logo (star icon + wordmark), single official SVG */
.navi-logo { height: 26px; width: auto; display: block; }
.navi-logo--lg { height: 32px; }

/* Section shell */
.navi-section { padding: clamp(72px, 11vw, 150px) var(--navi-pad); }
.navi-wrap { max-width: var(--navi-maxw); margin: 0 auto; }

/* --- Standard concept .note tag (fixed, bottom-right) --- */
.note {
  position: fixed; right: 14px; bottom: 14px; z-index: 9999;
  font-family: var(--navi-mono); font-size: 11px; line-height: 1.4;
  color: var(--navi-dark-blue);
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--navi-line);
  border-radius: 10px; padding: 8px 11px; max-width: 300px;
  box-shadow: var(--navi-shadow-soft);
  pointer-events: none;
}
.note b { color: var(--navi-blue); font-weight: 700; }
.note .flag { color: #b4341f; }

/* Placeholder proof marker */
.navi-ph {
  font-family: var(--navi-mono); font-size: 11px; letter-spacing: .04em;
  color: #b4341f; border: 1px dashed rgba(180, 52, 31, .4);
  border-radius: 6px; padding: 2px 7px; display: inline-block;
}

/* Reduced motion: concepts add their own final-state fallbacks too. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* --- Mobile nav (≤880px): hamburger + full-screen veil; Get a walkthrough stays in bar --- */
.n6-nav__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 -6px 0 2px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--navi-off-white);
  cursor: pointer;
  flex: none;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.n6-nav.over-light .n6-nav__toggle { color: var(--navi-ink); }
.n6-nav__toggle-bars,
.n6-nav__toggle-bars::before,
.n6-nav__toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform .35s var(--navi-ease), opacity .25s var(--navi-ease);
}
.n6-nav__toggle-bars { position: relative; }
.n6-nav__toggle-bars::before,
.n6-nav__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.n6-nav__toggle-bars::before { top: -6px; }
.n6-nav__toggle-bars::after { top: 6px; }
.n6-nav.is-menu-open .n6-nav__toggle-bars { background: transparent; }
.n6-nav.is-menu-open .n6-nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
.n6-nav.is-menu-open .n6-nav__toggle-bars::after { top: 0; transform: rotate(-45deg); }
/* When the veil is open, force light-on-dark chrome even over light page bands */
.n6-nav.is-menu-open {
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border-color: rgba(220,230,253,.16);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.14);
}
.n6-nav.is-menu-open .lg-light { display: block; }
.n6-nav.is-menu-open .lg-dark { display: none; }
.n6-nav.is-menu-open .n6-nav__toggle { color: var(--navi-off-white); }
.n6-nav.is-menu-open .navi-btn--primary {
  background: var(--navi-off-white);
  color: var(--navi-dark-blue);
}

.n6-nav-panel {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px var(--navi-pad) 48px;
  background: var(--navi-deep, #101029);
  color: var(--navi-off-white);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s var(--navi-ease), visibility .35s var(--navi-ease);
}
.n6-nav-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.n6-nav-panel[hidden] { display: none !important; }
.n6-nav-panel__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 4vh, 28px);
  width: min(420px, 100%);
}
.n6-nav-panel__nav a {
  font-size: clamp(32px, 8vw, 40px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: rgba(244, 246, 255, .88);
  transition: color .25s var(--navi-ease), opacity .35s var(--navi-ease), transform .35s var(--navi-ease);
}
.n6-nav-panel__nav a:hover,
.n6-nav-panel__nav a[aria-current="page"] { color: var(--navi-off-white); }
.n6-nav-panel__nav a[aria-current="page"] { color: var(--navi-light-blue); }
.n6-nav-panel__group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 1.05em;
  margin-top: -4px;
}
.n6-nav-panel__sub {
  font-size: clamp(22px, 5.5vw, 28px) !important;
  letter-spacing: -0.02em !important;
  color: rgba(244, 246, 255, .72);
}
.n6-nav-panel__sub:hover,
.n6-nav-panel__sub[aria-current="page"] { color: var(--navi-off-white); }
.n6-nav-panel__sub[aria-current="page"] { color: var(--navi-light-blue); }
.n6-nav-panel__rule {
  width: min(72px, 30%);
  height: 1px;
  margin: 8px 0;
  background: rgba(220, 230, 253, .22);
}
.n6-nav-panel__login {
  font-size: clamp(18px, 4.5vw, 22px) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  color: rgba(244, 246, 255, .72) !important;
}
.n6-nav-panel__login:hover { color: var(--navi-off-white) !important; }

.n6-nav-panel.is-open .n6-nav-panel__nav > * {
  animation: n6NavIn .55s var(--navi-ease) both;
}
.n6-nav-panel.is-open .n6-nav-panel__nav > *:nth-child(1) { animation-delay: .04s; }
.n6-nav-panel.is-open .n6-nav-panel__nav > *:nth-child(2) { animation-delay: .09s; }
.n6-nav-panel.is-open .n6-nav-panel__nav > *:nth-child(3) { animation-delay: .14s; }
.n6-nav-panel.is-open .n6-nav-panel__nav > *:nth-child(4) { animation-delay: .19s; }
.n6-nav-panel.is-open .n6-nav-panel__nav > *:nth-child(5) { animation-delay: .24s; }
.n6-nav-panel.is-open .n6-nav-panel__nav > *:nth-child(6) { animation-delay: .29s; }
.n6-nav-panel.is-open .n6-nav-panel__nav > *:nth-child(7) { animation-delay: .34s; }
@keyframes n6NavIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

html.n6-nav-lock,
html.n6-nav-lock body { overflow: hidden; }

@media (max-width: 880px) {
  .n6-nav__toggle { display: grid; }
  .n6-nav { padding: 10px 12px 10px 16px; gap: 8px; }
  .n6-nav__cta { gap: 6px; }
  .n6-nav__cta .navi-btn--primary { padding: 10px 14px; font-size: 13.5px; }
  .n6-nav__toggle { margin: 0 -4px 0 0; }
}
@media (max-width: 380px) {
  .n6-nav__cta .navi-btn--primary { padding: 9px 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .n6-nav-panel { transition: none; }
  .n6-nav__toggle-bars,
  .n6-nav__toggle-bars::before,
  .n6-nav__toggle-bars::after { transition: none; }
  .n6-nav-panel.is-open .n6-nav-panel__nav > * { animation: none; }
}

/* --- Brand grain: film noise over the gradients, replicating the brandbook PSDs
       (Gradient Fill + noise layers). Tune strength with --navi-grain. --- */
:root { --navi-grain: 0.18; }
.band-bright, .band-vivid, .n6-switch { position: relative; }
.band-bright::after, .band-vivid::after, .n6-switch::after,
.n6-hero__scrim::after, .n6-final__scrim::after, .n6-finale__scrim::after, .f-hero__scrim::after,
.navi-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: var(--navi-grain);
  /* normal blending, like the PSD noise layers — 'overlay' disappears on dark fills */
}
