/* ============================================================
   AI Infra Dao — Main Stylesheet
   ============================================================ */

:root {
  --bg:          #ffffff;
  --bg-alt:      #f5f5f7;
  --bg-card:     #ffffff;
  --bg-hover:    #f0f0f2;
  --border:      #e0e0e2;
  --border-hi:   #d0d0d2;
  --text:        #000000;
  --text-2:      #444444;
  --text-3:      #666666;
  --accent:      #7c82f0;
  --accent-hi:   #5a60d0;
  --accent-bg:   rgba(124, 130, 240, 0.08);

  /* Pressure type colours */
  --c-resource:   #d97706;
  --c-efficiency: #059669;
  --c-replacement:#dc2626;
  --c-governance: #2563eb;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r:   8px;
  --r-lg:12px;
  --max: 1060px;
  --ease: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ─────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--ease);
  position: relative;
  padding-bottom: 2px;
}
.nav-link.active {
  color: var(--text);
  font-weight: 600;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--ease);
  transform-origin: left;
}
.nav-link:hover,
.nav-link.active { color: var(--text); text-decoration: none; }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 28px 100px;
  position: relative;
  overflow: hidden;
}
/* Subtle grid */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.35;
  pointer-events: none;
}
/* Vignette - lighter for white background */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 65% 65% at 50% 50%, transparent 0%, var(--bg) 85%);
  pointer-events: none;
}
.hero-body {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-eyebrow {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(34px, 6.5vw, 62px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-desc {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto;
}
.hero-scroll {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-bar {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse-scroll 2.2s ease-in-out infinite;
}
@keyframes pulse-scroll {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.9; }
}

/* ── Generic section ────────────────────────────────────────── */

.section { padding: 96px 28px; }
.section-alt { background: var(--bg-alt); }
.section-wrap { max-width: var(--max); margin: 0 auto; }
.section-head { margin-bottom: 52px; }
.section-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 14px;
}
.section-desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 620px;
}

/* ── Signal cards ───────────────────────────────────────────── */

.signal-list { display: grid; gap: 14px; }

.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--ease), background var(--ease);
}
/* Coloured left stripe */
.signal-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}
.signal-card.resource::before    { background: var(--c-resource); }
.signal-card.efficiency::before  { background: var(--c-efficiency); }
.signal-card.replacement::before { background: var(--c-replacement); }
.signal-card.governance::before  { background: var(--c-governance); }
.signal-card:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.pressure-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 20px;
}
.signal-card.resource   .pressure-badge { background: rgba(217,119,6,0.12); color: var(--c-resource); }
.signal-card.efficiency .pressure-badge { background: rgba(5,150,105,0.12); color: var(--c-efficiency); }
.signal-card.replacement .pressure-badge { background: rgba(220,38,38,0.12); color: var(--c-replacement); }
.signal-card.governance .pressure-badge { background: rgba(37,99,235,0.12); color: var(--c-governance); }

.card-date  { font-size: 13px; color: var(--text-3); }
.card-phase { font-size: 12px; color: var(--text-3); margin-left: auto; font-style: italic; }

.card-title {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.card-body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 14px;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.card-tag {
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 9px;
}

/* ── System section ─────────────────────────────────────────── */

.system-body { display: grid; gap: 44px; }

.phase-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 38px 40px;
}
.phase-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.phase-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.phase-summary {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: 28px;
}
.tensions-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.tensions-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tensions-list li {
  font-size: 14px;
  color: var(--text-2);
  padding-left: 22px;
  position: relative;
  line-height: 1.6;
}
.tensions-list li::before {
  content: '↔';
  position: absolute; left: 0;
  color: var(--accent);
  font-size: 13px;
}

.articles-list { display: grid; gap: 16px; }

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  transition: border-color var(--ease);
}
.article-card:hover { border-color: var(--border-hi); }
.article-date { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.article-title {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
}
.article-summary { font-size: 14px; color: var(--text-2); line-height: 1.75; }
.article-content {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}
.article-paragraph {
  margin-bottom: 16px;
  line-height: 1.8;
}
.article-paragraph:last-child {
  margin-bottom: 0;
}
.article-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.article-image {
  width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--border);
}

/* ── About section ──────────────────────────────────────────── */

.about-body { max-width: 720px; }
.about-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 6px;
}
.about-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.about-tagline {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 28px;
}
.about-hr { height: 1px; background: var(--border); margin: 28px 0; }
.about-bio {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 20px;
}
.about-quote {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.85;
  padding: 20px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  margin-bottom: 30px;
}
.focus-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.focus-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.focus-list li {
  font-size: 16px;
  color: var(--text-2);
  padding-left: 22px;
  position: relative;
  line-height: 1.7;
}
.focus-list li::before {
  content: '›';
  position: absolute; left: 0;
  color: var(--accent);
  font-size: 17px;
  line-height: 1.5;
}
.about-contact {
  font-size: 14px;
  color: var(--text-3);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* Contact section */
.contact-section {
  padding-top: 8px;
}
.contact-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.contact-text {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 560px;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 18px;
  background: var(--accent-bg);
  border-radius: var(--r);
  transition: background var(--ease), color var(--ease);
}
.contact-email:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* Homepage Contact Section */
.contact-section-home {
  background: var(--bg-alt);
  padding: 72px 28px;
  text-align: center;
}
.contact-home-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.contact-home-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.contact-home-text {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.contact-home-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.contact-home-email:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}

/* Substack section */
.substack-section {
  margin-top: 28px;
}
.substack-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--text-3);
  font-size: 14px;
}
.substack-divider::before,
.substack-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.substack-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.substack-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  text-decoration: none;
}
.substack-icon {
  font-size: 18px;
}

