/* ============================================================
   Nox Æterna — Design System
   Distilled from BusinessPlan v3 (2026-05-30) PDF aesthetic.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ----- Tokens ----- */
:root {
  /* Sanctum palette (warm-black + cream + aged-gold) */
  --nx-black:        #0A0908;
  --nx-black-ink:    #050403;
  --nx-cream:        #F4EED6;
  --nx-cream-soft:   #EBE3C2;
  --nx-cream-deep:   #E2D8B1;

  /* Aged gold */
  --nx-gold:         #C9A961;
  --nx-gold-bright:  #E0C075;
  --nx-gold-muted:   #8B7541;
  --nx-gold-faint:   rgba(201, 169, 97, 0.15);

  /* Text */
  --nx-text-dark:        #1F1B14;
  --nx-text-dark-mute:   #6B5D45;
  --nx-text-dark-faint:  rgba(31, 27, 20, 0.55);
  --nx-text-light:       #E8E2D0;
  --nx-text-light-mute:  #8B7541;
  --nx-text-light-faint: rgba(232, 226, 208, 0.6);

  /* Hairlines */
  --nx-hairline-dark:  rgba(201, 169, 97, 0.25);
  --nx-hairline-light: rgba(31, 27, 20, 0.18);

  /* Semantic */
  --nx-success: #6B8E5A;
  --nx-warn:    #C99861;
  --nx-error:   #A85544;

  /* Type */
  --nx-serif: 'Cormorant Garamond', 'Cormorant', 'EB Garamond', Georgia, serif;
  --nx-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nx-mono:  'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Type scale */
  --nx-fs-xs:  0.75rem;   /* 12 */
  --nx-fs-sm:  0.875rem;  /* 14 */
  --nx-fs-base:1rem;      /* 16 */
  --nx-fs-md:  1.125rem;  /* 18 */
  --nx-fs-lg:  1.5rem;    /* 24 */
  --nx-fs-xl:  2rem;      /* 32 */
  --nx-fs-2xl: 2.75rem;   /* 44 */
  --nx-fs-3xl: 3.75rem;   /* 60 */
  --nx-fs-4xl: 5rem;      /* 80 */

  /* Spacing */
  --nx-1: 0.25rem;
  --nx-2: 0.5rem;
  --nx-3: 0.75rem;
  --nx-4: 1rem;
  --nx-6: 1.5rem;
  --nx-8: 2rem;
  --nx-12: 3rem;
  --nx-16: 4rem;
  --nx-24: 6rem;
  --nx-32: 8rem;

  /* Container */
  --nx-container: 1180px;

  /* Letterspacing */
  --nx-tracking-wide:    0.18em;
  --nx-tracking-wider:   0.24em;
  --nx-tracking-tight:   -0.01em;
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--nx-sans);
  font-weight: 400;
  font-size: var(--nx-fs-base);
  line-height: 1.6;
  color: var(--nx-text-dark);
  background: var(--nx-cream);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* ----- Themed sections ----- */
.nx-dark  { background: var(--nx-black); color: var(--nx-text-light); }
.nx-light { background: var(--nx-cream); color: var(--nx-text-dark); }
.nx-dark a { color: var(--nx-text-light); }
.nx-light a { color: var(--nx-text-dark); }
.nx-dark ::selection  { background: var(--nx-gold); color: var(--nx-black); }
.nx-light ::selection { background: var(--nx-black); color: var(--nx-cream); }

/* ----- Typography ----- */
h1, h2, h3, h4, h5 {
  font-family: var(--nx-serif);
  font-weight: 500;
  line-height: 1.08;
  margin: 0 0 var(--nx-4);
  letter-spacing: var(--nx-tracking-tight);
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.625rem); }
h5 { font-size: var(--nx-fs-md); }

em, .nx-em, .nx-italic {
  font-style: italic;
  font-family: var(--nx-serif);
  color: var(--nx-gold);
  font-weight: 400;
}
.nx-dark em, .nx-dark .nx-em { color: var(--nx-gold-bright); }

