:root {
  --bg: #020d14;
  --bg-soft: #071923;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #5eead4;
  --accent-strong: #99f6e4;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  min-height: 100vh;
}

/* Subtle dot-grid + radial spotlight */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(94, 234, 212, 0.06), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.08) 1px, transparent 0);
  background-size: auto, 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.6'/></svg>");
  z-index: 0;
}

a {
  color: var(--accent-strong);
}

main,
.site-header,
.site-footer .footer-inner {
  width: min(calc(100% - 3rem), var(--container));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 1.75rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand .dot {
  color: var(--accent);
}

/* Language toggle — twelve.js sets className with bg-white shadow-sm on active */
.lang-toggle {
  display: inline-flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 0.25rem;
  border-radius: 8px;
  flex-shrink: 0;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-toggle button:hover {
  color: var(--text);
}
.lang-toggle button[class*="bg-white"] {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

.hero {
  padding: clamp(4rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 5rem);
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .subhead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  max-width: 640px;
}

.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
}

/* Tools section */
.tools {
  padding: 1rem 0 5rem;
}

.tools h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(7, 25, 35, 0.85), rgba(2, 13, 20, 0.7));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.tool-card::after {
  content: "→";
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  transition: transform 0.2s, color 0.2s;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(94, 234, 212, 0.12);
}
.tool-card:hover::after {
  transform: translateX(4px);
  color: var(--accent);
}

.tool-icon {
  width: 44px;
  height: 44px;
}

.tool-name {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}

.tool-domain {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0;
}

.tool-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* About strip */
.about-strip {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--line);
}
.about-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 640px;
}
.about-strip a {
  color: var(--accent-strong);
  text-decoration: none;
}
.about-strip a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}
.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.footer-link:hover {
  color: var(--accent);
}
.footer-copy {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  main,
  .site-header,
  .site-footer .footer-inner {
    width: min(calc(100% - 2rem), var(--container));
  }
  .footer-copy {
    margin-left: 0;
    width: 100%;
  }
}

/* Legal-content: same approach as twelve-digital — twelve.js fills <main id="legal-content">
   with Tailwind-class HTML; we don't load Tailwind, so style it via the DOM structure. */
#legal-content {
  max-width: 800px;
  margin: 2rem auto 5rem;
  padding: 0 1rem;
}
#legal-content > h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 1.5rem;
  color: var(--text);
}
#legal-content > div {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
  padding: 2rem;
}
#legal-content section {
  margin-bottom: 2rem;
}
#legal-content section:last-child {
  margin-bottom: 0;
}
#legal-content h2 {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
#legal-content section > div {
  margin-top: 1rem;
}
#legal-content h3 {
  color: var(--text);
  font-size: 1rem;
  margin: 0 0 0.4rem;
}
#legal-content p,
#legal-content li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin: 0;
}
#legal-content a {
  color: var(--accent-strong);
  text-decoration: none;
}
#legal-content a:hover {
  text-decoration: underline;
}
