/* Norvia Labs — Neul Labs–inspired dark lab aesthetic */

:root {
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-800: #1e40af;
  --brand-900: #1e3a8a;
  --brand-950: #0f1d3d;

  --accent-400: #a78bfa;
  --accent-500: #8b5cf6;

  --rust: #dea584;
  --python: #3776ab;
  --go: #00add8;
  --typescript: #93c5fd;

  --bg: #0f1d3d;
  --bg-elevated: rgba(255, 255, 255, 0.02);
  --bg-elevated-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #f3f4f6;
  --text-muted: #d1d5db;
  --text-dim: #9ca3af;
  --text-faint: #6b7280;

  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --container: 80rem;
  --header-h: 4rem;
}

html.light {
  --bg: #f8fafc;
  --bg-elevated: rgba(15, 29, 61, 0.03);
  --bg-elevated-hover: rgba(15, 29, 61, 0.06);
  --border: rgba(15, 29, 61, 0.08);
  --border-strong: rgba(15, 29, 61, 0.12);
  --text: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  --text-faint: #94a3b8;
  --brand-950: #f1f5f9;
  --brand-900: #e2e8f0;
  --brand-800: #cbd5e1;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

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

img {
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

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

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

@media (min-width: 768px) {
  .container {
    padding-inline: 2rem;
  }
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Auto height so the mobile menu is not clipped by a fixed bar height */
  height: auto;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--brand-950) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.light .site-header {
  background: color-mix(in oklab, #ffffff 90%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  height: var(--header-h);
  width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  object-fit: cover;
  object-position: center;
  background: #000;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  /* Override global img { height: auto } so the mark stays square */
  max-width: none;
}

.logo-text {
  line-height: 1.2;
  white-space: nowrap;
}

.logo-wordmark {
  height: 1.75rem;
  width: auto;
  display: none;
}

.logo-img-full {
  height: 2.5rem;
  width: auto;
  border-radius: 0.35rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-left: auto;
  min-width: 0;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-dim);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--bg-elevated-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

@media (min-width: 900px) {
  .header-actions {
    margin-left: 0;
  }
}

.icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: inline-grid;
  place-items: center;
  color: var(--text-dim);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
}

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

/* Hide duplicate GitHub CTA on small screens (menu already links there) */
@media (max-width: 899px) {
  .header-actions .btn-primary {
    display: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand-600);
  color: white;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--brand-500);
}

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

.btn-ghost:hover {
  background: var(--bg-elevated-hover);
  color: var(--text);
  border-color: color-mix(in oklab, var(--brand-500) 40%, transparent);
}

.btn-lg {
  padding: 0.8rem 1.35rem;
  font-size: 0.9375rem;
}

.menu-toggle {
  display: grid;
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--brand-950);
  padding: 0.75rem 0 1rem;
}

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

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

html.light .mobile-nav {
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 0.7rem 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
  border-radius: var(--radius-lg);
}

.mobile-nav a:hover {
  background: var(--bg-elevated-hover);
  color: var(--text);
  padding-inline: 0.65rem;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 6.5rem 0 5rem;
  }
}

.hero-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, var(--brand-800) 0%, transparent 55%);
  opacity: 0.3;
}

html.light .hero-glow {
  opacity: 0.2;
  background: radial-gradient(ellipse at top, var(--brand-400) 0%, transparent 55%);
}

.hero-grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
}

html.light .hero-grid {
  background-image:
    linear-gradient(to right, rgba(15, 29, 61, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 29, 61, 0.06) 1px, transparent 1px);
}

.hero-content {
  position: relative;
  max-width: 48rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand-300);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--brand-500) 25%, transparent);
  background: color-mix(in oklab, var(--brand-500) 8%, transparent);
}

html.light .eyebrow {
  color: var(--brand-600);
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(to right, var(--brand-400), var(--accent-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 40rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero-lead {
    font-size: 1.125rem;
  }
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ——— Stats bar ——— */
.stats-bar {
  border-block: 1px solid var(--border);
  background: color-mix(in oklab, var(--brand-950) 50%, transparent);
  backdrop-filter: blur(8px);
  padding: 1.5rem 0;
}

html.light .stats-bar {
  background: rgba(255, 255, 255, 0.6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

.stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--brand-300);
  font-variant-numeric: tabular-nums;
}

html.light .stat-value {
  color: var(--brand-600);
}

.stat-label {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-faint);
}

/* ——— Sections ——— */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

@media (min-width: 768px) {
  .section {
    padding: 5rem 0;
  }
}

#experiments,
#families,
#find,
#principles,
#faq,
#about-blurb {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.section-muted {
  background: linear-gradient(
    to bottom,
    var(--brand-950),
    color-mix(in oklab, var(--brand-900) 20%, transparent)
  );
}

html.light .section-muted {
  background: linear-gradient(to bottom, #f8fafc, #eef2ff);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-400);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 40rem;
  line-height: 1.65;
  font-size: 1rem;
}

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

.section-header.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.section-header .section-title {
  margin-bottom: 0.75rem;
}

.section-header .section-desc {
  margin-bottom: 0;
}

/* ——— About split ——— */
.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
  }
}

