/* =========================================================
   CHATNEX — HOMEPAGE COMPONENT STYLES
   File: css/components/index.css
   ========================================================= */

/* =========================================================
   HOME PAGE FOUNDATION
   ========================================================= */

.home-page {
  overflow-x: hidden;
}

.home-page main {
  position: relative;
}

/* =========================================================
   HERO SECTION
   ========================================================= */

.home-hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  padding: 90px 0 110px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(59, 130, 246, 0.15),
      transparent 32%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(139, 92, 246, 0.14),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      var(--bg-primary) 0%,
      var(--bg-secondary) 52%,
      var(--bg-primary) 100%
    );
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    );
  background-size: 60px 60px;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.9),
    transparent 90%
  );
}

.hero-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.22;
}

.hero-orb-one {
  top: -180px;
  left: -120px;
  background: var(--brand-blue);
}

.hero-orb-two {
  right: -160px;
  bottom: -180px;
  background: var(--brand-purple);
}

.hero-orb-three {
  top: 38%;
  right: 32%;
  width: 220px;
  height: 220px;
  background: var(--brand-cyan);
  opacity: 0.1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      rgba(96, 165, 250, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(96, 165, 250, 0.035) 1px,
      transparent 1px
    );
  background-size: 80px 80px;
  opacity: 0.6;
}

.home-hero-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  gap: 70px;
  align-items: center;
}

/* =========================================================
   HERO CONTENT
   ========================================================= */

.home-hero-content {
  max-width: 680px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 8px 14px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.08);
  color: var(--brand-blue-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.7);
}

.home-hero-title {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.home-hero-title .gradient-text {
  display: inline-block;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-description {
  max-width: 610px;
  margin: 28px 0 0;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    background var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.category-pill:hover,
.category-pill:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
  box-shadow: var(--shadow-blue);
}

.category-pill-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand-blue-light);
}

.category-pill.app-pill .category-pill-icon {
  background: rgba(139, 92, 246, 0.12);
  color: var(--brand-purple-light);
}

/* =========================================================
   HERO ACTIONS
   ========================================================= */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-actions .btn {
  min-height: 50px;
}

.hero-actions .btn-primary {
  box-shadow:
    0 10px 30px rgba(59, 130, 246, 0.2),
    0 0 0 1px rgba(96, 165, 250, 0.08);
}

.hero-actions .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 38px rgba(59, 130, 246, 0.3),
    0 0 30px rgba(34, 211, 238, 0.08);
}

.hero-actions .btn-secondary:hover {
  transform: translateY(-3px);
}

/* =========================================================
   HERO STATS
   ========================================================= */

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 42px;
}

.hero-stat {
  position: relative;
  padding-right: 28px;
}

.hero-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 0;
  width: 1px;
  height: 38px;
  background: var(--border-color);
}

.hero-stat strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.45rem;
  line-height: 1;
}

.hero-stat span {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

/* =========================================================
   HERO VISUAL
   ========================================================= */

.hero-visual {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

.hero-visual-glow {
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(59, 130, 246, 0.2),
      rgba(139, 92, 246, 0.08) 45%,
      transparent 70%
    );
  filter: blur(12px);
  pointer-events: none;
}

.hero-preview-stack {
  position: relative;
  width: min(100%, 560px);
  min-height: 500px;
}

/* =========================================================
   TEMPLATE PREVIEW CARDS
   ========================================================= */

.template-preview-card {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      145deg,
      rgba(17, 26, 45, 0.96),
      rgba(10, 16, 32, 0.94)
    );
  box-shadow:
    0 35px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  backdrop-filter: blur(18px);
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow),
    border-color var(--transition-normal);
}

.template-preview-card:hover {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow:
    0 42px 90px rgba(0, 0, 0, 0.42),
    0 0 35px rgba(59, 130, 246, 0.08);
}

.website-preview {
  top: 25px;
  left: 0;
  width: 88%;
  z-index: 2;
  transform: rotateY(5deg) rotateX(2deg);
}

.website-preview:hover {
  transform: rotateY(0) rotateX(0) translateY(-8px);
}

.app-preview {
  right: 0;
  bottom: 20px;
  width: 55%;
  z-index: 4;
  transform: rotateY(-7deg) rotateX(2deg);
}

