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

:root {
  --bg-primary: #07070a;
  --bg-secondary: #0c0c14;
  --bg-card: #111120;
  --bg-card-hover: #161630;
  --border: #1a1a30;
  --border-glow: rgba(0, 240, 192, 0.08);
  --text-primary: #e2e2ea;
  --text-secondary: #7a7a90;
  --text-muted: #4a4a60;
  --accent: #00f0c0;
  --accent-dim: #00a080;
  --accent-glow: rgba(0, 240, 192, 0.15);
  --purple: #7c5cfc;
  --purple-dim: #5a3dd0;
  --orange: #ffb74d;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg-primary); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Background grid ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none; z-index: 0;
}

/* ── Container ── */
.container {
  max-width: 1040px; margin: 0 auto; padding: 0 24px;
  position: relative; z-index: 1;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dim); }

/* ── Navigation ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,10,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
nav .logo {
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500;
  letter-spacing: 2px; color: var(--accent); text-transform: uppercase;
}
nav .logo span { color: var(--text-muted); }
nav .logo a { color: var(--accent); }
.nav-links { display: flex; gap: 0; list-style: none; }
.nav-links li { position: relative; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary); font-size: 0.78rem;
  font-family: var(--font-mono); transition: color var(--transition);
  padding: 8px 14px; border-radius: var(--radius-sm);
}
.nav-links a:hover { color: var(--accent); background: rgba(0,240,192,0.04); }
.nav-links a.active { color: var(--accent); }
.nav-links .nav-cta a {
  background: var(--accent); color: var(--bg-primary) !important;
  padding: 6px 16px; border-radius: 6px; font-weight: 600;
  margin-left: 4px;
}
.nav-links .nav-cta a:hover { background: var(--accent-dim); color: var(--bg-primary) !important; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after {
  content: '▾'; margin-left: 4px; font-size: 0.6rem;
  color: var(--text-muted);
}
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 180px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px; z-index: 200;
  flex-direction: column;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: 8px 12px; font-size: 0.75rem; border-radius: 4px;
}
.nav-dropdown-menu a:hover { background: rgba(0,240,192,0.06); }

.nav-toggle {
  display: none; background: none; border: none; color: var(--text-secondary);
  font-size: 1.4rem; cursor: pointer; padding: 4px;
}

/* ── Mobile Nav ── */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-dropdown-menu {
    position: static; display: none; border: none;
    padding: 0 0 0 16px; background: transparent;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }
}

/* ── Page Hero ── */
.page-hero {
  padding: 80px 0 48px;
  text-align: center;
}
.page-hero h1 {
  font-size: 2.8rem; font-weight: 650; letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.page-hero .subtitle {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--accent); margin-bottom: 8px;
}
.page-hero p {
  color: var(--text-secondary); max-width: 600px; margin: 0 auto;
  font-size: 1rem;
}
.page-hero .breadcrumb {
  margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
}
.page-hero .breadcrumb a { color: var(--text-muted); }
.page-hero .breadcrumb a:hover { color: var(--accent); }
.page-hero .breadcrumb span { color: var(--text-secondary); }

/* ── Section ── */
section { padding: 64px 0; }
.section-label {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text-muted); margin-bottom: 8px;
}
.section-title {
  font-size: 1.6rem; font-weight: 600; margin-bottom: 8px;
}
.section-desc {
  color: var(--text-secondary); font-size: 0.9rem;
  margin-bottom: 32px; max-width: 600px;
}

/* ── Home Hero ── */
.home-hero {
  padding: 100px 0 60px;
  text-align: center;
}
.home-hero .tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--accent); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px;
}
.home-hero h1 {
  font-size: 3.2rem; font-weight: 650; letter-spacing: -1px;
  margin-bottom: 16px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.home-hero .terminal-line {
  font-family: var(--font-mono); font-size: 0.9rem;
  color: var(--accent); margin-bottom: 24px;
}
.home-hero p {
  color: var(--text-secondary); max-width: 500px; margin: 0 auto;
  font-size: 1rem; line-height: 1.7;
}

/* ── Directory Grid (home page) ── */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.dir-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: all var(--transition); cursor: pointer;
  position: relative; overflow: hidden;
}
.dir-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.dir-card:hover::before { opacity: 1; }
.dir-card:hover {
  background: var(--bg-card-hover); border-color: rgba(0,240,192,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,240,192,0.04);
}
.dir-card .dir-number {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-muted); margin-bottom: 8px;
}
.dir-card h3 {
  font-size: 1.05rem; font-weight: 600; margin-bottom: 6px;
  color: var(--text-primary);
}
.dir-card p {
  font-size: 0.85rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 12px;
}
.dir-card .dir-count {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--accent-dim);
}
.dir-card a { color: inherit; display: block; }
.dir-card a:hover { color: inherit; }

/* ── Why Now section ── */
.why-now { text-align: center; }
.why-now-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 32px;
}
.why-card {
  text-align: left; padding: 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color var(--transition);
}
.why-card:hover { border-color: rgba(0,240,192,0.15); }
.why-card .icon { font-size: 1.5rem; margin-bottom: 10px; display: block; }
.why-card h4 { font-size: 0.95rem; margin-bottom: 6px; }
.why-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Process / Steps ── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.step-card {
  text-align: center; padding: 24px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); position: relative;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,240,192,0.1); border: 1px solid rgba(0,240,192,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent); margin: 0 auto 12px;
}
.step-card h4 { font-size: 0.9rem; margin-bottom: 4px; }
.step-card p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Cards Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all var(--transition);
}
.card:hover {
  border-color: rgba(0,240,192,0.2);
  box-shadow: 0 4px 20px rgba(0,240,192,0.04);
}
.card .badge {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.6rem;
  padding: 2px 8px; border-radius: 4px; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 8px;
}
.badge-geo { background: rgba(0,240,192,0.1); color: var(--accent); border: 1px solid rgba(0,240,192,0.15); }
.badge-ready { background: rgba(124,92,252,0.1); color: var(--purple); border: 1px solid rgba(124,92,252,0.15); }
.badge-growth { background: rgba(255,183,77,0.12); color: var(--orange); border: 1px solid rgba(255,183,77,0.15); }
.card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }
.card .card-meta {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
}
.card a { color: inherit; display: block; }
.card a:hover { color: inherit; }