.about-body p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.about-body p strong {
  color: var(--text);
  font-weight: 600;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.code-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

html.light .code-panel {
  background: #0f172a;
  border-color: #1e293b;
}

.code-panel-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #475569;
}

.dot.r {
  background: #fb7185;
}
.dot.y {
  background: #fbbf24;
}
.dot.g {
  background: #4ade80;
}

.code-panel pre {
  padding: 1.25rem 1.35rem 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #e2e8f0;
  overflow-x: auto;
  flex: 1;
  margin: 0;
  white-space: pre;
  tab-size: 2;
}

.code-panel .cm {
  color: #64748b;
}
.code-panel .kw {
  color: #c4b5fd;
}
.code-panel .fn {
  color: #7dd3fc;
}
.code-panel .str {
  color: #86efac;
}

/* ——— Filters & cards ——— */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--bg-elevated);
  transition: all 0.15s;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-btn.active {
  color: white;
  background: color-mix(in oklab, var(--brand-600) 90%, transparent);
  border-color: color-mix(in oklab, var(--brand-500) 50%, transparent);
}

html.light .filter-btn.active {
  color: white;
}

.filter-btn .count {
  opacity: 0.7;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;
  height: 100%;
}

.product-card:hover {
  background: var(--bg-elevated-hover);
  border-color: color-mix(in oklab, var(--brand-500) 30%, transparent);
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.product-name-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.product-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--brand-500) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--brand-500) 20%, transparent);
  display: inline-grid;
  place-items: center;
  color: var(--brand-400);
}

.product-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
}

.product-name {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-300);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.product-name:hover {
  color: var(--brand-200);
}

html.light .product-name {
  color: var(--brand-600);
}

.stack-badge {
  flex-shrink: 0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.625rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  align-self: center;
}

html.light .stack-badge {
  background: rgba(15, 29, 61, 0.06);
}

.stack-badge[data-stack="Rust"],
.stack-badge[data-stack="Rust + Python"] {
  color: var(--rust);
}
.stack-badge[data-stack="Python"] {
  color: #60a5fa;
}
.stack-badge[data-stack="TypeScript"] {
  color: var(--typescript);
}
.stack-badge[data-stack="Go"] {
  color: var(--go);
}

.product-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1 1 auto;
  margin: 0;
}

.product-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.product-family {
  color: var(--text-faint);
  line-height: 1.3;
  min-width: 0;
}

.product-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

.product-links a {
  font-weight: 500;
}

.product-links .visit {
  color: var(--brand-400);
}

.product-links .visit:hover {
  color: var(--brand-300);
}

.product-links .code {
  color: var(--text-faint);
}

.product-links .code:hover {
  color: var(--text);
}

.empty-state {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

.empty-state.show {
  display: block;
}

.see-all {
  display: inline-flex;
  margin-top: 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--brand-400);
}

.see-all:hover {
  color: var(--brand-300);
}

/* ——— Families ——— */
.family-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .family-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.family-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  min-width: 0;
}

.family-card h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.family-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-400);
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.family-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1 1 auto;
}

.family-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
}

.family-tags a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  background: color-mix(in oklab, var(--brand-500) 10%, transparent);
  color: var(--brand-300);
  border: 1px solid color-mix(in oklab, var(--brand-500) 15%, transparent);
}

.family-tags a:hover {
  background: color-mix(in oklab, var(--brand-500) 18%, transparent);
}

/* ——— Decision table ——— */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
}

table.decision {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 640px;
}

table.decision th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  vertical-align: middle;
}

html.light table.decision th {
  background: rgba(15, 29, 61, 0.04);
}

table.decision td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
  line-height: 1.45;
}

table.decision td:first-child {
  color: var(--text);
}

table.decision tr:last-child td {
  border-bottom: none;
}

