/* ============================================================
   RiskForwardAI — site.css (2026 rebuild)
   Design tokens
   ============================================================ */
:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --ink-mute: #64748b;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --paper-edge: #e2e8f0;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --violet: #8b5cf6;
  --violet-deep: #6d28d9;
  --navy: #0b1220;
  --navy-2: #101a30;
  --gold: #fbbf24;
  --grad-brand: linear-gradient(120deg, var(--cyan) 0%, var(--violet) 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--cyan-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }

::selection { background: rgba(34, 211, 238, 0.25); }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.navbar.scrolled { border-bottom-color: var(--paper-edge); box-shadow: var(--shadow-sm); }

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.brand-text {
  font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; color: var(--ink);
}
.brand-text .brand-accent { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  color: var(--ink-soft); font-weight: 500; font-size: 0.95rem;
  padding: 9px 13px; border-radius: 999px; transition: background 0.2s ease, color 0.2s ease;
}
.nav-link:hover { background: var(--paper-soft); color: var(--ink); text-decoration: none; }

.nav-cta {
  margin-left: 6px; padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-link { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; background: none; border: 0; font-family: inherit; }
.nav-dropdown .caret { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.2s ease; }
.nav-dropdown.open .caret { transform: rotate(225deg) translateY(-1px); }

.dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 340px;
  background: #fff; border: 1px solid var(--paper-edge); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav-dropdown.open .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) {
  .nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
}

.dropdown-item { display: block; padding: 12px 14px; border-radius: var(--radius-sm); }
.dropdown-item:hover { background: var(--paper-soft); text-decoration: none; }
.dropdown-item .di-title { display: block; color: var(--ink); font-weight: 600; font-size: 0.93rem; line-height: 1.4; }
.dropdown-item .di-date { display: block; color: var(--ink-mute); font-size: 0.8rem; margin-top: 3px; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--paper-edge);
    padding: 12px 16px 18px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 13px 14px; border-radius: var(--radius-sm); font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; text-align: center; padding: 13px; }
  .dropdown-menu {
    position: static; min-width: 0; border: 0; box-shadow: none; padding: 0 0 0 10px;
    display: none; opacity: 1; visibility: visible; transform: none;
  }
  .nav-dropdown.open .dropdown-menu { display: block; }
}

/* ============================================================
   Hero (homepage)
   ============================================================ */
.hero {
  position: relative;
  background: radial-gradient(900px 500px at 12% -10%, rgba(34, 211, 238, 0.16), transparent 60%),
              radial-gradient(900px 520px at 92% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
              linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #e2e8f0;
  padding: calc(var(--nav-h) + 72px) 0 88px;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), rgba(139, 92, 246, 0.5), transparent);
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 22px;
}
.hero-eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad-brand); border-radius: 2px; }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; color: #fff;
  max-width: 780px;
}
.hero h1 .grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-sub {
  margin-top: 20px; max-width: 640px; font-size: 1.13rem; line-height: 1.7; color: #94a3b8;
}

.definition-card {
  margin-top: 36px; max-width: 640px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.definition-card .def-word { font-weight: 700; color: #fff; font-size: 1.02rem; }
.definition-card .def-type { color: var(--ink-mute); font-style: italic; margin-left: 6px; font-size: 0.92rem; }
.definition-card .def-text { display: block; margin-top: 8px; color: #cbd5e1; font-size: 1rem; line-height: 1.65; }
.definition-card .def-attr { display: block; margin-top: 10px; color: #64748b; font-size: 0.85rem; }

.hero-cta { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--grad-brand); color: var(--navy); box-shadow: 0 8px 24px rgba(34, 211, 238, 0.28); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(139, 92, 246, 0.35); }
.btn-ghost { background: transparent; color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.4); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(148, 163, 184, 0.7); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { box-shadow: var(--shadow-md); }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 88px 0; }
.section-alt { background: var(--paper-soft); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-eyebrow {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--violet-deep); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.section-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--grad-brand); border-radius: 2px; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.35rem); letter-spacing: -0.02em; line-height: 1.18; font-weight: 800; }
.section-sub { margin-top: 14px; color: var(--ink-mute); font-size: 1.05rem; }

