/* ============================================================
   SHARED CSS — dze.armatools.com
   Landing page styles. Tool pages have their own stylesheet.
   ============================================================ */
:root {
  --bg:          #0d0d0d;
  --bg-panel:    #111111;
  --bg-card:     #1c1c1c;
  --bg-card2:    #222222;
  --border:      #2a2a2a;
  --border-hi:   #3e5a28;
  --accent:      #4e8a2e;
  --accent-hi:   #62ae3a;
  --accent-dim:  #2e5018;
  --text:        #d0d0d0;
  --text-muted:  #5e5e5e;
  --text-hi:     #eaeaea;
  --danger:      #c0392b;
  --danger-hi:   #e74c3c;
  --radius:      8px;
  --shadow:      0 2px 16px rgba(0,0,0,.6);
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:        'Consolas', 'Courier New', monospace;
  --max-w:       1100px;
}

/* ============================================================
   LIGHT MODE OVERRIDES
   ============================================================ */
[data-theme="light"] {
  --bg:          #f5f5f4;
  --bg-panel:    #ececea;
  --bg-card:     #ffffff;
  --bg-card2:    #f0f0ee;
  --border:      #cccccc;
  --border-hi:   #5a9e30;
  --accent:      #3d7020;
  --accent-hi:   #2e5818;
  --accent-dim:  #cce4b0;
  --text:        #222222;
  --text-muted:  #666666;
  --text-hi:     #111111;
  --shadow:      0 2px 12px rgba(0,0,0,.10);
}

[data-theme="light"] code {
  background: #eef4e8;
  border-color: #b8d898;
  color: #2e6010;
}

[data-theme="light"] .hero {
  background: linear-gradient(160deg, #d8eec8 0%, #ebebeb 60%);
}

[data-theme="light"] a.tool-card:hover { background: #edf6e4; }

[data-theme="light"] .privacy-note {
  background: #e8f4de;
  border-color: #a0c880;
}

[data-theme="light"] .repo-card-summary:hover { background: #edf6e4; }
[data-theme="light"] .repo-card[open] > .repo-card-summary { background: #e8f2de; }

[data-theme="light"] .repo-card-detail { background: #f4f8f0; }

[data-theme="light"] .repo-card-tip {
  background: #e8f4de;
  border-color: #a0c880;
  color: #2e6010;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

code {
  font-family: var(--mono);
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: .875em;
  color: #98d66e;
}

/* ============================================================
   SITE NAV
   ============================================================ */
.site-nav {
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-hi);
  letter-spacing: .02em;
  text-decoration: none;
}
.site-brand:hover { color: var(--accent-hi); }
.site-brand-icon { font-size: 1.25rem; }
.site-brand-dim { color: var(--text-muted); font-weight: 400; }

.site-nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav-links a:hover,
.site-nav-links a.active {
  color: var(--accent-hi);
  border-bottom-color: var(--accent);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0e1a09 0%, #0d0d0d 60%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.25rem 4rem;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .75rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  color: var(--text-hi);
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(78,138,46,.25);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}
.hero-sub strong { color: var(--text); }

/* Decorative dot-grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(78,138,46,.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ============================================================
   TOOLS MAIN
   ============================================================ */
.tools-main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
}

/* ============================================================
   TOOL CARD
   ============================================================ */
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, background .2s, transform .15s;
  box-shadow: var(--shadow);
  position: relative;
  height: 100%;
  box-sizing: border-box;
}

a.tool-card:hover {
  border-color: var(--accent);
  background: #1a2a12;
  transform: translateY(-2px);
}

.tool-card--soon {
  opacity: .45;
  cursor: default;
}

.tool-card-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 2.5rem;
  text-align: center;
  filter: drop-shadow(0 0 8px var(--accent));
}
.muted-icon { filter: none; }

.tool-card-body {
  flex: 1;
  min-width: 0;
}

.tool-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: .35rem;
}

.tool-card-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: .65rem;
}

.tool-card-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tool-card-tags li {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--accent-dim);
  color: var(--accent-hi);
  border: 1px solid #3e5a20;
  border-radius: 3px;
  padding: .1rem .45rem;
}

.tool-card-arrow {
  font-size: 1.3rem;
  color: var(--accent);
  align-self: center;
  flex-shrink: 0;
  transition: transform .15s;
}
a.tool-card:hover .tool-card-arrow { transform: translateX(4px); }

/* ============================================================
   PRIVACY NOTE
   ============================================================ */
.privacy-note {
  font-size: .82rem;
  color: var(--text-muted);
  padding: .6rem 1rem;
  border: 1px solid #1e2a10;
  border-radius: var(--radius);
  background: #111a09;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .hero { padding: 3rem 1rem 2.5rem; }
  .tools-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   INDEX SECTIONS (Web Tools / Guides / Repos)
   ============================================================ */
.index-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.index-section + .index-section {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.index-section-head {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.index-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-hi);
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: .01em;
}
.index-section-icon { font-size: 1.15rem; line-height: 1; }
.index-section-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 680px;
}

/* ============================================================
   REPO CARDS (expandable <details>)
   ============================================================ */
.repo-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.repo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color .2s;
}
.repo-card[open] { border-color: var(--border-hi); }

.repo-card-summary {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  list-style: none;
  transition: background .15s;
}
.repo-card-summary::-webkit-details-marker { display: none; }
.repo-card-summary::marker { display: none; }
.repo-card-summary:hover { background: #1a2a12; }
.repo-card[open] > .repo-card-summary {
  background: #161f10;
  border-bottom: 1px solid var(--border);
}

.repo-card-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  width: 2.25rem;
  text-align: center;
  filter: drop-shadow(0 0 6px var(--accent));
  margin-top: .1rem;
}
.repo-card-body { flex: 1; min-width: 0; }
.repo-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: .3rem;
}
.repo-card-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: .65rem;
}
.repo-card-chevron {
  font-size: 1.7rem;
  color: var(--accent);
  align-self: center;
  flex-shrink: 0;
  transition: transform .2s;
  line-height: 1;
  font-weight: 300;
}
.repo-card[open] .repo-card-chevron { transform: rotate(90deg); }

.repo-card-detail {
  padding: 1.25rem;
  background: #131a0d;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  font-size: .875rem;
  color: var(--text);
  line-height: 1.65;
}
.repo-card-tip {
  background: #0e1a09;
  border: 1px solid #2a4010;
  border-radius: var(--radius);
  padding: .6rem .85rem;
  font-size: .82rem;
  color: #9abf7a;
}
.repo-card-tip a { color: var(--accent-hi); text-decoration: underline; }
.repo-card-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--accent-hi);
  font-weight: 600;
  font-size: .875rem;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: .45rem 1rem;
  transition: background .15s, color .15s;
  align-self: flex-start;
  text-decoration: none;
}
.repo-card-link:hover { background: var(--accent-dim); color: var(--text-hi); }

.browse-repos-btn {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.browse-repos-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-h);
}

/* ============================================================
   SCROLL REVEAL  (opt-in via <html class="reveal-on">)
   The initial hidden state only applies when the page has asked
   for it AND the visitor allows motion, so no-JS / reduced-motion
   visitors always see fully-visible content.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-on .tool-card:not(.tool-card--soon),
  html.reveal-on .repo-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
    will-change: opacity, transform;
  }
  html.reveal-on .tool-card.is-visible,
  html.reveal-on .repo-card.is-visible {
    opacity: 1;
    transform: none;
  }
}
