/* ==========================================================================
   Kestre Cyber — design system
   ========================================================================== */

:root {
  --bg: #0A0A0C;
  --bg-deep: #060608;
  --bg-alt: #0F0F12;
  --card: #141417;
  --card-deep: #101013;
  --line: rgba(161, 161, 170, .16);
  --line-deep: rgba(161, 161, 170, .14);
  --ink: #F4F4F5;
  --ink-soft: #B9B9C0;
  --ink-faint: #6E6E76;
  --silver: #A1A1AA;
  --red: #E42535;
  --red-hot: #FF3B4A;
  --red-deep: #8F1622;
  --white: #FFFFFF;
  --black: #0A0A0C;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 20px 48px rgba(0,0,0,.6);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Montserrat', sans-serif;

  --container: 1140px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
}

/* Light theme override (toggled via [data-theme="light"] on <html>) */
:root[data-theme="light"] {
  --bg: #F7F7F8;
  --bg-deep: #FFFFFF;
  --bg-alt: #EFEFF1;
  --card: #FFFFFF;
  --card-deep: #F2F2F4;
  --line: rgba(20, 20, 23, .10);
  --line-deep: rgba(20, 20, 23, .08);
  --ink: #101013;
  --ink-soft: #45454C;
  --ink-faint: #7A7A82;
  --silver: #5B5B63;
  --shadow: 0 1px 2px rgba(20,20,23,.06), 0 8px 24px rgba(20,20,23,.06);
  --shadow-lg: 0 2px 4px rgba(20,20,23,.06), 0 20px 48px rgba(20,20,23,.10);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--white);
  letter-spacing: -.01em;
}
:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3,
:root[data-theme="light"] h4 { color: var(--ink); }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

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

.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line-deep);
}
.section:last-of-type { border-bottom: none; }

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); }
.section-head p { font-size: 17px; margin-bottom: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(228,37,53,.35);
}
.btn-primary:hover { background: var(--red-hot); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--silver); }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line-deep);
}
/* Note: intentionally no backdrop-filter here — it makes this element a
   containing block for fixed-position descendants (the mobile nav panel
   below), which breaks its full-viewport positioning on small screens. */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  color: var(--white);
}
:root[data-theme="light"] .logo { color: var(--ink); }
.logo .mark {
  width: 26px; height: 26px;
  color: var(--red);
  flex-shrink: 0;
}
.logo .accent { color: var(--red); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: nowrap;
}
.primary-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color .15s ease;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--white); }
:root[data-theme="light"] .primary-nav a:hover,
:root[data-theme="light"] .primary-nav a[aria-current="page"] { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.theme-toggle svg { width: 16px; height: 16px; }
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  align-items: center; justify-content: center;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(228,37,53,.14), transparent 45%),
    var(--bg);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--red); }
.hero .lede { font-size: 18px; max-width: 52ch; }
.hero .rule {
  width: 32px; height: 2px; background: var(--red);
  display: inline-block; margin-right: 10px; vertical-align: middle;
}
.hero-ctas { display: flex; gap: 14px; margin: 30px 0 26px; flex-wrap: wrap; }
.hero-checks { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-checks span {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-soft); font-weight: 600;
}
.hero-checks svg { width: 16px; height: 16px; color: var(--red); flex-shrink: 0; }

/* ---------- console mock ---------- */
.console {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-deep);
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-faint);
}
.console-dots { display: flex; gap: 6px; }
.console-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.console-dots span:first-child { background: var(--red); }
.console-body { padding: 22px; }
.gauge-row { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.gauge {
  --pct: 87;
  width: 92px; height: 92px; border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--pct) * 1%), var(--line-deep) 0);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gauge::before {
  content: "";
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--card);
  position: absolute;
}
.gauge-label {
  position: relative;
  text-align: center;
  font-family: var(--font-head);
}
.gauge-label .pct { font-size: 22px; font-weight: 800; color: var(--white); display: block; }
.gauge-label .cap { font-size: 9.5px; letter-spacing: .1em; color: var(--ink-faint); }
:root[data-theme="light"] .gauge-label .pct { color: var(--ink); }

.status-list { display: flex; flex-direction: column; gap: 10px; }
.status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--card-deep);
  border: 1px solid var(--line-deep);
  border-radius: 10px;
}
.status-row .label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.status-row .label span { color: var(--ink-faint); font-weight: 400; font-size: 12px; }
.pill {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 100px;
}
.pill-ready { background: rgba(228,37,53,.14); color: var(--red-hot); }
.pill-progress { background: rgba(230,180,60,.14); color: #E6B43C; }
.pill-action { background: rgba(228,37,53,.85); color: #fff; }
.console-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--line-deep);
  font-family: 'Courier New', monospace;
  font-size: 10.5px;
  color: var(--ink-faint);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  display: inline-block; margin-right: 6px;
  box-shadow: 0 0 0 rgba(228,37,53,.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(228,37,53,.5); }
  70% { box-shadow: 0 0 0 8px rgba(228,37,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(228,37,53,0); }
}

/* ---------- logo strip ---------- */
.logo-strip {
  padding: 44px 0;
  border-bottom: 1px solid var(--line-deep);
}
.logo-strip .container { text-align: center; }
.logo-strip .strip-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 22px;
}
.logo-strip .tickers {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
}
.logo-strip .ticker {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: var(--silver);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 16px;
}

