/* H Programming Language Website Stylesheet */

:root {
  /* Brand palette sampled directly from logo.png */
  --crimson-bright: #d11b48;
  --crimson: #a7173c;
  --crimson-deep: #7c1231;
  --crimson-gradient: linear-gradient(160deg, #d11b48 0%, #a7173c 55%, #7c1231 100%);
  --crimson-bar: linear-gradient(90deg, #a7173c 0%, #d11b48 100%);

  /* Dark theme (default) */
  --bg: #0c0d11;
  --bg-alt: #11131a;
  --surface: #161922;
  --surface-elevated: #1c202c;
  --surface-hover: #222736;
  --code-bg: #10121a;
  --code-header: #161923;
  --border: #252a38;
  --border-strong: #353c50;
  --text: #eef0f6;
  --text-secondary: #a7b0c4;
  --text-muted: #7b849b;
  --accent: #f0486e;
  --accent-soft: rgba(209, 27, 72, 0.14);
  --accent-border: rgba(209, 27, 72, 0.38);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.25);

  /* Syntax highlighting (dark) */
  --tok-comment: #6f7891;
  --tok-keyword: #ff6485;
  --tok-type: #7ec8ff;
  --tok-func: #d2a8ff;
  --tok-string: #7ee2a8;
  --tok-number: #f5b971;
  --tok-attr: #ffb86c;
  --tok-ivar: #f28ba8;
  --tok-const: #ff9a76;
  --tok-op: #c7d0e2;
  --tok-variant: #93e5d2;

  /* Benchmark bar colors */
  --bar-c: #5b8def;
  --bar-ruby: #6c7388;
  --bar-track: #1f2433;

  /* Layout & typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container: 1120px;
}

[data-theme="light"] {
  --bg: #faf9f7;
  --bg-alt: #f3f1ee;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f5f3f0;
  --code-bg: #141720;
  --code-header: #1c202c;
  --border: #e4e1db;
  --border-strong: #cfc9bf;
  --text: #181a20;
  --text-secondary: #4c5263;
  --text-muted: #6f7688;
  --accent: #a7173c;
  --accent-soft: rgba(167, 23, 60, 0.08);
  --accent-border: rgba(167, 23, 60, 0.28);
  --shadow-lg: 0 20px 50px rgba(24, 26, 32, 0.09);
  --shadow-sm: 0 4px 14px rgba(24, 26, 32, 0.06);
  --bar-c: #3568d4;
  --bar-ruby: #8a91a4;
  --bar-track: #eae7e1;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--crimson-bright);
}

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

p code,
li code,
td code,
.card code,
.bench-note code {
  font-size: 0.875em;
  padding: 0.14em 0.42em;
  border-radius: 5px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--crimson-bright);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.65rem 1rem;
  background: var(--crimson);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 6px;
}

.brand-ext {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 36px;
  padding: 0;
}

[data-theme="dark"] .icon-sun,
:root:not([data-theme="light"]) .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon,
:root:not([data-theme="light"]) .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

.menu-toggle {
  display: none;
  width: 36px;
  padding: 0;
}

/* Hero */

.hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 820px;
  height: 460px;
  background: radial-gradient(ellipse at center, rgba(209, 27, 72, 0.2) 0%, rgba(124, 18, 49, 0.08) 42%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .hero::before {
  background: radial-gradient(ellipse at center, rgba(209, 27, 72, 0.12) 0%, rgba(167, 23, 60, 0.04) 45%, transparent 72%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 1.75rem;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crimson-bright);
  box-shadow: 0 0 10px var(--crimson-bright);
}

.hero-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(209, 27, 72, 0.16);
  margin-bottom: 1.5rem;
}

.hero-logo {
  width: 72px;
  height: 72px;
  display: block;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  max-width: 18ch;
}

.hero-title-accent {
  background: var(--crimson-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin: 0 0 0.85rem;
  font-size: clamp(1.12rem, 2.2vw, 1.38rem);
  font-weight: 500;
  color: var(--text);
  max-width: 44ch;
  line-height: 1.45;
}

.hero-sub {
  margin: 0 0 2rem;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.35rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--crimson-gradient);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(167, 23, 60, 0.35);
}

.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(209, 27, 72, 0.42);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

/* Copyable Terminal Snippet in Hero */

.hero-install {
  width: 100%;
  max-width: 680px;
  text-align: left;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 2.75rem;
}

.snippet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.95rem;
  background: var(--code-header);
  border-bottom: 1px solid #252a38;
}

.snippet-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #9ba5bc;
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f3547;
}

.window-dots span:first-child {
  background: rgba(209, 27, 72, 0.75);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #2e3446;
  background: #1c202d;
  color: #c7d0e2;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: #262c3d;
  border-color: #444d66;
  color: #ffffff;
}

