/* ToxinFreeMaterials.com — style.css */
/* Design: Clean living / consumer safety — dark forest greens, off-whites */

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

:root {
  --deep:         #0f1a0f;
  --mid:          #1a2d1a;
  --light:        #2a3d2a;
  --text:         #d4e8d4;
  --muted:        #8aab8a;
  --accent:       #4caf50;
  --accent-hov:   #388e3c;
  --white:        #ffffff;
  --border:       rgba(255,255,255,0.08);
  --row-alt:      rgba(255,255,255,0.03);
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --link:         #81c784;
  --link-hov:     #a5d6a7;
  --link-vis:     #66bb6a;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--deep);
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

p { margin-bottom: 1.25em; }

h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Navigation ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 26, 15, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 1100px; margin: 0 auto;
}

.nav-logo { font-size: 1.2rem; font-weight: 800; color: var(--white); text-decoration: none; }
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px; text-align: center;
  background: linear-gradient(180deg, var(--deep) 0%, var(--mid) 100%);
}

.hero-eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.15;
  color: var(--white); max-width: 800px; margin: 0 auto 24px;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 600px; margin: 0 auto 40px; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block; background: var(--accent); color: var(--white);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 14px 32px; border-radius: 6px; transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-hov); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block; border: 1px solid var(--accent); color: var(--accent);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 14px 32px; border-radius: 6px; margin-left: 12px; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--accent); color: var(--white); }

/* ── Sections ── */
section { padding: 80px 0; }

.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800;
  color: var(--white); margin-bottom: 16px;
}

.section-sub { font-size: 1rem; color: var(--muted); max-width: 560px; margin-bottom: 48px; }

/* ── Guides / Cards ── */
.guides {
  background: var(--mid);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

.guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.guide-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 28px;
  background: var(--light); text-decoration: none; display: block;
  transition: border-color 0.2s, transform 0.15s;
}
.guide-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.guide-tag {
  font-size: 0.75rem; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}

.guide-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.guide-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* ── Categories ── */
.categories { background: var(--deep); }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.category-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 24px;
  background: var(--mid); text-decoration: none; display: block; text-align: center;
  transition: border-color 0.2s, transform 0.15s;
}
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.category-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.category-card h3 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.category-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.5; margin: 0; }

/* ── About / Stats ── */
.about { background: var(--deep); }

.about-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}

.about-text p { font-size: 0.95rem; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.stat-box {
  background: var(--mid); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px; text-align: center;
}
.stat-box .number { font-size: 1.8rem; font-weight: 800; color: var(--accent); display: block; }
.stat-box .label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Newsletter ── */
.newsletter {
  background: var(--mid); text-align: center; border-top: 1px solid var(--border);
}
.newsletter h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; color: var(--white); margin-bottom: 16px; }
.newsletter p { font-size: 1rem; color: var(--muted); max-width: 480px; margin: 0 auto 32px; }

.email-form { display: flex; gap: 12px; max-width: 460px; margin: 0 auto; }
.email-form input {
  flex: 1; padding: 14px 18px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--deep); color: var(--white); font-size: 0.95rem;
}
.email-form input::placeholder { color: var(--muted); }
.email-form button {
  background: var(--accent); color: var(--white); border: none;
  padding: 14px 24px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.email-form button:hover { background: var(--accent-hov); }

/* ── Footer ── */
footer {
  background: var(--deep); border-top: 1px solid var(--border); padding: 36px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo { font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.82rem; color: var(--muted); }
.footer-copy a { color: var(--accent); text-decoration: none; }
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.82rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ── Article ── */
.article-header {
  padding: 80px 0 40px; text-align: center;
  background: linear-gradient(180deg, var(--deep) 0%, var(--mid) 100%);
}
.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
  color: var(--white); max-width: 800px; margin: 0 auto 16px;
}
.article-meta { font-size: 0.85rem; color: var(--muted); }

.article-body { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.article-body h2 { font-size: 1.5rem; font-weight: 700; color: var(--white); margin: 40px 0 16px; }
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--muted); margin: 32px 0 12px; }
.article-body p { font-size: 1rem; color: var(--text); margin-bottom: 16px; line-height: 1.75; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; color: var(--text); }
.article-body li { margin-bottom: 8px; line-height: 1.65; }