table.decision tr:hover td {
  background: var(--bg-elevated-hover);
}

table.decision .mono {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--brand-300);
}

html.light table.decision .mono {
  color: var(--brand-600);
}

/* ——— Principles ——— */
.principles {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .principles {
    grid-template-columns: repeat(4, 1fr);
  }
}

.principle {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  min-width: 0;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--brand-400);
  margin-bottom: 0.75rem;
}

.principle h3 {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.principle p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  flex: 1 1 auto;
}

/* ——— CTA ——— */
.cta-block {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
}

.cta-block .section-title {
  margin-bottom: 0.85rem;
}

.cta-block .section-desc {
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ——— FAQ ——— */
/* Center header + accordion as one block in the container */
#faq .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#faq .section-header {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  text-align: left;
}

.faq-list {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0;
}

.faq-item {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  overflow: hidden;
  /* Prevent shrink-to-fit so every row shares the same width */
  flex: 0 0 auto;
  align-self: stretch;
}

.faq-item summary {
  cursor: pointer;
  /* Fixed columns: question left, control right — icons line up across rows */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.5rem;
  align-items: center;
  column-gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  list-style: none;
  text-align: left;
}

.faq-item summary::-webkit-details-marker,
.faq-item summary::marker {
  display: none;
  content: "";
}

.faq-item summary::after {
  content: "+";
  grid-column: 2;
  justify-self: center;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-faint);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-body {
  /* Match summary text column (exclude the icon column + gap) */
  padding: 0 1.25rem 1.15rem;
  padding-right: calc(1.25rem + 1.5rem + 1rem);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  text-align: left;
}

.faq-item .faq-body p {
  margin: 0;
}

.faq-item .faq-body a {
  word-break: break-word;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
  width: 100%;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem 1.5rem;
  }
}

.footer-brand .logo {
  margin-bottom: 0;
}

.footer-brand p {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--text-faint);
  max-width: 18rem;
  line-height: 1.6;
}

.footer-col {
  min-width: 0;
}

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-dim);
  padding: 0.3rem 0;
  line-height: 1.35;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-faint);
}

/* ——— Page hero (inner pages) ——— */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 36rem;
  line-height: 1.65;
  margin: 0;
}

.page-hero .logo-img-full,
.page-hero .logo-mark {
  margin-bottom: 1rem;
}

/* ——— Utility ——— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.text-link {
  color: var(--brand-400);
  font-weight: 500;
}

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

/* ——— Contact page ——— */
.contact-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 3.5rem;
  }
}

.contact-intro {
  max-width: 32rem;
}

.contact-intro .section-desc {
  margin-bottom: 1.5rem;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color 0.15s, background 0.15s;
}

.contact-channel:hover {
  border-color: color-mix(in oklab, var(--brand-500) 30%, transparent);
  background: var(--bg-elevated-hover);
}

.contact-channel-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  display: inline-grid;
  place-items: center;
  background: color-mix(in oklab, var(--brand-500) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--brand-500) 20%, transparent);
  color: var(--brand-400);
}

.contact-channel-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.contact-channel strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.15rem;
  color: var(--text);
}

.contact-channel span,
.contact-channel p {
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.contact-channel .channel-value {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand-300);
  word-break: break-all;
}

html.light .contact-channel .channel-value {
  color: var(--brand-600);
}

.contact-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--bg-elevated);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .contact-form-card {
    padding: 1.75rem 1.85rem;
  }
}

.contact-form-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.contact-form-card .form-lead {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1.35rem;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.form-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

.form-field .req {
  color: var(--brand-400);
  font-weight: 700;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: color-mix(in oklab, var(--brand-950) 70%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}

html.light .form-field input,
html.light .form-field textarea,
html.light .form-field select {
  background: #fff;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-faint);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--brand-500) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-500) 18%, transparent);
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-field .hint {
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.form-field-file input[type="file"] {
  padding: 0.55rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.form-status {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-status.show {
  display: block;
}

.form-status.success {
  border: 1px solid color-mix(in oklab, #4ade80 35%, transparent);
  background: color-mix(in oklab, #4ade80 10%, transparent);
  color: #bbf7d0;
}

html.light .form-status.success {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.form-status.error {
  border: 1px solid color-mix(in oklab, #fb7185 35%, transparent);
  background: color-mix(in oklab, #fb7185 10%, transparent);
  color: #fecdd3;
}

html.light .form-status.error {
  color: #9f1239;
  background: #ffe4e6;
  border-color: #fda4af;
}