.app-preview:hover {
  transform: rotateY(0) rotateX(0) translateY(-8px);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.preview-window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-window-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.preview-window-dots span:nth-child(1) {
  background: #fb7185;
}

.preview-window-dots span:nth-child(2) {
  background: #facc15;
}

.preview-window-dots span:nth-child(3) {
  background: #4ade80;
}

.preview-address {
  width: 46%;
  height: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
}

.preview-card-content {
  padding: 18px;
}

/* =========================================================
   WEBSITE PREVIEW
   ========================================================= */

.website-preview-content {
  min-height: 370px;
}

.preview-website-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.preview-logo {
  width: 86px;
  height: 13px;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    var(--brand-blue),
    var(--brand-cyan)
  );
}

.preview-nav-links {
  display: flex;
  gap: 9px;
}

.preview-nav-links span {
  width: 35px;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.14);
}

.preview-hero-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
}

.preview-hero-text {
  padding: 10px 0;
}

.preview-hero-line {
  height: 11px;
  margin-bottom: 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.13);
}

.preview-hero-line.large {
  width: 92%;
  height: 19px;
  background: linear-gradient(
    90deg,
    rgba(96, 165, 250, 0.7),
    rgba(34, 211, 238, 0.5)
  );
}

.preview-hero-line.medium {
  width: 72%;
}

.preview-hero-line.small {
  width: 58%;
}

.preview-hero-button {
  width: 80px;
  height: 26px;
  margin-top: 15px;
  border-radius: 7px;
  background: linear-gradient(
    135deg,
    var(--brand-blue),
    var(--brand-cyan)
  );
}

.preview-hero-image {
  min-height: 150px;
  border-radius: 16px;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(34, 211, 238, 0.35),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.3),
      rgba(139, 92, 246, 0.28)
    );
  border: 1px solid rgba(96, 165, 250, 0.12);
}

.preview-feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 18px;
}

.preview-feature {
  height: 68px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

/* =========================================================
   APP PREVIEW
   ========================================================= */

.app-preview .preview-card-content {
  padding: 0;
}

.preview-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.preview-app-header span:first-child {
  width: 78px;
  height: 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
}

.preview-app-header span:last-child {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.2);
}

.preview-app-body {
  padding: 15px;
}

.preview-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 105px;
  padding: 15px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.preview-chart span {
  flex: 1;
  min-height: 20px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(
    to top,
    var(--brand-purple),
    var(--brand-cyan)
  );
  opacity: 0.8;
}

.preview-chart span:nth-child(1) {
  height: 38%;
}

.preview-chart span:nth-child(2) {
  height: 56%;
}

.preview-chart span:nth-child(3) {
  height: 44%;
}

.preview-chart span:nth-child(4) {
  height: 76%;
}

.preview-chart span:nth-child(5) {
  height: 63%;
}

.preview-chart span:nth-child(6) {
  height: 88%;
}

.preview-app-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.preview-app-card {
  height: 58px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}

/* =========================================================
   CATEGORY SECTION
   ========================================================= */

.home-categories {
  position: relative;
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.category-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.category-feature-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 34px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      145deg,
      rgba(17, 26, 45, 0.95),
      rgba(10, 16, 32, 0.95)
    );
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.category-feature-card::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  filter: blur(35px);
  pointer-events: none;
}

.category-feature-card.app-category::before {
  background: rgba(139, 92, 246, 0.1);
}

.category-feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: var(--shadow-lg);
}

.category-feature-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 17px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--brand-blue-light);
  font-size: 1.35rem;
}

.app-category .category-feature-icon {
  border-color: rgba(167, 139, 250, 0.2);
  background: rgba(139, 92, 246, 0.1);
  color: var(--brand-purple-light);
}

.category-feature-card h3 {
  margin: 24px 0 12px;
  font-size: 1.5rem;
}

.category-feature-card p {
  max-width: 470px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.category-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  color: var(--brand-blue-light);
  font-size: 0.9rem;
  font-weight: 700;
}

.category-card-link span {
  transition: transform var(--transition-fast);
}

.category-card-link:hover {
  color: var(--brand-cyan-light);
}

