/* ============================================================
   Ahleen.ai — Fonts
   ============================================================ */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/dm-sans-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/dm-sans-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/space-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/space-mono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/space-mono-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Design Tokens — oklch system
   Light default, .dark class for dark mode
   Primary hue 18 = warm crimson/red
   Background hue 75 = warm beige
   ============================================================ */

:root {
  --background: oklch(0.955 0.008 75);
  --foreground: oklch(0.178 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.178 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.178 0 0);
  --primary: oklch(0.505 0.195 18);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.955 0.008 75);
  --secondary-foreground: oklch(0.178 0 0);
  --muted: oklch(0.975 0.004 75);
  --muted-foreground: oklch(0.438 0 0);
  --accent: oklch(0.975 0.004 75);
  --accent-foreground: oklch(0.178 0 0);
  --destructive: oklch(0.505 0.195 18);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.888 0.008 75);
  --input: oklch(0.888 0.008 75);
  --ring: oklch(0.505 0.195 18);
  --radius: 0.5rem;

  /* Derived tokens for the landing page */
  --primary-soft: oklch(0.505 0.195 18 / 0.08);
  --primary-medium: oklch(0.505 0.195 18 / 0.15);
  --text-tertiary: oklch(0.55 0 0);

  /* Spacing: 8px base */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;
}

.dark {
  --background: oklch(0.178 0 0);
  --foreground: oklch(0.955 0.008 75);
  --card: oklch(0.22 0.012 55);
  --card-foreground: oklch(0.955 0.008 75);
  --popover: oklch(0.22 0.012 55);
  --popover-foreground: oklch(0.955 0.008 75);
  --primary: oklch(0.545 0.195 18);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.22 0.012 55);
  --secondary-foreground: oklch(0.955 0.008 75);
  --muted: oklch(0.22 0.012 55);
  --muted-foreground: oklch(0.7 0 0);
  --accent: oklch(0.3 0.015 55);
  --accent-foreground: oklch(0.955 0.008 75);
  --destructive: oklch(0.58 0.2 20);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.3 0.015 55);
  --input: oklch(0.3 0.015 55);
  --ring: oklch(0.545 0.195 18);

  --primary-soft: oklch(0.545 0.195 18 / 0.1);
  --primary-medium: oklch(0.545 0.195 18 / 0.18);
  --text-tertiary: oklch(0.6 0 0);
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "DM Sans", -apple-system, system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* ============================================================
   Typography
   ============================================================ */

.t-display {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.t-h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.t-h2 {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.t-h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.t-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
}

.t-body-lg {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
}

.t-label {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.t-caption {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}

.t-mono {
  font-family: "Space Mono", monospace;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.section {
  padding: var(--sp-10) 0;
}

.section--sm {
  padding: var(--sp-9) 0;
}

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--sp-3) 0;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: oklch(0.955 0.008 75 / 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.04);
}

.dark .nav--scrolled {
  background: oklch(0.178 0 0 / 0.8);
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.2);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav__logo {
  width: 28px;
  height: 28px;
}

.nav__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__name span {
  color: var(--primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--foreground);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: opacity 0.2s ease;
}

.nav__cta:hover {
  opacity: 0.9;
}

.nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: var(--sp-2);
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__mobile-toggle { display: block; }
  .nav__links--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-5);
    gap: var(--sp-4);
  }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: var(--sp-9);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: var(--primary-soft);
  border: 1px solid var(--primary-medium);
  border-radius: 999px;
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-6);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero__title {
  margin-bottom: var(--sp-5);
}

.hero__title em {
  color: var(--primary);
  font-style: normal;
}

.hero__sub {
  color: var(--muted-foreground);
  max-width: 560px;
  margin-bottom: var(--sp-7);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ── Hero conversation panel ── */

.hero__panel {
  position: relative;
  z-index: 2;
}

.conv-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 1px 2px oklch(0 0 0 / 0.04),
    0 4px 16px oklch(0 0 0 / 0.06),
    0 12px 48px oklch(0 0 0 / 0.06);
}

.dark .conv-panel {
  box-shadow:
    0 1px 2px oklch(0 0 0 / 0.2),
    0 4px 16px oklch(0 0 0 / 0.25),
    0 12px 48px oklch(0 0 0 / 0.2);
}

.conv-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.conv-panel__header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.conv-panel__status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(0.65 0.2 145);
  animation: pulse-dot 2s ease-in-out infinite;
}

.conv-panel__header-title {
  font-size: 0.8125rem;
  font-weight: 600;
}