/* Reality strip */
.reality-strip {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.07), rgba(139, 92, 246, 0.07));
  border-block: 1px solid var(--paper-edge);
  padding: 40px 0;
}
.reality-strip p {
  max-width: 860px; margin: 0 auto; text-align: center;
  font-size: 1.16rem; line-height: 1.7; color: var(--ink-soft); font-weight: 500;
}
.reality-strip strong { color: var(--ink); }

/* Pillars */
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .pillars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pillars-grid { grid-template-columns: 1fr; } }

.pillar-card {
  background: #fff; border: 1px solid var(--paper-edge); border-radius: var(--radius);
  padding: 26px 24px; position: relative; overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.pillar-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--grad-brand); opacity: 0; transition: opacity 0.22s ease;
}
.pillar-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.pillar-card:hover::before { opacity: 1; }

.pillar-number {
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 10px;
}
.pillar-card h3 { font-size: 1.13rem; letter-spacing: -0.01em; margin-bottom: 12px; }
.pillar-list { list-style: none; }
.pillar-list li {
  position: relative; padding-left: 20px; margin-bottom: 9px;
  color: var(--ink-mute); font-size: 0.93rem; line-height: 1.55;
}
.pillar-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--grad-brand); opacity: 0.75;
}

/* Emerging risk */
.risk-panel {
  background: var(--navy); color: #cbd5e1; border-radius: 22px;
  padding: clamp(28px, 5vw, 56px);
  position: relative; overflow: hidden;
}
.risk-panel::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 85% 10%, rgba(139, 92, 246, 0.18), transparent 60%),
              radial-gradient(600px 300px at 10% 90%, rgba(34, 211, 238, 0.14), transparent 60%);
  pointer-events: none;
}
.risk-panel > * { position: relative; }
.risk-def {
  font-size: 1.12rem; color: #fff; font-weight: 600; line-height: 1.6;
  padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.risk-def strong { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.risk-panel p { margin-bottom: 14px; line-height: 1.75; }
.risk-closing { margin-top: 8px; font-weight: 700; color: #fff; font-size: 1.08rem; }

/* Articles (cards) */
.articles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 860px) { .articles-grid { grid-template-columns: 1fr; } }

.article-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--paper-edge); border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); text-decoration: none; }

.ac-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ac-badge {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: var(--grad-brand); color: var(--navy);
}
.ac-badge.muted { background: var(--paper-soft); color: var(--ink-mute); border: 1px solid var(--paper-edge); }
.ac-date { font-size: 0.82rem; color: var(--ink-mute); font-weight: 500; }

.article-card h3 { font-size: 1.28rem; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); margin-bottom: 12px; }
.article-card p { color: var(--ink-mute); font-size: 0.97rem; flex: 1; }
.ac-cta {
  margin-top: 20px; font-weight: 700; font-size: 0.94rem; color: var(--cyan-deep);
  display: inline-flex; align-items: center; gap: 6px;
}
.ac-cta::after { content: "→"; transition: transform 0.2s ease; }
.article-card:hover .ac-cta::after { transform: translateX(4px); }