.category-card-link:hover span {
  transform: translateX(4px);
}

/* =========================================================
   FEATURED TEMPLATES
   ========================================================= */

.featured-section {
  position: relative;
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
}

.featured-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.featured-header-content {
  max-width: 680px;
}

.featured-header-action {
  flex-shrink: 0;
}

.featured-templates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Dynamic cards inherit from templates.css. */
.featured-templates-grid .template-card {
  height: 100%;
}

/* =========================================================
   HOMEPAGE FEATURE CARDS
   ========================================================= */

.home-features {
  position: relative;
  padding: var(--section-padding) 0;
  background:
    linear-gradient(
      180deg,
      var(--bg-secondary),
      var(--bg-primary)
    );
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  position: relative;
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: rgba(17, 26, 45, 0.7);
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    background var(--transition-normal),
    box-shadow var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(96, 165, 250, 0.26);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.feature-card:nth-child(2) .feature-icon {
  background: rgba(34, 211, 238, 0.1);
  color: var(--brand-cyan-light);
}

.feature-card:nth-child(3) .feature-icon {
  background: rgba(139, 92, 246, 0.1);
  color: var(--brand-purple-light);
}

.feature-card:nth-child(4) .feature-icon {
  background: rgba(34, 197, 94, 0.1);
  color: var(--brand-green-light);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--brand-blue-light);
}

.feature-card h3 {
  margin: 20px 0 10px;
  font-size: 1.08rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* =========================================================
   HOMEPAGE PRICING
   ========================================================= */

.home-pricing {
  position: relative;
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.home-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 48px auto 0;
}

.home-pricing-grid .pricing-card {
  height: 100%;
}

.pricing-card {
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.pricing-card:hover {
  transform: translateY(-7px);
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */

.testimonials-section {
  position: relative;
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.testimonial-card {
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.24);
  box-shadow: var(--shadow-md);
}

.testimonial-rating {
  display: flex;
  gap: 4px;
  color: #facc15;
  font-size: 0.9rem;
}

.testimonial-card blockquote {
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.75;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--text-white);
  font-size: 0.82rem;
  font-weight: 800;
}

.testimonial-author div:last-child {
  min-width: 0;
}

.testimonial-author strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.testimonial-author span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

/* =========================================================
   HOMEPAGE CTA
   ========================================================= */

.home-cta {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(59, 130, 246, 0.2),
      transparent 32%
    ),
    radial-gradient(
      circle at 80% 50%,
      rgba(139, 92, 246, 0.18),
      transparent 32%
    ),
    var(--bg-secondary);
}

.home-cta::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(96, 165, 250, 0.08);
  border-radius: var(--radius-xl);
  pointer-events: none;
}

.home-cta-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.home-cta-content p {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.home-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* =========================================================
   SECTION DECORATIONS
   ========================================================= */

.section-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.1;
}

.section-glow-blue {
  top: 15%;
  left: -160px;
  background: var(--brand-blue);
}

.section-glow-purple {
  right: -160px;
  bottom: 15%;
  background: var(--brand-purple);
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */

.home-page .reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.home-page .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   HOMEPAGE LIGHT MODE
   ========================================================= */

body.light-mode .home-hero {
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(59, 130, 246, 0.09),
      transparent 32%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(139, 92, 246, 0.08),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      #f8fbff 0%,
      #eef4ff 55%,
      #f8fbff 100%
    );
}

