/* =========================================================================
   Curizen — GitHub Copilot Custom Agent Usage Observability
   Centralized design system (tokens + reusable component styles)
   ========================================================================= */

/* ---- Design tokens --------------------------------------------------- */
:root {
  /* Brand (sampled from logo-light.png) */
  --brand:            #0C1031;   /* Curizen navy */
  --brand-soft:       #1B2150;   /* lighter navy for accents / links */
  --brand-tint:       #EEF0F6;   /* very light navy wash for fills */
  --brand-tint-2:     #E3E6F0;   /* slightly deeper navy wash */

  /* Backgrounds */
  --bg:               #FFFFFF;
  --bg-muted:         #F7F8FA;   /* alternating section wash */
  --bg-panel:         #FBFBFD;

  /* Text */
  --text:             #1A1D2B;   /* body */
  --text-muted:       #565B70;   /* secondary */
  --text-faint:       #767B8E;   /* captions / footnotes */
  --text-on-brand:    #FFFFFF;

  /* Lines */
  --border:           #E4E6EC;
  --border-strong:    #D2D5DF;

  /* Status accents (used WITH text/symbols, never color alone) */
  --ok:               #1F7A4D;   /* included / proven */
  --ok-tint:          #EEF6F1;
  --no:               #9A3B3B;   /* excluded */
  --no-tint:          #F7EFEF;
  --future:           #6A5B18;   /* future / to be validated */
  --future-tint:      #F6F3E8;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
               "Apple Color Emoji", "Segoe UI Emoji", sans-serif;

  --fs-hero:   clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem);
  --fs-h2:     clamp(1.4rem, 1.05rem + 1.1vw, 1.8rem);
  --fs-h3:     1.1rem;
  --fs-lead:   clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
  --fs-body:   1rem;
  --fs-small:  0.9rem;
  --fs-xsmall: 0.82rem;

  --lh-tight:  1.25;
  --lh-normal: 1.65;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;

  /* Layout */
  --container:   1040px;
  --container-narrow: 760px;
  --radius:      8px;
  --radius-sm:   6px;

  --header-h:    64px;
}

/* ---- Reset / base ---------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3 {
  color: var(--brand);
  line-height: var(--lh-tight);
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-soft); }

strong { font-weight: 650; color: var(--brand); }

/* ---- Layout primitives ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section {
  padding-block: var(--sp-8);
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.section--muted { background: var(--bg-muted); }
.section--plain { border-top: none; }

.section__eyebrow {
  display: inline-block;
  font-size: var(--fs-xsmall);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}

.section__title { font-size: var(--fs-h2); }

.section__intro {
  max-width: 72ch;
  color: var(--text-muted);
  margin-top: var(--sp-4);
  font-size: var(--fs-lead);
}

.subheading {
  font-size: var(--fs-h3);
  font-weight: 650;
  color: var(--brand);
  margin: var(--sp-6) 0 var(--sp-3);
}

.measure { max-width: 72ch; }

/* ---- Header / navigation -------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img {
  height: 26px;
  width: auto;
  display: block;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-small);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--brand); background: var(--brand-tint); }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

@media (max-width: 860px) {
  .site-nav { display: none; }
}

/* ---- Hero ------------------------------------------------------------ */
.hero {
  padding-block: var(--sp-8) var(--sp-7);
  background:
    linear-gradient(180deg, var(--brand-tint) 0%, rgba(238,240,246,0) 100%);
}
.hero__wrap { max-width: 56rem; }
.hero__title {
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__subtitle {
  margin-top: var(--sp-3);
  font-size: var(--fs-lead);
  font-weight: 600;
  color: var(--brand-soft);
}
.hero__support {
  margin-top: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-lead);
  max-width: 62ch;
}

.summary-card {
  margin-top: var(--sp-6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-6);
  max-width: 74ch;
}
.summary-card__label {
  font-size: var(--fs-xsmall);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-2);
}
.summary-card p { color: var(--text); }

/* ---- Callout (core question etc.) ----------------------------------- */
.callout {
  margin-top: var(--sp-5);
  background: var(--brand);
  color: var(--text-on-brand);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-6);
  max-width: 78ch;
}
.callout__label {
  font-size: var(--fs-xsmall);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #AEB4D6;
  margin-bottom: var(--sp-2);
}
.callout p {
  margin: 0;
  font-size: var(--fs-lead);
  color: #F2F3F9;
}
.callout strong { color: #fff; }

/* ---- Question / bullet lists ---------------------------------------- */
.q-list,
.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0 0;
  display: grid;
  gap: var(--sp-3);
  max-width: 74ch;
}
.q-list li,
.feature-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text);
}
.q-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--brand-soft);
  border-radius: 50%;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.66em;
  width: 10px;
  height: 2px;
  background: var(--brand);
}

/* two-column list on wider screens */
.feature-list--cols {
  max-width: none;
}
@media (min-width: 720px) {
  .feature-list--cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3) var(--sp-6);
  }
}