.copy-btn.is-copied {
  border-color: rgba(126, 226, 168, 0.45);
  color: #7ee2a8;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.hero-install pre {
  margin: 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.87rem;
  line-height: 1.65;
  color: #e6ebf5;
}

.shell-prompt {
  color: #f0486e;
  user-select: none;
}

.shell-comment {
  color: #737e99;
}

/* Trust Strip */

.trust-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.trust-item {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
}

.trust-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.trust-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Sections */

.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.section-title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-lead {
  margin: 0;
  font-size: 1.03rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Interactive Tabbed Code Showcase */

.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.showcase-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.showcase-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.showcase-tab[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.tab-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.7;
}

.code-window {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.code-panel {
  display: none;
}

.code-panel.is-active {
  display: block;
}

.code-panel pre {
  margin: 0;
  padding: 1.35rem 1.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #e6ebf5;
  tab-size: 2;
}

.code-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1.35rem;
  background: #141822;
  border-top: 1px solid #242938;
  font-size: 0.88rem;
  color: #a9b3c8;
}

.code-caption {
  margin: 0;
  max-width: 68ch;
}

.code-output {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #7ee2a8;
  background: rgba(126, 226, 168, 0.08);
  border: 1px solid rgba(126, 226, 168, 0.25);
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
}

.interop-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  background: #11141d;
  border-top: 1px solid #202534;
}

.interop-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #cbd3e6;
  background: #1b202e;
  border: 1px solid #2c3347;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.interop-pill strong {
  color: #ff6485;
  font-weight: 600;
}

/* Syntax Token Classes */

.hl-comment { color: var(--tok-comment); font-style: italic; }
.hl-keyword { color: var(--tok-keyword); font-weight: 600; }
.hl-type { color: var(--tok-type); }
.hl-func { color: var(--tok-func); }
.hl-string { color: var(--tok-string); }
.hl-number { color: var(--tok-number); }
.hl-attr { color: var(--tok-attr); }
.hl-ivar { color: var(--tok-ivar); }
.hl-const { color: var(--tok-const); }
.hl-op { color: var(--tok-op); }
.hl-variant { color: var(--tok-variant); }
.hl-interp-delim { color: var(--tok-keyword); }

/* Feature Grid (Why H) */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Benchmarks */

.bench-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.bench-env {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.scale-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.scale-btn {
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.scale-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.bench-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.bench-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.bench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.bench-head h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
}

.bench-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  white-space: nowrap;
}

.bench-sub {
  margin: 0 0 1.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bench-bars {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-bottom: 1.35rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bar-row.is-hidden-zoom {
  opacity: 0.42;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.86rem;
}

.bar-name {
  font-weight: 600;
  color: var(--text);
}

.bar-val {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.bar-row.is-h .bar-val {
  color: var(--accent);
  font-weight: 700;
}

.bar-track {
  height: 11px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  min-width: 6px;
  border-radius: 999px;
  transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill {
    transition: none;
  }
}

.bar-fill.fill-h {
  background: var(--crimson-bar);
}

.bar-fill.fill-c {
  background: var(--bar-c);
}

.bar-fill.fill-ruby {
  background: var(--bar-ruby);
}

.bench-note {
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.bench-footer {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Tooling & Standard Library */

.tooling-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 2.75rem;
}

.tool-card {
  padding: 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tool-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.tool-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.tool-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.stdlib-box {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stdlib-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.stdlib-header h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
}

.stdlib-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.stdlib-group h4 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.module-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.62rem;
  border-radius: 7px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.module-chip code {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0;
}

/* Install & Build */

.install-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 1.75rem;
  align-items: start;
}

.req-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.req-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.req-platform {
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.req-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.req-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.req-list strong {
  color: var(--text);
  font-size: 0.94rem;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.install-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.install-block pre {
  margin: 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.68;
  color: #e6ebf5;
}

.install-note {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.75rem 0;
  background: var(--bg);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--text);
}

.footer-brand-row img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}

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

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

/* 404 Page */

.not-found {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.not-found-card {
  max-width: 480px;
}

.not-found-code {
  font-family: var(--font-mono);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  margin: 0 0 0.75rem;
  background: var(--crimson-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Responsive Breakpoints */

@media (max-width: 980px) {
  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .bench-grid,
  .tooling-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .install-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .site-nav.is-open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-label {
    display: none;
  }

  .hero {
    padding: 3.75rem 0 3.25rem;
  }

  .section {
    padding: 3.75rem 0;
  }

  .feature-grid,
  .bench-grid,
  .tooling-grid,
  .stdlib-groups {
    grid-template-columns: 1fr;
  }

  .code-panel pre {
    padding: 1.1rem;
    font-size: 0.83rem;
  }
}

@media (max-width: 480px) {
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }
}
