/* MicroDC.ai marketing site — page-level styles atop tokens.css */

html { scroll-behavior: smooth; }

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

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

button { font: inherit; }

code, pre { font-family: var(--mono); }

::selection { background: var(--accent); color: var(--btn-fg); }

/* ---------- layout ---------- */
.page { background: var(--bg); color: var(--fg); min-height: 100vh; }

.page-pad { padding-left: 32px; padding-right: 32px; }
.section-pad { padding-top: 32px; padding-bottom: 32px; }

.container-wide { max-width: 1600px; margin: 0 auto; }

/* ---------- utility bar ---------- */
.utility-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 32px; border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--fg-3); text-transform: uppercase;
}
.utility-bar span + span::before {
  content: " · "; color: var(--line-2); padding: 0 4px;
}

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 26px; }
.nav-links { display: flex; gap: 26px; }
.nav-link {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.02em; color: var(--fg-2);
  transition: color .15s ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent); }
.nav-cta-group { display: flex; gap: 10px; align-items: center; }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--line-2);
  color: var(--fg-2); padding: 8px 10px; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2);
  padding: 6px 10px; color: var(--fg-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .cells { display: inline-flex; }
.theme-toggle .cell {
  width: 10px; height: 10px; border: 1px solid var(--line-2);
  display: inline-block;
}
.theme-toggle .cell + .cell { border-left: none; }
[data-theme="dark"] .theme-toggle .cell-dark,
:root:not([data-theme="light"]) .theme-toggle .cell-dark { background: var(--accent); }
[data-theme="light"] .theme-toggle .cell-light { background: var(--accent); }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0; background: var(--bg-1);
}
.ticker-track {
  display: flex; gap: 48px;
  animation: ticker-scroll 120s linear infinite;
  width: max-content;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  font-family: var(--mono); font-size: 11px; white-space: nowrap;
  color: var(--fg-2); display: inline-flex; gap: 10px; align-items: center;
}
.ticker-item .dim { color: var(--fg-3); }
.ticker-item .accent { color: var(--accent); }

/* ---------- status dot ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--fg-2);
}
.status .dot { width: 6px; height: 6px; display: inline-block; }
.status[data-s="complete"] .dot { background: var(--ok); }
.status[data-s="running"] .dot { background: var(--accent); animation: blink 1.4s steps(2, end) infinite; }
.status[data-s="queued"] .dot { background: var(--fg-3); }
.status[data-s="failed"] .dot { background: var(--err); }

/* ---------- hero ---------- */
.hero { padding: 48px 32px 32px; }
.hero-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 48px;
}
.hero-headline {
  font-family: var(--serif); font-weight: 400;
  font-size: 92px; line-height: 0.95; letter-spacing: -0.02em;
  margin: 0 0 8px; max-width: 1100px;
}
.hero-headline em {
  color: var(--accent); font-style: italic;
}
.hero-sub {
  font-size: 16px; line-height: 1.55; color: var(--fg-2);
  max-width: 620px; margin-top: 24px;
}
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.stats-sidebar {
  width: 260px; flex-shrink: 0;
  display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.stat-cell { background: var(--bg); padding: 16px 18px; }
.stat-value {
  font-family: var(--mono); font-size: 26px; font-weight: 500;
  letter-spacing: -0.01em; margin-top: 6px;
}
.stat-delta {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------- schematic ---------- */
.schematic {
  margin: 56px 32px 32px; position: relative;
  border: 1px solid var(--line); padding: 24px;
}
.schematic-label {
  position: absolute; background: var(--bg); padding: 0 8px;
}
.schematic-label.tl { top: -8px; left: 16px; }
.schematic-label.tr { top: -8px; right: 16px; }

.schematic-grid {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px;
  align-items: stretch;
}
.topology {
  position: relative; min-height: 420px; padding: 24px;
}

/* ---------- live job log ---------- */
.job-log {
  position: relative; border: 1px solid var(--line);
  background: var(--bg-1); display: flex; flex-direction: column;
}
.job-log-head {
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2);
}
.job-log-head .rec {
  font-family: var(--mono); font-size: 10px; color: var(--ok);
  animation: blink 1.4s steps(2, end) infinite;
}
.job-log-cols, .job-log-row {
  display: grid; grid-template-columns: 70px 1fr 110px 80px 88px; gap: 0;
}
.job-log-cols {
  padding: 8px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.job-log-row {
  padding: 9px 16px; border-bottom: 1px solid var(--line);
  font-size: 12px; align-items: center; font-family: var(--mono);
}
.job-log-row .id { color: var(--accent); }
.job-log-row .model { color: var(--fg-2); }
.job-log-row .region { color: var(--fg-2); }
.job-log-row .time { color: var(--fg-3); }

/* ---------- generic section heading ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 32px;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 400; font-size: 44px;
  line-height: 1.05; letter-spacing: -0.01em; margin: 0;
}
.section-head h2 em { color: var(--accent); font-style: italic; }

/* ---------- integration / code ---------- */
.integration {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line); margin: 0 32px;
}
.integration-copy { padding: 32px 40px; border-right: 1px solid var(--line); }
.integration-copy h2 {
  font-family: var(--serif); font-weight: 400; font-size: 44px;
  line-height: 1.05; letter-spacing: -0.01em; margin: 0;
}
.integration-copy p {
  color: var(--fg-2); max-width: 460px; margin-top: 18px; line-height: 1.55;
}
.integration-copy code { color: var(--accent); }
.code-panel {
  background: var(--bg-1); padding: 20px 0;
  display: flex; flex-direction: column;
}
.code-tabs {
  display: flex; gap: 4px; padding: 0 24px 12px;
  border-bottom: 1px solid var(--line);
}
.code-tab {
  font-family: var(--mono); font-size: 11px; padding: 4px 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); border-bottom: 1px solid transparent;
  background: transparent; cursor: pointer;
}
.code-tab[aria-selected="true"] {
  color: var(--accent); border-bottom-color: var(--accent);
}
.code-pane {
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  padding: 20px 24px; margin: 0; color: var(--fg);
  white-space: pre; overflow-x: auto;
}
.code-pane[hidden] { display: none; }
.code-pane .c { color: var(--fg-3); }
.code-pane .k { color: var(--accent); }
.code-pane .s { color: var(--ok); }

