/* ============================================================
   MANA OS, Marketing Site Shared Foundations
   Imports the design system tokens, then layers web-density
   scales, navigation, footer, and the editorial section
   primitives both option pages re-use.
   ============================================================ */
@import url('/manaos/colors_and_type.css');

/* ---- SPACE GROTESK (display face), self-hosted so it renders
        identically in every browser, online or offline ---- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('assets/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('assets/fonts/space-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ---- WEB TYPE SCALE (overrides deck-scale tokens in tokens file) ---- */
:root {
  /* Web-density type scale */
  --w-display:   88px;
  --w-h1:        64px;
  --w-h2:        44px;
  --w-h3:        26px;
  --w-lead:      22px;
  --w-body:      17px;
  --w-small:     14px;
  --w-kicker:    13px;

  --w-container: 1320px;
  --w-pad-x:     40px;
  --w-section-y: 140px;
}

@media (max-width: 1100px) {
  :root {
    --w-display: 56px;
    --w-h1: 44px;
    --w-h2: 34px;
    --w-h3: 22px;
    --w-lead: 19px;
    --w-section-y: 96px;
    --w-pad-x: 24px;
  }
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--w-body);
  line-height: 1.55;
  color: var(--fg1);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

/* ---- LAYOUT ---- */
.container {
  max-width: var(--w-container);
  margin: 0 auto;
  padding-left: var(--w-pad-x);
  padding-right: var(--w-pad-x);
}
.section { padding-top: var(--w-section-y); padding-bottom: var(--w-section-y); }
.section--tight { padding-top: 80px; padding-bottom: 80px; }
.section--dark { background: var(--midnight); color: var(--on-dark-1); }
.section--paper2 { background: var(--paper-2); }

/* ---- TYPE PRIMITIVES (web-scale) ---- */
.w-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--w-display);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.w-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--w-h1);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.w-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--w-h2);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.w-h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--w-h3);
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0;
}
.w-lead {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--w-lead);
  line-height: 1.45;
  color: var(--fg2);
  margin: 0;
  text-wrap: pretty;
}
.w-body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--w-body);
  line-height: 1.6;
  color: var(--fg2);
  margin: 0;
  text-wrap: pretty;
}
.w-small {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--w-small);
  line-height: 1.5;
  color: var(--fg3);
  margin: 0;
}
.w-kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--w-kicker);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg3);
  margin: 0;
}
.on-dark .w-lead, .on-dark.w-lead { color: var(--on-dark-2); }
.on-dark .w-body, .on-dark.w-body { color: var(--on-dark-2); }
.on-dark .w-small, .on-dark.w-small { color: var(--on-dark-3); }
.on-dark .w-kicker, .on-dark.w-kicker { color: var(--on-dark-3); }
.on-dark .w-display, .on-dark .w-h1, .on-dark .w-h2, .on-dark .w-h3 { color: var(--on-dark-1); }

.muted { color: var(--fg2); }
.faint { color: var(--fg3); }
.spark { color: var(--mana-violet); }

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(246, 244, 240, 0.78);
  border-bottom: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.nav--dark {
  background: rgba(14, 6, 38, 0.62);
  color: var(--on-dark-1);
}
.nav__inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 40px;
}
/* ---- LOGO LOCKUP ---- */
.lockup {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}
.lockup__img {
  height: 26px;
  width: auto;
  display: block;
}
.lockup__img--lg { height: 32px; }
.lockup__img--sm { height: 22px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}
.nav__link {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--fg2);
  transition: color .15s ease;
}
.nav--dark .nav__link { color: var(--on-dark-2); }
.nav__link:hover { color: var(--fg1); }
.nav--dark .nav__link:hover { color: var(--on-dark-1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}
.signin {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--fg2);
}
.nav--dark .signin { color: var(--on-dark-2); }