.conv-panel__header-sub {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.conv-panel__header-badge {
  font-family: "Space Mono", monospace;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(0.65 0.2 145);
  background: oklch(0.65 0.2 145 / 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.conv-panel__waveform {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--muted);
  height: 56px;
  position: relative;
  overflow: hidden;
}

.conv-panel__waveform canvas {
  width: 100%;
  height: 100%;
}

.conv-panel__messages {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 280px;
}

.conv-msg {
  display: flex;
  gap: var(--sp-3);
  opacity: 0;
  transform: translateY(8px);
  animation: msg-appear 0.4s ease forwards;
}

.conv-msg:nth-child(1) { animation-delay: 0.6s; }
.conv-msg:nth-child(2) { animation-delay: 2.2s; }
.conv-msg:nth-child(3) { animation-delay: 3.8s; }
.conv-msg:nth-child(4) { animation-delay: 5.4s; }
.conv-msg:nth-child(5) { animation-delay: 7.0s; }

@keyframes msg-appear {
  to { opacity: 1; transform: translateY(0); }
}

.conv-msg__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.conv-msg__avatar--caller {
  background: var(--primary-soft);
  color: var(--primary);
}

.conv-msg__avatar--agent {
  background: oklch(0.65 0.2 145 / 0.12);
  color: oklch(0.55 0.2 145);
}

.dark .conv-msg__avatar--agent {
  color: oklch(0.7 0.18 145);
}

.conv-msg__body {
  flex: 1;
}

.conv-msg__name {
  font-size: 0.6875rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--muted-foreground);
}

.conv-msg__text {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--foreground);
}

.conv-msg__text .arabic {
  font-size: 0.875rem;
  direction: rtl;
  display: block;
  margin-bottom: 2px;
}

.conv-msg__text .translation {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-style: italic;
}

.conv-msg__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: 4px;
}

.conv-msg__tag {
  font-family: "Space Mono", monospace;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary);
}

.conv-msg__tag--system {
  background: oklch(0.65 0.2 145 / 0.1);
  color: oklch(0.55 0.18 145);
}

.dark .conv-msg__tag--system {
  color: oklch(0.7 0.18 145);
}

.conv-panel__footer {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--muted);
}

.conv-panel__footer-stats {
  display: flex;
  gap: var(--sp-5);
}

.conv-panel__footer-stat {
  display: flex;
  flex-direction: column;
}

.conv-panel__footer-stat-value {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--foreground);
}

.conv-panel__footer-stat-label {
  font-size: 0.625rem;
  color: var(--muted-foreground);
}

@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }
  .hero {
    padding-top: 100px;
    min-height: auto;
  }
  .hero__panel {
    max-width: 480px;
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: "DM Sans", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: transparent;
  color: var(--foreground);
  font-family: "DM Sans", sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: var(--accent);
  border-color: oklch(0.82 0.01 75);
}

.dark .btn-secondary:hover {
  background: var(--accent);
  border-color: oklch(0.38 0.015 55);
}

/* ============================================================
   Stats
   ============================================================ */

.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-7) 0;
  background: var(--muted);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  text-align: center;
}

.stat__value {
  font-family: "Space Mono", monospace;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1.1;
}

.stat__label {
  margin-top: var(--sp-2);
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
}

/* ============================================================
   Waveform Demo
   ============================================================ */

.waveform-demo {
  position: relative;
  overflow: hidden;
}

.waveform-demo__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}

.waveform-demo__visual {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waveform-demo__visual canvas {
  width: 100%;
  height: 100%;
}

.waveform-demo__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.section__label {
  color: var(--primary);
}

.section__title {
  margin-bottom: var(--sp-2);
}

.section__desc {
  color: var(--muted-foreground);
  max-width: 480px;
}

.bullet-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  list-style: none;
}

.bullet-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.bullet-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .waveform-demo__inner { grid-template-columns: 1fr; gap: var(--sp-6); }
}

/* ============================================================
   Features
   ============================================================ */

.features__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--sp-9);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  padding: var(--sp-6);
  background: var(--card);
  transition: background 0.2s ease;
}

.feature-card:hover {
  background: var(--muted);
}

.feature-card__icon {
  width: 36px;
  height: 36px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  color: var(--primary);
}

.feature-card__title {
  margin-bottom: var(--sp-2);
}

.feature-card__desc {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.65;
}

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

/* ============================================================
   Pipeline
   ============================================================ */

.pipeline {
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pipeline__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--sp-8);
}

.pipeline__flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.pipeline__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 150px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.pipeline__node:hover {
  border-color: var(--primary);
}

.pipeline__node-icon {
  width: 44px;
  height: 44px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.pipeline__node-label {
  font-weight: 600;
  font-size: 0.875rem;
}

.pipeline__node-sub {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.pipeline__arrow {
  color: var(--muted-foreground);
  font-size: 1.25rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pipeline__flow { flex-direction: column; }
  .pipeline__arrow { transform: rotate(90deg); }
}

/* ============================================================
   Languages
   ============================================================ */

.languages__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--sp-8);
}

