:root {
  --bg: #050505;
  --bg-elevated: #101010;
  --bg-card: #101010;
  --text: #ffffff;
  --text-muted: #b6b6b6;
  --accent: #31d67c;
  --accent-dim: #00cc70;
  --accent-glow: rgba(49, 214, 124, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --error: #ef4444;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1120px;
  --nav-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  height: auto;
}

.preview-banner {
  background: rgba(49, 214, 124, 0.08);
  border-bottom: 1px solid rgba(49, 214, 124, 0.2);
  color: var(--accent);
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  text-align: center;
}

.preview-banner strong {
  color: var(--text);
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  line-height: 1;
}

.logo-icon {
  display: block;
  height: 28px;
  width: 28px;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.logo-img {
  display: none;
}

.logo-mark {
  display: none;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-desktop a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
}

.nav-desktop a.active {
  color: var(--accent);
}

.nav-login {
  color: var(--text-muted) !important;
  font-size: 0.875rem !important;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s, color 0.15s !important;
}

.nav-login:hover {
  border-color: var(--accent-dim);
  color: var(--accent) !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--border);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: 0.625rem 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.nav-mobile a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-mobile.open {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .nav-mobile a {
    color: var(--text);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #050505;
}

.btn-primary:hover {
  background: #3de88a;
  box-shadow: 0 0 24px rgba(49, 214, 124, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(49, 214, 124, 0.25);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

.hero .lead {
  font-size: 1.1875rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.hero-cta {
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
}

.card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* OS teaser */
.os-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.os-teaser-content h2 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

.os-teaser-content p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.os-teaser-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  font-family: monospace;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.os-teaser-visual .line-accent {
  color: var(--accent);
}

@media (max-width: 768px) {
  .os-teaser {
    grid-template-columns: 1fr;
  }
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 56ch;
  margin: 0;
}

/* About */
.pillar-list {
  display: grid;
  gap: 1.5rem;
}

.pillar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.pillar-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
}

.pillar h3 {
  margin: 0 0 0.375rem;
}

.pillar p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Cases */
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

.case-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.case-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.case-card .sector {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.case-outcomes {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.case-outcomes li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding: 0.375rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.case-outcomes li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.case-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .case-layout {
    grid-template-columns: 1fr;
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.125rem 1rem;
}

.metric-card.highlight {
  background: var(--accent-glow);
  border-color: rgba(49, 214, 124, 0.2);
}

.metric-value {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.metric-card.highlight .metric-value {
  color: var(--accent);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.case-viz-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.case-viz-header {
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.case-viz-header strong {
  display: block;
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  margin-top: 0.25rem;
}

.case-pdf-embed {
  display: none;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.chart-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  width: 0;
  animation: bar-grow 1.2s ease-out forwards;
}

.chart-bar-fill.muted {
  background: rgba(49, 214, 124, 0.45);
}

.chart-bar-row:nth-child(1) .chart-bar-fill { animation-delay: 0.1s; }
.chart-bar-row:nth-child(2) .chart-bar-fill { animation-delay: 0.25s; }
.chart-bar-row:nth-child(3) .chart-bar-fill { animation-delay: 0.4s; }
.chart-bar-row:nth-child(4) .chart-bar-fill { animation-delay: 0.55s; }

@keyframes bar-grow {
  from { width: 0; }
  to { width: var(--bar-width); }
}

.chart-bar-value {
  min-width: 2.5rem;
  text-align: right;
  color: var(--accent);
  font-weight: 600;
}

.case-chart-block {
  padding: 1.125rem;
}

.growth-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 140px;
  padding: 0.5rem 0;
}

.growth-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  justify-content: flex-end;
}

.growth-bar {
  width: 100%;
  max-width: 56px;
  background: var(--accent);
  border-radius: 6px 6px 0 0;
  height: 0;
  animation: column-grow 1.4s ease-out forwards;
}

.growth-bar-col:nth-child(1) .growth-bar { animation-delay: 0.15s; }
.growth-bar-col:nth-child(2) .growth-bar { animation-delay: 0.4s; }
.growth-bar-col:nth-child(3) .growth-bar { animation-delay: 0.65s; }

@keyframes column-grow {
  from { height: 0; }
  to { height: var(--col-height); }
}

.growth-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
}

.growth-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.platform-tag {
  font-size: 0.75rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
}

.email-link {
  color: var(--accent);
}

.email-link:hover {
  text-decoration: underline;
}

  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

/* Blog */
.blog-grid {
  display: grid;
  gap: 1.25rem;
}

.blog-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s;
}

.blog-card:hover {
  border-color: rgba(49, 214, 124, 0.35);
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.category-tag {
  color: var(--accent);
  font-weight: 500;
}

.blog-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.blog-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.blog-date-col {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

@media (max-width: 600px) {
  .blog-card {
    grid-template-columns: 1fr;
  }

  .blog-date-col {
    writing-mode: horizontal-tb;
    transform: none;
  }
}

/* Article */
.article-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  max-width: 24ch;
}

.article-body {
  padding: 2.5rem 0 4rem;
  max-width: 68ch;
}

.article-body h2 {
  font-size: 1.375rem;
  margin: 2rem 0 0.75rem;
}

.article-body p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.article-body ul {
  color: var(--text-muted);
  padding-left: 1.25rem;
}

.article-body ol {
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.article-body h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.5rem;
}

.article-body a {
  color: var(--accent);
}

.article-body a:hover {
  text-decoration: underline;
}

.article-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.article-table th,
.article-table td {
  border: 1px solid var(--border);
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.article-table th {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
}

.article-table td {
  color: var(--text-muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--accent);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* Contact */
.contact-block {
  max-width: 480px;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.contact-block p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
}

.contact-email:hover {
  text-decoration: underline;
}

/* Login */
.login-page {
  min-height: calc(100vh - var(--nav-height) - 40px);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.login-card {
  width: min(100%, 400px);
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.login-card h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  text-align: center;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0 0 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.form-error {
  display: none;
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.form-error.visible {
  display: block;
}

.login-note {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.login-success {
  display: none;
  text-align: center;
  padding: 1rem 0;
}

.login-success.visible {
  display: block;
}

.login-success .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.login-form.hidden {
  display: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}
