/* ==========================================================================
   Aegis Infinity Group — design system
   Palette derived from the Aegis brand lockup: warm near-black + gold gradient.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* Ground */
  --ink:        #131211;   /* warm near-black, matches logo field */
  --ink-2:      #1D1B17;
  --ink-3:      #2A261E;

  --paper:      #FFFFFF;
  --paper-2:    #FAF7F0;   /* warm ivory */
  --paper-3:    #F3ECDE;

  /* Gold, sampled from the lockup gradient */
  --gold:       #C9A24C;
  --gold-bright:#E4C084;
  --gold-pale:  #F0E4C0;
  --gold-deep:  #7A5A16;   /* text-safe on white — 5.0:1 */

  /* Neutrals, warm-biased toward the gold rather than pure grey */
  --muted:      #5B5449;
  --muted-dark: #B8AE99;
  --rule:       #E6DECB;
  --rule-dark:  rgba(240,228,192,.17);

  /* Type */
  --font-display: "Source Serif 4", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --maxw: 1180px;
  --maxw-text: 68ch;

  --ease: cubic-bezier(.2,.6,.3,1);
}

/* --- Base ----------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 1.6rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.85rem, 1.35rem + 2.1vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 1.08rem + .5vw, 1.4rem); letter-spacing: -.01em; }
h4 { font-size: 1.0625rem; font-family: var(--font-sans); font-weight: 650; letter-spacing: -.005em; }

p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--gold-deep); }

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

/* --- Layout helpers ------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.prose { max-width: var(--maxw-text); }
.prose p + p { margin-top: 1.1em; }
.prose ul { margin-top: 1em; padding-left: 1.15rem; }
.prose li + li { margin-top: .5em; }

.dark { background: var(--ink); color: #EDE7DA; }
.dark h1, .dark h2, .dark h3 { color: var(--gold-pale); }
.dark p, .dark .lede { color: #C6BDA9; }
.dark a:hover { text-decoration-color: var(--gold-bright); }

.tint { background: var(--paper-2); }

/* --- Typographic components ----------------------------------------------- */
.eyebrow {
  font-size: .75rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .7rem;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); max-width: 4rem; }
.dark .eyebrow { color: var(--gold-bright); }
.dark .eyebrow::after { background: var(--rule-dark); }

.lede {
  font-size: clamp(1.1rem, 1.02rem + .45vw, 1.3rem);
  line-height: 1.55; color: var(--muted); max-width: 60ch;
}
h1 + .lede, h2 + .lede { margin-top: 1.1rem; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.5rem; font-size: .95rem; font-weight: 600;
  border-radius: 3px; border: 1px solid transparent; text-decoration: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

/* On light grounds: ink fill, gold type */
.btn--primary { background: var(--ink); color: var(--gold-pale); }
.btn--primary:hover { background: var(--ink-3); color: #fff; }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-2); }

/* On dark grounds: gold fill, ink type */
.dark .btn--primary, .hero .btn--primary, .cta .btn--primary,
.site-header .btn--primary {
  background: var(--gold); color: #14120E;
}
.dark .btn--primary:hover, .hero .btn--primary:hover, .cta .btn--primary:hover,
.site-header .btn--primary:hover { background: var(--gold-bright); color: #14120E; }

.dark .btn--ghost, .hero .btn--ghost, .cta .btn--ghost {
  border-color: rgba(240,228,192,.34); color: var(--gold-pale);
}
.dark .btn--ghost:hover, .hero .btn--ghost:hover, .cta .btn--ghost:hover {
  border-color: var(--gold); background: rgba(201,162,76,.12);
}

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.arrow { transition: transform .18s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* --- Header (dark, to carry the gold mark) -------------------------------- */
.skip { position: absolute; left: -9999px; background: var(--gold); color: #14120E; padding: .75rem 1.25rem; z-index: 100; font-weight: 600; }
.skip:focus { left: var(--gutter); top: .5rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19,18,17,.94);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid rgba(240,228,192,.14);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; flex-shrink: 0; }
.brand img { width: auto; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-sans); font-weight: 600; font-size: 1.02rem;
  letter-spacing: .17em; color: var(--gold-pale);
}
.brand-sub {
  font-size: .58rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin-top: .3rem;
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-size: .92rem; font-weight: 500; text-decoration: none; color: #B8AE99;
  padding-block: .4rem; position: relative; transition: color .16s var(--ease);
}
.nav a:hover { color: var(--gold-pale); }
.nav a[aria-current="page"] { color: var(--gold-pale); font-weight: 600; }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold);
}
.nav .btn { padding: .6rem 1.15rem; font-size: .88rem; }
.nav .btn:hover { color: #14120E; }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--gold-pale); }
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 78px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--rule-dark);
    padding: .5rem var(--gutter) 1.5rem; display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .95rem 0; border-bottom: 1px solid var(--rule-dark); font-size: 1rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .btn { margin-top: 1.1rem; justify-content: center; border-bottom: 0; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--gold-pale); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(115% 85% at 80% 8%, rgba(201,162,76,.26), transparent 60%),
    radial-gradient(85% 75% at 8% 100%, rgba(122,90,22,.34), transparent 62%);
}
.hero::after {
  content: ""; position: absolute; right: -3%; top: 50%; transform: translateY(-50%);
  width: min(44%, 500px); aspect-ratio: 1.4 / 1;
  background: url("../img/mark.png") no-repeat center / contain;
  opacity: .11; pointer-events: none;
}
@media (max-width: 880px) { .hero::after { opacity: .05; right: -20%; } }
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { padding-block: clamp(4.5rem, 11vw, 8.5rem); max-width: 44rem; }
.hero h1 { color: var(--gold-pale); }
.hero .lede { color: #C6BDA9; margin-top: 1.5rem; }

.hero-flag {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid rgba(201,162,76,.42);
  background: rgba(201,162,76,.10);
  padding: .45rem .95rem; border-radius: 100px; margin-bottom: 1.9rem;
}
.hero-flag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* --- Stat band ------------------------------------------------------------ */
.statband { border-top: 1px solid var(--rule-dark); position: relative; z-index: 1; }
.statband-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { padding: 2.1rem 0; }
.statband-grid .stat + .stat { border-left: 1px solid var(--rule-dark); padding-left: 2rem; }
@media (max-width: 700px) {
  .statband-grid .stat + .stat { border-left: 0; border-top: 1px solid var(--rule-dark); padding-left: 0; }
  .stat { padding-block: 1.5rem; }
}
.stat-num {
  font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 1.6vw, 2.6rem);
  font-weight: 600; letter-spacing: -.02em; color: var(--gold-pale); line-height: 1;
}
.stat-label { font-size: .82rem; color: var(--muted-dark); margin-top: .6rem; line-height: 1.45; max-width: 22ch; }