.languages__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  max-width: 720px;
  margin: 0 auto;
}

.lang-card {
  padding: var(--sp-5) var(--sp-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.2s ease;
}

.lang-card--primary {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-medium);
}

.lang-card:hover {
  border-color: oklch(0.78 0.01 75);
}

.dark .lang-card:hover {
  border-color: oklch(0.4 0.015 55);
}

.lang-card__script {
  font-size: 1.75rem;
  margin-bottom: var(--sp-3);
  line-height: 1;
}

.lang-card__name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--sp-1);
}

.lang-card__native {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.lang-card--primary .lang-card__name {
  color: var(--primary);
}

@media (max-width: 600px) {
  .languages__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Use Cases
   ============================================================ */

.use-cases {
  background: var(--muted);
  border-top: 1px solid var(--border);
}

.use-cases__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--sp-8);
}

.use-cases__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

.use-case {
  padding: var(--sp-6);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.use-case__industry {
  color: var(--primary);
  margin-bottom: var(--sp-3);
}

.use-case__title {
  margin-bottom: var(--sp-2);
}

.use-case__desc {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}

.use-case__metrics {
  display: flex;
  gap: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.use-case__metric-value {
  font-family: "Space Mono", monospace;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.use-case__metric-label {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-top: var(--sp-1);
}

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

/* ============================================================
   CTA
   ============================================================ */

.cta {
  text-align: center;
}

.cta__inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta__title {
  margin-bottom: var(--sp-4);
}

.cta__desc {
  color: var(--muted-foreground);
  margin-bottom: var(--sp-7);
}

.cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-6) 0;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer__links {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
}

.footer__link {
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--foreground);
}

/* ============================================================
   Dark mode toggle
   ============================================================ */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2);
  cursor: pointer;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease;
  width: 32px;
  height: 32px;
}

.theme-toggle:hover {
  color: var(--foreground);
  border-color: oklch(0.78 0.01 75);
}

.dark .theme-toggle:hover {
  border-color: oklch(0.4 0.015 55);
}

.theme-toggle .icon-sun,
.dark .theme-toggle .icon-moon { display: none; }
.dark .theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-moon,
.dark .theme-toggle .icon-sun { display: block; }

/* ============================================================
   Split layout (text + aside)
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--sp-8);
  align-items: start;
}

.split--reverse {
  grid-template-columns: 1.2fr 0.8fr;
}

.split__text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.split__aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

@media (max-width: 900px) {
  .split, .split--reverse {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
}

/* ============================================================
   Callout cards (problem section)
   ============================================================ */

.callout-card {
  padding: var(--sp-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.callout-card .t-mono {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: var(--sp-2);
}

/* ============================================================
   Architecture cards
   ============================================================ */

.arch-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.arch-card {
  padding: var(--sp-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.arch-card h3 {
  margin-bottom: var(--sp-3);
}

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

/* ============================================================
   Deep features grid (3-col)
   ============================================================ */

.deep-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.deep-feature {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.deep-feature h3 {
  margin-bottom: var(--sp-2);
}

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

/* ============================================================
   Integrations
   ============================================================ */

.integrations__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

.integration-group {
  padding: var(--sp-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.integration-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.integration-pill {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}

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

/* ============================================================
   Comparison cards
   ============================================================ */

.comparison-card {
  padding: var(--sp-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comparison-card--good {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-soft);
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.comparison-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.comparison-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comparison-list--bad li::before {
  background: var(--muted-foreground);
}

.comparison-list--good li::before {
  background: var(--primary);
}

.comparison-list--good li {
  color: var(--foreground);
}

/* ============================================================
   Pull quote
   ============================================================ */

.quote-section {
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pull-quote {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.pull-quote p {
  font-weight: 400;
  line-height: 1.35;
}

.pull-quote__footer {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-top: var(--sp-6);
}

/* ============================================================
   Utilities
   ============================================================ */

.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-foreground); }
.text-center { text-align: center; }

/* ============================================================
   Reveal animation
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal-stagger--visible > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger--visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger--visible > *:nth-child(3) { transition-delay: 0.12s; }
.reveal-stagger--visible > *:nth-child(4) { transition-delay: 0.16s; }
.reveal-stagger--visible > *:nth-child(5) { transition-delay: 0.2s; }
.reveal-stagger--visible > *:nth-child(6) { transition-delay: 0.24s; }
.reveal-stagger--visible > *:nth-child(7) { transition-delay: 0.28s; }
.reveal-stagger--visible > *:nth-child(8) { transition-delay: 0.32s; }
.reveal-stagger--visible > *:nth-child(9) { transition-delay: 0.36s; }

.reveal-stagger--visible > * {
  opacity: 1;
  transform: translateY(0);
}
