/* ═══════════════════════════════════════════════════
   TOOLSNOVA — HOMEPAGE
   Premium homepage sections: hero, stats, sections,
   featured workspace, FAQ, newsletter.
   Only loaded on index.html.

   Per HOMEPAGE_DESIGN_SPEC.md — homepage-scoped tokens.
   tokens.css (shared across 727 pages) is NOT modified;
   --secondary is defined locally here only.
   ═══════════════════════════════════════════════════ */

:root {
  --secondary: #5BD6FF;
  --secondary-dim: rgba(91, 214, 255, 0.12);
}

/* ── Homepage animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-8px) rotate(2deg); }
  66%       { transform: translateY(4px) rotate(-1deg); }
}
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in   { animation: fadeUp 0.5s ease both; }
.fade-in-1 { animation-delay: 0.05s; }
.fade-in-2 { animation-delay: 0.10s; }
.fade-in-3 { animation-delay: 0.15s; }
.fade-in-4 { animation-delay: 0.20s; }
.fade-in-5 { animation-delay: 0.25s; }

/* ── Navigation (homepage premium nav) ── */
.v2-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 13, 17, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .v2-nav {
  background: rgba(255, 255, 255, 0.78);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.v2-logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.v2-logo-dot { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link-item {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  transition: all 0.15s;
  user-select: none;
}
.nav-link-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform 0.2s;
}
.nav-link-item:hover { background: var(--card2); color: var(--text); }
.nav-link-item:hover .mega-menu { display: flex; }
.nav-link-item:hover svg { transform: rotate(180deg); opacity: 1; }

/* ── Mega menu dropdown ── */
.mega-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  min-width: 220px;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-hover);
  z-index: 999;
}
.mega-menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text2);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.12s;
}
.mega-menu a:hover {
  background: var(--accent-dim);
  color: var(--accent);
}
.mega-menu a span { font-size: 1rem; width: 20px; text-align: center; }

/* ── Nav actions ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}
.nav-btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn-icon:hover { border-color: var(--border2); color: var(--text); }
.nav-bookmarks-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-bookmarks-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.1rem;
  color: var(--text2);
  cursor: pointer;
}

/* ── Mobile nav overlay ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 9998;
  overflow-y: auto;
  padding: 5rem 1.5rem 2rem;
  flex-direction: column;
  gap: 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav-section { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.mobile-nav-label {
  font-size: 0.62rem;
  color: var(--text3);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.25rem 0 0.5rem;
  font-family: var(--mono);
}
.mobile-nav a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.12s;
}
.mobile-nav a:hover { color: var(--accent); }

/* ═════════════════════════
   HERO SECTION
   ═════════════════════════ */
.v2-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-left {}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  border: 1px solid rgba(127, 255, 111, 0.3);
  border-radius: 99px;
  padding: 0.4rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-family: var(--mono);
}
.hero-h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hero-h1-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #a8ff9f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 1.75rem;
}
.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #0c0c0e;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.18s;
  font-family: var(--sans);
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: var(--card2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border2);
  text-decoration: none;
  transition: all 0.18s;
  font-family: var(--sans);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Hero orb (decorative) ── */
.hero-right { display: flex; justify-content: center; align-items: center; position: relative; min-height: 380px; }

/* ── Orbit rings (decorative, behind mockup) ── */
.hero-orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(127, 255, 111, 0.12);
  animation: ringRotate 26s linear infinite;
}
.hero-orbit-ring-1 { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
.hero-orbit-ring-2 { width: 460px; height: 460px; margin: -230px 0 0 -230px; border-color: rgba(91, 214, 255, 0.08); animation-duration: 34s; animation-direction: reverse; }
.hero-orbit-dot {
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--accent);
}

