/* ── Omnia · Dark Editorial ─────────────────────────────────────────────
   Aesthetic: late-night reading room × trading terminal.
   Serif display · mono labels · hairline rules · ember as signal only.
   ───────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  /* signal */
  --ember:        #D9541C;
  --ember-hot:    #E8692F;
  --oxide:        #6B4226;
  /* surface */
  --ink:          #0E0B08;
  --ink-2:        #12100D;
  --steel:        #1A1714;
  --steel-2:      #221E19;
  /* type */
  --bone:         #EFE8DC;
  --bone-dim:     rgba(239,232,220,0.72);
  --bone-fade:    rgba(239,232,220,0.44);
  --bone-ghost:   rgba(239,232,220,0.22);
  /* rules */
  --hair:         rgba(239,232,220,0.12);
  --hair-strong:  rgba(239,232,220,0.28);
  /* motion */
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  /* fonts */
  --f-display:    'Fraunces', 'Iowan Old Style', Georgia, serif;
  --f-body:       'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --f-mono:       'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* legacy aliases to keep existing markup intact */
  --amber:        var(--ember-hot);
  --amber-light:  var(--ember-hot);
  --bg:           var(--ink);
  --bg-2:         var(--ink-2);
  --bg-card:      var(--steel);
  --border:       var(--hair);
  --border-hover: var(--hair-strong);
  --text-1:       var(--bone);
  --text-2:       var(--bone-dim);
  --text-3:       var(--bone-fade);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-feature-settings: "ss01", "cv11", "tnum";
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* subtle film grain for warmth */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 300;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

/* ── NAV · masthead hairline ─────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.25rem;
  background: rgba(14,11,8,0.82);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--hair);
}

.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 3px;
}
.nav-logo-text {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--bone);
  -webkit-text-fill-color: currentColor;
  background: none;
}
.nav-logo-parent {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-fade);
  opacity: 1;
  font-style: normal;
}

.nav-links { display: flex; align-items: center; gap: 0.15rem; list-style: none; }
.nav-link {
  position: relative;
  color: var(--bone-dim);
  text-decoration: none;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 0;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.3rem;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover { color: var(--bone); background: transparent; }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--bone); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ember);
  color: var(--ink);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.78rem 1.35rem;
  border-radius: 0;
  text-decoration: none;
  margin-left: 0.85rem;
  box-shadow: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-cta:hover { background: var(--bone); color: var(--ink); transform: none; }
.nav-cta.active { box-shadow: inset 0 0 0 1px var(--ink); }

/* hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--bone);
  border-radius: 0;
  transition: all 0.3s var(--ease);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  #main-nav { padding: 0 1.1rem; height: 60px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(14,11,8,0.98);
    border-bottom: 1px solid var(--hair);
    padding: 1rem 1.1rem 1.5rem;
    gap: 0.15rem;
  }
  .nav-links.open { display: flex; }
  .nav-cta { text-align: center; justify-content: center; margin-left: 0; margin-top: 0.65rem; }
}

/* ── PAGE SHELL ────────────────────────────────────────────────────── */
.page-content { padding-top: 68px; }

/* ── HERO · editorial left-align, no glow orbs ───────────────────── */
.page-hero {
  padding: 6rem 2.25rem 4.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  max-width: 1180px;
  margin: 0 auto;
}
.page-hero::before {
  content: "";
  position: absolute;
  left: 2.25rem; right: 2.25rem; top: 5.5rem;
  height: 1px;
  background: var(--hair);
  pointer-events: none;
}
.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.5rem;
}
.page-hero-eyebrow::before {
  content: "";
  display: block;
  width: 28px; height: 1px;
  background: var(--ember);
}
.page-hero-eyebrow::after { display: none; }
.page-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  color: var(--bone);
  max-width: 20ch;
}
.page-hero p {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  color: var(--bone-dim);
  max-width: 56ch;
  margin: 0;
  line-height: 1.7;
}
/* ember-grad = serif italic ember signal word */
.ember-grad {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: currentColor;
  background-clip: unset;
  color: var(--ember);
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
}

/* ── BUTTONS · squared, decisive ─────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ember);
  color: var(--ink);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 1rem 1.6rem;
  border-radius: 0;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn-primary:hover {
  background: var(--bone);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: none;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--bone);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 1rem 1.5rem;
  border-radius: 0;
  border: 1px solid var(--hair-strong);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.btn-outline:hover {
  background: transparent;
  border-color: var(--ember);
  color: var(--ember);
}

/* ── CARDS · quiet, hairline, draw-line hover ────────────────────── */
.card {
  background: var(--steel);
  border: 1px solid var(--hair);
  border-radius: 0;
  padding: 2rem;
  position: relative;
  transition: border-color 0.3s ease, transform 0.4s var(--ease), background 0.3s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 28px; height: 1px;
  background: var(--ember);
  transition: width 0.5s var(--ease);
}
.card:hover {
  border-color: var(--hair-strong);
  transform: translateY(-2px);
  box-shadow: none;
  background: var(--steel-2);
}
.card:hover::before { width: 64px; }
.card-icon {
  width: 40px; height: 40px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--hair-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ember);
  margin-bottom: 1.25rem;
}