/* About */
.about-wrap { display: grid; grid-template-columns: 1fr; gap: 0; max-width: 860px; }
.about-name { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.about-role { color: var(--violet-deep); font-weight: 600; margin: 4px 0 22px; }
.about-wrap p.bio { color: var(--ink-soft); margin-bottom: 16px; line-height: 1.75; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--paper-edge); border-radius: 999px; padding: 10px 18px;
  color: var(--ink); font-weight: 600; font-size: 0.9rem; background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.contact-chip:hover { text-decoration: none; border-color: var(--cyan); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

/* ============================================================
   Article pages
   ============================================================ */
.article-hero {
  background: radial-gradient(800px 420px at 15% -10%, rgba(34, 211, 238, 0.15), transparent 60%),
              radial-gradient(800px 460px at 90% 0%, rgba(139, 92, 246, 0.15), transparent 60%),
              linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #e2e8f0;
  padding: calc(var(--nav-h) + 64px) 0 64px;
}
.article-hero .hero-eyebrow { margin-bottom: 18px; }
.article-hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.15; letter-spacing: -0.02em;
  font-weight: 800; color: #fff; max-width: 820px;
}
.article-hero .article-deck { margin-top: 18px; max-width: 700px; color: #94a3b8; font-size: 1.1rem; line-height: 1.7; }
.byline-row { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; color: #94a3b8; font-size: 0.92rem; }
.byline-row .byline-name { color: #fff; font-weight: 700; }
.byline-row .dot { width: 4px; height: 4px; border-radius: 50%; background: #475569; }

/* Reading progress */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad-brand); z-index: 120;
}

/* Article body */
.article-body { max-width: 740px; margin: 0 auto; padding: 64px 20px 40px; }
.article-body p { margin-bottom: 22px; color: var(--ink-soft); font-size: 1.06rem; line-height: 1.8; }
.article-body p.lead { font-size: 1.22rem; color: var(--ink); line-height: 1.75; }
.article-body h2 {
  margin: 44px 0 18px; font-size: 1.55rem; letter-spacing: -0.018em; line-height: 1.25; color: var(--ink);
}
.article-body ul { margin: 0 0 22px 2px; list-style: none; }
.article-body ul li {
  position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--ink-soft); line-height: 1.7;
}
.article-body ul li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--grad-brand); opacity: 0.8;
}
.article-body a { color: var(--cyan-deep); font-weight: 500; }
.article-body strong { color: var(--ink); }
.article-body p.conclusion {
  border-left: 3px solid; border-image: var(--grad-brand) 1;
  padding: 4px 0 4px 20px; color: var(--ink); font-size: 1.12rem;
}

.industry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 26px; }
@media (max-width: 640px) { .industry-grid { grid-template-columns: 1fr; } }
.industry-card {
  background: var(--paper-soft); border: 1px solid var(--paper-edge); border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.industry-card h4 { font-size: 0.98rem; margin-bottom: 6px; color: var(--ink); }
.industry-card p { margin: 0; font-size: 0.92rem; color: var(--ink-mute); line-height: 1.6; }

.disclaimer {
  margin-top: 48px; background: var(--paper-soft); border: 1px solid var(--paper-edge);
  border-radius: var(--radius-sm); padding: 20px 24px;
}
.disclaimer h4 { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; }
.disclaimer p { margin: 0; font-size: 0.9rem; color: var(--ink-mute); line-height: 1.65; }

/* Next-article footer nav */
.article-next { border-top: 1px solid var(--paper-edge); }
.article-next .an-inner { max-width: 740px; margin: 0 auto; padding: 44px 20px; }
.an-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 10px; }
.an-link { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); line-height: 1.4; display: inline-block; }
.an-link:hover { color: var(--cyan-deep); text-decoration: none; }
.an-date { display: block; margin-top: 6px; color: var(--ink-mute); font-size: 0.88rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--navy); color: #94a3b8; padding: 56px 0 28px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 34px; height: 34px; border-radius: 8px; }
.footer-text { color: #fff; font-weight: 800; font-size: 1.05rem; }
.footer-tag { margin-top: 10px; font-size: 0.92rem; max-width: 320px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #94a3b8; font-size: 0.92rem; }
.footer-links a:hover { color: var(--cyan); text-decoration: none; }
.footer-col-title { color: #e2e8f0; font-weight: 700; font-size: 0.86rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 0.84rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}