/* ---------- cards / grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--silver); transform: translateY(-2px); }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 14.5px; margin-bottom: 0; }
.card .eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--red); text-transform: uppercase; margin-bottom: 12px; display: block;
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; color: var(--red);
  margin-top: 16px;
}

/* ---------- stats ---------- */
.stats-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.stats-caption {
  font-family: 'Courier New', monospace;
  font-size: 11px; letter-spacing: .08em; color: var(--ink-faint);
  margin-bottom: 22px; text-transform: uppercase;
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 36px; }
.stat-row:last-child { margin-bottom: 0; }
.stat { text-align: left; }
.stat .num {
  font-family: var(--font-head); font-weight: 800; font-size: 34px;
  color: var(--white);
  display: block;
}
:root[data-theme="light"] .stat .num { color: var(--ink); }
.stat .num.red { color: var(--red-hot); }
.stat .cap { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- why-us ---------- */
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature h3 {
  font-size: 17px;
  display: flex; align-items: center; gap: 10px;
}
.feature h3::before {
  content: "";
  width: 8px; height: 8px; background: var(--red); border-radius: 2px; flex-shrink: 0;
}
.feature p { font-size: 14.5px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--bg-deep);
  padding: 72px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 14px; max-width: 34ch; }
.footer-col h4 {
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14.5px; color: var(--ink-soft); }
.footer-col a:hover { color: var(--white); }
:root[data-theme="light"] .footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line-deep);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: var(--ink-faint);
}
.footer-bottom .tag { font-family: 'Courier New', monospace; letter-spacing: .06em; }

/* ---------- inner page hero ---------- */
.page-hero {
  padding: 72px 0 56px;
  background: radial-gradient(circle at 85% 0%, rgba(228,37,53,.12), transparent 45%), var(--bg);
  border-bottom: 1px solid var(--line-deep);
}
.page-hero .section-head { margin-bottom: 0; max-width: 720px; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 72px 0;
}
.cta-band h2 { font-size: clamp(26px, 3vw, 34px); }
.cta-band p { max-width: 52ch; margin-left: auto; margin-right: auto; font-size: 16px; }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- framework cards w/ tags ---------- */
.fw-card .eyebrow { color: var(--ink-faint); }

/* ---------- process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; padding-left: 0; }
.step .num {
  font-family: var(--font-head); font-weight: 800; font-size: 30px;
  color: var(--red); margin-bottom: 12px; display: block;
}

.cert-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 44px;
}
.cert-chip {
  border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial blockquote {
  margin: 0 0 18px; font-size: 15.5px; color: var(--ink); font-style: italic;
}
.testimonial cite { font-style: normal; font-size: 13px; color: var(--ink-faint); display: block; }
.testimonial cite b { color: var(--ink-soft); display: block; font-size: 14px; margin-bottom: 2px;}

/* ---------- contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-info .info-row {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 22px;
}
.contact-info .info-row svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; margin-top: 2px; }
.contact-info .info-row a, .contact-info .info-row span { font-size: 15.5px; color: var(--ink); font-weight: 600; }
.contact-info .info-row .label { display: block; font-size: 12.5px; color: var(--ink-faint); font-weight: 500; margin-bottom: 2px; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--card-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
}
.form-note { font-size: 13px; color: var(--ink-faint); margin-top: 14px; text-align: center; }

/* ---------- resources ---------- */
.resource-card .eyebrow { display: flex; gap: 8px; align-items: center; }

/* ---------- legal ---------- */
.legal-body h2 { font-size: 20px; margin-top: 40px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { font-size: 15px; max-width: 70ch; }
.legal-updated { font-size: 13px; color: var(--ink-faint); margin-top: 40px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .primary-nav { position: fixed; inset: 76px 0 0 0; z-index: 99; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 22px; border-top: 1px solid var(--line-deep); display: none; }
  .primary-nav.open { display: flex; }
  .primary-nav a { font-size: 17px; }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary.desktop-only { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .post-grid { grid-template-columns: 1fr; }
}

/* ---------- blog ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.post-card { display: flex; flex-direction: column; }
.post-card .post-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 14px;
}
.post-card .post-meta .cat { color: var(--red); }
.post-card h3 { font-size: 20px; margin-bottom: 10px; }
.post-card p { font-size: 14.5px; flex: 1; }
.post-card.placeholder {
  align-items: center; justify-content: center; text-align: center;
  border-style: dashed;
  color: var(--ink-faint);
}
.post-card.placeholder h3 { color: var(--ink-faint); font-size: 17px; }

/* single post article */
.post-hero .post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 18px;
}
.post-hero .post-meta .cat { color: var(--red); }
.post-hero h1 { font-size: clamp(28px, 4vw, 42px); max-width: 22ch; }
.post-hero .dek { font-size: 17.5px; max-width: 62ch; }
.post-hero .byline { font-size: 13.5px; color: var(--ink-faint); margin-top: 20px; }

.article {
  max-width: 720px;
  margin: 0 auto;
}
.article h2 { font-size: 24px; margin-top: 44px; }
.article h3 { font-size: 19px; margin-top: 32px; color: var(--white); }
.article p { font-size: 16px; color: var(--ink-soft); }
.article ul, .article ol { color: var(--ink-soft); font-size: 16px; padding-left: 22px; margin-bottom: 1em; }
.article li { margin-bottom: .5em; }
.article blockquote {
  margin: 28px 0; padding: 18px 24px;
  border-left: 3px solid var(--red);
  background: var(--card);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  font-size: 16.5px;
}
.article strong { color: var(--ink); }
.article hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--red); font-size: 14px; }

/* template-only banner (shown in the copy-paste starter file) */
.template-banner {
  background: rgba(228,37,53,.1);
  border: 1px dashed var(--red);
  color: var(--ink);
  border-radius: 10px;
  padding: 18px 22px;
  font-size: 14px;
  margin-bottom: 36px;
}
.template-banner b { color: var(--red-hot); }
