/* ═══════════════════════════════════════════════════════
   DIYMiner — The Temple of Natural Law
   Styles: calm, earth-toned, responsive, section-colored
   ═══════════════════════════════════════════════════════ */

/* ── Reset & base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Default (Home) — Jade Green */
  --accent:         #5b8c5a;
  --accent-dark:    #4a7a49;
  --accent-light:   #c4d1b5;
  --accent-bg:      #eef5ed;
  --clay:           #5c4a3a;
  --clay-light:     #8b7355;
  --paper:          #f5f0e8;
  --paper-dark:     #e8e0d0;
  --text:           #2c2418;
  --text-muted:     #6b5d4e;
  --white:          #ffffff;
  --border:         #d4c9b8;
  --nav-border:     #d4c9b8;

  --font-serif:     "Georgia", "Palatino", "Times New Roman", serif;
  --font-sans:      "Helvetica Neue", Arial, sans-serif;
  --max-width:      720px;
  --max-wide:       960px;
}

/* ── Section color themes ────────────────────────────── */
/* The Bridge — Warm Clay */
body.theme-bridge    { --accent: #8b7355; --accent-dark: #7a6348; --accent-light: #e3d9cd; --accent-bg: #f5f0e8; --nav-border: #d4c9b8; }
/* Methods — Deep Blue */
body.theme-methods   { --accent: #3a5a7a; --accent-dark: #2d4a63; --accent-light: #c5d5e3; --accent-bg: #eef2f5; --nav-border: #c5d5e3; }
/* Blog — Neutral Earth */
body.theme-blog      { --accent: #a0896b; --accent-dark: #8a7559; --accent-light: #e3dbd0; --accent-bg: #f5f2ed; --nav-border: #e3dbd0; }
/* Guide — Light Sage */
body.theme-guide     { --accent: #9aae8f; --accent-dark: #839a78; --accent-light: #d9e4d4; --accent-bg: #f2f5f0; --nav-border: #d9e4d4; }
/* Support — Soft Gold */
body.theme-support   { --accent: #b8995a; --accent-dark: #a0834a; --accent-light: #ece2ce; --accent-bg: #f5f2ea; --nav-border: #ece2ce; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  color: var(--text);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.3;
  color: var(--clay);
  letter-spacing: 0.01em;
}

h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-top: 1.75rem; margin-bottom: 0.5rem; color: var(--clay-light); }
h2 .h2-accent { color: var(--accent); }

p { margin-bottom: 1.2rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--clay); }

small, .text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* ── Container ───────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 1.5rem; }

/* ── Navigation ──────────────────────────────────────── */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--nav-border);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--clay);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
.nav-brand:hover { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 1.2rem; }

.nav-links > a {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.nav-links > a:hover { color: var(--clay); }

/* ── Dropdown ──────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }

.dropdown > a {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
}
.dropdown > a:hover { color: var(--accent); }
.dropdown > a::after { content: " ▾"; font-size: 0.7rem; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--nav-border);
  border-radius: 4px;
  min-width: 200px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 200;
}

.dropdown-menu-right { left: auto; right: 0; }

.dropdown-menu a {
  display: block;
  padding: 0.45rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--accent-light); color: var(--text); }
.dropdown:hover .dropdown-menu { display: block; }

/* ── Page Header ──────────────────────────────────────── */
.page-header {
  padding: 3rem 0 1.5rem;
  text-align: center;
}
.page-header .section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.page-header h1 { margin-bottom: 0.3rem; }
.page-header .subtitle { font-size: 0.95rem; color: var(--text-muted); max-width: 500px; margin: 0 auto; }

/* ── Sections ────────────────────────────────────────── */
.section { padding: 2.5rem 0; }
.section-alt {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── Hero ──────────────────────────────────────────────── */
.hero { padding: 5rem 0 4rem; text-align: center; }
.hero h1 { font-size: 2.6rem; margin-bottom: 0.3rem; }
.hero .byline { font-size: 1.1rem; color: var(--text-muted); max-width: 520px; margin: 0.5rem auto 1.5rem; line-height: 1.6; }
.hero .invitation { font-size: 0.95rem; color: var(--accent); margin-top: 0.5rem; }

/* ── Cards ────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin: 2rem 0; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.06); }
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card .card-meta {
  font-family: var(--font-sans); font-size: 0.78rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem;
}
.card p { font-size: 0.9rem; color: var(--text-muted); }

/* ── Blueprint blocks ────────────────────────────────── */
.blueprint-framework,
.blueprint-materials,
.blueprint-procedure {
  padding: 1.5rem; margin: 1.5rem 0;
  border-left: 3px solid var(--accent-light);
  background: var(--white);
  border-radius: 0 6px 6px 0;
}
.blueprint-materials ul, .blueprint-procedure ol { padding-left: 1.2rem; margin: 0.8rem 0; }
.blueprint-materials li, .blueprint-procedure li { margin-bottom: 0.4rem; font-size: 0.95rem; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-sans); font-size: 0.85rem;
  padding: 0.6rem 1.4rem; border-radius: 4px;
  cursor: pointer; transition: all 0.2s;
  text-align: center; letter-spacing: 0.03em;
}
.btn-primary {
  background: var(--accent); color: var(--white); border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); color: var(--white); }

