/* ============================================================
   FOXFOSTER — Homepage (v4 rebuild)
   Loaded after style.css; consumes the existing CSS variables.
   ============================================================ */

/* Section alternate background (used on alternating sections) */
.bg-alt { background: var(--bg-alt); }

:root { --bg-rgb: 5, 5, 5; }
[data-theme="light"] { --bg-rgb: 250, 250, 250; }

/* ============================================================
   HERO — left-aligned, SpaceX-grade restraint
   Right side shows the theme background image; the container
   lays a solid-to-transparent gradient so the left stays
   readable and the image is revealed toward the right.
   ============================================================ */
body.home .hero { text-align: left; }

body.home .hero-bg {
  background-image: url('../images/home-dark-01.png');
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
}

[data-theme="light"] body.home .hero-bg {
  background-image: url('../images/home-light-01.png');
}

body.home .hero .container {
  text-align: left;
  background: linear-gradient(90deg,
    var(--bg) 0%,
    rgba(var(--bg-rgb), 0.94) 26%,
    rgba(var(--bg-rgb), 0.72) 46%,
    rgba(var(--bg-rgb), 0) 76%);
  padding: 48px 40px 40px;
  border-radius: var(--radius-lg);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  border-radius: 100px;
  padding: 8px 18px;
  margin-bottom: 28px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

body.home .hero-title {
  max-width: 800px;
  margin-left: 0;
  margin-bottom: 28px;
}

body.home .hero-subtitle {
  max-width: 640px;
  margin: 0 0 40px;
  color: var(--text-secondary);
}

body.home .hero-actions {
  justify-content: flex-start;
  margin-bottom: 64px;
}

body.home .hero-stats {
  justify-content: flex-start;
  gap: 0;
  margin-top: 8px;
  padding-top: 0;
}

body.home .stat-item {
  text-align: left;
  padding: 28px 48px 0 0;
}

body.home .stat-item + .stat-item {
  padding-left: 48px;
  border-left: 1px solid var(--border-light);
}

.stat-label {
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust-strip {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 22px;
}

.trust-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.trust-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
}

/* ============================================================
   ECOSYSTEM — 6 premium cards
   ============================================================ */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

.eco-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all var(--transition);
}

.eco-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.eco-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(var(--primary-rgb), 0.35);
  transform: translateY(-4px);
  color: inherit;
}

.eco-card:hover::before { opacity: 1; }

.eco-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eco-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: background var(--transition);
}

.eco-card:hover .eco-icon { background: rgba(var(--primary-rgb), 0.18); }

.eco-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.eco-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.eco-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.eco-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.eco-foot svg {
  transition: transform var(--transition);
}

.eco-card:hover .eco-foot svg { transform: translateX(3px); }

/* ============================================================
   PRODUCT SHOWCASE — Xnolex scan window
   ============================================================ */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
}

.showcase-copy { max-width: 520px; }

.showcase-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

.showcase-lead {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.showcase-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.showcase-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.sb-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Product window */
.product-window {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .product-window {
  box-shadow: 0 24px 60px -36px rgba(0, 0, 0, 0.2);
}

.pw-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.pw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
}

.pw-dot:first-child { background: var(--border-light); }

.pw-addr {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.pw-body {
  position: relative;
  padding: 28px;
}

.pw-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(var(--primary-rgb), 0.07), transparent);
  pointer-events: none;
  opacity: 0;
}

.product-window.scanning .pw-scanline {
  opacity: 1;
  animation: scan-sweep 3.2s linear infinite;
}

@keyframes scan-sweep {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.pw-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.pw-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pw-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.pw-status {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  padding: 6px 14px;
}

.pw-status.ready { border-color: rgba(var(--primary-rgb), 0.35); color: var(--primary); }
.pw-status.done { color: #46A758; border-color: rgba(70, 167, 88, 0.4); }

.pw-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.pw-metric {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg);
}

.pw-m-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.pw-m-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.pw-progress {
  height: 6px;
  border-radius: 100px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}

.pw-bar {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
  transition: width 0.2s linear;
}

.pw-targets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.pw-target {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.pw-t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.pw-t-name { flex: 1; }

.pw-t-tag {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 100px;
  padding: 2px 10px;
}

.pw-findings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.pw-finding {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 0.84rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pw-finding.revealed { opacity: 1; transform: none; }

.pw-sev {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 8px;
  min-width: 42px;
  text-align: center;
}

.pw-sev.high { color: #E5484D; background: rgba(229, 72, 77, 0.12); }
.pw-sev.med { color: var(--primary); background: rgba(var(--primary-rgb), 0.12); }
.pw-sev.low { color: #46A758; background: rgba(70, 167, 88, 0.12); }

.pw-f-name { flex: 1; }

.pw-f-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.pw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pw-file {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* ============================================================
   JOURNEY — Learn → Practice → Compete → Protect
   ============================================================ */
.journey-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.journey-grid::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light) 8%, var(--border-light) 92%, transparent);
}

.journey-step {
  position: relative;
  text-align: center;
  padding: 0 8px;
}

.journey-icon {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all var(--transition);
}

.journey-step:hover .journey-icon {
  border-color: rgba(var(--primary-rgb), 0.4);
  background: rgba(var(--primary-rgb), 0.08);
}

.journey-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.journey-step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.journey-step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   COMPARISON
   ============================================================ */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}

.compare-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.compare-good {
  border-color: rgba(var(--primary-rgb), 0.3);
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.07), transparent 55%);
}

