/* ==========================================================================
   PS Growth Line - foundation layer
   Tokens, reset, typography, controls, header, footer.
   ========================================================================== */

:root {
  /* Grounds */
  --bg:            #F7F7F3;
  --bg-alt:        #EEEDE7;
  --surface:       #FFFFFF;
  --ink-navy:      #101827;
  --deep-navy:     #182338;

  /* Ink */
  --ink:           #111827;
  --muted:         #5E6879;
  --ink-inv:       #F3F4F1;
  --muted-inv:     #94A0B8;

  /* Accents */
  --gold:          #F4B740;
  --gold-deep:     #8A6410;
  --gold-soft:     #FCEFD2;
  --green:         #2FAE8F;
  --green-deep:    #1B6E59;
  --green-soft:    #E1F3ED;

  /* Lines */
  --hair:          #E1E0D8;
  --hair-dark:     #26324A;

  /* Type */
  --f-head: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-xs:   0.8125rem;
  --t-sm:   0.9375rem;
  --t-base: 1.0625rem;
  --t-md:   1.1875rem;
  --t-lg:   clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem);
  --t-xl:   clamp(1.75rem, 1.3rem + 1.9vw, 2.5rem);
  --t-2xl:  clamp(2.125rem, 1.5rem + 2.7vw, 3.25rem);
  --t-3xl:  clamp(2.5rem, 1.6rem + 4vw, 4.75rem);

  /* Space */
  --s-xs: 8px;
  --s-sm: 16px;
  --s-md: 32px;
  --s-lg: 64px;
  --s-xl: clamp(64px, 8vw, 112px);

  /* Shape */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;

  --wrap: 1200px;
  --wrap-wide: 1360px;

  --lift: 0 8px 24px -12px rgba(16, 24, 39, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-sm);
  text-wrap: balance;
}

h1 { font-size: var(--t-3xl); letter-spacing: -0.03em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); line-height: 1.15; letter-spacing: -0.01em; }
h4 { font-size: var(--t-md); line-height: 1.25; letter-spacing: -0.01em; }

p { margin: 0 0 var(--s-sm); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }

img, svg, video { max-width: 100%; height: auto; display: block; }

strong { font-weight: 600; }

::selection { background: var(--gold); color: var(--ink-navy); }

/* ------------------------------------------------------------- a11y ----- */

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-navy :focus-visible { outline-color: var(--gold); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  z-index: 999;
  background: var(--gold);
  color: var(--ink-navy);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------------------------------------------------------- structure -- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}
.wrap--wide { max-width: var(--wrap-wide); }

.band { padding-block: var(--s-xl); position: relative; }
.band--tight { padding-block: clamp(48px, 6vw, 80px); }
.band--alt { background: var(--bg-alt); }

.band--navy {
  background: var(--ink-navy);
  color: var(--ink-inv);
}
.band--navy h1, .band--navy h2, .band--navy h3, .band--navy h4 { color: var(--ink-inv); }
.band--navy p { color: var(--muted-inv); }

/* Faint ascending texture behind dark bands */
.band--navy::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(244, 183, 64, 0.05) 50%, transparent calc(50% + 0.5px));
  background-size: 260px 260px;
}
.band--navy > * { position: relative; z-index: 1; }

/* ------------------------------------------------------------ headings -- */

.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 var(--s-sm);
  display: block;
}
.band--navy .eyebrow { color: var(--gold); }

