/* ==========================================================================
   ToolboxTree — Design Tokens
   Palette: deep teal (brand), gold (premium/"golden fruit" accent tied to
   the tree motif), warm neutral background. Manrope for display/headings,
   Inter for body & UI/data. Keep it disciplined — the tree-branch diagram
   is the one signature flourish; everything else stays quiet.
   ========================================================================== */

:root {
  --navy: #0b1f3a;
  --teal-700: #0f9488;
  --teal-600: #12a695;
  --teal-500: #14b8a6;
  --teal-100: #e3f5f2;
  --teal-50: #f2faf9;

  --gold-700: #96701f;
  --gold-600: #b8862f;
  --gold-100: #fbf1de;

  --ink: #101828;
  --muted: #5b6b72;
  --faint: #8a9a97;

  --bg: #f7f9f8;
  --card: #ffffff;
  --border: #e3e8e7;
  --border-strong: #cfd9d7;

  --danger: #d64545;
  --success: #1f9d6b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 20px 48px rgba(11, 31, 58, 0.12);

  --font-display: "Manrope", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --container: 1120px;
}

/* ---------- Dark mode ---------- */
:root[data-theme="dark"] {
  --navy: #eef2f6;
  --teal-700: #2dd4c0;
  --teal-600: #22c1ae;
  --teal-500: #14b8a6;
  --teal-100: #123a35;
  --teal-50: #0f2a27;

  --gold-700: #e8c374;
  --gold-600: #d9a940;
  --gold-100: #2a2216;

  --ink: #eef2f6;
  --muted: #a7b3bb;
  --faint: #78878a;

  --bg: #0b1420;
  --card: #101b2b;
  --border: #1e2c3d;
  --border-strong: #2c3d52;

  --danger: #ef6767;
  --success: #33d189;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);
}
:root[data-theme="dark"] .site-header { background: rgba(11, 20, 32, 0.88); }
html { transition: background-color 0.2s ease; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--muted); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.96); }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-600); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--teal-50); }
.btn-gold { background: var(--gold-600); color: #fff; }
.btn-gold:hover { background: var(--gold-700); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: transparent;
  color: var(--navy); cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.theme-toggle:hover { background: var(--teal-50); border-color: var(--teal-500); transform: translateY(-2px) rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 248, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--navy);
}
.brand svg { display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--navy);
}
.nav-links a { position: relative; padding: 6px 2px; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: var(--teal-500); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.nav-links a:hover { color: var(--teal-700); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--teal-700); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; background: none; border: 1px solid var(--border-strong);
    border-radius: 10px; padding: 8px 10px; cursor: pointer;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 48px 0 28px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: var(--navy); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--teal-700); }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 20px; flex-wrap: wrap; gap: 10px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tool-card { display: flex; flex-direction: column; height: 100%; transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--teal-500); }
.tool-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-100); color: var(--teal-700); margin-bottom: 18px;
  font-size: 1.4rem; transition: transform 0.25s ease;
}
.tool-card:hover .tool-icon { transform: scale(1.1) rotate(-4deg); }
.tool-card .badge { align-self: flex-end; margin-top: -44px; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--teal-100); color: var(--teal-700);
  padding: 4px 10px; border-radius: 999px;
}
.tool-card ul { margin: 0 0 20px; padding-left: 18px; color: var(--muted); font-size: 0.92rem; }
.tool-card li { margin-bottom: 4px; }
.tool-card .btn { margin-top: auto; }

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

/* ---------- Category pills / filters ---------- */
.pillbar { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--navy);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.pill:hover { border-color: var(--teal-500); color: var(--teal-700); transform: translateY(-1px); }
.pill[aria-pressed="true"] { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.pill[aria-pressed="true"]:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
  text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(70px); opacity: 0.55; pointer-events: none;
}
.hero::before { width: 420px; height: 420px; top: -160px; left: -100px; background: radial-gradient(circle, var(--teal-500), transparent 70%); }
.hero::after { width: 380px; height: 380px; bottom: -180px; right: -80px; background: radial-gradient(circle, var(--gold-600), transparent 70%); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-100); color: var(--teal-700);
  font-weight: 700; font-size: 0.82rem;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
  animation: eyebrow-pulse 3s ease-in-out infinite;
}
@keyframes eyebrow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15, 148, 136, 0.28); }
  50% { box-shadow: 0 0 0 9px rgba(15, 148, 136, 0); }
}
.grad-text {
  background: linear-gradient(120deg, var(--teal-500), var(--gold-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { max-width: 560px; margin: 0 auto 28px; font-size: 1.05rem; }
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.trust-row {
  display: flex; justify-content: center; gap: 28px; flex-wrap: wrap;
  margin-top: 40px; font-size: 0.85rem; color: var(--muted); font-weight: 600;
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Ad slots (empty until AdSense is approved) ---------- */
.ad-slot {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--teal-50);
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
  padding: 10px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot::after { content: "Ad space"; }

/* ---------- Section spacing ---------- */
.section { padding: 64px 0; }
.section-head { max-width: 620px; margin: 0 auto 40px; text-align: center; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
