/*
 * Shared styling for the static HTML pages (about, privacy, terms, contact,
 * guides) and for the static header/footer/content on the homepage.
 *
 * Everything here is namespaced under .site-* / .prose / .card so it cannot
 * collide with the React app's App.css, which loads alongside it on the
 * homepage only.
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

/* ---------- header / nav ---------- */

.site-header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.site-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: #667eea;
  text-decoration: none;
  margin-right: auto;
}

.site-nav a:not(.site-brand) {
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:not(.site-brand):hover {
  color: #667eea;
  text-decoration: underline;
}

/* ---------- hero (homepage) ---------- */

.hero {
  background: rgba(255, 255, 255, 0.95);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  color: #667eea;
  margin-bottom: 0.75rem;
}

.hero p {
  color: #555;
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  color: #666;
  font-size: 0.9rem;
}

/* ---------- content containers ---------- */

.card {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
}

.prose h1 {
  font-size: 2rem;
  line-height: 1.25;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.prose h2 {
  font-size: 1.4rem;
  color: #667eea;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-size: 1.1rem;
  color: #764ba2;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose p,
.prose li {
  color: #444;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: #667eea;
}

.prose strong {
  color: #333;
}

.prose code {
  background: #f0f0f5;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.92em;
  /* Long URLs in inline code would otherwise push the page wider than the
     viewport on narrow screens. */
  overflow-wrap: anywhere;
}

.prose pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #ddd;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border: 1px solid #ddd;
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.prose th {
  background: #f5f5f5;
  color: #333;
}

.page-meta {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.callout {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

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

/* ---------- homepage sections below the tool ---------- */

.use-cases {
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.use-cases li {
  background: #f7f7fb;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 0;
}

.use-cases strong {
  display: block;
  color: #764ba2;
  margin-bottom: 0.35rem;
}

.faq-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.faq-item:last-child {
  border-bottom: none;
}

.guide-list {
  list-style: none;
  margin: 0;
}

.guide-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.guide-list li:last-child {
  border-bottom: none;
}

.guide-list a {
  font-size: 1.05rem;
  font-weight: 600;
  color: #667eea;
  text-decoration: none;
}

.guide-list a:hover {
  text-decoration: underline;
}

.guide-list span {
  display: block;
  color: #666;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.cta {
  display: inline-block;
  padding: 1rem 1.75rem;
  background: #764ba2;
  color: white;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.cta:hover {
  background: #653a8a;
}

/* ---------- footer ---------- */

.site-footer {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 3rem;
  padding: 2rem 1.5rem;
}

.site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  color: #666;
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: #667eea;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .card {
    padding: 1.5rem;
    margin: 1rem auto;
  }

  .site-footer-inner {
    justify-content: center;
    text-align: center;
  }

  /* Let wide tables scroll inside themselves rather than widening the page. */
  .prose table {
    display: block;
    overflow-x: auto;
  }
}