.sec-head { max-width: 42rem; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head p { font-size: var(--t-md); color: var(--muted); margin-top: var(--s-sm); }
.band--navy .sec-head p { color: var(--muted-inv); }

.lead { font-size: var(--t-md); color: var(--muted); }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-body);
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: 1;
  padding: 17px 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--gold);
  color: var(--ink-navy);
}
.btn--primary:hover { background: #FFC55A; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 25%, transparent);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(17, 24, 39, 0.04); }

.band--navy .btn--ghost,
.btn--ghost-inv {
  color: var(--ink-inv);
  border-color: rgba(243, 244, 241, 0.3);
}
.band--navy .btn--ghost:hover,
.btn--ghost-inv:hover { border-color: var(--ink-inv); background: rgba(243, 244, 241, 0.07); }

.btn--sm { padding: 12px 18px; font-size: var(--t-xs); }

.btn .arrow { transition: transform 0.18s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Inline text link with gold arrow */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
  transition: gap 0.18s var(--ease), color 0.18s var(--ease);
}
.tlink:hover { gap: 12px; color: var(--gold-deep); }
.band--navy .tlink { color: var(--ink-inv); }
.band--navy .tlink:hover { color: var(--gold); }

/* -------------------------------------------------------------- data --- */

.metric {
  font-family: var(--f-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric--up { color: var(--green-deep); }
.band--navy .metric--up { color: var(--green); }

.mono-label {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.band--navy .mono-label { color: var(--muted-inv); }

.illus-note {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted-inv);
  border: 1px solid var(--hair-dark);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  display: inline-block;
}
.band:not(.band--navy) .illus-note { color: var(--muted); border-color: var(--hair); }

/* -------------------------------------------------------------- cards -- */

.card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 34px);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card--navy {
  background: var(--deep-navy);
  border-color: var(--hair-dark);
  color: var(--ink-inv);
}
.card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift);
  border-color: color-mix(in srgb, var(--gold) 55%, var(--hair));
}

/* -------------------------------------------------------------- forms -- */

.field { display: block; margin-bottom: 18px; }

.field label,
.psl-form label {
  display: block;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-inv);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: var(--t-base);
  color: var(--ink-inv);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hair-dark);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: #8290AA; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.07);
}
.field textarea { min-height: 108px; resize: vertical; }
.field select option { background: var(--deep-navy); color: var(--ink-inv); }

.req { color: var(--gold); }

/* --------------------------------------------------------------- nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  min-height: 76px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink-inv);
  white-space: nowrap;
}
.nav__mark { flex: none; }
.nav__logo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 32px);
}
.nav__links a {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--muted-inv);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.nav__links a:hover { color: var(--ink-inv); }

.nav__cta { display: flex; align-items: center; gap: 12px; }

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(243, 244, 241, 0.28);
  border-radius: var(--r-sm);
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-inv);
}

/* Solid state once scrolled past the hero */
.nav.is-stuck {
  background: rgba(16, 24, 39, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--hair-dark);
}

@media (max-width: 980px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    inset: 76px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-navy);
    border-bottom: 1px solid var(--hair-dark);
    padding: var(--s-sm) clamp(20px, 5vw, 40px) var(--s-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a {
    padding: 15px 0;
    font-size: var(--t-md);
    border-bottom: 1px solid var(--hair-dark);
    color: var(--ink-inv);
  }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__cta .btn { padding: 12px 16px; font-size: var(--t-xs); }
}

@media (max-width: 420px) {
  .nav__cta .btn--primary { display: none; }
}

/* ------------------------------------------------------------ footer --- */

.foot {
  background: var(--ink-navy);
  color: var(--muted-inv);
  padding-block: clamp(56px, 6vw, 80px) 0;
  border-top: 1px solid var(--hair-dark);
}
.foot a { color: var(--muted-inv); text-decoration: none; transition: color 0.18s var(--ease); }
.foot a:hover { color: var(--gold); }

.foot__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: var(--s-lg);
}
.foot__brand { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; color: var(--ink-inv); letter-spacing: -0.02em; margin-bottom: 14px; display: block; }
.foot__grid p { font-size: var(--t-sm); max-width: 32ch; }
.foot h3 {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.foot ul li { margin-bottom: 10px; font-size: var(--t-sm); }

.foot__social { display: flex; gap: 10px; margin-top: 18px; }
.foot__social a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hair-dark);
  border-radius: var(--r-sm);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.foot__social a:hover { border-color: var(--gold); }

.foot__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-sm);
  padding-block: 22px;
  border-top: 1px solid var(--hair-dark);
  font-size: var(--t-xs);
}
.foot__base ul { display: flex; flex-wrap: wrap; gap: 20px; }

@media (max-width: 860px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .foot__grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ motion --- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

html:not(.js) .reveal { opacity: 1; transform: none; }

@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Sticky-header offset for in-page anchors */
section[id], main[id] { scroll-margin-top: 92px; }
body.menu-open { overflow: hidden; }