.compare-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.compare-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-bad .compare-ico {
  background: var(--bg-card-hover);
  color: var(--text-muted);
}

.compare-good .compare-ico {
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
}

.compare-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.c-ico {
  flex-shrink: 0;
  margin-top: 4px;
}

.compare-bad .c-ico { color: var(--text-muted); }
.compare-good .c-ico { color: var(--primary); }

/* ============================================================
   WHY — benefit cards
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.why-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
}

.why-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.why-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.why-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   DOMAINS — chips
   ============================================================ */
.domains-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.88rem;
  transition: all var(--transition);
  cursor: default;
}

.domain-chip:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.4);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ============================================================
   FAQ + CTA polish
   ============================================================ */
.faq-item {
  background: var(--bg-card);
}

.faq-question .icon svg {
  transition: transform var(--transition);
}

.faq-item.active .faq-question .icon svg { transform: rotate(90deg); }

/* ============================================================
   SCROLL REVEAL STAGGER (keep after .fade-in rules)
   ============================================================ */
.eco-card:nth-child(2) { transition-delay: 0.06s; }
.eco-card:nth-child(3) { transition-delay: 0.12s; }
.eco-card:nth-child(4) { transition-delay: 0.18s; }
.eco-card:nth-child(5) { transition-delay: 0.24s; }
.eco-card:nth-child(6) { transition-delay: 0.3s; }

.journey-step:nth-child(2) { transition-delay: 0.08s; }
.journey-step:nth-child(3) { transition-delay: 0.16s; }
.journey-step:nth-child(4) { transition-delay: 0.24s; }

.why-card:nth-child(2) { transition-delay: 0.08s; }
.why-card:nth-child(3) { transition-delay: 0.16s; }
.why-card:nth-child(4) { transition-delay: 0.24s; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in-left, .fade-in-right, .fade-in-scale {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .eco-card, .why-card, .blog-card, .domain-chip { transition: none; }

  .pw-finding { transition: none; opacity: 1; transform: none; }

  .product-window.scanning .pw-scanline { animation: none; opacity: 0; }
  .pw-bar { transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .eco-grid { grid-template-columns: repeat(2, 1fr); }
  .journey-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .journey-grid::before { display: none; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: 1fr; gap: 48px; }
  .showcase-copy { max-width: 640px; }
  .compare-grid { grid-template-columns: 1fr; max-width: 640px; }
  body.home .hero-actions { margin-bottom: 48px; }
  body.home .stat-item { padding-right: 32px; }
  body.home .stat-item + .stat-item { padding-left: 32px; }
}

@media (max-width: 767px) {
  .trust-inner { gap: 14px; padding-top: 18px; padding-bottom: 18px; }
  .trust-item { font-size: 0.64rem; }

  body.home .hero .container { padding: 40px 20px; }

  .eco-grid { grid-template-columns: 1fr; }
  .journey-grid { grid-template-columns: 1fr; gap: 36px; }
  .why-grid { grid-template-columns: 1fr; }
  .compare-grid { gap: 16px; }
  .compare-panel { padding: 24px; }

  body.home .hero-actions { margin-bottom: 40px; }
  body.home .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  body.home .stat-item { padding: 0; }
  body.home .stat-item + .stat-item { padding-left: 0; border-left: none; }
  .stat-number { font-size: 1.6rem; }

  .showcase-grid { gap: 40px; }
  .pw-body { padding: 20px; }
  .pw-metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pw-head { flex-direction: column; gap: 12px; }
  .pw-finding { flex-wrap: wrap; }
  .pw-f-count { margin-left: auto; }

  .domain-chip { padding: 10px 16px; font-size: 0.8rem; }
  .domains-wrap { gap: 8px; }
}
