:root {
  --bg: oklch(16% 0.02 250);
  --surface: oklch(20% 0.025 250);
  --surface-2: oklch(23% 0.025 250);
  --text: oklch(96% 0.01 250);
  --muted: oklch(70% 0.02 250);
  --border: oklch(96% 0.01 250 / 12%);
  --accent: oklch(78% 0.14 195);
  --accent-strong: oklch(85% 0.12 195);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand img { width: 26px; height: 26px; }
.brand:hover { color: var(--text); }

.site-header nav {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--text); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  background:
    radial-gradient(circle at 82% 20%, oklch(35% 0.08 195 / 22%), transparent 45%),
    repeating-linear-gradient(0deg, var(--border) 0px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--border) 0px, transparent 1px 48px);
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.eyebrow img { width: 20px; height: 20px; }

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 20px;
}

.hero .lede {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.btn-primary { background: var(--accent); color: oklch(16% 0.02 250); }
.btn-primary:hover { background: var(--accent-strong); color: oklch(16% 0.02 250); }

.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn[hidden] { display: none; }

/* A button whose link doesn't exist yet, such as a store page before launch. */
.btn-soon { cursor: default; opacity: 0.6; }
.btn-primary.btn-soon:hover { background: var(--accent); }

.btn-tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: oklch(16% 0.02 250 / 18%);
}

/* Spotlight: one tool's key art, between the hero and the grid */
.spotlight { padding: 72px 0 0; }
.spotlight[hidden] { display: none; }

.spotlight-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 48px;
  overflow: hidden;
  padding: 56px 0 56px 56px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(circle at 78% 50%, color-mix(in oklch, var(--tool-accent) 16%, transparent), transparent 62%),
    var(--surface);
}

.spotlight-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.spotlight h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.spotlight p { font-size: 16px; color: var(--muted); max-width: 420px; margin: 0 0 12px; }

/* The key art runs off the card's right edge, turned slightly away, like the store card. */
.spotlight-art { display: block; margin-right: -14%; perspective: 1600px; }

.spotlight-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 40px 80px -30px oklch(5% 0.02 250 / 90%);
  transform: rotateY(-9deg);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.spotlight-art:hover img { transform: rotateY(-4deg); }

/* Each part of the card stacks every tool's version in one grid cell, as tall as the longest, so
   changing tools cross-fades the content while everything stays where it is. */
.spotlight-stack { display: grid; }
.spotlight-stack > .spotlight-layer { grid-area: 1 / 1; transition: opacity 0.5s ease, visibility 0.5s; }
.spotlight-stack > .spotlight-layer:not(.is-active) { opacity: 0; visibility: hidden; }
.spotlight-stack.hero-actions { display: grid; }
.spotlight-text .spotlight-stack { width: 100%; }
.spotlight-text .spotlight-layer { display: flex; align-items: flex-start; }
.spotlight-art-stack { margin-right: -14%; }
.spotlight-art-stack .spotlight-art { margin-right: 0; }

.spotlight-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}

.spotlight-controls[hidden] { display: none; }

.spotlight-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.spotlight-nav:hover { color: var(--text); border-color: var(--tool-accent, var(--accent)); }

.spotlight-dots { display: flex; align-items: center; gap: 8px; }

.spotlight-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.spotlight-dot:hover { background: var(--muted); }
.spotlight-dot[aria-current="true"] { width: 28px; background: var(--tool-accent, var(--accent)); }

@media (prefers-reduced-motion: reduce) {
  .spotlight-stack > .spotlight-layer,
  .spotlight-dot { transition: none; }
}

/* Tools */
.tools { padding: 88px 0 96px; }

.tools h2 {
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 32px;
  font-weight: 500;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--tool-accent, var(--accent));
  transform: translateY(-2px);
  outline: none;
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tool-accent, var(--accent));
}

.tool-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.tool-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  flex-grow: 1;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-soon,
.status-live { color: var(--tool-accent, var(--accent)); }
.status-dev { color: var(--muted); }

.tools-footnote {
  margin: 28px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.footer-brand img { width: 16px; height: 16px; }

.copyright {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.footer-contact {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

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

/* Tool detail modal */
.modal-backdrop[hidden] { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(10% 0.02 250 / 65%);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* A tool's card art across the top of its popup, edge to edge. */
.modal-banner {
  display: block;
  flex-shrink: 0;
  width: calc(100% + 72px);
  max-width: none;
  height: auto;
  margin: -36px -36px 4px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.modal-banner[hidden] { display: none; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
}

.modal-close:hover { color: var(--text); background: var(--surface-2); }

.modal.has-banner .modal-close {
  color: var(--text);
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tool-accent, var(--accent));
}

.modal-icon svg { width: 24px; height: 24px; }

.modal h3 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.modal p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 860px) {
  .spotlight-card { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px 0 0 40px; }
  .spotlight-text { padding-right: 40px; }
  .spotlight-art { margin: 0 -2px -2px 0; perspective: none; }
  .spotlight-art-stack { margin: 0; }
  .spotlight-art img, .spotlight-art:hover img { transform: none; border-radius: 12px 0 0 0; }
}

@media (max-width: 600px) {
  .header-inner { height: 60px; }
  .site-header nav { gap: 18px; }
  .hero { padding: 64px 0 56px; }
  .spotlight { padding-top: 48px; }
  .spotlight-card { padding: 28px 0 0 24px; }
  .spotlight-text { padding-right: 24px; }
  .tools { padding: 56px 0 64px; }
}
