/* =====================================================
   Clear InfoSec — Design System v2
   Confident, quiet, engineered. Verdigris teal accent.
   Red reserved for actual danger states only.
   Manrope + JetBrains Mono.
   ===================================================== */

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

:root {
  /* Ink & panels — slightly warmer than pure black */
  --ink:        #0d1214;
  --ink-2:      #10171a;
  --panel:      #151d20;
  --panel-2:    #1c2529;
  --panel-3:    #253034;

  /* Text */
  --text:       #eef2f2;
  --text-2:     #c4cccf;
  --dim:        #8a9599;
  --mute:       #566065;

  /* Rules & borders */
  --rule:       rgba(238,242,242,0.07);
  --rule-2:     rgba(238,242,242,0.13);
  --rule-3:     rgba(238,242,242,0.22);

  /* Accent — ClearGRC ecosystem green (shared identity thread) */
  --accent:     #3aaa35;              /* logo green */
  --accent-2:   #5cc84c;              /* lifted for text on dark ink (AA safe) */
  --accent-3:   #2e8c2a;              /* darker for pressed / borders */
  --accent-dim: rgba(58,170,53,0.10);
  --accent-line:rgba(58,170,53,0.34);
  --accent-glow:rgba(58,170,53,0.20);
  --accent-rgb: 58,170,53;
  /* Ecosystem tri-colour signature */
  --tri: linear-gradient(90deg, #d62027 0%, #f5b400 45%, #3aaa35 100%);

  /* Danger — reserved for real danger states (IR, breach, critical) */
  --danger:     #c04b3a;
  --danger-line:rgba(192,75,58,0.32);
  --danger-dim: rgba(192,75,58,0.08);

  /* Positive confirmation */
  --safe:       #4ea884;
  --amber:      #d19a3a;

  /* Legacy aliases so 33 inner pages keep working */
  --bg:         var(--ink);
  --bg-2:       var(--panel);
  --bg-3:       var(--panel-2);
  --cyan:       var(--accent);
  --cyan-dim:   var(--accent-dim);
  --red:        var(--danger);
  --text-muted: var(--mute);
  --text-dim:   var(--dim);
  --border:     var(--rule);
  --border-cyan:var(--accent-line);

  --radius:     4px;
  --radius-lg:  6px;
  --font:       'Manrope', system-ui, sans-serif;
  --font-head:  'Manrope', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'Consolas', monospace;
  --transition: 200ms cubic-bezier(.2,.7,.2,1);
  --shadow-lg:  0 24px 60px rgba(0,0,0,0.55);
}

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

body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-feature-settings: 'ss01' on;
}

/* Very subtle background — no in-your-face grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(58,170,53,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 100%, rgba(58,170,53,0.03) 0%, transparent 60%);
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

main { flex: 1; padding-top: 68px; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -0.038em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2.3vw, 1.5rem); font-weight: 700; letter-spacing: -0.018em; }
h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.012em; }

p  { color: var(--text-2); line-height: 1.7; }

a  { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); opacity: 1; }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent); color: #fff; }

/* ---- Layout ---- */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: 80px 0; }

/* Section label — small, quiet, sparing use */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 20px;
}
.section-label::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.section-header { margin-bottom: 64px; }
.section-header h2 { margin-bottom: 20px; max-width: 720px; }
.section-header p { max-width: 640px; font-size: 1.05rem; color: var(--dim); }
.section-header.centered { text-align: center; }
.section-header.centered h2,
.section-header.centered p { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  padding: 14px 24px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(58,170,53,0.28);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-3);
}
.btn-outline:hover {
  background: transparent;
  color: var(--accent-2);
  border-color: var(--accent);
  opacity: 1;
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--rule-2);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--rule-3);
  opacity: 1;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #d05b4a; border-color: #d05b4a; color: #fff; opacity: 1; }
.btn-sm { padding: 10px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 28px; font-size: 0.95rem; }

.btn .arrow, .btn svg { transition: transform var(--transition); }
.btn:hover .arrow, .btn:hover svg { transform: translateX(3px); }

/* ---- Cards ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
  position: relative;
}
.card:hover {
  border-color: var(--rule-2);
  background: var(--panel-2);
  transform: translateY(-2px);
}

.service-icon {
  width: 44px;
  height: 44px;
  background: var(--panel-2);
  border: 1px solid var(--rule-2);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

/* ---- Hero (generic) ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
  background: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(238,242,242,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238,242,242,0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  padding: 96px 0 64px;
  background: var(--ink);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 240px;
  height: 1px;
  background: var(--accent);
}
.page-hero h1 { margin-top: 12px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--dim); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent-2); opacity: 1; }
.breadcrumb span { color: var(--mute); }
.breadcrumb svg { opacity: 0.5; }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  margin-bottom: 24px;
}
.badge svg { color: var(--accent); }

/* ---- Stats ---- */
.stats-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.stat-number {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--dim);
  margin-top: 8px;
}

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

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
}

.divider { height: 1px; background: var(--rule); margin: 0; }

/* ---- Tags ---- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag {
  background: var(--panel-2);
  border: 1px solid var(--rule);
  color: var(--dim);
  border-radius: 2px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* ---- CTA section (generic) ---- */
.cta-section {
  background: var(--ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
  padding: 96px 0;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: var(--accent);
}
.cta-section h2 { margin-bottom: 20px; }
.cta-section p { margin-bottom: 40px; font-size: 1.05rem; color: var(--dim); }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Checklist ---- */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  color: var(--text-2);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--rule);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--accent);
  margin-top: 9px;
  border-radius: 1px;
}

/* ---- Utilities ---- */
.text-cyan  { color: var(--accent); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--mute); }
.text-dim   { color: var(--dim); }
.fw-700 { font-weight: 700; }
.mono   { font-family: var(--font-mono); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }

.meta-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.meta-line .sep { color: var(--mute); }
