/* ==========================================================================
   IoI Press — Design System
   Palette: Ink Navy / Marine / Emerald / Gold Leaf / Parchment
   Type: Source Serif 4 (display) + IBM Plex Sans (body/UI) + IBM Plex Mono (data)
   ========================================================================== */

:root {
  --ink:        #10213F;
  --marine:     #1B3B6F;
  --marine-70:  rgba(27,59,111,.7);
  --emerald:    #175C3E;
  --emerald-l:  #1F7A50;
  --gold:       #B8863A;
  --gold-l:     #D9AE6A;
  --parchment:  #FAF7F0;
  --paper:      #FFFFFF;
  --line:       #E4DFD2;
  --slate:      #3A4252;
  --slate-soft: #6B7280;
  --slate-faint:#9AA1AE;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --max: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@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; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--slate);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 3.6vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: .9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.lede {
  font-size: 1.1rem;
  color: var(--slate-soft);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .92rem;
  padding: .82em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-l); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { background: transparent; color: var(--marine); border-color: var(--line); }
.btn-outline:hover { border-color: var(--marine); background: rgba(27,59,111,.05); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a5762e; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px;
  max-width: var(--max); margin: 0 auto;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .name { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.brand-text .tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.main-nav a {
  font-size: .86rem; font-weight: 500; color: var(--slate);
  padding: 10px 12px; border-radius: var(--radius);
  transition: color .15s ease, background .15s ease;
}
.main-nav a:hover { color: var(--emerald); background: rgba(23,92,62,.06); }
.main-nav a.active { color: var(--emerald); font-weight: 700; }
.nav-cta { margin-left: 8px; }
.nav-cta .btn { padding: .6em 1.1em; font-size: .82rem; }

.nav-toggle { display: none; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius);
    background: none; cursor: pointer;
  }
  .header-inner.open .main-nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px;
  }
  .header-inner.open .main-nav a { padding: 12px 6px; border-bottom: 1px solid var(--line); }
  .header-inner { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--ink) 0%, var(--marine) 62%, #234a82 100%);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max); margin: 0 auto; padding: 92px 28px 76px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
  position: relative; z-index: 2;
}
.hero .eyebrow { color: var(--gold-l); }
.hero .eyebrow::before { background: var(--gold-l); }
.hero h1 { color: #fff; }
.hero p.lede { color: rgba(255,255,255,.82); }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-figure { position: relative; }
.hero-figure svg { width: 100%; height: auto; }

.hero-globe {
  animation: spin 90s linear infinite;
  transform-origin: 260px 260px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-figure { order: -1; max-width: 260px; margin: 0 auto; }
}

/* page hero (interior pages, shorter) */
.page-hero {
  background: linear-gradient(160deg, var(--ink) 0%, var(--marine) 100%);
  color: #fff; padding: 64px 28px 52px;
}
.page-hero .container { max-width: var(--max); }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.8); max-width: 68ch; margin: 0; }
.breadcrumb { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--gold-l); text-transform: uppercase; margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: #fff; }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
section.alt { background: var(--parchment); }
section.navy { background: var(--ink); color: #fff; }
section.navy h2 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

hr.rule { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: 0 14px 34px rgba(16,33,63,.08); transform: translateY(-3px); border-color: #d7cfb9; }
.card .icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(23,92,62,.09); color: var(--emerald);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card h3 { margin-bottom: .4em; font-size: 1.12rem; }
.card p { color: var(--slate-soft); font-size: .94rem; margin-bottom: 0; }
.card a.card-link { color: var(--emerald); font-weight: 600; font-size: .86rem; display: inline-block; margin-top: 14px; }

/* Stat strip (ledger motif) */
.stat-strip {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--paper);
}
.stat-cell {
  padding: 26px 18px; text-align: center; border-right: 1px solid var(--line);
}
.stat-cell:last-child { border-right: none; }
.stat-num { font-family: var(--mono); font-size: 1.9rem; color: var(--ink); font-weight: 500; letter-spacing: -0.02em; }
.stat-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--slate-soft); margin-top: 6px; }
@media (max-width: 880px) { .stat-strip { grid-template-columns: repeat(3,1fr); } .stat-cell:nth-child(3){border-right:none;} }
@media (max-width: 520px) { .stat-strip { grid-template-columns: repeat(2,1fr); } .stat-cell:nth-child(odd){ } }