/* ── Content Page (article style) ── */
.content-page {
  max-width: 720px; margin: 0 auto;
  padding: 24px 0 64px;
}
.content-page h1 {
  font-size: 2rem; font-weight: 650; letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.content-page h2 {
  font-size: 1.35rem; font-weight: 600; margin: 40px 0 12px;
  color: var(--text-primary);
}
.content-page h3 {
  font-size: 1.05rem; font-weight: 600; margin: 28px 0 8px;
  color: var(--accent);
}
.content-page p {
  font-size: 0.92rem; line-height: 1.9; color: var(--text-secondary);
  margin-bottom: 14px;
}
.content-page p strong { color: var(--text-primary); font-weight: 600; }
.content-page ul, .content-page ol {
  font-size: 0.9rem; line-height: 1.8; color: var(--text-secondary);
  margin: 12px 0 16px 20px;
}
.content-page li { margin-bottom: 4px; }
.content-page hr {
  border: none; border-top: 1px solid var(--border); margin: 36px 0;
}
.content-page .highlight-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 20px;
  margin: 20px 0; font-size: 0.88rem; color: var(--text-secondary);
}
.content-page .highlight-box strong { color: var(--text-primary); }
.content-page table {
  width: 100%; border-collapse: collapse;
  margin: 20px 0; font-size: 0.85rem;
}
.content-page th, .content-page td {
  padding: 10px 12px; border: 1px solid var(--border);
  text-align: left;
}
.content-page th {
  background: var(--bg-card); color: var(--text-primary);
  font-weight: 500; font-family: var(--font-mono); font-size: 0.75rem;
}
.content-page td { color: var(--text-secondary); }

/* ── TOC ── */
.toc {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  margin: 24px 0 32px;
}
.toc-title {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 4px; }
.toc-list a {
  font-size: 0.85rem; color: var(--text-secondary);
  padding: 4px 0; display: inline-block;
}
.toc-list a:hover { color: var(--accent); }
.toc-list .toc-h2 { padding-left: 0; }
.toc-list .toc-h3 { padding-left: 16px; font-size: 0.8rem; }

/* ── Case Study Card ── */
.case-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.case-card:hover {
  border-color: rgba(0,240,192,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,240,192,0.04);
}
.case-card-body { padding: 24px; }
.case-card .badge { margin-bottom: 8px; }
.case-card h3 { font-size: 1rem; margin-bottom: 6px; }
.case-card .result {
  margin-top: 12px; padding: 10px 14px;
  background: rgba(0,240,192,0.04); border: 1px solid rgba(0,240,192,0.08);
  border-radius: 6px;
}
.case-card .result-label {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--accent-dim); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 2px;
}
.case-card .result-text {
  font-size: 0.85rem; color: var(--accent);
}

/* ── FAQ (page) ── */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border); padding: 16px 0;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  font-size: 0.95rem; font-weight: 500; color: var(--text-primary);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-question::after {
  content: '+'; font-size: 1.2rem; color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0; margin-left: 12px;
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7;
}
.faq-item.open .faq-answer {
  max-height: 500px; padding-top: 12px;
}

/* ── Resource Card ── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.resource-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all var(--transition); text-align: center;
}
.resource-card:hover {
  border-color: rgba(124,92,252,0.2);
  box-shadow: 0 4px 20px rgba(124,92,252,0.04);
}
.resource-card .icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.resource-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.resource-card p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.resource-card .tag {
  display: inline-block; margin-top: 10px;
  font-family: var(--font-mono); font-size: 0.6rem;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(0,240,192,0.1); color: var(--accent);
}

/* ── CTA Section ── */
.cta-section {
  text-align: center; padding: 80px 0;
  border-top: 1px solid var(--border);
}
.cta-section h2 { font-size: 1.6rem; margin-bottom: 8px; }
.cta-section p { color: var(--text-secondary); margin-bottom: 24px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--bg-primary);
  font-family: var(--font-mono); font-size: 0.8rem;
  font-weight: 600; border: none; cursor: pointer;
  transition: all var(--transition);
}
.cta-btn:hover { background: var(--accent-dim); color: var(--bg-primary); transform: translateY(-1px); }
.cta-btn.outline {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
}
.cta-btn.outline:hover { background: rgba(0,240,192,0.08); }

/* ── Tags ── */
.tags-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tags-row span {
  font-family: var(--font-mono); font-size: 0.62rem;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(124,92,252,0.08); color: var(--purple);
  border: 1px solid rgba(124,92,252,0.12);
}
.tags-row span.accent {
  background: rgba(0,240,192,0.08); color: var(--accent);
  border-color: rgba(0,240,192,0.12);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border); padding: 32px 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.footer-col h4 {
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-col p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul a {
  font-size: 0.8rem; color: var(--text-muted); text-decoration: none;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
}

/* ── Animations ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.fade-in {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .directory-grid { grid-template-columns: 1fr; }
  .why-now-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .home-hero h1 { font-size: 2.2rem; }
  .page-hero h1 { font-size: 2rem; }
}
@media (max-width: 600px) {
  .process-steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 1.8rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .home-hero { padding: 60px 0 32px; }
  section { padding: 40px 0; }
  .container { padding: 0 16px; }
}
