:root {
  color-scheme: light;
  --background: #f5f4f0;
  --surface: #ebeae5;
  --text: #171716;
  --muted: #686762;
  --line: #cecdc7;
  --accent: #196ca3;
  --accent-contrast: #f7fbfe;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #151514;
  --surface: #20201e;
  --text: #f0efea;
  --muted: #aaa9a3;
  --line: #393936;
  --accent: #79b9e4;
  --accent-contrast: #11181d;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button { color: inherit; font: inherit; }

.site-header,
main,
footer {
  margin: 0 auto;
  max-width: 1180px;
  width: calc(100% - 3rem);
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 76px;
  justify-content: space-between;
}

.brand {
  align-items: baseline;
  display: flex;
  font-size: 1.05rem;
  font-weight: 720;
  gap: .5rem;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand-section {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 540;
  letter-spacing: .08em;
  text-transform: uppercase;
}

nav { align-items: center; display: flex; gap: 1.2rem; }
nav a { color: var(--muted); font-size: .82rem; text-decoration: none; }
nav a:hover { color: var(--text); }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  height: 36px;
  place-items: center;
  width: 36px;
}

.theme-toggle:hover { background: var(--surface); }

main { padding: clamp(5rem, 10vw, 9rem) 0 7rem; }
.hero { max-width: 850px; }
.eyebrow, .tool-type {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 720;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: "Avenir Next", "Century Gothic", "Avant Garde", Futura, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 300;
  letter-spacing: -.055em;
  line-height: .94;
  margin: 1.3rem 0 2rem;
}

.intro {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.65;
  margin: 0;
  max-width: 650px;
}

.tools { margin-top: clamp(6rem, 12vw, 11rem); }
.section-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: .85rem;
}

.section-heading h2,
.section-heading span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .1em;
  margin: 0;
  text-transform: uppercase;
}

.tool-card {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2rem;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  padding: 2.3rem 1rem;
  text-decoration: none;
  transition: background-color 160ms ease, padding 160ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  background: var(--surface);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.tool-meta { align-items: flex-start; display: grid; gap: 1rem; }
.tool-number { color: var(--muted); font: .8rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.tool-copy h3 {
  font-family: "Avenir Next", "Century Gothic", "Avant Garde", Futura, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1;
  margin: 0 0 .75rem;
}
.tool-copy p { color: var(--muted); line-height: 1.55; margin: 0; max-width: 650px; }
.tool-action { color: var(--accent); font-size: .85rem; font-weight: 650; white-space: nowrap; }

footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: .78rem;
  justify-content: space-between;
  padding: 1.5rem 0 2.5rem;
}

footer p { margin: 0; }
footer a { text-underline-offset: .2em; }

@media (max-width: 720px) {
  .site-header, main, footer { width: calc(100% - 2rem); }
  .site-header { height: 64px; }
  nav a { display: none; }
  main { padding-top: 4.5rem; }
  .hero h1 { font-size: clamp(2.9rem, 15vw, 5rem); }
  .tools { margin-top: 6rem; }
  .tool-card { align-items: start; gap: 1.3rem; grid-template-columns: 1fr auto; padding: 1.7rem .35rem; }
  .tool-meta { display: flex; grid-column: 1 / -1; justify-content: space-between; }
  .tool-action { padding-top: .4rem; }
  footer { align-items: flex-start; gap: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
}
