/* Criterionyx - page chrome: top nav, navy hero, how-section framing, closing CTA.
   Shares the brand tokens defined in illustration.css (:root). */

.page { background: var(--paper); }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 64px); height: 68px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav.on-dark {
  background: color-mix(in srgb, #0a1d3d 70%, transparent);
  border-bottom-color: rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand .logo-img { height: 40px; width: auto; display: block; flex: none; }
.brand .brand-text { display: flex; flex-direction: row; align-items: baseline; gap: 6px; line-height: 1; }
.brand .bname { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand .btag { font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: -.01em; text-transform: none; opacity: .72; }
.brand .bname { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; line-height: 1.05; }
.brand .btag-legacy { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; opacity: .6; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 600; color: inherit; opacity: .8; }
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; }
.nav-has-sub { position: relative; display: inline-flex; align-items: center; }
.nav-has-sub > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-caret { opacity: .7; transition: transform .18s ease; }
.nav-has-sub:hover .nav-caret { transform: rotate(180deg); }
.nav-has-sub::after { content: ""; position: absolute; top: 100%; left: -10px; right: -10px; height: 16px; }
.nav-sub { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px); min-width: 256px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: #0a1d3d; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 20px 46px -18px rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s ease; z-index: 40; }
.nav-has-sub:hover .nav-sub, .nav-has-sub:focus-within .nav-sub { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-sub a { padding: 10px 13px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: #cdd9ef; opacity: 1; white-space: nowrap; }
.nav-sub a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav .btn-sm {
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: 9px 16px; border-radius: 8px; background: var(--accent); color: #fff;
  border: 0; white-space: nowrap;
}
.on-dark .brand .bname, .on-dark .brand .btag, .on-dark .nav-links { color: #eaf0fb; }
.nav-menu { display: contents; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 82% -10%, #15336b 0%, transparent 55%),
    radial-gradient(90% 80% at 0% 110%, #0d244e 0%, transparent 50%),
    linear-gradient(160deg, #0a1d3d 0%, #081830 100%);
  color: #eaf0fb;
}
.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 64px) clamp(56px, 7vw, 104px);
  display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: #8fb4f0;
}
.hero-eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--accent); }
.hero h1 {
  margin: 0 0 22px; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(36px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -.025em;
  text-wrap: balance;
}
.hero h1 .hl { color: #6fa3ef; }
.hero .lede {
  margin: 0 0 32px; font-size: clamp(16px, 1.7vw, 19px); line-height: 1.6;
  color: #b9c6de; max-width: 560px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; cursor: pointer; text-decoration: none;
  font-size: 15px; font-weight: 600; padding: 14px 24px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { transform: translateY(-1px); background: #2a64c0; }
.btn-gold { background: var(--gold); color: #221a05; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--gold) 75%, transparent); }
.btn-gold:hover { transform: translateY(-1px); background: #e6b521; }
.btn-ghost { background: transparent; color: #eaf0fb; border-color: rgba(255,255,255,.22); }
.btn-ghost:hover { border-color: rgba(255,255,255,.5); }

.hero-trust { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; }
.hero-trust .lbl { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #6f82a6; font-weight: 600; }
.hero-trust .items { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-trust .pill {
  font-size: 12.5px; font-weight: 600; color: #cdd9ef; padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.04);
}

/* hero data motif (right) */
.hero-viz {
  position: relative; border-radius: 16px; overflow: hidden;
  background: linear-gradient(165deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  aspect-ratio: 4 / 3.2;
}
.hero-viz .hv-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.hero-viz .hv-head .t { font-size: 12.5px; font-weight: 700; color: #dde7f7; letter-spacing: .01em; }
.hero-viz .hv-head .s { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #7e90b3; }
.hero-viz .hv-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; color: #ff7a73; }
.hero-viz .hv-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); animation: hbeat 1.5s ease-in-out infinite; }
@keyframes hbeat { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
.hero-viz svg { width: 100%; height: auto; display: block; }
.hero-viz svg text { font-family: "IBM Plex Mono", monospace; fill: #7e90b3; }

/* ---------- Section intro (above illustration) ---------- */
.section-intro {
  max-width: 1180px; margin: 0 auto; padding: clamp(44px, 6vw, 80px) clamp(20px, 5vw, 64px) 0;
}
.section-intro .keyline { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.section-intro .keyline .k {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; color: var(--accent);
  letter-spacing: .06em;
}
.section-intro .keyline .rule { flex: 1; height: 1px; background: var(--line-strong); }
.section-intro h2 {
  margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; max-width: 720px;
}
.section-intro p { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 620px; }

/* the illustration frame, when embedded, loses its big top padding */
.page .frame { padding-top: clamp(20px, 3vw, 32px); }

/* ---------- Closing CTA band ---------- */
.cta-band {
  margin: clamp(40px, 6vw, 80px) auto 0; max-width: 1180px;
  padding: 0 clamp(20px, 5vw, 64px) clamp(48px, 7vw, 88px);
}
.cta-card {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #0a1d3d, #0e2a57);
  border-radius: 20px; padding: clamp(36px, 5vw, 60px);
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
  color: #eaf0fb;
}
.cta-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent), transparent 65%);
  pointer-events: none;
}
.cta-card h3 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.08; }
.cta-card p { margin: 0; color: #b9c6de; font-size: 16px; line-height: 1.55; max-width: 520px; }
.cta-card .actions { display: flex; flex-direction: column; gap: 12px; z-index: 1; }

/* ---------- Site footer (navy) ---------- */
.site-footer { background: linear-gradient(180deg, #0a1d3d, #081830); color: #cdd9ef; margin-top: clamp(56px, 8vw, 104px); }
.site-footer .sf-inner {
  max-width: 1180px; margin: 0 auto; padding: clamp(44px, 6vw, 72px) clamp(20px, 5vw, 64px) 28px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px 32px;
}
.site-footer .sf-brand .brand { margin-bottom: 16px; }
.site-footer .sf-brand .bname { color: #fff; }
.site-footer .sf-brand .btag { color: #8fb4f0; opacity: 1; }
.site-footer .sf-blurb { font-size: 14px; line-height: 1.6; color: #9fb1d0; max-width: 300px; margin: 0 0 16px; }
.site-footer .sf-mission { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #eaf0fb; }
.site-footer .sf-mission .q { color: #8fb4f0; }
.site-footer .sf-col h5 { margin: 0 0 14px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #6f82a6; font-weight: 700; }
.site-footer .sf-col a { display: block; text-decoration: none; color: #c2cfe6; font-size: 14px; font-weight: 500; padding: 5px 0; }
.site-footer .sf-col a:hover { color: #fff; }
.site-footer .sf-contact .ci { font-size: 14px; color: #c2cfe6; padding: 5px 0; }
.site-footer .sf-contact .ci a { color: #8fb4f0; text-decoration: none; }
.site-footer .sf-legal {
  max-width: 1180px; margin: 0 auto; padding: 18px clamp(20px, 5vw, 64px) 34px;
  border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer .sf-legal .c { font-size: 12.5px; color: #6f82a6; }
.site-footer .sf-legal .lk { display: flex; gap: 20px; }
.site-footer .sf-legal a { font-size: 12.5px; color: #8a9bbd; text-decoration: none; }
.site-footer .sf-legal a:hover { color: #fff; }

@media (max-width: 820px) {
  .site-footer .sf-inner { grid-template-columns: 1fr 1fr; }
  .site-footer .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer .sf-inner { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-viz { max-width: 480px; }
  .nav-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 0; background: transparent; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; cursor: pointer; flex: none; }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: #eaf0fb; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px clamp(20px,5vw,56px) 20px; background: #0a1d3d; border-bottom: 1px solid rgba(255,255,255,.1); box-shadow: 0 22px 44px -16px rgba(0,0,0,.55); }
  .nav.open .nav-menu { display: flex; }
  .nav-menu .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-menu .nav-links a { padding: 13px 6px; font-size: 16px; opacity: .92; border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav-menu .nav-links a.active { opacity: 1; color: #6fa3ef; }
  .nav-menu .nav-has-sub { display: block; }
  .nav-menu .nav-has-sub > a { border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav-menu .nav-caret { display: none; }
  .nav-menu .nav-sub { position: static; opacity: 1; visibility: visible; transform: none; display: flex; min-width: 0; padding: 2px 0 6px 16px; background: transparent; border: 0; box-shadow: none; }
  .nav-menu .nav-sub a { font-size: 14.5px; opacity: .78; padding: 11px 6px; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav-menu .btn-sm { margin-top: 14px; text-align: center; padding: 13px; font-size: 15px; }
  .cta-card { grid-template-columns: 1fr; }
}
