/* ============================================================
   INFOSECAI — shared site styles (v2 editorial refresh)
   ============================================================ */

:root {
  --canvas: #FAFAF7;
  --paper:  #F4F3EE;
  --stone:  #ECEAE2;
  --hairline: #DDD9CE;
  --rule:   #C9C3B3;

  --ink:    #0A1628;
  --navy:   #1B2A4A;
  --navy-900: #0E1A33;
  --navy-700: #2A3B5F;
  --navy-500: #50607F;
  --navy-300: #8A95AB;

  --teal:    #00D4B8;
  --teal-800:#00786A;
  --teal-700:#00A893;
  --teal-50: #E6FAF7;

  --graphite-700: #334155;
  --graphite-500: #64748B;
  --graphite-400: #94A3B8;

  --accent: var(--teal);
  --accent-deep: var(--teal-800);
  --accent-tint: var(--teal-50);

  --display: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sans:    'Inter',   -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;
}

html[data-accent="cobalt"] {
  --accent: #3258FF;
  --accent-deep: #1E3FBE;
  --accent-tint: #E8EDFF;
}
html[data-accent="amber"] {
  --accent: #E69500;
  --accent-deep: #9C5F00;
  --accent-tint: #FFF4DE;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--graphite-700);
  background: var(--canvas);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--navy-900); }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.container.tight { max-width: 1080px; }
.display { font-family: var(--display); letter-spacing: -0.028em; }
.mono    { font-family: var(--mono); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow.plain::before { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 4px;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(2px); }
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-outline { border-color: var(--rule); color: var(--navy-900); background: transparent; }
.btn-outline:hover { border-color: var(--navy-900); }
.btn-ghost { color: var(--navy-900); padding-left: 0; padding-right: 0; }
.btn-ghost::after {
  content: "";
  height: 1px;
  background: currentColor;
  flex: 0 0 32px;
  transition: flex-basis .2s ease;
  margin-left: 4px;
}
.btn-ghost:hover::after { flex-basis: 52px; }
.btn.lg { padding: 16px 26px; font-size: 14.5px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: rgba(255,255,255,.78);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  padding: 9px 0;
}
.topbar .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.topbar .left { display: flex; align-items: center; gap: 12px; }
.topbar .pulse {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.78); }
}
.topbar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(255,255,255,.4); }
.topbar a:hover { text-decoration-color: var(--accent); }
.topbar .right { color: rgba(255,255,255,.55); }
@media (max-width: 720px) { .topbar .right { display: none; } }

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0; z-index: 50;
  background: color-mix(in oklab, var(--canvas) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
header.site .inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.wordmark { height: 26px; width: auto; flex-shrink: 0; }
.wordmark .infosec { fill: var(--navy-900); }
.wordmark .ai { fill: var(--accent); }

nav.primary { display: flex; align-items: center; gap: 4px; }
nav.primary a.nav-link {
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy-700);
  border-radius: 4px;
  transition: color .15s, background .15s;
}
nav.primary a.nav-link:hover,
nav.primary a.nav-link.active {
  color: var(--navy-900);
  background: var(--stone);
}
nav.primary .divider { width: 1px; height: 22px; background: var(--hairline); margin: 0 8px; }

.nav-toggle { display: none; }
@media (max-width: 920px) {
  nav.primary { display: none; }
  .nav-toggle { display: inline-flex; padding: 8px; color: var(--navy-900); }
}

/* ---------- Section base ---------- */
section { position: relative; }
.pad { padding: 120px 0; }
@media (max-width: 760px) { .pad { padding: 80px 0; } }
.bg-canvas { background: var(--canvas); }
.bg-paper  { background: var(--paper); }
.bg-navy   { background: var(--navy-900); color: rgba(255,255,255,.86); }
.bg-navy h2, .bg-navy h3 { color: #fff; }

.section-head {
  max-width: 880px;
  margin-bottom: 64px;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--navy-900);
  margin-top: 18px;
  text-wrap: balance;
}
.section-head h2 em {
  font-style: normal;
  color: var(--accent-deep);
}
.bg-navy .section-head h2 { color: #fff; }
.bg-navy .section-head h2 em { color: var(--accent); }
.section-head p.lede {
  margin-top: 22px;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--graphite-700);
  max-width: 62ch;
  text-wrap: pretty;
}
.bg-navy .section-head p.lede { color: rgba(255,255,255,.7); }
.bg-navy .eyebrow { color: var(--accent); }