/* Featured journal panel */
.journal-panel {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--paper);
}
.journal-cover {
  background: linear-gradient(150deg, var(--emerald) 0%, #0e3d28 100%);
  padding: 44px 34px; color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.journal-cover .abbr { font-family: var(--serif); font-size: 2.3rem; font-weight: 700; }
.journal-cover .full { font-size: .85rem; margin-top: 10px; color: rgba(255,255,255,.85); line-height: 1.5; }
.journal-body { padding: 40px 38px; }
.journal-meta { display: flex; gap: 22px; flex-wrap: wrap; margin: 18px 0 22px; font-family: var(--mono); font-size: .76rem; color: var(--slate-soft); }
.journal-meta strong { color: var(--ink); display: block; font-family: var(--sans); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 760px) { .journal-panel { grid-template-columns: 1fr; } }

/* Timeline / list rows (for news, org chart, workflow) */
.row-list { border-top: 1px solid var(--line); }
.row-item {
  display: grid; grid-template-columns: 130px 1fr; gap: 24px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.row-item .when { font-family: var(--mono); font-size: .78rem; color: var(--gold); padding-top: 3px; }
.row-item h4 { margin-bottom: .3em; }
.row-item p { color: var(--slate-soft); margin: 0; font-size: .93rem; }
@media (max-width: 600px) { .row-item { grid-template-columns: 1fr; gap: 6px; } }

/* Table styling for policy / structured content */
table.policy-table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .92rem; }
table.policy-table th, table.policy-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.policy-table th { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-soft); font-weight: 500; }

/* Anchor / accordion nav for long pages */
.subnav {
  position: sticky; top: 78px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; background: var(--paper);
}
.subnav .eyebrow { margin-bottom: .6em; }
.subnav ul { list-style: none; margin: 0; padding: 0; }
.subnav li { border-top: 1px solid var(--line); }
.subnav li:first-child { border-top: none; }
.subnav a { display: block; padding: 10px 2px; font-size: .88rem; color: var(--slate); }
.subnav a:hover { color: var(--emerald); }

.layout-with-side { display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .layout-with-side { grid-template-columns: 1fr; } .subnav { position: static; } }

.content-block { max-width: 74ch; }
.content-block h2 { margin-top: 2.2em; scroll-margin-top: 90px; }
.content-block h2:first-child { margin-top: 0; }
.content-block h3 { margin-top: 1.6em; scroll-margin-top: 90px; }
.content-block ul, .content-block ol { padding-left: 1.3em; }
.content-block li { margin-bottom: .5em; }

/* Callout / notice box */
.callout {
  border-left: 3px solid var(--gold);
  background: var(--parchment);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .93rem; margin: 1.6em 0;
}
.callout strong { color: var(--ink); }

/* Badges */
.badge {
  display: inline-block; font-family: var(--mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 9px; border-radius: 2px; background: rgba(184,134,58,.14); color: var(--gold);
  margin-right: 6px;
}
.badge.green { background: rgba(23,92,62,.1); color: var(--emerald); }
.badge.navy { background: rgba(27,59,111,.1); color: var(--marine); }

/* Partner / logo strip */
.partner-strip { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.partner-chip {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 20px; font-family: var(--serif); font-weight: 600; color: var(--slate-soft);
  font-size: .95rem;
}

/* CTA band */
.cta-band {
  background: var(--emerald); color: #fff; border-radius: var(--radius);
  padding: 50px 44px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding-top: 60px; }
.footer-top { border-top: 1px solid rgba(255,255,255,.12); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 46px; }
.footer-brand { display: flex; gap: 12px; margin-bottom: 16px; }
.footer-brand img { height: 42px; width: 42px; }
.footer-brand .name { font-family: var(--serif); color: #fff; font-weight: 700; font-size: 1.05rem; }
.footer-brand .tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; color: var(--gold-l); text-transform: uppercase; }
.site-footer p.desc { font-size: .87rem; color: rgba(255,255,255,.6); max-width: 34ch; }
.site-footer h5 { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-l); margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { font-size: .88rem; color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.5); margin-left: 16px; }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }

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

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