/* ── Footer ─────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 28px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 13px; color: var(--text-3); }
.footer-admin {
  font-size: 12px;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 14px;
  transition: color var(--ease), border-color var(--ease);
}
.footer-admin:hover {
  color: var(--text-2);
  border-color: var(--border-hi);
  text-decoration: none;
}

/* ── Hero nav cards (homepage) ──────────────────────────────── */

.hero-nav-cards {
  display: flex;
  gap: 16px;
  margin-top: 44px;
  flex-wrap: nowrap;
  justify-content: center;
}
.hero-nav-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  min-width: 180px;
  max-width: 280px;
  flex: 1;
  text-decoration: none;
  transition: border-color var(--ease), background var(--ease);
  position: relative;
}
.hero-nav-card:hover { border-color: var(--border-hi); background: var(--bg-hover); text-decoration: none; }
.hero-nav-card-accent { border-color: rgba(124,130,240,0.3); }
.hero-nav-card-accent:hover { border-color: var(--accent); }
.hero-nav-card-label {
  font-size: 18px;
  font-weight: 620;
  color: var(--text);
  margin-bottom: 6px;
}
.hero-nav-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
}
.hero-nav-card-arrow {
  font-size: 26px;
  color: var(--accent);
  margin-top: 14px;
  transition: transform var(--ease);
}
.hero-nav-card:hover .hero-nav-card-arrow { transform: translateX(4px); }

/* ── Page hero (sub-pages) ───────────────────────────────────── */

.page-hero {
  padding: 80px 28px 72px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.2;
  pointer-events: none;
}
.page-hero-title {
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 720;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 18px;
  position: relative;
}
.page-hero-desc {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 600px;
  position: relative;
}
.page-hero-product .page-hero-title { max-width: 700px; }

/* ── Buttons ─────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--r);
  text-decoration: none;
  transition: background var(--ease), opacity var(--ease);
}
.btn-primary:hover { background: var(--accent-hi); text-decoration: none; opacity: 0.85; color: #fff; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.btn-secondary:hover { border-color: var(--text-3); color: var(--text); background: var(--bg-hover); text-decoration: none; }

.product-cta-row {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
  position: relative;
}

/* ── Feature grid (product page) ─────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: border-color var(--ease);
}
.feature-card:hover { border-color: var(--border-hi); }
.feature-icon { font-size: 22px; margin-bottom: 14px; }
.feature-title {
  font-size: 15px;
  font-weight: 620;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-body { font-size: 13px; color: var(--text-2); line-height: 1.75; }

/* ── Method steps ────────────────────────────────────────────── */

