/**
 * Canonical site header — the ONLY definition of the marketing nav.
 *
 * Every public page links this file. Do not re-declare .nav__* rules in a page's
 * inline <style>; a page-local copy is how three pages silently lost their logo
 * (a bad find/replace ate the `.nav__logo {` selector, so the wordmark fell back
 * to the body sans font, coloured and underlined like a raw link).
 *
 * Tokens are namespaced --nav-* on purpose. Pages disagree about what --coral,
 * --ember, --ink and --cream mean; the header must render identically regardless,
 * so it never reads a page's palette.
 *
 * DELIBERATELY NOT SET HERE: `position` on .nav, and the body offset that pairs
 * with it. Those genuinely differ per page and launch-sale.css depends on the
 * difference:
 *   position: fixed   marketing.html + the generated SEO pages (body is offset)
 *   position: sticky  samples, pricing, check-your-name, start (nav sits in flow)
 * Forcing one here re-introduces the gap-under-the-nav bug documented in
 * launch-sale.css. Each page keeps its own two-line positioning rule.
 */

@font-face {
  font-family: "Cormorant Local";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Local";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-italic-latin.woff2") format("woff2");
}

:root {
  --nav-h: 72px;
  --nav-bg: #14150f;
  --nav-ink: #f4f2ec;
  --nav-muted: #b9beb4;
  --nav-coral: #e07a4a;
  --nav-coral-hover: #f0a074;
  --nav-coral-ink: #14150f;
  --nav-serif: "Cormorant Local", Georgia, "Times New Roman", serif;
  /* Pin chrome sans so links/CTA do not inherit page body fonts (Geist vs Manrope). */
  --nav-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

.nav {
  z-index: 100;
  min-height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(224, 122, 74, 0.22);
}
.nav.is-scrolled {
  border-bottom-color: rgba(224, 122, 74, 0.42);
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.75);
  background: rgba(20, 21, 15, 0.97);
}

/* Three zones: logo | centered links | CTA — equal side columns keep links optically centered.
   Side columns get a content-based floor so logo + CTA keep breathing room from the link rail. */
.nav__inner {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  column-gap: clamp(28px, 3.2vw, 48px);
  min-height: var(--nav-h);
  width: min(calc(100% - 40px), 1360px);
  margin: 0 auto;
  box-sizing: border-box;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
  font-family: var(--nav-serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  color: var(--nav-ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
  min-width: 0;
  padding-right: 4px;
  transition: opacity 0.25s var(--nav-ease);
}
.nav__logo:hover { opacity: 0.9; }
.nav__logo:focus-visible {
  outline: 2px solid var(--nav-coral);
  outline-offset: 4px;
  border-radius: 4px;
}
.nav__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 0 10px rgba(224, 122, 74, 0.35));
}
.nav__mark svg { display: block; width: 100%; height: 100%; }
.nav__word em { font-style: italic; color: var(--nav-coral); font-weight: 500; }

.nav__primary {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  min-width: 0;
}
.nav__end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-left: 4px;
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0px, 0.5vw, 6px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--nav-muted);
  text-decoration: none;
  font-family: var(--nav-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s var(--nav-ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 1px;
  background: var(--nav-coral);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--nav-ease);
}
.nav__links a:hover { color: var(--nav-ink); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--nav-ink); }
.nav__links a:focus-visible {
  outline: 2px solid var(--nav-coral);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 10.75rem;
  padding: 0 32px;
  border-radius: 999px;
  font-family: var(--nav-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--nav-coral);
  background: var(--nav-coral);
  color: var(--nav-coral-ink);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition:
    background 0.2s var(--nav-ease),
    border-color 0.2s var(--nav-ease),
    color 0.2s var(--nav-ease),
    transform 0.2s var(--nav-ease);
}
.nav__cta:hover {
  background: var(--nav-coral-hover);
  border-color: var(--nav-coral-hover);
  color: var(--nav-coral-ink);
}
.nav__cta:active {
  transform: scale(0.98);
  background: #c96a3f;
  border-color: #c96a3f;
}
.nav__cta:focus-visible { outline: 2px solid var(--nav-coral); outline-offset: 3px; }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(224, 122, 74, 0.4);
  border-radius: 10px;
  background: transparent;
  color: var(--nav-ink);
  cursor: pointer;
  flex-shrink: 0;
}
.nav__toggle-bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav__toggle-bars::before { top: -6px; }
.nav__toggle-bars::after { top: 6px; }
.nav__toggle:hover { border-color: var(--nav-coral); color: var(--nav-coral); }
.nav__toggle:focus-visible { outline: 2px solid var(--nav-coral); outline-offset: 3px; }
.nav.is-open .nav__toggle { border-color: var(--nav-coral); color: var(--nav-coral); }
.nav.is-open .nav__toggle-bars { background: transparent; }
.nav.is-open .nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* Set by the nav script while the mobile drawer is open */
body.nav-locked { overflow: hidden; }

/* start.html shows a step counter instead of the link list */
.nav__meta {
  font-family: var(--nav-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--nav-muted);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(100% - 32px, 1280px);
    position: relative;
    grid-template-columns: none;
  }
  .nav__logo { font-size: 1.15rem; }
  .nav__primary {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    grid-column: auto;
    justify-self: stretch;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(224, 122, 74, 0.22);
    box-shadow: 0 22px 48px -16px rgba(0, 0, 0, 0.88);
  }
  .nav.is-open .nav__primary { display: flex; }
  .nav__end { grid-column: auto; justify-self: end; margin-left: auto; }
  .nav__toggle { display: inline-flex; }
  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    justify-content: flex-start;
  }
  .nav__links a { min-height: 48px; padding: 0 12px; }
  .nav__links a::after { display: none; }
  .nav__cta { min-width: 0; padding: 0 22px; min-height: 44px; font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .nav__word-lead { display: none; }
  .nav__logo { font-size: 1.1rem; gap: 10px; }
  .nav__mark { width: 36px; height: 36px; }
}

/* Ambient cursor trail — driven by /assets/cursor-spotlight.js
   Sits under the nav (z-index 100) but above page content so the glow is visible. */
.cursor-spotlight {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  z-index: 60;
  pointer-events: none !important;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(224, 122, 74, 0.16) 0%,
    rgba(224, 122, 74, 0.07) 35%,
    transparent 68%
  );
  mix-blend-mode: screen;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.35s var(--nav-ease, cubic-bezier(0.32, 0.72, 0, 1));
}
.cursor-spotlight.is-on {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav__logo,
  .nav__links a,
  .nav__links a::after,
  .nav__cta,
  .nav__toggle,
  .nav__toggle-bars,
  .nav__toggle-bars::before,
  .nav__toggle-bars::after {
    transition: none !important;
  }
  /* .cursor-spotlight intentionally NOT hidden here — home ships the same
     trail ungated, and GTK's enable-animations=false reports reduced-motion,
     which was silently killing the trail on every page except home. */
}