/* ---------- paths grid ---------- */
.paths-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line);
}
.path-cell {
  padding: 32px 28px; display: flex; flex-direction: column; gap: 16px;
}
.path-cell + .path-cell { border-left: 1px solid var(--line); }
.path-head { display: flex; justify-content: space-between; align-items: center; }
.path-num {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.08em;
}
.path-title {
  font-family: var(--serif); font-weight: 400; font-size: 26px;
  margin: 0; line-height: 1.15; letter-spacing: -0.01em;
}
.path-body { color: var(--fg-2); font-size: 14px; line-height: 1.55; margin: 0; }
.path-list {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: grid; gap: 6px;
}
.path-list li {
  font-family: var(--mono); font-size: 12px; color: var(--fg-2);
  display: flex; gap: 10px;
}
.path-list li::before { content: "›"; color: var(--accent); }
.path-cta { margin-top: auto; }
.path-cta .btn { width: 100%; justify-content: center; }

/* ---------- mechanics ---------- */
.mechanics {
  padding: 32px; border-top: 1px solid var(--line);
}
.mechanics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.mech-step { position: relative; padding-top: 36px; }
.mech-step-meta {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
}
.mech-step-num {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.08em;
}
.mech-step-arrow {
  font-family: var(--mono); color: var(--fg-3); font-size: 14px;
}
.mech-step-body { border-top: 1px solid var(--accent); padding-top: 16px; }
.mech-step-body h3 {
  font-family: var(--serif); font-weight: 400; font-size: 28px;
  margin: 0 0 10px; letter-spacing: -0.01em;
}
.mech-step-body p { color: var(--fg-2); font-size: 14px; line-height: 1.55; margin: 0; }

