/* ZTeasy — shared design system */

:root {
  --navy-900: #0a1f3d;
  --navy-800: #0f2a52;
  --navy-700: #16386b;
  --blue-600: #2f6feb;
  --blue-500: #4c85f5;
  --blue-100: #e8f0fe;
  --blue-50: #f4f8ff;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #e3e8f0;
  --text: #1c2a3a;
  --text-muted: #5b6b82;
  --text-faint: #8695a8;
  --success: #16915a;
  --success-bg: #e7f7ef;
  --danger: #d1392b;
  --danger-bg: #fdecea;
  --violet: #6d4fd1;
  --violet-bg: #f1ecfd;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 60, 0.06);
  --shadow: 0 8px 24px rgba(15, 30, 60, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 30, 60, 0.14);
  --max-width: 1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, Menlo, monospace;
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-muted); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--blue-100);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: 0 6px 16px rgba(47, 111, 235, 0.3); }
.btn-primary:hover { background: #2559c9; }
.btn-secondary { background: var(--surface); color: var(--navy-900); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--blue-600); color: var(--blue-600); }
.btn-ghost { background: transparent; color: var(--navy-900); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy-900);
}
.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy-900); border-color: var(--blue-600); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.nav-github:hover { color: var(--navy-900); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--border);
}
.nav-mobile a { padding: 10px 0; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: none; }
body.nav-open .nav-mobile { display: flex; }

/* Hero */
.hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -160px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(47,111,235,0.16), transparent 70%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 0.85rem; color: var(--text-faint); }

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.stat-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--blue-500);
}
.stat-card:hover .stat-source { color: var(--blue-600); }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--navy-900); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.stat-source { font-size: 0.74rem; color: var(--text-faint); margin-top: 2px; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-navy { background: var(--navy-900); color: #fff; }
.section-navy p { color: rgba(255,255,255,0.72); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin: 0 0 48px; text-align: left; }

/* Chain-of-trust diagram */
.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}
.chain-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.section-navy .chain-step { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); color: #fff; }
.chain-arrow { color: var(--blue-500); font-weight: 700; font-size: 1.1rem; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* Quote / positioning banner */
.positioning {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
}
.positioning blockquote {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 700;
  margin: 0 0 14px;
  color: #fff;
}
.positioning cite {
  font-style: normal;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* Code / YAML panel */
.code-panel {
  background: var(--navy-900);
  border-radius: var(--radius);
  padding: 24px 28px;
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.code-panel pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: #d7e3fb;
  line-height: 1.7;
}
.code-panel .tok-key { color: #7fb2ff; }
.code-panel .tok-str { color: #9be3a8; }
.code-panel .tok-com { color: #6f83a3; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.72); max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .hero-actions { justify-content: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 10px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.92rem; color: var(--text-muted); margin-bottom: 10px; }
.footer-col a:hover { color: var(--blue-600); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* Page hero (secondary pages) */
.page-hero { padding: 64px 0 48px; }
.page-hero .eyebrow { margin-bottom: 18px; }
.breadcrumb { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--blue-600); }

/* Product page pillars */
.pillar {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.pillar:last-child { border-bottom: none; }
.pillar-num {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.pillar h3 { margin-bottom: 6px; }
.pillar-meta {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-600);
  background: var(--blue-100);
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 8px;
}

/* Threat research: sidebar + content layout */
.research-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.research-content { min-width: 0; }
.research-block {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}
.sidebar-sticky {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
}
.sidebar-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 14px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.sidebar-nav a:hover, .sidebar-nav a.active { color: var(--blue-600); background: var(--blue-50); border-left-color: var(--blue-600); }
.sidebar-nav a.cat2:hover, .sidebar-nav a.cat2.active { color: var(--violet); background: var(--violet-bg); border-left-color: var(--violet); }
.sidebar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-600);
  font-weight: 700;
  margin: 18px 0 6px;
  padding: 0 12px;
}
.sidebar-label:first-child { margin-top: 0; }
.sidebar-label.cat2 { color: var(--violet); }
.sidebar-divider { height: 1px; background: var(--border); margin: 14px 8px; }

@media (max-width: 900px) {
  .research-layout { grid-template-columns: 1fr; }
  .research-sidebar {
    position: sticky;
    top: 65px;
    z-index: 40;
    background: rgba(247, 249, 252, 0.94);
    backdrop-filter: blur(6px);
    margin: 0 -24px 24px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-sticky { position: static; max-height: none; }
  .sidebar-title { display: none; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 2px; }
  .sidebar-nav a { flex-shrink: 0; white-space: nowrap; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; }
  .sidebar-nav a:hover, .sidebar-nav a.active { border-color: var(--blue-600); }
  .sidebar-nav a.cat2:hover, .sidebar-nav a.cat2.active { border-color: var(--violet); }
  .sidebar-label, .sidebar-divider { display: none; }
}

/* Category badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-cat1 { background: var(--blue-100); color: var(--blue-600); }
.badge-cat2 { background: var(--violet-bg); color: var(--violet); }

/* Incident cards */
.incident-intro { max-width: 760px; margin: 0 0 40px; }
.incident-category { margin-bottom: 64px; }
.incident-category-head { margin-bottom: 28px; }
.incident {
  scroll-margin-top: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.incident-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.incident-head h3 { margin-bottom: 4px; }
.incident-date { font-size: 0.85rem; color: var(--text-faint); font-weight: 600; }
.incident-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 20px;
}
.incident-field h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 8px;
  font-weight: 700;
}
.incident-field p { font-size: 0.92rem; margin-bottom: 0; }
.incident-solution {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.incident-category .incident.cat2 .incident-solution {
  background: var(--violet-bg);
  border-color: rgba(109,79,209,0.25);
  border-left-color: var(--violet);
}
.incident-solution h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-600); margin-bottom: 6px; font-weight: 700; }
.incident-category .incident.cat2 .incident-solution h4 { color: var(--violet); }
.incident-solution p { margin-bottom: 0; font-size: 0.94rem; color: var(--text); }
.incident-sources { font-size: 0.82rem; color: var(--text-faint); }
.incident-sources a { color: var(--blue-600); word-break: break-word; }
.incident-sources a:hover { text-decoration: underline; }
.incident-sources ul { margin: 6px 0 0; padding-left: 18px; }
.incident-sources li { margin-bottom: 4px; }

/* Findings list */
.findings { counter-reset: finding; }
.finding {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.finding:last-child { border-bottom: none; }
.finding-num {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}

/* Policy example table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.policy-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.92rem; }
table.policy-table th, table.policy-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.policy-table th { background: var(--blue-50); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
table.policy-table tr:last-child td { border-bottom: none; }
.tag-allow { color: var(--success); background: var(--success-bg); padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; display: inline-block; }
.tag-deny { color: var(--danger); background: var(--danger-bg); padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; display: inline-block; }

.disclaimer {
  margin-top: 40px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.disclaimer strong { color: var(--text); }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(47,111,235,0.14);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.8rem; color: var(--text-faint); margin-top: -8px; }
.form-success {
  display: none;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(22,145,90,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-weight: 600;
  margin-bottom: 20px;
}
.form-success.show { display: block; }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 26px; }
.contact-info-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
}
.contact-info-item h4 { margin-bottom: 4px; font-size: 0.98rem; }
.contact-info-item p { margin-bottom: 0; font-size: 0.92rem; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-github { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .incident-body { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .pillar { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 22px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
}
