/* Savett hub design — light theme, TikTok-pink accent, with a dark
   mode (html[data-theme="dark"]) switched by the header toggle.
   Loaded after the theme stylesheet on every front-end page. Redefines
   the theme tokens (the tools use the same tokens, so they follow the
   new palette automatically) and restyles the header, hero, tool cards,
   steps, FAQs, and footer so the rebuilt growth-tools blog looks
   nothing like the old dark converter site. No external assets. */

/* ---------- Light tokens (TikTok-pink accent) ---------- */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f8f7f8;
  --surface: #ffffff;
  --surface-2: #f1f0f2;
  --border: #e3e1e6;
  --border-soft: #eceaf0;
  --text: #17131a;
  --text-2: #4d4552;
  --muted: #7a7280;
  --amber: #e11d4e;
  --amber-2: #be123c;
  --amber-ink: #ffffff;
  --amber-dim: rgba(225, 29, 78, 0.09);
  --ok: #1c7a4d;
  --danger: #c92a2a;
}

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #ffffff;
  box-shadow: 0 1px 0 var(--border-soft), 0 4px 18px rgba(23, 32, 31, 0.05);
}
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  box-shadow: inset 0 -2px 0 var(--amber);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #fdeef2 0%, rgba(253, 238, 242, 0) 100%);
  padding: 56px 0 10px;
  border-bottom: 1px solid var(--border-soft);
}
.hero h1 { letter-spacing: -0.02em; }

/* Front-page section headings get a short teal rule. */
.home .section h2 { position: relative; padding-bottom: 12px; }
.home .section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 4px;
  border-radius: 2px;
  background: var(--amber);
}

/* ---------- Fancy tool cards (homepage) ---------- */
.trust-grid { gap: 18px; }
.trust-grid li {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 26px 22px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(23, 32, 31, 0.05), 0 8px 24px rgba(23, 32, 31, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.trust-grid li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}
.trust-grid li:nth-child(1)::before { background: linear-gradient(90deg, #00a8a8, #25f4ee); }
.trust-grid li:nth-child(2)::before { background: linear-gradient(90deg, #fe2c55, #ff7a9e); }
.trust-grid li:nth-child(3)::before { background: linear-gradient(90deg, #7c3aed, #c084fc); }
.trust-grid li:nth-child(4)::before { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.trust-grid li:nth-child(5)::before { background: linear-gradient(90deg, #059669, #34d399); }
.trust-grid li:nth-child(6)::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.trust-grid li:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 6px rgba(23, 32, 31, 0.06), 0 16px 32px rgba(23, 32, 31, 0.1);
}
.trust-grid h3 { font-size: 1.12rem; }
.trust-grid h3 a { color: var(--text); text-decoration: none; }
.trust-grid h3 a::after { content: " \2192"; color: var(--amber); }
.trust-grid h3 a:hover { color: var(--amber-2); text-decoration: none; }
.trust-grid p { font-size: 0.96rem; }

/* ---------- Steps ---------- */
.steps li {
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 32, 31, 0.05), 0 8px 24px rgba(23, 32, 31, 0.05);
}

/* ---------- FAQs ---------- */
.faq-list details {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(23, 32, 31, 0.04);
}
.faq-list details[open] { border-color: var(--amber); }

/* ---------- Dark footer (contrast anchor) ---------- */
.site-footer {
  background: #11161a;
  border-top: 0;
  color: #a7adb6;
}
.site-footer a { color: #e9ebef; }
.site-footer a:hover { color: #ffffff; }
.site-footer .site-brand a { color: #ffffff; }
.site-footer .brand-wave i { background: #25f4ee; }
.site-footer .brand-wave i:nth-child(2),
.site-footer .brand-wave i:nth-child(4) { background: #fe2c55; }
.footer-note,
.site-info { color: #8b9098; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero { padding-top: 36px; }
  .trust-grid li { padding: 22px 18px 18px; }
  /* Keep the theme toggle on the brand row while the mobile menu is
     open: the nav takes a full row (flex-basis:100%), so without an
     explicit order the toggle drops below the open menu list. */
  .theme-toggle { order: 2; }
  .main-nav { order: 3; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .trust-grid li { transition: none; }
  .trust-grid li:hover { transform: none; }
}

/* ---------- Dark mode (visitor toggle; normal/light is the default) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121016;
  --bg-2: #191623;
  --surface: #1d1a26;
  --surface-2: #262233;
  --border: #353047;
  --border-soft: #2a2538;
  --text: #f0edf3;
  --text-2: #c9c3d2;
  --muted: #9a93a6;
  --amber: #ff4d6d;
  --amber-2: #ff7a93;
  --amber-ink: #21060f;
  --amber-dim: rgba(255, 77, 109, 0.14);
  --ok: #3fb97f;
  --danger: #ff6b6b;
}
html[data-theme="dark"] .site-header {
  background: #121016;
  box-shadow: 0 1px 0 var(--border-soft), 0 4px 18px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .hero {
  background: linear-gradient(180deg, rgba(255, 77, 109, 0.12) 0%, rgba(255, 77, 109, 0) 100%);
}
html[data-theme="dark"] .trust-grid li,
html[data-theme="dark"] ul.trust-grid li {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .trust-grid li:hover,
html[data-theme="dark"] ul.trust-grid li:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .steps li {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .faq-list details {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ---------- Theme toggle (dark / normal) ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--amber); color: var(--amber-2); }
.theme-toggle svg { width: 22px; height: 22px; display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
