.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.faint { color: var(--text-faint); }
.muted { color: var(--text-dim); }
.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 700;
}
.h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: 1.12;
  font-weight: 650;
}
.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1.15;
  font-weight: 650;
}
.h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.2;
  font-weight: 650;
}
.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.bg-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(139,92,246,.18), transparent 34%),
    radial-gradient(circle at 80% 25%, rgba(34,211,238,.12), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
}
.bg-field::before {
  content: "";
  position: absolute;
  inset: -20%;
  opacity: .7;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: drift 24s linear infinite;
}
@keyframes drift { to { transform: translate3d(36px, 24px, 0); } }

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
}
.nav-inner {
  width: min(100% - 32px, var(--container));
  min-height: 68px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: url(/assets/logo.png) no-repeat center / contain;
}
.nav-links { display: flex; gap: var(--sp-4); margin-left: auto; }
.nav-links a {
  color: var(--text-dim);
  font-size: var(--fs-sm);
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: var(--sp-3); }
.theme-toggle, .nav-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
}
.theme-toggle svg, .nav-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .theme-toggle .moon,
[data-theme="light"] .theme-toggle .sun { display: none; }
.nav-toggle { display: none; }

/* Language switcher — globe button + dropdown menu of real links */
.lang-switch { position: relative; }
.lang-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.lang-btn:hover,
.lang-switch.is-open .lang-btn { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lang-btn .lang-globe { width: 18px; height: 18px; color: var(--accent); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 136px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
  z-index: 60;
}
.lang-switch.is-open .lang-menu,
.lang-switch:focus-within .lang-menu { visibility: visible; opacity: 1; transform: none; }
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a.is-current { color: var(--text); }
.lang-menu a.is-current::after { content: "✓"; color: var(--accent); font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-full);
  font-weight: 700;
  border: 1px solid var(--border);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.btn-lg {
  min-height: 52px;
  padding-inline: 24px;
  font-size: 1rem;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad-brand); color: white; border: none; box-shadow: var(--glow-soft); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-link { color: var(--accent); padding-inline: 0; border: none; background: transparent; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  color: var(--text);
  background: var(--violet-soft);
  border: 1px solid rgba(var(--violet-rgb), .24);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}
.badge--cyan { color: var(--accent); border-color: rgba(var(--accent-rgb), .25); background: rgba(var(--accent-rgb), .10); }
.badge--violet { color: var(--primary); }
.badge--magenta { color: #EC4899; border-color: rgba(236,72,153,.25); background: rgba(236,72,153,.10); }

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  padding: var(--sp-5);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.card > * {
  position: relative;
}
.card--spot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .16), transparent 55%);
  transition: opacity var(--t-base);
}
.card--spot:hover::before { opacity: 1; }
a.card:hover, .card--spot:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}
.card--glow { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--violet-rgb), .25);
  border-radius: var(--r-sm);
  background: var(--violet-soft);
  color: var(--primary);
}
.card-icon svg { width: 23px; height: 23px; }
.cat-count, .soon-tag {
  color: var(--text-faint);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-4);
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.chev { width: 16px; height: 16px; }

.code {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #090914;
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #9CA3AF;
}
.code-head i { width: 10px; height: 10px; border-radius: 50%; background: #EF4444; }
.code-head i:nth-child(2) { background: #F59E0B; }
.code-head i:nth-child(3) { background: #22C55E; }
.code pre { margin: 0; padding: 18px; overflow: auto; color: #D7E0FF; font-family: var(--font-mono); font-size: .9rem; line-height: 1.65; }
.code .p { color: #22D3EE; }
.code .s { color: #A7F3D0; }

.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-7) 0 var(--sp-4);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-6);
}
.footer h5 { margin-bottom: var(--sp-3); font-size: var(--fs-sm); }
.footer a:not(.brand) { display: block; color: var(--text-dim); font-size: var(--fs-sm); margin-top: 8px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: var(--fs-sm);
}

.section, .section--tight {
  padding: var(--sp-9) 0;
}
.section--tight { padding-block: var(--sp-6); }
.hero {
  min-height: 92vh;
  display: grid;
  align-content: center;
  padding-top: calc(68px + var(--sp-7));
  padding-bottom: var(--sp-7);
}
.hero .display, .section .display {
  margin: var(--sp-4) 0;
}
.hero-cta, .hero-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.sec-head {
  margin-bottom: var(--sp-6);
}
.sec-head.narrow, .narrow {
  max-width: var(--container-narrow);
}
.sec-head p {
  color: var(--text-dim);
  font-size: var(--fs-lead);
  line-height: 1.7;
  margin-top: var(--sp-3);
}
.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.swatch {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.swatch .chip {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.swatch .meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.swatch code {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