/* ---- Tables ---------------------------------------------------------- */
.table-wrap {
  margin-top: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  min-width: 520px;
}
table.data caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 var(--sp-3);
  color: var(--text-faint);
  font-size: var(--fs-xsmall);
}
table.data thead th {
  background: var(--brand);
  color: var(--text-on-brand);
  font-weight: 600;
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  vertical-align: bottom;
  letter-spacing: 0.01em;
}
table.data tbody th,
table.data tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  vertical-align: top;
}
table.data tbody th {
  font-weight: 600;
  color: var(--brand);
  text-align: left;
}
table.data tbody tr:nth-child(even) { background: var(--bg-muted); }

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
th.num { text-align: right; }

.footnote {
  margin-top: var(--sp-3);
  color: var(--text-faint);
  font-size: var(--fs-xsmall);
  max-width: 78ch;
}
.footnote sup, .fn-mark { color: var(--brand-soft); font-weight: 650; }

.caveat {
  margin-top: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--future-tint);
  border: 1px solid #E9E2C8;
  border-radius: var(--radius-sm);
  color: #4F451A;
  font-size: var(--fs-small);
  max-width: 82ch;
}
.caveat strong { color: #4F451A; }

/* Key finding block */
.keyfinding {
  margin-top: var(--sp-5);
  padding: var(--sp-5);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2);
  border-radius: var(--radius);
  max-width: 82ch;
}
.keyfinding__label {
  font-size: var(--fs-xsmall);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin-bottom: var(--sp-2);
}
.keyfinding p { margin: 0; }

/* ---- Comparison tables (included/excluded, proven/next) ------------- */
.cmp th, .cmp td { width: 50%; }
.cmp .col-a th { background: var(--brand); }

.tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}
.tag__mark {
  font-weight: 700;
  font-size: 0.95em;
  line-height: 1;
}
.tag--yes .tag__mark { color: var(--ok); }
.tag--no  .tag__mark { color: var(--no); }
.tag--fut .tag__mark { color: var(--future); }
.tag--next .tag__mark { color: var(--brand-soft); }

td.cell-yes  { background: var(--ok-tint); }
td.cell-no   { background: var(--no-tint); }
td.cell-fut  { background: var(--future-tint); }
tr:nth-child(even) td.cell-yes  { background: var(--ok-tint); }
tr:nth-child(even) td.cell-no   { background: var(--no-tint); }
tr:nth-child(even) td.cell-fut  { background: var(--future-tint); }

/* ---- Hierarchy flow (Company -> ... -> Model Usage) ----------------- */
.hierarchy {
  margin-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--sp-2);
}
.hierarchy__node {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--brand);
  display: flex;
  align-items: center;
}
.hierarchy__node:last-child {
  background: var(--brand);
  color: var(--text-on-brand);
  border-color: var(--brand);
}
.hierarchy__sep {
  display: flex;
  align-items: center;
  color: var(--text-faint);
  font-weight: 700;
}
.hierarchy__sep::before { content: "\2192"; } /* → */

@media (max-width: 620px) {
  .hierarchy { flex-direction: column; align-items: stretch; }
  .hierarchy__node { justify-content: center; text-align: center; }
  .hierarchy__sep { justify-content: center; }
  .hierarchy__sep::before { content: "\2193"; } /* ↓ */
}

/* ---- Architecture diagram (vertical) -------------------------------- */
.arch {
  margin-top: var(--sp-6);
  max-width: 560px;
  margin-inline: auto;
}
.arch__stage {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  text-align: center;
}
.arch__stage .step {
  display: block;
  font-size: var(--fs-xsmall);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.arch__stage .name {
  font-weight: 650;
  color: var(--brand);
}
.arch__stage:first-child { border-top: 3px solid var(--brand); }
.arch__stage:last-child {
  background: var(--brand);
}
.arch__stage:last-child .name { color: #fff; }
.arch__stage:last-child .step { color: #AEB4D6; }

.arch__arrow {
  display: flex;
  justify-content: center;
  color: var(--brand-soft);
  font-size: 1.1rem;
  line-height: 1;
  padding: var(--sp-2) 0;
}
.arch__arrow::before { content: "\2193"; } /* ↓ */

.arch__caption {
  text-align: center;
  color: var(--text-faint);
  font-size: var(--fs-xsmall);
  margin-top: var(--sp-4);
}

/* ---- Outcome block --------------------------------------------------- */
.outcome {
  margin-top: var(--sp-5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-6);
  max-width: 82ch;
}
.outcome .subheading { margin-top: 0; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--brand);
  color: #C9CDE2;
  padding-block: var(--sp-6);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
}
.site-footer img { height: 24px; width: auto; display: block; }
.site-footer p {
  margin: 0;
  font-size: var(--fs-small);
  color: #AEB4D6;
  max-width: 48ch;
}

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