/* ── Browser-chrome tool mockup card ── */
.hero-mockup {
  position: relative;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  padding: 1.1rem;
  z-index: 2;
  transform: rotate(-1.5deg);
}
.hero-mockup-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 0.9rem; }
.hero-mockup-dot { width: 9px; height: 9px; border-radius: 50%; }
.hero-mockup-dot-r { background: #ff5f57; }
.hero-mockup-dot-y { background: #ffbd2e; }
.hero-mockup-dot-g { background: #28ca42; }
.hero-mockup-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-dim);
  border: 1px solid rgba(127, 255, 111, 0.3);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.72rem;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 0.85rem;
}
.hero-mockup-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.2rem;
  font-size: 0.78rem;
  color: var(--text2);
  font-weight: 600;
}
.hero-mockup-row-icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── Floating decorative badges (code, calculator, lightning) ── */
.hero-float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-size: 1.1rem;
  animation: orbFloat 4.5s ease-in-out infinite;
  z-index: 3;
}
.hero-float-code   { width: 52px; height: 52px; top: -6%;  right: 2%;  color: var(--accent); animation-delay: 0s; }
.hero-float-calc    { width: 46px; height: 46px; bottom: 14%; left: -8%; color: var(--secondary); animation-delay: 1.2s; }
.hero-float-bolt    { width: 44px; height: 44px; bottom: -4%; right: 10%; color: #ffc93c; animation-delay: 2.1s; }

@media (max-width: 900px) {
  .hero-right { display: none; }
}

/* ═════════════════════════
   SECTION LAYOUT
   ═════════════════════════ */
.v2-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 0.4rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}
.section-view-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.section-view-all:hover { opacity: 0.75; }
.v2-divider {
  max-width: 1280px;
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--border);
  padding: 0 2rem;
}

/* ── Scroll fade-in ── */
.scroll-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═════════════════════════
   FEATURED / AI WORKSPACE
   ═════════════════════════ */
.v2-featured {
  background: linear-gradient(135deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  max-width: 1280px;
  margin: 0 auto 0;
  overflow: hidden;
  position: relative;
}
.v2-featured::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, var(--secondary-dim) 0%, transparent 70%);
  pointer-events: none;
}
.featured-flagship-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--secondary);
  background: var(--secondary-dim);
  border: 1px solid rgba(91, 214, 255, 0.3);
  border-radius: 99px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.6rem;
  font-family: var(--mono);
}
.featured-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem 2.5rem;
  align-items: center;
}
.featured-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 0.75rem;
}
.featured-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 0.85rem;
  line-height: 1.15;
}
.featured-desc {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.featured-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.4rem;
  background: var(--accent);
  color: #0c0c0e;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.18s;
  font-family: var(--sans);
}
.featured-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ── Mockup ── */
.featured-mockup {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-hover);
  font-family: var(--mono);
  font-size: 0.8rem;
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mockup-dot-r { background: #ff5f57; }
.mockup-dot-y { background: #ffbd2e; }
.mockup-dot-g { background: #28ca42; }
.mockup-title { font-size: 0.72rem; color: var(--text3); margin-left: 0.5rem; }
.mockup-input-row {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: var(--text3);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.mockup-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0.75rem;
}
.mockup-tab {
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--text3);
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.15s;
}
.mockup-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(127, 255, 111, 0.3);
}
.mockup-output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  line-height: 1.8;
  color: var(--text2);
  font-size: 0.78rem;
}
.mockup-output .hl { color: var(--accent); font-weight: 600; }

/* ═════════════════════════
   FAQ
   ═════════════════════════ */
.faq-list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background 0.15s;
  font-family: var(--sans);
}
.faq-q:hover { background: var(--card2); }
.faq-chevron {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform 0.25s;
}
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.75;
  padding: 0 1.25rem 1.1rem;
}

/* FAQ tool-page styles live in css/tools.css */

/* ═════════════════════════
   NEWSLETTER
   ═════════════════════════ */
.v2-newsletter {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}
.newsletter-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.newsletter-text h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.newsletter-text p {
  font-size: 0.85rem;
  color: var(--text2);
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 320px;
}
.newsletter-input {
  flex: 1;
  min-width: 220px;
  background: var(--bg);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 0.7rem 1.1rem;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-input::placeholder { color: var(--text3); }
.newsletter-input:focus { border-color: var(--accent); }
.newsletter-btn {
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  color: #0c0c0e;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: opacity 0.15s, transform 0.15s;
}
.newsletter-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.newsletter-btn:disabled { cursor: default; opacity: 0.7; transform: none; }

.newsletter-msg {
  margin: 0.6rem 0 0;
  min-height: 1.1em;
  font-size: 0.85rem;
  font-weight: 600;
}
.newsletter-msg:empty { margin: 0; }
.newsletter-msg.ok  { color: var(--accent); }
.newsletter-msg.err { color: var(--red); }

/* ═════════════════════════
   HOMEPAGE HERO (simple, production style)
   ═════════════════════════ */
.hero {
  padding: 3rem 2rem 1.5rem;
  max-width: 620px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}
.hero h1 span { color: var(--accent); }
.hero p { font-size: 0.83rem; color: var(--text2); line-height: 1.8; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 0.8rem; }
.pill {
  font-size: 0.67rem;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text3);
  letter-spacing: 0.04em;
}