/* ── SECTION LAYOUTS ───────────────────────────────────────────────── */
.section { padding: 6rem 2.25rem; position: relative; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: "";
  display: block;
  width: 28px; height: 1px;
  background: var(--ember);
  opacity: 1;
}
.section-title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.02;
  margin-bottom: 1.25rem;
  color: var(--bone);
  max-width: 22ch;
}
.section-sub {
  font-size: 1.0625rem;
  color: var(--bone-dim);
  max-width: 58ch;
  line-height: 1.75;
  margin-bottom: 3rem;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 4rem 1.25rem; }
  .page-hero { padding: 4rem 1.25rem 3rem; }
  .page-hero::before { left: 1.25rem; right: 1.25rem; top: 3.5rem; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* asymmetric editorial two-column */
.col-asym {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 4rem;
  align-items: start;
}
@media (max-width: 900px) {
  .col-asym { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── DIVIDER · hairline ───────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--hair);
  margin: 0 2.25rem;
}

/* ── STAT BAR · terminal ticker ──────────────────────────────────── */
.stat-bar {
  display: flex;
  justify-content: flex-start;
  gap: 3.5rem;
  flex-wrap: wrap;
  padding: 2rem 2.25rem;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  max-width: 1180px;
  margin: 0 auto;
  font-variant-numeric: tabular-nums;
}
.stat-num {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--bone);
  -webkit-text-fill-color: currentColor;
  background: none;
  line-height: 1;
}
.stat-label {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-fade);
  margin-top: 8px;
}

/* ── FORM ELEMENTS · editorial questionnaire ─────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-fade);
}
.form-input, .form-select, .form-textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  border-radius: 0;
  padding: 0.75rem 0.1rem;
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s ease;
  width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--bone-ghost); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--ember);
}
.form-textarea { resize: vertical; min-height: 110px; padding-top: 0.85rem; }
.form-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--bone-dim) 50%),
                    linear-gradient(135deg, var(--bone-dim) 50%, transparent 50%);
  background-position: right 4px center, right 10px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 1.5rem;
}
option { background: var(--ink); color: var(--bone); }

/* ── FOOTER · masthead ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--hair);
  padding: 4rem 2.25rem 2rem;
  margin-top: 5rem;
  background: var(--ink-2);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.footer-brand { flex: 1; min-width: 220px; }
.footer-tagline {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  color: var(--bone-dim);
  line-height: 1.5;
  margin-top: 1rem;
  max-width: 30ch;
}
.footer-links-group { display: flex; gap: 4rem; flex-wrap: wrap; }
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 130px;
}
.footer-col-title {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.6rem;
}
.footer-col a {
  font-family: var(--f-body);
  font-size: 0.92rem;
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  width: fit-content;
}
.footer-col a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  height: 1px; width: 100%;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.footer-col a:hover { color: var(--bone); }
.footer-col a:hover::after { transform: scaleX(1); }
.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  color: var(--bone-fade);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── FADE-UP ──────────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── BADGE · tag ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 0;
  border: 1px solid var(--hair-strong);
}
.badge-ember { color: var(--ember); background: transparent; border-color: var(--ember); }
.badge-green { color: #9AB892; background: transparent; border-color: rgba(154,184,146,0.4); }

/* ── TYPOGRAPHY BASELINE ─────────────────────────────────────────── */
strong, b { color: var(--bone); font-weight: 600; }
em, i { font-family: var(--f-display); font-style: italic; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; letter-spacing: -0.02em; color: var(--bone); }
h3 { font-size: 1.35rem; line-height: 1.15; }
a { color: var(--bone); }

/* ── IMAGE PRIMITIVES ────────────────────────────────────────────── */
.editorial-img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(0.08) contrast(1.02) brightness(0.92) sepia(0.08);
  object-fit: cover;
}
.img-tone {
  position: relative;
  overflow: hidden;
  background: var(--steel);
}
.img-tone::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,11,8,0.0) 55%, rgba(14,11,8,0.55) 100%);
  pointer-events: none;
}
.img-caption {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-fade);
  margin-top: 0.75rem;
}
