/* ===== Theme tokens ===== */
:root {
  --bg: #ffffff;
  --surface: #f3f6fb;
  --ink: #0b1422;
  --muted: #54627a;
  --line: rgba(13, 34, 71, 0.14);
  --line-strong: rgba(13, 34, 71, 0.26);
  --accent: #1e7bf5;
  --accent-dim: #1763cf;
  --accent-ink: #ffffff;
}
[data-theme="dark"] {
  --bg: #0a0e16;
  --surface: #111720;
  --ink: #e8edf5;
  --muted: #93a0b5;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #4ea6ff;
  --accent-dim: #6cb6ff;
  --accent-ink: #061018;
}

/* ===== Reset + base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0; /* zero-radius house style */
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}
.label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  padding: 3px 10px;
  color: var(--accent);
}
.accent {
  color: var(--accent);
}

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 1.05rem;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}
.nav a {
  padding: 7px 12px;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav a:hover {
  color: var(--ink);
}
.toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Hero ===== */
.hero {
  padding: clamp(64px, 12vw, 130px) clamp(20px, 5vw, 40px) clamp(48px, 8vw, 90px);
}
.hero .label {
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.hero-sub {
  margin-top: 26px;
  max-width: 56ch;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--muted);
}
.hero-cta {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Sections ===== */
.section {
  padding: clamp(48px, 8vw, 80px) clamp(20px, 5vw, 40px);
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ===== Product grid (hairline table) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-top: none;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg);
  padding: 28px clamp(20px, 3vw, 30px) 24px;
  min-height: 240px;
  transition: background 0.15s ease;
}
.card:hover {
  background: var(--surface);
}
.card-no {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.card-body {
  flex: 1;
}
.card-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin-bottom: 10px;
}
.card-title {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.card-desc {
  color: var(--muted);
  font-size: 0.96rem;
}
.card-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card .arrow {
  color: var(--accent);
  transition: transform 0.18s ease;
}
.card:hover .arrow {
  transform: translate(2px, -2px);
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding-top: 34px;
}
.about-lead {
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
}
.about-lead strong {
  color: var(--accent);
  font-weight: 600;
}
.about-text {
  color: var(--muted);
  align-self: center;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 8vw, 80px);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 18px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.92rem;
}
.footer-links a {
  color: var(--muted);
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--ink);
}
.footer-meta {
  padding-bottom: 30px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .nav a:not(.nav-ghost) {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