/* ---------- applications grid ---------- */
.apps {
  padding: 32px; border-top: 1px solid var(--line);
}
.apps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line);
}
.app-cell {
  padding: 28px 24px; min-height: 220px;
  display: flex; flex-direction: column; gap: 12px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.app-cell:nth-child(3n) { border-right: none; }
.app-cell:nth-last-child(-n+3) { border-bottom: none; }
.app-head { display: flex; justify-content: space-between; }
.app-metric { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.app-title {
  font-family: var(--serif); font-weight: 400; font-size: 24px;
  margin: 0; letter-spacing: -0.01em;
}
.app-body { color: var(--fg-2); font-size: 13px; line-height: 1.55; margin: 0; }

/* ---------- final CTA ---------- */
.cta {
  padding: 80px 32px; border-top: 1px solid var(--line); position: relative;
  overflow: hidden;
}
.cta-bg { position: absolute; inset: 0; opacity: 0.4; pointer-events: none; }
.cta-inner { position: relative; max-width: 900px; }
.cta h2 {
  font-family: var(--serif); font-weight: 400; font-size: 80px;
  line-height: 0.95; margin: 16px 0 28px; letter-spacing: -0.02em;
}
.cta h2 em { color: var(--accent); font-style: italic; }
.cta p { font-size: 18px; color: var(--fg-2); line-height: 1.5; max-width: 620px; }
.cta-buttons { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 48px 32px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer-blurb {
  color: var(--fg-3); font-size: 13px; line-height: 1.6;
  max-width: 320px; margin-top: 16px;
}
.footer-compliance {
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap;
}
.footer-col-head {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 14px;
}
.footer-link {
  display: block; font-family: var(--mono); font-size: 12px;
  color: var(--fg-2); padding: 4px 0;
}
.footer-link:hover { color: var(--accent); }
.footer-legal {
  grid-column: 1 / -1; border-top: 1px solid var(--line);
  padding-top: 16px; display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  flex-wrap: wrap; gap: 12px;
}

/* ---------- generic page header for non-homepage pages ---------- */
.page-header {
  padding: 64px 32px 48px; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end;
}
.page-header h1 {
  font-family: var(--serif); font-weight: 400; font-size: 72px;
  line-height: 0.98; letter-spacing: -0.02em; margin: 0;
  max-width: 900px;
}
.page-header h1 em { color: var(--accent); font-style: italic; }
.page-header .meta {
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.06em; text-transform: uppercase; text-align: right;
  display: flex; flex-direction: column; gap: 4px;
}
.page-lede {
  padding: 0 32px 48px; max-width: 760px;
  font-size: 17px; line-height: 1.55; color: var(--fg-2);
}

/* ---------- generic data table ---------- */
.data-table {
  width: 100%; border-collapse: collapse; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px;
}
.data-table th, .data-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top;
}
.data-table th {
  background: var(--bg-2); font-weight: 500; font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td.num { text-align: right; color: var(--accent); }

/* ---------- panel (hairline-bordered card) ---------- */
.panel {
  border: 1px solid var(--line); padding: 24px 28px;
  background: var(--bg);
}
.panel + .panel { margin-top: -1px; } /* shared border for stacks */
.panel-grid {
  display: grid; gap: 0; border: 1px solid var(--line);
}
.panel-grid > .panel {
  border: none; border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line); margin: 0;
}
.panel-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.panel-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.panel-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.panel-grid > .panel:nth-child(2n):last-child {} /* placeholder */

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-1); border-bottom: 1px solid var(--line);
    padding: 8px 32px;
  }
  .nav.open .nav-links .nav-link {
    padding: 12px 0; border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links .nav-link:last-child { border-bottom: none; }

  .hero-row { flex-direction: column; }
  .stats-sidebar {
    width: 100%; grid-template-columns: repeat(4, 1fr);
  }
  .schematic-grid { grid-template-columns: 1fr; }

  .hero-headline { font-size: 72px; }
  .page-header h1 { font-size: 56px; }
  .integration { grid-template-columns: 1fr; }
  .integration-copy { border-right: none; border-bottom: 1px solid var(--line); }
  .mechanics-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid.cols-3, .panel-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
  .app-cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .app-cell:nth-child(2n) { border-right: none; }
  .app-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .app-cell:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 767px) {
  .page-pad, .nav, .schematic, .integration, .mechanics, .apps,
  .cta, .site-footer, .page-header, .page-lede, .hero, .utility-bar {
    padding-left: 20px; padding-right: 20px;
  }
  .schematic, .integration { margin-left: 16px; margin-right: 16px; }
  .nav { padding-top: 14px; padding-bottom: 14px; }
  .hero-headline { font-size: 48px; }
  .page-header h1 { font-size: 40px; }
  .page-header { grid-template-columns: 1fr; }
  .page-header .meta { text-align: left; flex-direction: row; gap: 16px; }
  .stats-sidebar { grid-template-columns: repeat(2, 1fr); }
  .paths-grid { grid-template-columns: 1fr; }
  .path-cell + .path-cell { border-left: none; border-top: 1px solid var(--line); }
  .mechanics-grid { grid-template-columns: 1fr; }
  .mech-step-arrow { display: none; }
  .apps-grid, .panel-grid.cols-2, .panel-grid.cols-3, .panel-grid.cols-4 {
    grid-template-columns: 1fr;
  }
  .app-cell { border-right: none !important; border-bottom: 1px solid var(--line) !important; }
  .app-cell:last-child { border-bottom: none !important; }
  .site-footer { grid-template-columns: 1fr; gap: 32px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .cta h2 { font-size: 48px; }
  .topology { min-height: 320px; }
  .job-log-cols, .job-log-row {
    grid-template-columns: 56px 1fr 80px;
  }
  .job-log-cols .col-tokens, .job-log-row .col-tokens,
  .job-log-cols .col-region, .job-log-row .col-region {
    display: none;
  }
}

/* ---------- blog post article ---------- */
.post-header {
  padding: 64px 32px 32px; max-width: 880px; margin: 0 auto;
}
.post-header .meta {
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.post-header h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: 56px; line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.post-header h1 em { color: var(--accent); font-style: italic; }
.post-header .lede {
  font-size: 18px; line-height: 1.55; color: var(--fg-2); margin: 0;
}
.article {
  max-width: 760px; margin: 0 auto;
  padding: 24px 32px 48px;
  font-size: 17px; line-height: 1.7; color: var(--fg);
}
.article h2 {
  font-family: var(--serif); font-weight: 400; font-size: 32px;
  letter-spacing: -0.01em; margin: 48px 0 14px; line-height: 1.15;
}
.article h2 em { color: var(--accent); font-style: italic; }
.article h3 {
  font-family: var(--serif); font-weight: 400; font-size: 22px;
  letter-spacing: -0.01em; margin: 32px 0 10px;
}
.article p { margin: 0 0 18px; color: var(--fg-2); }
.article p strong { color: var(--fg); font-weight: 500; }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article ul, .article ol { margin: 0 0 20px; padding-left: 24px; color: var(--fg-2); }
.article li { margin-bottom: 6px; }
.article code {
  font-family: var(--mono); font-size: 14px; color: var(--accent);
  padding: 1px 5px; background: var(--bg-1); border: 1px solid var(--line);
}
.article pre {
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  background: var(--bg-1); border: 1px solid var(--line);
  padding: 18px 20px; margin: 18px 0; overflow-x: auto; color: var(--fg);
  white-space: pre;
}
.article pre code { padding: 0; background: none; border: none; color: inherit; font-size: inherit; }
.article blockquote {
  border-left: 2px solid var(--accent);
  padding: 6px 0 6px 20px; margin: 18px 0;
  color: var(--fg-2); font-style: italic;
}
.article table {
  width: 100%; border-collapse: collapse; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; margin: 18px 0;
}
.article th, .article td {
  padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left;
}
.article th { background: var(--bg-2); font-weight: 500; }
.article tr:last-child td { border-bottom: none; }
.related {
  border-top: 1px solid var(--line); padding: 48px 32px;
  max-width: 880px; margin: 0 auto;
}
.related h3 {
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 20px;
}
.related-list { display: grid; gap: 0; border: 1px solid var(--line); }
.related-list a {
  display: block; padding: 18px 22px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.related-list a:last-child { border-bottom: none; }
.related-list a:hover { background: var(--bg-1); }
.related-list .date {
  font-family: var(--mono); font-size: 10px; color: var(--fg-3);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px;
  display: block;
}
.related-list .ttl {
  font-family: var(--serif); font-size: 18px; line-height: 1.25;
  letter-spacing: -0.01em; color: var(--fg);
}
@media (max-width: 767px) {
  .post-header { padding: 40px 20px 20px; }
  .post-header h1 { font-size: 36px; }
  .article { padding: 20px 20px 32px; font-size: 16px; }
  .article h2 { font-size: 26px; }
  .related { padding: 32px 20px; }
}