/* ── Cat section (production homepage) ── */
.cat-section { padding: 0 2rem 2rem; }
.cat-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.cat-label span { font-size: 0.65rem; font-family: var(--mono); color: var(--text3); font-weight: 400; letter-spacing: 0.06em; }

/* ═════════════════════════
   BACK TO TOP
   ═════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--text2);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 999;
  box-shadow: var(--shadow-card);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ═════════════════════════
   RESPONSIVE — HOMEPAGE
   ═════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Stat cards: stack one-per-row on mobile instead of the desktop
     flex-wrap grid. The base .v2-stat-card rule (flex:1; min-width:160px)
     lets 2-3 cards share a row anywhere from ~414px up to 900px, which
     squeezes each card down to ~165-200px wide — too narrow for both
     halves of the two-line subtitle (e.g. "Happy Users" / "And Growing")
     to each fit on one line, so they wrap a second time and look
     cramped. A full-width card gives the subtitle generous room for a
     clean two-line wrap at every mobile size. */
  .v2-stat-card { flex: 1 1 100%; }

  /* Bigger tap target for the hamburger button (was 36x36, below the
     44x44 minimum recommended for touch targets on iOS/Android). Scoped
     here rather than in the base .nav-hamburger rule so it never affects
     desktop, even though the base rule is display:none on desktop anyway. */
  .nav-hamburger { width: 44px; height: 44px; font-size: 1.25rem; }

  /* Mobile nav drawer links: bigger, evenly-spaced tap targets. Was
     0.6rem vertical padding only (~39px tall row) — bumped to a full
     44px+ tap height with a visible divider between items so adjacent
     links don't feel cramped on a touchscreen. */
  .mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.85rem 0.25rem;
    font-size: 0.98rem;
    border-bottom: 1px solid var(--border);
  }
  .mobile-nav a:last-child { border-bottom: none; }
  .mobile-nav-section { padding: 0.5rem 0; }

  .v2-hero {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem 2rem;
    gap: 2rem;
    text-align: center;
  }
  .hero-sub { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-search-wrap { margin-left: auto; margin-right: auto; }
  .hero-popular { justify-content: center; }
  .hero-right { display: none; }

  .featured-inner {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
  }
  .featured-visual { display: none; }
}
@media (max-width: 700px) {
  .v2-section { padding: 2rem 1.25rem; }
  .section-title { font-size: 1.4rem; }
  .nav-inner { padding: 0.75rem 1.25rem; }
  .newsletter-form { min-width: 100%; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
}

/* ═════════════════════════
   DYNAMIC CONTENT LOADING STATE
   Shown briefly while tools.json / prompts.json /
   categories.json / collections.json are fetched.
   ═════════════════════════ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.skeleton-card {
  height: 140px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 37%, var(--card) 63%);
  background-size: 400% 100%;
  animation: skeletonPulse 1.4s ease infinite;
}
@keyframes skeletonPulse {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (max-width: 1100px) { .skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .skeleton-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .skeleton-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════
   PHASE 3.5 — VISUAL MATCH TO DESIGN REFERENCE
   All rules below are homepage-scoped (loaded only on
   index.html via css/homepage.css). cards.css and every
   other shared CSS module remain untouched.
   ═══════════════════════════════════════════════════ */

/* ── Colored icon badge system (used across Stats, Trending,
      Categories, AI Workspace, Collections, Goals, Why cards) ── */
.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  line-height: 1;
}
.icon-badge-circle { border-radius: 50%; }
.icon-badge-sm { width: 34px; height: 34px; font-size: 0.95rem; border-radius: 9px; }