body.light-mode .home-hero::before {
  background:
    linear-gradient(
      rgba(15, 23, 42, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(15, 23, 42, 0.035) 1px,
      transparent 1px
    );
}

body.light-mode .category-pill {
  background: rgba(255, 255, 255, 0.72);
}

body.light-mode .template-preview-card,
body.light-mode .category-feature-card,
body.light-mode .feature-card,
body.light-mode .testimonial-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

body.light-mode .home-categories,
body.light-mode .home-features,
body.light-mode .home-pricing,
body.light-mode .home-cta {
  background: #f4f7fc;
}

body.light-mode .featured-section,
body.light-mode .testimonials-section {
  background: #ffffff;
}

body.light-mode .preview-card-header,
body.light-mode .preview-app-header {
  background: rgba(15, 23, 42, 0.025);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .preview-address,
body.light-mode .preview-feature,
body.light-mode .preview-app-card,
body.light-mode .preview-chart {
  background: rgba(15, 23, 42, 0.035);
  border-color: rgba(15, 23, 42, 0.07);
}

/* =========================================================
   HERO ANIMATION STATES
   ========================================================= */

.home-page .hero-animate {
  animation: homeHeroFadeUp 0.8s ease both;
}

.home-page .hero-animate.delay-1 {
  animation-delay: 0.12s;
}

.home-page .hero-animate.delay-2 {
  animation-delay: 0.22s;
}

.home-page .hero-animate.delay-3 {
  animation-delay: 0.32s;
}

.home-page .hero-animate.delay-4 {
  animation-delay: 0.42s;
}

@keyframes homeHeroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-float {
  animation: heroFloat 5s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
  .home-hero-container {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .home-hero-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
  }

  .hero-category-pills,
  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .home-hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual {
    min-height: 500px;
  }

  .hero-preview-stack {
    max-width: 620px;
    margin: 0 auto;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonial-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 10px);
    width: 100%;
    justify-self: center;
  }
}

/* =========================================================
   TABLET / SMALL DESKTOP
   ========================================================= */

@media (max-width: 900px) {
  .home-hero {
    padding: 75px 0 90px;
  }

  .home-hero-title {
    font-size: clamp(2.8rem, 8vw, 4.6rem);
  }

  .category-feature-grid,
  .home-pricing-grid {
    grid-template-columns: 1fr;
  }

  .featured-templates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-header-action {
    width: 100%;
  }

  .hero-visual {
    min-height: 460px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
  .home-hero {
    min-height: auto;
    padding: 65px 0 75px;
  }

  .home-hero-title {
    font-size: clamp(2.45rem, 12vw, 3.7rem);
    letter-spacing: -0.045em;
  }

  .home-hero-description {
    font-size: 0.98rem;
  }

  .hero-category-pills {
    gap: 8px;
  }

  .category-pill {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    gap: 18px;
  }

  .hero-stat {
    padding-right: 18px;
  }

  .hero-stat strong {
    font-size: 1.2rem;
  }

  .hero-stat span {
    font-size: 0.7rem;
  }

  .hero-visual {
    min-height: 400px;
  }

  .hero-preview-stack {
    min-height: 390px;
  }

  .website-preview {
    width: 94%;
    top: 15px;
  }

  .app-preview {
    width: 62%;
    bottom: 5px;
  }

  .website-preview-content {
    min-height: 285px;
  }

  .preview-hero-content {
    gap: 10px;
  }

  .preview-hero-image {
    min-height: 110px;
  }

  .preview-feature {
    height: 48px;
  }

  .category-feature-card {
    min-height: auto;
    padding: 26px;
  }

  .featured-templates-grid,
  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .home-cta {
    padding: 75px 0;
  }

  .home-cta::before {
    inset: 10px;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {
  .home-hero {
    padding-top: 52px;
  }

  .home-hero-title {
    font-size: 2.35rem;
  }

  .hero-eyebrow {
    font-size: 0.68rem;
    padding: 7px 11px;
  }

  .hero-stats {
    justify-content: space-between;
    width: 100%;
  }

  .hero-stat {
    flex: 1;
    padding-right: 12px;
  }

  .hero-stat:not(:last-child)::after {
    display: none;
  }

  .hero-visual {
    min-height: 330px;
  }

  .hero-preview-stack {
    min-height: 325px;
  }

  .website-preview {
    top: 10px;
  }

  .app-preview {
    width: 65%;
  }

  .preview-card-header {
    min-height: 35px;
  }

  .preview-card-content {
    padding: 12px;
  }

  .website-preview-content {
    min-height: 220px;
  }

  .preview-website-nav {
    margin-bottom: 16px;
  }

  .preview-hero-image {
    min-height: 80px;
  }

  .preview-feature-row {
    margin-top: 10px;
  }

  .preview-feature {
    height: 34px;
  }

  .category-feature-card {
    padding: 22px;
  }

  .feature-card,
  .testimonial-card {
    padding: 22px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .home-page .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }

  .hero-float {
    animation: none;
  }
}