/* Fire Tools landing and docs site. Mirrors the app's tokens in src/App.css. */
:root {
  color-scheme: dark;
  --bg: #0D1213;
  --panel: #141B1C;
  --panel-2: #1B2425;
  --panel-3: #232E2F;
  --text: #E8EEEC;
  --muted: #A9B7B4;
  --subtle: #93A3A0;
  --accent: #65D4C4;
  --accent-light: #8EE0D3;
  --accent-soft: rgba(101, 212, 196, 0.1);
  --border: #273233;
  --border-strong: #354344;
  --radius: 12px;
  --radius-sm: 8px;
  --gap: 1.25rem;
  --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI Variable Display', 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.015em; line-height: 1.2; }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--panel-2);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #071B19;
  z-index: 20;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem var(--gap);
  padding: 0.875rem max(1.5rem, calc((100vw - var(--max)) / 2));
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 650;
  font-size: 1rem;
}
.brand:hover { text-decoration: none; }
.brand-icon { width: 1.5em; height: 1.5em; display: inline-block; }

.site-header nav { display: flex; gap: 0.25rem 1.25rem; align-items: center; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }
.site-header nav a.cta {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #071B19;
  font-weight: 600;
}
.site-header nav a.cta:hover { background: var(--accent-light); }

main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  cursor: pointer;
}
.btn:hover { background: var(--panel-3); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #071B19; }
.btn.primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel); }
.btn.is-disabled,
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Hero */
.hero { padding: 4.5rem 0 3rem; }
.hero-copy { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero .accent { color: var(--accent); }
.hero .lede { color: var(--muted); font-size: 1.1rem; max-width: 68ch; margin-bottom: 0.75rem; }
.hero .lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 0.625rem; flex-wrap: wrap; margin-top: 1.75rem; }

.app-frame {
  margin-top: 3rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.app-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 5px);
}
.app-frame figcaption {
  padding: 0.6rem 0.5rem 0.25rem;
  color: var(--subtle);
  font-size: 0.85rem;
}

/* Sections */
.section { padding: 4.5rem 0 0; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 650; margin-bottom: 0.75rem; }
.section p { color: var(--muted); }
.section p strong { color: var(--text); }
.section-lede { margin-bottom: 1.75rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: center;
}
.split .app-frame { margin-top: 0; }
.split--reverse .section-copy { order: 2; }
.section-copy p + p { margin-top: 0.75rem; }

.steps {
  list-style: none;
  counter-reset: step;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}
.steps strong { font-weight: 600; }
.steps span { color: var(--muted); font-size: 0.95rem; }

.checklist { list-style: none; margin-top: 1.25rem; display: grid; gap: 0.75rem; }
.checklist li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--muted);
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* Tools */
.tool-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}
.tool-group h3 {
  color: var(--subtle);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.tool-list { border-top: 1px solid var(--border); }
.tool-list > div { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.tool-list dt { font-weight: 600; margin-bottom: 0.2rem; }
.tool-list dt a { color: var(--text); }
.tool-list dt a:hover { color: var(--accent); }
.tool-list dd { color: var(--muted); font-size: 0.95rem; }

.badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  vertical-align: middle;
}

.note { margin-top: 1.5rem; font-size: 0.95rem; }

.facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.facts li { color: var(--muted); }
.facts strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 0.25rem; }

/* Download */
.download-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  margin-top: 1.25rem;
}
.download-options article {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
}
.download-options article + article { border-left: 1px solid var(--border); }
.download-options h3 { font-size: 1.1rem; font-weight: 600; }
.download-options p { flex: 1; font-size: 0.95rem; margin-bottom: 0.75rem; }
.download-options .btn { align-self: flex-start; }

.macos-install { margin-top: 2.5rem; max-width: 820px; }
.macos-install h3 { font-size: 1.1rem; font-weight: 600; }
.macos-install p { color: var(--muted); margin: 0.75rem 0; }
.macos-install pre {
  overflow-x: auto;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 0.9rem;
}
.macos-install pre code { background: transparent; padding: 0; }

/* Footer */
.site-footer {
  margin-top: 5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--subtle);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.footer-legal {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.footer-legal a { color: var(--muted); }
.footer-sep { opacity: 0.6; }
.footer-attrib { margin: 0; }

/* Docs index cards reuse .features/.feature */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.feature {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.feature h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.feature p { color: var(--muted); }

@media (max-width: 900px) {
  .split,
  .tool-groups { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .split--reverse .section-copy { order: 0; }
  .facts,
  .download-options { grid-template-columns: minmax(0, 1fr); }
  .download-options article + article { border-left: 0; border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .site-header { padding: 0.75rem 1rem; }
  .site-header nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }
  .site-header nav a { white-space: nowrap; }
  main { padding: 0 1rem; }
  .hero { padding-top: 2.5rem; }
  .section { padding-top: 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