.method-steps { display: grid; gap: 2px; }
.method-step {
  display: flex;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.method-step:last-child { border-bottom: none; }
.step-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: -0.04em;
  min-width: 44px;
  padding-top: 2px;
}
.step-title {
  font-size: 17px;
  font-weight: 620;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.step-body { font-size: 14px; color: var(--text-2); line-height: 1.8; }

/* ── Demo CTA block ──────────────────────────────────────────── */

.demo-cta-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.demo-preview-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.demo-preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.demo-preview-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.demo-preview-dot.red    { background: #ef4444; }
.demo-preview-dot.yellow { background: #f59e0b; }
.demo-preview-dot.green  { background: #10b981; }
.demo-preview-title {
  font-size: 11px;
  color: var(--text-3);
  margin-left: 6px;
  font-family: var(--font);
}
.demo-preview-body { padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.trace-line { font-size: 11px; line-height: 1.55; padding: 2px 0; }
.trace-user   { color: var(--text-2); }
.trace-agent  { color: var(--accent-hi); }
.trace-tool   { color: #f59e0b; }
.trace-warn   { color: #f59e0b; font-weight: 600; }
.trace-fail   { color: #ef4444; font-weight: 600; }

/* ── Demo page — trace steps ─────────────────────────────────── */

.trace-steps { display: grid; gap: 24px; }
.trace-step {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 28px;
}
.trace-step-danger { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); }
.trace-step-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-3);
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.trace-step-num.danger { border-color: rgba(239,68,68,0.4); color: #ef4444; }
.trace-step-title {
  font-size: 15px;
  font-weight: 620;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.trace-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tc-role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 4px;
}
.tc-role.user  { background: rgba(124,130,240,0.12); color: var(--accent-hi); }
.tc-role.agent { background: rgba(16,185,129,0.12);  color: #10b981; }
.tc-role.tool  { background: rgba(245,158,11,0.12);  color: #f59e0b; }
.tc-text { color: var(--text-2); font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.tc-inject { color: #ef4444; }
.trace-step-note { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.trace-step-note.danger-note { color: #ef4444; }

/* ── Scenario grid ───────────────────────────────────────────── */

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
}
.scenario-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.scenario-value { font-size: 14px; color: var(--text); line-height: 1.5; }
.severity-critical { color: #ef4444; font-weight: 600; }

/* ── Mitigation grid ─────────────────────────────────────────── */

.mitigation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.mitigation-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 24px;
}
.mitigation-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.mitigation-label.root-cause { color: #ef4444; }
.mitigation-title {
  font-size: 15px;
  font-weight: 620;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.mitigation-body { font-size: 13px; color: var(--text-2); line-height: 1.75; }

/* ── Whiteboard cards ─────────────────────────────────────────── */

.whiteboard-list { display: grid; gap: 16px; }

.whiteboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  transition: border-color var(--ease), background var(--ease);
}
.whiteboard-card:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.whiteboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.whiteboard-card-title {
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}
.whiteboard-card-org {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.whiteboard-card-link {
  margin-bottom: 14px;
}
.whiteboard-card-link a {
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
}
.whiteboard-card-link a:hover { color: var(--accent-hi); }
.whiteboard-card-desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
}
.whiteboard-card-contribution {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.whiteboard-card-contact {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.whiteboard-card-contact .contact-label {
  margin-bottom: 0;
  white-space: nowrap;
}
.whiteboard-card-contact .contact-email-link {
  word-break: break-all;
}
.contact-email-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.contact-email-link:hover {
  color: var(--accent-hi);
  text-decoration: underline;
}
.whiteboard-paragraph {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin: 12px 0;
}
.whiteboard-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.whiteboard-image {
  width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--border);
}
.contribution-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contribution-value {
  font-size: 13px;
  color: var(--text);
  background: var(--accent-bg);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ── Share links ─────────────────────────────────────────────── */

.share-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.share-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.share-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hi);
  text-decoration: none;
}
.share-btn.twitter:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}
.share-btn.linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}
.share-btn.telegram:hover {
  background: #24a1de;
  border-color: #24a1de;
  color: #fff;
}

/* ── Inline images (pasted directly into content) ───────────── */
.inline-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--border);
  display: block;
  margin: 12px 0;
}

/* ── Footer legal links ─────────────────────────────────────── */

.footer-legal {
  display: flex;
  gap: 20px;
}
.footer-legal a {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--ease);
}
.footer-legal a:hover {
  color: var(--text-2);
  text-decoration: underline;
}

/* ── Legal pages ────────────────────────────────────────────── */

.legal-wrap {
  max-width: 720px;
}
.legal-content {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.85;
}
.legal-content p {
  margin-bottom: 20px;
}
.legal-content p:last-child {
  margin-bottom: 0;
}

/* ── Utility ─────────────────────────────────────────────────── */

.empty { text-align: center; padding: 56px 20px; color: var(--text-3); font-size: 14px; }

@media (max-width: 768px) {
  .demo-cta-block { grid-template-columns: 1fr; }
  .demo-cta-preview { display: none; }
  .method-step { flex-direction: column; gap: 10px; }
  .step-num { font-size: 20px; }
}

@media (max-width: 600px) {
  .nav-links { gap: 14px; }
  .hero { padding: 60px 20px 80px; }
  .page-hero { padding: 56px 20px 48px; }
  .section { padding: 72px 20px; }
  .phase-block { padding: 26px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero-nav-cards { flex-wrap: wrap; flex-direction: column; align-items: stretch; }
  .hero-nav-card { max-width: 100%; }
  .trace-step { flex-direction: column; gap: 12px; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Dropdown navigation ────────────────────────────────────── */

.nav-dropdown {
  position: relative;
}
.nav-dropdown > .nav-link::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.2s ease;
}
.nav-dropdown:hover > .nav-link::after {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 0;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease 0.05s, transform 0.18s ease 0.05s;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  z-index: 199;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.nav-dropdown-menu a:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}
.nav-dropdown.active > .nav-link {
  color: var(--text);
  font-weight: 600;
}
.nav-dropdown.active > .nav-link::after {
  transform: scaleX(1);
}

/* ── Work section ───────────────────────────────────────────── */

.work-body {
  max-width: 720px;
}
.work-intro {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 36px;
}
.work-subhead {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.work-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.work-list li {
  font-size: 16px;
  padding-left: 22px;
  position: relative;
  line-height: 1.7;
}
.work-list li::before {
  content: '\203A';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 18px;
  line-height: 1.4;
}
.work-list li a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--ease), color var(--ease);
}
.work-list li a:hover {
  color: var(--accent-hi);
  border-bottom-color: var(--accent-hi);
  text-decoration: none;
}