p { margin: 0 0 var(--nx-4); max-width: 65ch; }
.nx-lead {
  font-family: var(--nx-serif);
  font-style: italic;
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  line-height: 1.5;
  max-width: 60ch;
  color: var(--nx-text-dark-mute);
}
.nx-dark .nx-lead { color: var(--nx-text-light-mute); }

.nx-mono { font-family: var(--nx-mono); }
.nx-serif { font-family: var(--nx-serif); }

/* Eyebrow (small uppercase label, mono, gold) */
.nx-eyebrow {
  display: inline-block;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  font-weight: 500;
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  color: var(--nx-gold);
  margin-bottom: var(--nx-6);
}

/* Section header (eyebrow + h2 + lead) */
.nx-section-head { margin-bottom: var(--nx-12); max-width: 640px; }

/* ----- Container ----- */
.nx-container {
  width: 100%;
  max-width: var(--nx-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) {
  .nx-container { padding: 0 3rem; }
}

/* Section vertical rhythm */
.nx-section { padding: clamp(3rem, 8vw, 6rem) 0; }
.nx-section-lg { padding: clamp(4rem, 12vw, 9rem) 0; }

/* ----- Page header / footer (mimics BP plate) ----- */
.nx-plate-head, .nx-plate-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  color: var(--nx-text-dark-mute);
}
.nx-dark .nx-plate-head, .nx-dark .nx-plate-foot { color: var(--nx-text-light-mute); }
.nx-plate-head { padding: 1.25rem 0 0.75rem; border-bottom: 1px solid var(--nx-hairline-light); }
.nx-plate-foot { padding: 1rem 0;             border-top:    1px solid var(--nx-hairline-light); }
.nx-dark .nx-plate-head { border-bottom-color: var(--nx-hairline-dark); }
.nx-dark .nx-plate-foot { border-top-color:    var(--nx-hairline-dark); }

/* ----- Navigation (sticky, transparent on dark hero) ----- */
.nx-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem 0;
  transition: background 200ms ease, border-color 200ms ease;
  border-bottom: 1px solid transparent;
}
.nx-nav.is-solid {
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--nx-hairline-dark);
}
.nx-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nx-nav a { text-decoration: none; }
.nx-nav-links {
  display: none;
  gap: 2rem;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
}
@media (min-width: 900px) { .nx-nav-links { display: flex; } }
.nx-nav-links a { color: var(--nx-text-light); opacity: 0.8; transition: opacity 150ms; }
.nx-nav-links a:hover { opacity: 1; color: var(--nx-gold); }

/* ----- Buttons ----- */
.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  font-weight: 500;
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
}
.nx-btn:disabled, .nx-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.nx-btn-primary { background: var(--nx-gold); color: var(--nx-black); border-color: var(--nx-gold); }
.nx-btn-primary:hover { background: var(--nx-gold-bright); border-color: var(--nx-gold-bright); }
.nx-btn-ghost-dark { background: transparent; color: var(--nx-text-light); border-color: var(--nx-gold); }
.nx-btn-ghost-dark:hover { background: var(--nx-gold-faint); }
.nx-btn-ghost-light { background: transparent; color: var(--nx-text-dark); border-color: var(--nx-text-dark); }
.nx-btn-ghost-light:hover { background: rgba(0,0,0,0.05); }
.nx-btn-lg { padding: 1.15rem 2.25rem; font-size: 0.8125rem; }
.nx-btn-link {
  background: none; border: 0; padding: 0;
  color: inherit; text-decoration: none;
  font-family: var(--nx-mono); font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide); text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: color 150ms;
}
.nx-btn-link:hover { color: var(--nx-gold); }

/* ----- Hairlines / rules ----- */
.nx-rule {
  display: block; width: 3rem; height: 1px;
  background: var(--nx-gold); margin: 1.25rem 0;
  border: 0;
}
.nx-divider { border: 0; height: 1px; background: var(--nx-hairline-light); margin: 0; }
.nx-dark .nx-divider { background: var(--nx-hairline-dark); }