/* ── Global link styles ── */
a {
  color: var(--link);
  text-decoration: underline;
}
a:hover { color: var(--link-hov); }
a:visited { color: var(--link-vis); }

/* Preserve styled components */
.affiliate-btn,
.affiliate-btn:hover,
.affiliate-btn:visited,
.btn-primary,
.btn-primary:hover,
.btn-primary:visited,
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:visited {
  color: var(--white);
  text-decoration: none;
}
.nav-logo,
.nav-logo:hover,
.nav-logo:visited { color: var(--white); text-decoration: none; }
.nav-links a,
.nav-links a:visited { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--white); }
.guide-card,
.guide-card:hover,
.guide-card:visited { text-decoration: none; }
.category-card,
.category-card:hover,
.category-card:visited { text-decoration: none; }
.footer-copy a,
.footer-copy a:visited { color: var(--accent); text-decoration: none; }
.footer-copy a:hover { color: var(--link-hov); }
.footer-links a,
.footer-links a:visited { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ── Product Box ── */
.product-box {
  background: var(--light); border: 1px solid var(--border);
  border-radius: 10px; padding: 24px; margin: 24px 0;
}
.product-box h4 { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.product-box p { font-size: 0.9rem; color: var(--muted); }
.product-box .price { font-size: 1.2rem; font-weight: 700; color: var(--accent); margin-top: 8px; }

.affiliate-btn {
  display: inline-block; background: var(--accent); color: var(--white);
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 10px 20px; border-radius: 6px; margin-top: 12px; transition: background 0.2s;
}
.affiliate-btn:hover { background: var(--accent-hov); }

/* ── AEO Quick Answer Box ── */
.quick-answer {
  background: rgba(255,255,255,0.06);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}
.quick-answer strong { color: var(--accent); }

/* ── FAQ Section ── */
.faq-section { margin: 2rem 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-question,
.faq-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.faq-answer,
.faq-item p {
  line-height: 1.7;
  color: var(--text);
  margin-top: 0.5rem;
}

/* ── Related Articles ── */
.related-articles {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin: 2rem 0;
}
.related-articles h3 { color: var(--white); margin: 0 0 1rem; font-size: 1.1rem; }
.related-articles ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.related-articles li a { color: var(--accent); text-decoration: none; font-size: 0.95rem; }
.related-articles li a:hover { text-decoration: underline; }

/* ── Related Sites (footer) ── */
.related-sites {
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.related-sites p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.related-sites ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.related-sites li { font-size: 0.85rem; }
.related-sites a { color: var(--accent); text-decoration: none; }
.related-sites a:hover { text-decoration: underline; }

/* ── Article body link styles ── */
.article-body a:not(.affiliate-btn):not(.affiliate-link) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.2);
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.article-body a:not(.affiliate-btn):not(.affiliate-link):hover {
  color: var(--accent-hov);
  text-decoration-color: var(--accent);
}
.article-body a:not(.affiliate-btn):not(.affiliate-link):visited {
  color: var(--accent);
  opacity: 0.85;
}

/* ── Comparison Table ── */
.comparison-table { width: 100%; border-collapse: collapse; margin: 8px 0 32px; }
.comparison-table th {
  padding: 10px 14px; text-align: left; color: var(--white);
  border: 1px solid var(--border); font-size: 0.9rem;
  background: var(--light);
}
.comparison-table td {
  padding: 10px 14px; border: 1px solid var(--border);
  color: var(--text);
}
.comparison-table tr:nth-child(even) { background: var(--row-alt); }
.comparison-table td:first-child { color: var(--white); font-weight: 600; }
.comparison-table td.price-col { color: var(--accent); font-weight: 600; }

/* ── Mobile ── */
@media (max-width: 768px) {
  body { font-size: 17px; line-height: 1.7; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .btn-primary, .btn-secondary, button {
    min-height: 48px;
    padding: 12px 24px;
  }
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 60px 0 56px; }
  section { padding: 60px 0; }
  .about-content { grid-template-columns: 1fr; }
  .email-form { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
}
