/* Light palette is the default — this is a local-business-facing
   marketing site, not a developer tool, so it should look normal to
   anyone regardless of theme preference. Dark mode is available via
   system preference or the toggle in the header. */
:root {
  --bg: #ffffff;
  --fg: #1a1d24;
  --muted: #5c6270;
  /* Brand green from the logo (a vivid chartreuse) fails contrast on white
     (~1.3:1), so light mode reuses the deeper green from RF's resume
     template (#2e7d4f, 5.0:1 on white) instead — consistent personal
     brand, still legible. */
  --accent: #2e7d4f;
  --accent-contrast: #ffffff;
  --border: #e2e4ea;
  --surface: #f5f6f8;
  --error: #c62828;
  --success: #2e7d32;
}

/* System preference, when the user hasn't made an explicit choice here */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --fg: #e8e8ea;
    --muted: #9a9aa5;
    /* True to the logo's neon green on a dark background, where it has
       plenty of contrast. It's too light for white button labels, so
       filled buttons use --accent-contrast (near-black) as the label color. */
    --accent: #7cfb0b;
    --accent-contrast: #05170a;
    --border: #2a2d36;
    --surface: #1a1d24;
    --error: #ff6b6b;
    --success: #4caf50;
  }
}

/* Explicit toggle wins over system preference in both directions */
:root[data-theme="dark"] {
  --bg: #0f1115;
  --fg: #e8e8ea;
  --muted: #9a9aa5;
  --accent: #7cfb0b;
  --accent-contrast: #05170a;
  --border: #2a2d36;
  --surface: #1a1d24;
  --error: #ff6b6b;
  --success: #4caf50;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.site-header .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* Two logo images, each baked for one theme's background — swap which
   one's visible using the same theme-detection pattern as the color
   tokens, rather than trying to derive one from the other. */
.brand-image-light { display: block; height: 3.5rem; width: auto; }
.brand-image-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-image-light { display: none; }
  :root:not([data-theme="light"]) .brand-image-dark { display: block; height: 3.5rem; width: auto; }
}

:root[data-theme="dark"] .brand-image-light { display: none; }
:root[data-theme="dark"] .brand-image-dark { height: 3.5rem; width: auto; display: block; }

/* Two banner images, each baked for one theme's background — same
   swap pattern as the logo. */
.home-banner-light,
.home-banner-dark {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 2rem;
}

.home-banner-light { display: block; }
.home-banner-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-banner-light { display: none; }
  :root:not([data-theme="light"]) .home-banner-dark { display: block; }
}

:root[data-theme="dark"] .home-banner-light { display: none; }
:root[data-theme="dark"] .home-banner-dark { display: block; }

.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
}

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

.theme-toggle {
  margin-left: 1.5rem;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.theme-toggle button {
  background: var(--surface);
  color: var(--muted);
  border: none;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 0;
}

.theme-toggle button:hover { color: var(--fg); }
.theme-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); margin-bottom: 1.5rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* On the homepage the eyebrow sits below the choice cards instead of
   above a heading (unlike roi.html/prestige.html, where it's still the
   lead-in above their h1) — flip the spacing to match. */
.choice .eyebrow {
  margin-bottom: 0;
  margin-top: 1.5rem;
}

.choice h1 { font-size: 2rem; margin-bottom: 2rem; }

.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .choice-cards { grid-template-columns: 1fr; }
}

.choice-card {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.choice-card:hover { border-color: var(--accent); }
.choice-card h2 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.choice-card p { margin: 0; color: var(--muted); }

.pitch h1 { font-size: 2.2rem; margin-bottom: 1rem; }
.pitch .lede { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.5rem; }
.pitch h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }

.pitch-points {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.pitch-points li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.button, button, input[type="submit"] {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
}

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.25rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  padding: 0.5rem;
  background: var(--surface);
  /* var(--border) is too subtle against var(--surface) in light mode
     specifically (both are near-white) — var(--muted) gives real
     definition in both themes without touching the shared surface
     token used elsewhere (cards, messages). */
  border: 1px solid var(--muted);
  border-radius: 6px;
  color: var(--fg);
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.error { color: var(--error); }

.services-list, .post-list { list-style: none; padding: 0; }
.services-list li, .post-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.meta { color: var(--muted); font-size: 0.9rem; }

.messages { list-style: none; padding: 1rem 2rem 0; margin: 0; }
.messages .message { padding: 0.5rem 1rem; border-radius: 6px; background: var(--surface); margin-bottom: 0.5rem; }
.messages .success { border-left: 3px solid var(--success); }
.messages .error { border-left: 3px solid var(--error); }

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.footer-links { margin-top: 0.5rem; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.75rem;
}
.footer-links a:hover { color: var(--fg); }