/* ----- Cards / tier blocks (matches BP pricing plate) ----- */
.nx-tier {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid var(--nx-hairline-light);
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.3);
  transition: border-color 200ms, transform 200ms;
}
.nx-dark .nx-tier { border-color: var(--nx-hairline-dark); background: rgba(255,255,255,0.02); }
@media (min-width: 760px) {
  .nx-tier { grid-template-columns: minmax(180px, 1fr) minmax(140px, 180px) 2fr; gap: 1.5rem; padding: 1.25rem 1.75rem; }
}
.nx-tier:hover { border-color: var(--nx-gold); }
.nx-tier-name {
  font-family: var(--nx-serif);
  font-size: 1.625rem;
  color: var(--nx-gold-muted);
  font-style: italic;
  font-weight: 500;
}
.nx-dark .nx-tier-name { color: var(--nx-gold-muted); }
.nx-tier-meta {
  display: block;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 0.25rem;
}
.nx-tier-price {
  font-family: var(--nx-serif);
  font-size: 2.5rem;
  color: var(--nx-gold);
  font-weight: 500;
  line-height: 1;
}
.nx-tier-price-alt {
  font-family: var(--nx-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--nx-gold-muted);
  margin-left: 0.4rem;
}
.nx-tier-price-unit {
  display: block;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 0.25rem;
}
.nx-tier-desc { font-size: var(--nx-fs-sm); line-height: 1.55; opacity: 0.9; }
.nx-tier-desc strong { font-weight: 600; }
.nx-tier-desc em { font-style: italic; color: var(--nx-gold-muted); }

/* ----- Stat block ----- */
.nx-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 1px solid var(--nx-hairline-light);
}
.nx-dark .nx-stat-grid { border-color: var(--nx-hairline-dark); }
.nx-stat {
  padding: 1.5rem;
  border-right: 1px solid var(--nx-hairline-light);
  border-bottom: 1px solid var(--nx-hairline-light);
}
.nx-dark .nx-stat { border-color: var(--nx-hairline-dark); }
.nx-stat:last-child { border-right: 0; }
.nx-stat-value {
  font-family: var(--nx-serif);
  font-size: 2.25rem;
  color: var(--nx-gold);
  line-height: 1;
  font-weight: 500;
}
.nx-stat-label {
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* ----- Quote ----- */
.nx-quote {
  border-left: 2px solid var(--nx-gold);
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-family: var(--nx-serif);
  font-style: italic;
  font-size: var(--nx-fs-md);
  margin: 1.5rem 0;
  max-width: 60ch;
}
.nx-quote-cite {
  display: block;
  font-family: var(--nx-mono);
  font-style: normal;
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 0.75rem;
}

/* ----- Forms ----- */
.nx-field { margin-bottom: 1.5rem; }
.nx-label {
  display: block;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  color: var(--nx-text-dark-mute);
  margin-bottom: 0.5rem;
}
.nx-dark .nx-label { color: var(--nx-text-light-mute); }
.nx-input, .nx-select, .nx-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--nx-sans);
  font-size: var(--nx-fs-base);
  color: var(--nx-text-dark);
  background: transparent;
  border: 1px solid var(--nx-hairline-light);
  border-radius: 0;
  transition: border-color 150ms;
}
.nx-dark .nx-input, .nx-dark .nx-select, .nx-dark .nx-textarea {
  color: var(--nx-text-light);
  border-color: var(--nx-hairline-dark);
}
.nx-input:focus, .nx-select:focus, .nx-textarea:focus {
  outline: none;
  border-color: var(--nx-gold);
}
.nx-help { font-size: var(--nx-fs-xs); color: var(--nx-text-dark-mute); margin-top: 0.5rem; }
.nx-dark .nx-help { color: var(--nx-text-light-mute); }