.section-head.split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 60px;
  align-items: end;
}
@media (max-width: 920px) { .section-head.split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Standards marquee strip ---------- */
.strip {
  background: var(--navy-900);
  color: rgba(255,255,255,.86);
  overflow: hidden;
  padding: 22px 0;
  border-bottom: 1px solid var(--navy-700);
}
.strip-row {
  display: flex;
  gap: 56px;
  align-items: center;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.strip-row span { display: inline-flex; align-items: center; gap: 14px; }
.strip-row span::after {
  content: "";
  width: 5px; height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
  margin-left: 14px;
}
.strip-row span:last-child::after { display: none; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.strip:hover .strip-row { animation-play-state: paused; }

/* ---------- Final CTA band ---------- */
.final-cta {
  background: var(--navy-900);
  color: #fff;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.05) 1px, transparent 1.5px);
  background-size: 36px 36px;
  opacity: .6;
  mask-image: radial-gradient(ellipse 60% 70% at 100% 50%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 100% 50%, #000 0%, transparent 70%);
}
.final-cta .container { position: relative; z-index: 1; }
.final-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 920px) { .final-cta-grid { grid-template-columns: 1fr; gap: 32px; } }
.final-cta h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 22px;
  text-wrap: balance;
}
.final-cta h2 em { font-style: normal; color: var(--accent); }
.final-cta p {
  font-size: 18px;
  color: rgba(255,255,255,.72);
  line-height: 1.55;
  max-width: 52ch;
}
.cta-actions { display: grid; gap: 14px; }
.cta-actions .btn { justify-content: space-between; padding: 22px 26px; }
.cta-actions .btn-primary {
  background: var(--accent);
  color: var(--navy-900);
}
.cta-actions .btn-primary:hover { background: #fff; color: var(--navy-900); }
.cta-actions .btn-outline {
  border-color: rgba(255,255,255,.2);
  color: #fff;
  background: transparent;
}
.cta-actions .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.04); }
.cta-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.5);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ---------- Footer ---------- */
footer.site {
  background: var(--navy-900);
  color: rgba(255,255,255,.6);
  padding: 80px 0 32px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
footer.site .wordmark { height: 22px; margin-bottom: 22px; }
footer.site .wordmark .infosec { fill: #fff; }
footer.site .intro {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,.6);
  max-width: 32ch;
}
footer.site h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,.5);
  margin-bottom: 18px;
  font-weight: 500;
}
footer.site nav a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.78);
  padding: 5px 0;
  transition: color .15s;
}
footer.site nav a:hover { color: var(--accent); }
.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-base a { color: rgba(255,255,255,.55); }
.footer-base a:hover { color: var(--accent); }
.footer-base .legal { display: flex; gap: 24px; flex-wrap: wrap; }

/* ---------- Reveal animation ---------- */
/* Only hide reveal targets when JS has confirmed it can drive them.
   Without .js on <html>, content shows immediately — never lost to a JS failure. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* Subtle stagger for adjacent siblings inside the same parent */
.phases > .phase[data-reveal]:nth-child(2) { transition-delay: .08s; }
.phases > .phase[data-reveal]:nth-child(3) { transition-delay: .16s; }
.phases > .phase[data-reveal]:nth-child(4) { transition-delay: .24s; }
.pillars > .pillar[data-reveal]:nth-child(2) { transition-delay: .08s; }
.pillars > .pillar[data-reveal]:nth-child(3) { transition-delay: .16s; }
.pillars > .pillar[data-reveal]:nth-child(4) { transition-delay: .24s; }
.fw-grid > .fw-panel[data-reveal]:nth-child(2) { transition-delay: .12s; }
.toolkit-cards > .toolkit-card[data-reveal]:nth-child(2) { transition-delay: .1s; }
.toolkit-cards > .toolkit-card[data-reveal]:nth-child(3) { transition-delay: .2s; }