.icon-badge-green  { background: rgba(127, 255, 111, 0.12); color: #7fff6f; }
.icon-badge-purple { background: rgba(155, 127, 255, 0.14); color: #9b7fff; }
.icon-badge-blue   { background: rgba(91, 214, 255, 0.14);  color: #5bd6ff; }
.icon-badge-orange { background: rgba(255, 164, 0, 0.14);   color: #ffa400; }
.icon-badge-pink   { background: rgba(251, 113, 133, 0.14); color: #fb7185; }
.icon-badge-lime   { background: rgba(163, 230, 53, 0.14);  color: #a3e635; }
.icon-badge-cyan   { background: rgba(34, 211, 238, 0.14);  color: #22d3ee; }
.icon-badge-yellow { background: rgba(255, 201, 60, 0.14);  color: #ffc93c; }

/* ── Stats: icon badge + number/label layout ── */
.v2-stat-card { align-items: flex-start; gap: 0.85rem; }
.v2-stat-card .icon-badge { margin-top: 2px; }

/* ── Trending / Recently Added tool cards: icon badge on top ── */
.tools-grid-4 .tool-card-v2 .icon-badge,
#trending-tools-grid .icon-badge,
#recently-added-grid .icon-badge,
#ai-workspace-grid .icon-badge {
  margin-bottom: 0.7rem;
}

/* ── Browse Categories: circular colored icon ── */
#browse-categories-grid .cat-card-v2 {
  align-items: center;
  text-align: center;
}
#browse-categories-grid .icon-badge {
  margin: 0 auto 0.6rem;
}

/* ── AI Workspace: restructured to match reference
      (illustration left, 2x2 item grid right, CTA below) ── */
.ai-workspace-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: center;
}
.ai-workspace-illustration {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-workspace-illustration-core {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
}
.ai-workspace-illustration-core::before {
  content: '';
  position: absolute;
  inset: -18px;
  border: 1px dashed rgba(127, 255, 111, 0.25);
  border-radius: 50%;
  animation: ringRotate 18s linear infinite;
}
.ai-workspace-orbit-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: var(--shadow-card);
}
.ai-workspace-orbit-icon-1 { top: 4%;   left: 8%; }
.ai-workspace-orbit-icon-2 { bottom: 6%; right: 4%; }

.ai-workspace-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.5rem;
  margin: 1.1rem 0 1.4rem;
}
.ai-workspace-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  text-decoration: none;
}
.ai-workspace-item .icon-badge { margin-top: 1px; }
.ai-workspace-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--display);
  margin-bottom: 2px;
}
.ai-workspace-item-desc {
  font-size: 0.74rem;
  color: var(--text3);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .ai-workspace-layout { grid-template-columns: 1fr; }
  .ai-workspace-illustration { height: 160px; }
}
@media (max-width: 560px) {
  .ai-workspace-items { grid-template-columns: 1fr; }
}

/* ── Popular Collections: compact icon+name+count card
      (matches reference — no inline tool link list) ── */
.collection-card-compact {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}
.collection-card-compact:hover {
  border-color: var(--accent-glow);
  background: var(--card2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.collection-card-compact .icon-badge { margin: 0 auto; }
.collection-card-compact-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--display);
}
.collection-card-compact-count {
  font-size: 0.72rem;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 600;
}
.collections-grid-compact {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
  max-width: 1280px;
  margin: 0 auto;
}
@media (max-width: 1100px) { .collections-grid-compact { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .collections-grid-compact { grid-template-columns: repeat(2, 1fr); } }

/* ── Browse by Goal: icon badge above label ── */
.goal-card .icon-badge { margin: 0 auto 0.6rem; }

/* ── Why ToolsNova: horizontal layout (icon left, text right) ── */
.why-grid-horizontal {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.why-card-h {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  box-shadow: var(--shadow-card);
}
.why-card-h .icon-badge { margin-top: 1px; }
.why-card-h-title { font-family: var(--display); font-weight: 700; font-size: 0.9rem; color: var(--text); margin-bottom: 2px; }
.why-card-h-desc  { font-size: 0.76rem; color: var(--text3); line-height: 1.5; }
@media (max-width: 900px) { .why-grid-horizontal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .why-grid-horizontal { grid-template-columns: 1fr; } }

/* ── Newsletter: envelope icon ── */
.newsletter-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  border: 1px solid rgba(127, 255, 111, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.newsletter-content-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
@media (max-width: 700px) {
  .newsletter-content-row { flex-direction: column; text-align: center; }
}

/* ── Trending Tools "flame" eyebrow + View all link already exist via .section-eyebrow/.section-view-all ── */

/* ── Nav icon buttons (search / bookmark / theme as icon-only, matches reference) ── */
.nav-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.nav-icon-btn:hover { border-color: var(--border2); color: var(--text); }

/* ── FIX: "NEW" badge on Recently Added cards ──
      float has no effect on flex children, which caused the badge
      to stretch full-width instead of sitting in the corner. Scoped
      to #recently-added-grid only; cards.css itself is untouched. ── */
#recently-added-grid .tool-card-v2 {
  position: relative;
}
#recently-added-grid .tool-card-v2 .badge-new {
  position: absolute;
  top: 1rem;
  right: 1rem;
  float: none;
}
