/* X-Designer — Payload Media legacy site
   Palette:
     --navy   #0F1923  page background
     --slate  #1C2B3A  card / nav background
     --amber  #C8922A  accent / stripe
     --ivory  #E8E2D5  body text
     --muted  #8A99A8  secondary text
     --white  #FFFFFF
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Inter:wght@400;500;600&display=swap');

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

:root {
  --navy:   #0F1923;
  --slate:  #1C2B3A;
  --amber:  #C8922A;
  --ivory:  #E8E2D5;
  --muted:  #8A99A8;
  --white:  #FFFFFF;
  --max:    860px;
  --mono:   'IBM Plex Mono', monospace;
  --sans:   'Inter', system-ui, sans-serif;
}

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

body {
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--sans);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Nav logo image ── */
.nav-logo img { display: block; }

/* ── Hero logo layout ── */
.hero-logo {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}
.hero-logo-img {
  width: 120px;
  height: auto;
  flex-shrink: 0;
  margin-top: 0.25rem;
}
@media (max-width: 580px) {
  .hero-logo { flex-direction: column; gap: 1rem; }
  .hero-logo-img { width: 80px; }
}

/* ── Nav ── */

header {
  background: var(--slate);
  border-bottom: 2px solid var(--amber);
  position: sticky; top: 0; z-index: 100;
}
nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 54px;
}
.nav-logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--amber);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}
.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ivory); }

/* ── Page wrapper ── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Amber stripe section divider ── */
.stripe {
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--amber);
  margin: 2.5rem 0;
}

/* ── Hero / page header ── */
.page-header { margin-bottom: 2.5rem; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
h1 {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.lead {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--ivory);
  max-width: 640px;
}

/* ── Section headings ── */
h2 {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}
h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.4rem;
}

p { margin-bottom: 1rem; color: var(--ivory); }
p:last-child { margin-bottom: 0; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Cards ── */
.card {
  background: var(--slate);
  border-left: 3px solid var(--amber);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: 0 4px 4px 0;
}
.card h3 { margin-bottom: 0.5rem; }

/* ── Info box ── */
.info-box {
  background: var(--slate);
  border: 1px solid #2E4255;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* ── Notice / callout ── */
.notice {
  border-left: 3px solid var(--amber);
  background: rgba(200,146,42,0.08);
  padding: 0.9rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--ivory);
}

/* ── Feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.feature-item {
  background: var(--slate);
  padding: 1rem 1.25rem;
  border-radius: 4px;
}
.feature-item h3 { font-size: 0.88rem; color: var(--amber); margin-bottom: 0.35rem; }
.feature-item p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0 1.5rem;
}
th {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #2E4255;
  background: var(--slate);
}
td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #1E3040;
  color: var(--ivory);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Code / mono inline ── */
code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--slate);
  padding: 0.1em 0.35em;
  border-radius: 2px;
  color: var(--amber);
}

/* ── Download list ── */
.dl-list { list-style: none; margin: 0.75rem 0 1.5rem; }
.dl-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #1E3040;
  font-size: 0.9rem;
}
.dl-list li:last-child { border-bottom: none; }
.dl-label { color: var(--muted); font-size: 0.8rem; min-width: 9rem; }
.dl-size { color: var(--muted); font-size: 0.78rem; margin-left: auto; white-space: nowrap; }

/* ── Steps (numbered process) ── */
.steps { margin: 1.25rem 0; }
.step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.step-num {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--amber);
  min-width: 2rem;
  line-height: 1.4;
}
.step-body h3 { margin-bottom: 0.4rem; }
.step-body p { font-size: 0.93rem; }

/* ── IST logo (trademarks + footer heritage mark) ── */
.ist-logo-tm {
  height: 60px;
  width: auto;
  /* SVG is near-black on white — invert on dark background */
  filter: invert(1) brightness(0.85);
}
.footer-ist-logo {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.4rem;
  filter: invert(1) brightness(0.6);
  opacity: 0.7;
}

/* ── Footer ── */
footer {
  border-top: 1px solid #1E3040;
  margin-top: 4rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--ivory); }

/* ── Responsive ── */
@media (max-width: 580px) {
  .nav-links { gap: 1rem; }
  main { padding: 2rem 1rem 4rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .step { flex-direction: column; gap: 0.5rem; }
  table { font-size: 0.82rem; }
  td, th { padding: 0.4rem 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Print ── */
@media print {
  @page { margin: 1.8cm 2cm; }

  /* Force everything to black on white — the nuclear option,
     needed because inline color vars survive unless overridden at * level */
  *, *::before, *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-family: Georgia, serif;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  /* Hide navigation and footer */
  header, footer { display: none !important; }

  main { max-width: 100%; padding: 0; }

  /* Headings */
  h1 { font-size: 18pt; font-family: Georgia, serif; margin-bottom: 6pt; }
  h2 {
    font-size: 12pt; font-family: Georgia, serif;
    margin-top: 14pt; margin-bottom: 4pt;
    border-bottom: 0.5pt solid #999; padding-bottom: 2pt;
  }
  h3 { font-size: 10.5pt; font-family: Georgia, serif; margin-bottom: 3pt; }

  .eyebrow { font-size: 8pt; letter-spacing: 0.1em; }
  .lead { font-size: 11pt; }

  /* Stripe becomes a thin rule */
  .stripe { background: #999 !important; width: 3cm; height: 0.5pt; margin: 10pt 0; }

  /* Cards and info boxes */
  .card, .info-box, .feature-item {
    border: 0.5pt solid #bbb !important;
    border-left-width: 0.5pt !important;
    border-radius: 0;
    padding: 6pt 8pt;
    margin-bottom: 6pt;
    break-inside: avoid;
  }

  .notice {
    border: 0.5pt solid #888 !important;
    border-left-width: 2pt !important;
    padding: 5pt 8pt;
    margin: 8pt 0;
    break-inside: avoid;
    font-size: 9.5pt;
  }

  /* Feature grid — two-up for print */
  .feature-grid { display: block; }
  .feature-grid .feature-item {
    display: inline-block;
    width: 48%;
    vertical-align: top;
    margin-right: 2%;
  }

  /* Tables */
  table { border-collapse: collapse; width: 100%; font-size: 9.5pt; }
  th {
    background: #eee !important;
    border: 0.5pt solid #aaa !important;
    padding: 3pt 5pt;
    font-family: Georgia, serif;
    font-size: 9pt;
    letter-spacing: 0;
  }
  td {
    border: 0.5pt solid #ccc !important;
    padding: 3pt 5pt;
  }

  /* Code */
  code {
    background: #f0f0f0 !important;
    font-size: 9pt;
    padding: 0 2pt;
    border: 0.3pt solid #ccc !important;
  }

  /* Download list */
  .dl-list li { border-bottom: 0.5pt solid #ddd !important; padding: 3pt 0; }

  /* Links — show URL in brackets, skip mailto and anchors */
  a[href]::after { content: " (" attr(href) ")"; font-size: 8pt; }
  a[href^="mailto:"]::after,
  a[href^="#"]::after { content: ""; }

  /* Don't break steps and cards across pages */
  .step, .card { break-inside: avoid; }

  /* Legal */
  .legal-section ol, .legal-section ul { font-size: 9.5pt; }
  .caps { font-size: 8.5pt; }
}