/* Reveal staggered children inside a parent that has data-reveal */
.js .metrics-grid[data-reveal] .metric,
.js .why-grid[data-reveal] .why-card,
.js .thinking-grid[data-reveal] .think-card,
.js .sectors-table[data-reveal] .sector-row,
.js .hero-aside .agenda li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1);
}
.js .metrics-grid[data-reveal].in .metric,
.js .why-grid[data-reveal].in .why-card,
.js .thinking-grid[data-reveal].in .think-card,
.js .sectors-table[data-reveal].in .sector-row,
.js [data-reveal].in .hero-aside .agenda li,
.js .hero-grid[data-reveal].in .agenda li {
  opacity: 1; transform: none;
}
.metrics-grid .metric:nth-child(2) { transition-delay: .06s; }
.metrics-grid .metric:nth-child(3) { transition-delay: .12s; }
.metrics-grid .metric:nth-child(4) { transition-delay: .18s; }
.metrics-grid .metric:nth-child(5) { transition-delay: .24s; }
.why-grid .why-card:nth-child(2) { transition-delay: .06s; }
.why-grid .why-card:nth-child(3) { transition-delay: .12s; }
.why-grid .why-card:nth-child(4) { transition-delay: .18s; }
.why-grid .why-card:nth-child(5) { transition-delay: .24s; }
.why-grid .why-card:nth-child(6) { transition-delay: .3s; }
.thinking-grid .think-card:nth-child(2) { transition-delay: .1s; }
.thinking-grid .think-card:nth-child(3) { transition-delay: .2s; }
.sectors-table .sector-row:nth-child(2) { transition-delay: .05s; }
.sectors-table .sector-row:nth-child(3) { transition-delay: .1s; }
.sectors-table .sector-row:nth-child(4) { transition-delay: .15s; }
.sectors-table .sector-row:nth-child(5) { transition-delay: .2s; }
.sectors-table .sector-row:nth-child(6) { transition-delay: .25s; }
.sectors-table .sector-row:nth-child(7) { transition-delay: .3s; }
.sectors-table .sector-row:nth-child(8) { transition-delay: .35s; }
.hero-aside .agenda li:nth-child(1) { transition-delay: .35s; }
.hero-aside .agenda li:nth-child(2) { transition-delay: .45s; }
.hero-aside .agenda li:nth-child(3) { transition-delay: .55s; }
.hero-aside .agenda li:nth-child(4) { transition-delay: .65s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .metrics-grid[data-reveal] .metric,
  .why-grid[data-reveal] .why-card,
  .thinking-grid[data-reveal] .think-card,
  .sectors-table[data-reveal] .sector-row,
  .hero-aside .agenda li {
    opacity: 1; transform: none; transition: none;
  }
  .strip-row { animation: none; }
  .topbar .pulse { animation: none; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* ---------- Mobile drawer ---------- */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(90vw, 320px);
  background: var(--canvas);
  border-left: 1px solid var(--hairline);
  z-index: 100;
  transform: translateX(100%);
  transition: transform .25s ease;
  padding: 88px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  padding: 14px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy-900);
  border-bottom: 1px solid var(--hairline);
}
.mobile-drawer .btn { margin-top: 20px; justify-content: center; }
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(14,26,51,.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

/* ---------- Tweaks panel ---------- */
#tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 20px;
  width: 280px;
  box-shadow: 0 18px 40px -20px rgba(14,26,51,.25);
  font-size: 13px;
  display: none;
}
#tweaks-panel.open { display: block; }
#tweaks-panel h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--navy-500);
  margin-bottom: 12px;
  font-weight: 500;
}
#tweaks-panel .tk-section { margin-bottom: 18px; }
#tweaks-panel .swatches { display: flex; gap: 8px; }
#tweaks-panel .swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
#tweaks-panel .swatch:hover { transform: scale(1.1); }
#tweaks-panel .swatch.active { border-color: var(--navy-900); }
#tweaks-panel .dense-row { display: flex; gap: 8px; }
#tweaks-panel .dense-row button {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--navy-700);
  transition: all .15s;
}
#tweaks-panel .dense-row button.active {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}
#tweaks-panel .tk-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-500);
  border-radius: 4px;
}
#tweaks-panel .tk-close:hover { background: var(--stone); }
html[data-density="dense"] .pad { padding: 80px 0; }

/* ---------- Inner-page hero (used by services/toolkits/blog) ---------- */
.page-hero {
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, color-mix(in oklab, var(--navy-300) 35%, transparent) 1px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: .3;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--navy-900);
  margin: 22px 0 28px;
  text-wrap: balance;
  max-width: 22ch;
}
.page-hero h1 em {
  font-style: normal;
  color: var(--accent-deep);
}
.page-hero p.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--graphite-700);
  max-width: 60ch;
  margin-bottom: 32px;
  text-wrap: pretty;
}
.page-hero .meta-row {
  margin-top: 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-500);
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.page-hero .meta-row span strong {
  color: var(--accent-deep);
  font-weight: 500;
  margin-right: 6px;
}
@media (max-width: 760px) { .page-hero { padding: 56px 0 56px; } }