/* --- Section heading ------------------------------------------------------ */
.sec-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.sec-head .lede { margin-top: 1.1rem; }

/* --- Cards / grids -------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: clamp(1.6rem, 3vw, 2.1rem);
  display: flex; flex-direction: column;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--gold); box-shadow: 0 14px 34px -20px rgba(19,18,17,.4); transform: translateY(-2px); }
.card-num { font-family: var(--font-display); font-size: .95rem; font-weight: 600; color: var(--gold-deep); margin-bottom: 1rem; letter-spacing: .02em; }
.card h3 { margin-bottom: .7rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card ul { margin-top: 1.1rem; padding-left: 0; list-style: none; }
.card ul li { font-size: .89rem; color: var(--muted); padding-left: 1.1rem; position: relative; }
.card ul li + li { margin-top: .45rem; }
.card ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }

.card--flat { background: var(--paper-2); border-color: transparent; }
.card--flat:hover { transform: none; box-shadow: none; border-color: var(--rule); }

/* Cards sitting on a dark section */
.dark .card { background: rgba(240,228,192,.045); border-color: rgba(240,228,192,.16); }
.dark .card:hover { border-color: var(--gold); box-shadow: none; }
.dark .card h3 { color: var(--gold-pale); }
.dark .card p { color: #C6BDA9; }
.dark .card-num { color: var(--gold-bright); }

/* --- Split feature -------------------------------------------------------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.split--sticky > :first-child { position: sticky; top: 118px; }
@media (max-width: 880px) { .split--sticky > :first-child { position: static; } }

/* --- Spec table ----------------------------------------------------------- */
.spec { border-top: 1px solid var(--rule); }
.spec-row { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 1rem 2rem; padding: 1.15rem 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 620px) { .spec-row { grid-template-columns: 1fr; gap: .3rem; } }
.spec-key { font-size: .78rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-deep); padding-top: .15rem; }
.spec-val { font-size: .98rem; color: var(--muted); }
.dark .spec, .dark .spec-row { border-color: var(--rule-dark); }
.dark .spec-key { color: var(--gold-bright); }
.dark .spec-val { color: #C6BDA9; }

/* --- Credential strip ----------------------------------------------------- */
.creds { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.9rem; }
.cred {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600;
  border: 1px solid var(--rule); background: var(--paper);
  padding: .5rem .9rem; border-radius: 100px; color: var(--ink);
}
.cred svg { width: 15px; height: 15px; color: var(--gold-deep); flex-shrink: 0; }
.dark .cred { border-color: rgba(240,228,192,.22); background: rgba(240,228,192,.05); color: var(--gold-pale); }
.dark .cred svg { color: var(--gold-bright); }

/* --- Pull quote ----------------------------------------------------------- */
.pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.85rem);
  line-height: 1.35; letter-spacing: -.015em;
  border-left: 2px solid var(--gold); padding-left: clamp(1.25rem, 3vw, 2rem); max-width: 34ch;
}

/* --- CTA band ------------------------------------------------------------- */
.cta { background: var(--ink); color: var(--gold-pale); position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(75% 120% at 88% 50%, rgba(201,162,76,.22), transparent 62%);
}
.cta .wrap { position: relative; z-index: 1; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta h2 { color: var(--gold-pale); max-width: 20ch; }
.cta p { color: #C6BDA9; margin-top: .9rem; max-width: 44ch; }

/* --- Contact form --------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.15rem; }
.field label { font-size: .78rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-deep); }
.field input, .field textarea, .field select {
  border: 1px solid var(--rule); border-radius: 3px; padding: .75rem .9rem;
  background: var(--paper); font-size: .98rem;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,76,.22);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 1rem; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--muted-dark); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: .9rem; }
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(150px, 1fr));
  padding-bottom: 2.75rem; border-bottom: 1px solid var(--rule-dark);
}
.footer-blurb { margin-top: 1.2rem; max-width: 34ch; font-size: .88rem; line-height: 1.6; }
.footer-col h4 { color: var(--gold-pale); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 650; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li + li { margin-top: .6rem; }
.footer-col a { text-decoration: none; color: var(--muted-dark); transition: color .16s var(--ease); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-top: 1.75rem; font-size: .8rem; color: #9C927C; }
.ack { margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid var(--rule-dark); font-size: .85rem; line-height: 1.65; color: var(--muted-dark); max-width: 70ch; }

/* --- Utilities ------------------------------------------------------------ */
.mt-0 { margin-top: 0 !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
