/* ============================================================
   WP Error Trace — Static Site Styles
   System fonts · No frameworks · Mobile-first · Dark mode
   ============================================================ */

/* ---------- Reset & Base ---------- */

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

:root {
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --yellow: #e5a000;
  --yellow-hover: #cc8d00;
  --yellow-soft: #fdf6e3;
  --yellow-border: #f0d58c;
  --brand: #235e77;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.06);
  --code-bg: #f0f0f0;
  --radius: 6px;
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
  --container: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #5b9cf6;
    --accent-hover: #7db4fc;
    --yellow: #e5a000;
    --yellow-hover: #f0b020;
    --yellow-soft: #2a2418;
    --yellow-border: #5c4a1e;
    --brand: #4fa8c9;
    --bg: #121212;
    --bg-alt: #1a1a1a;
    --bg-card: #1e1e1e;
    --text: #e4e4e4;
    --text-secondary: #a0a0a0;
    --border: #2e2e2e;
    --shadow: rgba(0, 0, 0, 0.3);
    --code-bg: #2a2a2a;
    --focus-ring: 0 0 0 3px rgba(91, 156, 246, 0.4);
  }
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  border-top: 3px solid var(--yellow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Focus ---------- */

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius);
}

/* ---------- Container ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--yellow);
  display: inline-block;
}

section .container > h2 {
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

p {
  margin-bottom: 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

ul {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

li {
  margin-bottom: 0.35rem;
}

li::marker {
  color: var(--yellow);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--yellow);
  color: #1a1a1a;
  border-color: var(--yellow);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--yellow-hover);
  border-color: var(--yellow-hover);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(229, 160, 0, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--yellow);
  color: var(--yellow-hover);
}

/* ---------- Sections (shared) ---------- */

section {
  padding: 3rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ---------- Hero ---------- */

.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  border-top: none;
  background: var(--bg-alt);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}

.hero-subtitle-secondary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- Screenshot ---------- */

.screenshot-section {
  padding: 0 0 3rem;
  border-top: none;
  background: var(--bg-alt);
}

.screenshot-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: 0 2px 12px var(--shadow);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

/* Hide broken image icon and show placeholder background when image fails */
.screenshot-card img[src] {
  background: var(--bg-alt);
}

/* ---------- Features Grid ---------- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--yellow-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px var(--shadow);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.feature-card:hover {
  box-shadow: 0 2px 8px var(--shadow);
  border-left-color: var(--yellow);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ---------- FAQ ---------- */

.faq-section details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.625rem;
  background: var(--bg-card);
}

.faq-section details[open] {
  box-shadow: 0 1px 3px var(--shadow);
}

.faq-section summary {
  padding: 0.875rem 1.25rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.15s ease;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::before {
  content: "+";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 1px;
  border-radius: 3px;
  background: var(--yellow);
  color: #1a1a1a;
  transition: background 0.15s ease, color 0.15s ease;
}

.faq-section details[open] > summary::before {
  content: "\2212"; /* minus sign */
  background: var(--yellow);
  color: #1a1a1a;
  padding-bottom: 0;
}

.faq-section summary:hover {
  color: var(--yellow-hover);
}

.faq-answer {
  padding: 0 1.25rem 1rem 3.4rem;
  color: var(--text-secondary);
}

.faq-answer p {
  margin-bottom: 0.5rem;
}

/* ---------- Built By ---------- */

.built-by {
  text-align: center;
  background: var(--bg-alt);
}

.built-by h2 .brand-name {
  color: var(--brand);
}

.built-by p {
  color: var(--text-secondary);
}

.built-by-links {
  margin-top: 0.5rem;
}

.built-by-links a {
  font-weight: 500;
  color: var(--yellow);
}

.built-by-links a:hover {
  color: var(--yellow-hover);
}

.separator {
  margin: 0 0.4rem;
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */

footer {
  border-top: 2px solid var(--yellow);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---------- Responsive ---------- */

@media (min-width: 600px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  section {
    padding: 4rem 0;
  }

  .hero {
    padding: 5rem 0 3.5rem;
  }
}

@media (min-width: 900px) {
  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 2rem;
  }

  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .container {
    padding: 0 2rem;
  }
}