/* ----- Status chips ----- */
.nx-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  font-family: var(--nx-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.nx-chip-pending   { color: var(--nx-text-dark-mute); }
.nx-dark .nx-chip-pending { color: var(--nx-text-light-mute); }
.nx-chip-sent      { color: var(--nx-gold); }
.nx-chip-confirmed { color: var(--nx-success); }
.nx-chip-failed    { color: var(--nx-error); }
.nx-chip-dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }

/* ----- Numbered steps ----- */
.nx-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--nx-hairline-light);
}
.nx-dark .nx-step { border-top-color: var(--nx-hairline-dark); }
.nx-step:last-child { border-bottom: 1px solid var(--nx-hairline-light); }
.nx-dark .nx-step:last-child { border-bottom-color: var(--nx-hairline-dark); }
.nx-step-num {
  font-family: var(--nx-mono);
  font-size: 1.5rem;
  color: var(--nx-gold);
  font-style: italic;
  line-height: 1;
}
.nx-step-title {
  font-family: var(--nx-serif);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.nx-step-body { font-size: var(--nx-fs-sm); line-height: 1.6; opacity: 0.9; }

/* ----- Tables ----- */
.nx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--nx-fs-sm);
}
.nx-table th, .nx-table td {
  text-align: left;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--nx-hairline-light);
  vertical-align: top;
}
.nx-dark .nx-table th, .nx-dark .nx-table td { border-bottom-color: var(--nx-hairline-dark); }
.nx-table th {
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  font-weight: 500;
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  color: var(--nx-text-dark-mute);
}
.nx-dark .nx-table th { color: var(--nx-text-light-mute); }

/* ----- Footer (site-wide) ----- */
.nx-footer {
  background: var(--nx-black-ink);
  color: var(--nx-text-light);
  padding: 4rem 0 2rem;
}
.nx-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--nx-hairline-dark);
}
@media (min-width: 760px) {
  .nx-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.nx-footer-col h5 {
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  font-weight: 500;
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  color: var(--nx-gold);
  margin-bottom: 1rem;
}
.nx-footer-col ul { list-style: none; padding: 0; margin: 0; }
.nx-footer-col li { margin-bottom: 0.5rem; }
.nx-footer-col a { color: var(--nx-text-light); opacity: 0.75; text-decoration: none; font-size: var(--nx-fs-sm); transition: opacity 150ms; }
.nx-footer-col a:hover { opacity: 1; color: var(--nx-gold); }
.nx-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  font-family: var(--nx-mono);
  font-size: var(--nx-fs-xs);
  letter-spacing: var(--nx-tracking-wide);
  text-transform: uppercase;
  color: var(--nx-text-light-mute);
}

/* ----- Utility ----- */
.nx-text-gold { color: var(--nx-gold); }
.nx-text-mute { opacity: 0.7; }
.nx-mb-2 { margin-bottom: 0.5rem; } .nx-mb-4 { margin-bottom: 1rem; }
.nx-mb-6 { margin-bottom: 1.5rem; } .nx-mb-8 { margin-bottom: 2rem; }
.nx-mb-12 { margin-bottom: 3rem; }  .nx-mb-16 { margin-bottom: 4rem; }
.nx-mt-4 { margin-top: 1rem; } .nx-mt-6 { margin-top: 1.5rem; } .nx-mt-8 { margin-top: 2rem; }
.nx-flex { display: flex; } .nx-grid { display: grid; }
.nx-items-center { align-items: center; }
.nx-justify-between { justify-content: space-between; }
.nx-gap-4 { gap: 1rem; } .nx-gap-6 { gap: 1.5rem; } .nx-gap-8 { gap: 2rem; }
.nx-text-center { text-align: center; } .nx-text-right { text-align: right; }
.nx-hidden { display: none; } @media (min-width: 760px) { .nx-md-block { display: block; } }
.nx-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ----- Animations ----- */
@keyframes nx-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.nx-fade-in { animation: nx-fade-in 600ms ease-out both; }

@keyframes nx-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.nx-pulse { animation: nx-pulse 2s ease-in-out infinite; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