/* ---- MOBILE NAV (hamburger) ---- */
.nav__burger {
  display: none;
  margin-left: auto;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav__burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg1);
  transition: transform .2s ease, opacity .2s ease;
}
.nav--dark .nav__burger-bar { background: var(--on-dark-1); }
.nav--menu-open .nav__burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--menu-open .nav__burger-bar:nth-child(2) { opacity: 0; }
.nav--menu-open .nav__burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile { display: none; }
.nav__mobile-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 24px;
}
.nav__mobile-link {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  color: var(--fg1);
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.nav__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
.nav__mobile-actions .signin {
  font-size: 16px;
  padding: 8px 0;
}
.nav__mobile-actions .btn { width: 100%; justify-content: center; }

@media (max-width: 860px) {
  .nav__links, .nav__actions { display: none; }
  .nav__burger { display: flex; }
  .nav__mobile {
    display: block;
    background: rgba(246, 244, 240, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
  }
  .nav__mobile[hidden] { display: none; }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
  text-decoration: none;
}
/* Primary button: solid midnight ink, plum on activation (no gradient).
   Matches the homepage rule — gradient is reserved for the logo, one
   keyword, and hairline accents, never the CTA. */
.btn--spark {
  background: var(--midnight);
  color: white;
  box-shadow: 0 10px 28px rgba(14, 6, 38, .18);
}
.btn--spark:hover { background: var(--mana-plum); transform: translateY(-1px); }
.btn--spark:active { background: var(--mana-plum); transform: translateY(0) scale(.98); }

.btn--ghost {
  background: transparent;
  color: var(--fg1);
  border: 1px solid var(--hairline);
}
.btn--ghost:hover { background: var(--card); border-color: var(--fg3); }

.btn--ghost-dark {
  background: transparent;
  color: var(--on-dark-1);
  border: 1px solid rgba(246, 244, 240, 0.22);
}
.btn--ghost-dark:hover { background: rgba(246, 244, 240, 0.06); border-color: rgba(246, 244, 240, 0.4); }

.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- ICON CHIP ---- */
.chip {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mana-blue);
  flex: 0 0 auto;
}
.chip--magenta { background: var(--magenta-tint); color: var(--mana-magenta); }
.chip--dark   { background: rgba(123, 40, 251, 0.18); color: var(--mana-magenta); }
.chip svg { width: 22px; height: 22px; }

/* ---- HAIRLINE / RULE ---- */
.hr { height: 1px; background: var(--hairline); border: 0; margin: 0; }
.hr--dark { background: var(--midnight-3); }
.spark-rule { height: 3px; background: var(--spark); border-radius: 2px; border: 0; margin: 0; }

/* ---- SECTION HEAD (eyebrow + headline + lead) ---- */
.section-head { display: flex; flex-direction: column; gap: 22px; max-width: 820px; margin-bottom: 72px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }

/* ---- LOGO WALL ---- */
.logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.logos .logo-cell {
  padding: 32px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg3);
  border-right: 1px solid var(--hairline);
}
.logos .logo-cell:last-child { border-right: 0; }
.logos .logo-cell:hover { color: var(--fg1); }

/* ---- METRICS BAND ---- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.metrics .metric { padding: 8px 32px; border-left: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 8px; }
.metrics .metric:first-child { border-left: 0; padding-left: 0; }
.metric__fig {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--fg1);
}
.metric__fig--spark { color: var(--mana-violet); }
.metric__lbl {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--fg2);
  line-height: 1.45;
}

.on-dark .metrics .metric { border-color: var(--midnight-3); }
.on-dark .metric__fig { color: var(--on-dark-1); }
.on-dark .metric__lbl { color: var(--on-dark-2); }

/* ---- PILLARS (3-up differentiators) ---- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--hairline); }
.pillar { padding: 56px 48px 0 0; display: flex; flex-direction: column; gap: 18px; }
.pillar:nth-child(n+2) { padding-left: 48px; border-left: 1px solid var(--hairline); padding-right: 48px; }
.pillar:last-child { padding-right: 0; }
.pillar__num { font-family: var(--font-mono); font-size: 13px; letter-spacing: .2em; color: var(--mana-violet); }

/* ---- CARD ---- */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card--dark {
  background: var(--midnight-2);
  border-color: var(--midnight-3);
  color: var(--on-dark-1);
}
.card--dark .w-body { color: var(--on-dark-2); }

/* ---- GRIDS ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar:nth-child(n+2) { padding-left: 0; border-left: 0; border-top: 1px solid var(--hairline); }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .logos .logo-cell:nth-child(3n) { border-right: 0; }
}

/* ---- FOOTER ---- */
.footer {
  background: var(--midnight);
  color: var(--on-dark-1);
  padding: 96px 0 48px;
}
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 48px; padding-bottom: 72px; border-bottom: 1px solid var(--midnight-3); }
.footer__brand { display: flex; flex-direction: column; gap: 22px; max-width: 340px; }
.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__h {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 6px;
}
.footer__col a {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--on-dark-2);
  transition: color .15s ease;
}
.footer__col a:hover { color: var(--on-dark-1); }
.footer__bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--on-dark-3);
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}

/* ---- LIST ROWS (for lenses, sources etc.) ---- */
.list-rows { display: flex; flex-direction: column; }
.list-rows .row {
  display: grid;
  grid-template-columns: 40px 220px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}
.list-rows .row:last-child { border-bottom: 1px solid var(--hairline); }
.list-rows .row__no { font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; color: var(--fg3); }
.list-rows .row__name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.012em; color: var(--fg1); }
.list-rows .row__desc { font-family: var(--font-sans); font-size: 15px; color: var(--fg2); }
.list-rows .row__tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; color: var(--fg3); text-transform: uppercase; }

.on-dark .list-rows .row { border-color: var(--midnight-3); }
.on-dark .list-rows .row__no { color: var(--on-dark-3); }
.on-dark .list-rows .row__name { color: var(--on-dark-1); }
.on-dark .list-rows .row__desc { color: var(--on-dark-2); }
.on-dark .list-rows .row__tag { color: var(--on-dark-3); }

/* ---- GLOW HALO (dark sections) ---- */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .5;
  pointer-events: none;
}

/* ---- OPTION BAR (between-option switcher) ---- */
.option-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 8px;
  background: rgba(14, 6, 38, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
}
.option-bar a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--on-dark-2);
  transition: background .15s, color .15s;
}
.option-bar a.is-active { background: var(--spark); color: white; }
.option-bar a:not(.is-active):hover { color: var(--on-dark-1); }

/* ---- UTILITIES ---- */
.flex { display: flex; }
.col { flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; } .mt-96 { margin-top: 96px; }
.text-center { text-align: center; }
.relative { position: relative; }