.btn-outline {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-light); color: var(--text); }

.btn-muted {
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
}
.btn-muted:hover { color: var(--clay); border-color: var(--accent); }

/* ── Support / Newsletter ─────────────────────────────── */
.support-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; padding: 2rem;
  text-align: center; margin: 2rem 0;
}
.support-box h3 { margin-top: 0; }
.support-box p { font-size: 0.9rem; }
.support-box .btn { margin: 0.5rem; }

.newsletter-box {
  background: var(--accent-light); border-radius: 6px;
  padding: 2rem; margin: 2rem 0; text-align: center;
}
.newsletter-box h3 { margin-top: 0; color: var(--clay); }

.newsletter-form { display: flex; gap: 0.5rem; max-width: 420px; margin: 1rem auto; }
.newsletter-form input {
  flex: 1; padding: 0.6rem 1rem; border: 1px solid var(--border);
  border-radius: 4px; font-family: var(--font-serif); font-size: 0.9rem; background: var(--white);
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }

/* ── Product detail ──────────────────────────────────── */
.product-detail {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; padding: 2rem; margin: 2rem 0;
}
.product-detail h2 { margin-top: 0; }
.product-problem {
  background: var(--accent-bg); border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem; border-radius: 0 4px 4px 0; font-style: italic; color: var(--clay);
}
.product-detail .price { font-family: var(--font-sans); font-size: 1.2rem; color: var(--accent); margin: 1.2rem 0; }

/* ── Footer ──────────────────────────────────────────── */
footer {
  background: var(--white); border-top: 1px solid var(--border);
  padding: 2.5rem 0; margin-top: 3rem; text-align: center;
}
footer p { font-size: 0.85rem; color: var(--text-muted); }
footer .footer-nav {
  display: flex; justify-content: center; gap: 1rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
footer .footer-nav a { font-family: var(--font-sans); font-size: 0.8rem; color: var(--text-muted); }
footer .footer-nav a:hover { color: var(--accent); }

/* ── Contact form ────────────────────────────────────── */
.contact-form { max-width: 520px; margin: 2rem auto; }
.contact-form label { display: block; font-family: var(--font-sans); font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.6rem 1rem; border: 1px solid var(--border);
  border-radius: 4px; font-family: var(--font-serif); font-size: 0.9rem;
  background: var(--white); margin-bottom: 1.2rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form textarea { min-height: 120px; resize: vertical; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); padding: 1.2rem 0; }
.faq-question { font-family: var(--font-sans); font-weight: 600; font-size: 1rem; color: var(--clay); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question:hover { color: var(--accent); }
.faq-question::after { content: "+"; font-size: 1.2rem; color: var(--text-muted); }
.faq-item.open .faq-question::after { content: "–"; }
.faq-answer { display: none; padding-top: 0.8rem; font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.faq-item.open .faq-answer { display: block; }

/* ── Breadcrumbs ─────────────────────────────────────── */
.breadcrumbs {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-muted);
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { color: var(--clay); }
.breadcrumbs .sep { margin: 0 0.4rem; color: var(--text-muted); }
.breadcrumbs .current { color: var(--text-muted); }

/* ── Accent border helper ────────────────────────────── */
.accent-border { border-left: 3px solid var(--accent); padding-left: 1rem; }

/* ── The Five Gates ────────────────────────────────── */
.gates { list-style: none; padding: 0; margin: 2rem 0; }
.gates li { padding: 1rem 0 1rem 2.5rem; border-left: 2px solid var(--accent-light); position: relative; margin-left: 1rem; }
.gates li:last-child { border-left-color: transparent; }
.gates li::before { content: ""; position: absolute; left: -0.5rem; top: 1.2rem; width: 0.9rem; height: 0.9rem; background: var(--accent); border-radius: 50%; border: 2px solid var(--paper); }
.gates .gate-num { font-family: var(--font-sans); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.gates .gate-name { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; color: var(--clay); }
.gates .gate-desc { font-size: 0.9rem; margin-top: 0.2rem; color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-links { gap: 0.8rem; }
  .nav-links > a, .dropdown > a { font-size: 0.75rem; }
  .dropdown-menu { min-width: 170px; }
  .dropdown-menu a { font-size: 0.75rem; padding: 0.4rem 1rem; }
}

@media (max-width: 700px) {
  html { font-size: 16px; }
  nav { overflow-x: auto; }
  .nav-inner { gap: 0.5rem; }
  .nav-links { gap: 0.5rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .cards { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .nav-links > a, .dropdown > a { font-size: 0.7rem; }
  .hero h1 { font-size: 1.7rem; }
}
