/* ==========================================================================
   Capitan Homepage — light mockup layout (brand palette preserved)
   indigo #6366F1 · violet · pink #EC4899 / #C026D3 · accent red
   ========================================================================== */

body[data-page="home"] .app-main > .section {
  padding-block: clamp(28px, 4.5vw, 52px);
}

body[data-page="home"] .app-main > .section.section--compact {
  padding-block: clamp(10px, 2vw, 20px);
}

body[data-page="home"] .app-main > .section.section--cta {
  padding-block: clamp(32px, 5vw, 60px);
}

/* ---- Section headers ---- */
body[data-page="home"] .section__header {
  margin-bottom: clamp(18px, 3vw, 28px);
}

body[data-page="home"] .section__header--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

body[data-page="home"] .section__title {
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: 0.02em;
}

body[data-page="home"] .section__title::before {
  width: 5px;
  height: 72%;
  box-shadow: 0 0 14px var(--color-indigo-glow);
}

body[data-page="home"] .section__subtitle {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.5;
}

/* ==========================================================================
   HERO — full-bleed image + text overlay + single CTA
   ========================================================================== */
.home-hero {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: #0F172A;
}

.home-hero__viewport {
  position: relative;
  min-height: clamp(360px, 48vw, 600px);
}

.home-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 550ms var(--ease-out, ease), visibility 550ms;
}

.home-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.home-hero__media {
  position: absolute;
  inset: 0;
}

.home-hero__media picture,
.home-hero__media img,
.home-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  background:
    linear-gradient(to left, rgba(5, 10, 28, 0.9) 0%, rgba(7, 13, 34, 0.72) 35%, rgba(7, 13, 34, 0.08) 72%),
    linear-gradient(0deg, rgba(5, 10, 28, 0.46) 0%, transparent 48%);
}

.home-hero__content {
  width: 100%;
  padding-block: clamp(36px, 6vw, 64px);
  color: #fff;
  max-width: var(--container-max);
}

.home-hero__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  max-width: 16ch;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.home-hero__text {
  margin: 0 0 22px;
  max-width: 44ch;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.home-hero__cta {
  min-height: 48px;
  padding-inline: 26px;
  gap: 8px;
  background: linear-gradient(135deg, #EC4899 0%, #C026D3 45%, #7C3AED 100%);
  box-shadow: 0 12px 32px rgba(192, 38, 211, 0.35);
  border: none;
  color: #fff;
}

.home-hero__cta:hover {
  color: #fff;
  box-shadow: 0 16px 40px rgba(192, 38, 211, 0.42);
}

.home-hero__cta [data-lucide] {
  width: 18px;
  height: 18px;
}

.home-hero__dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
}

.home-hero__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease, border-radius 200ms ease;
}

.home-hero__dot.is-active {
  width: 22px;
  border-radius: 999px;
  background: #fff;
}

@media (max-width: 767px) {
  .home-hero__viewport {
    min-height: clamp(420px, 128vw, 560px);
  }

  .home-hero__overlay {
    background:
      linear-gradient(0deg, rgba(5, 10, 28, 0.96) 0%, rgba(5, 10, 28, 0.76) 42%, rgba(5, 10, 28, 0.08) 78%);
    align-items: flex-end;
  }

  .home-hero__media img,
  .home-hero__img {
    object-position: 28% center;
  }

  .home-hero__content {
    text-align: center;
    padding-block: 28px 40px;
  }

  .home-hero__title,
  .home-hero__text {
    margin-inline: auto;
    max-width: none;
  }

  .home-hero__cta {
    width: 100%;
    max-width: 280px;
  }

  .home-hero__dots {
    bottom: 12px;
  }
}

[data-theme="dark"] .home-hero {
  background: #0B1220;
}

/* ==========================================================================
   VISUAL CATEGORY BENTO
   ========================================================================== */
.home-cats {
  overflow: hidden;
}

.home-cats__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 18px;
}

.home-cats__header h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 32px);
}

.home-cats__eyebrow {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
}

.home-cats__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.home-cats__all svg {
  width: 16px;
  height: 16px;
}

.home-cats__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.home-cats__item {
  position: relative;
  grid-column: span 3;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--radius-xl) + 2px);
  color: #fff;
  background: #111827;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.13);
  isolation: isolate;
  text-decoration: none;
  transition: transform 240ms var(--ease-out, ease), box-shadow 240ms ease;
}

.home-cats__item:nth-child(-n + 2) {
  grid-column: span 6;
  min-height: 280px;
}

.home-cats__item:hover {
  transform: translateY(-6px);
  color: #fff;
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.24);
}

.home-cats__media,
.home-cats__shade {
  position: absolute;
  inset: 0;
}

.home-cats__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms var(--ease-out, ease);
}

.home-cats__item:hover .home-cats__media img {
  transform: scale(1.055);
}

.home-cats__shade {
  z-index: 1;
  background:
    linear-gradient(to left, rgba(6, 10, 27, 0.92) 0%, rgba(6, 10, 27, 0.55) 48%, rgba(6, 10, 27, 0.04) 82%),
    linear-gradient(0deg, rgba(6, 10, 27, 0.7), transparent 55%);
}

.home-cats__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: min(65%, 290px);
  height: 100%;
  min-height: inherit;
  padding: clamp(16px, 2.5vw, 26px);
}

.home-cats__icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: background var(--transition-fast);
}

.home-cats__item:hover .home-cats__icon {
  background: rgba(255, 255, 255, 0.22);
}

.home-cats__icon [data-lucide] {
  width: 19px;
  height: 19px;
}

.home-cats__label {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.home-cats__description {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.5;
}

.home-cats__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
}

.home-cats__cta svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   TRUST BAR
   ========================================================================== */
.home-trust__bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 6px;
  border-radius: calc(var(--radius-xl) + 2px);
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.home-trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  min-width: 0;
}

.home-trust__item + .home-trust__item {
  border-inline-start: 1px solid rgba(99, 102, 241, 0.1);
}

.home-trust__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
}

.home-trust__icon [data-lucide] {
  width: 18px;
  height: 18px;
}

.home-trust__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-trust__text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
}

.home-trust__text span {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   BANNERS / PRODUCTS / CARDS
   ========================================================================== */
body[data-page="home"] .banner-grid {
  gap: clamp(14px, 2vw, 20px);
}

body[data-page="home"] .promo-banner {
  min-height: 210px;
  border-radius: calc(var(--radius-xl) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body[data-page="home"] .promo-banner:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(99, 102, 241, 0.26);
}

body[data-page="home"] .promo-banner__content {
  min-height: 210px;
  padding: clamp(16px, 2.5vw, 24px);
}

body[data-page="home"] .product-grid {
  gap: clamp(12px, 2vw, 20px);
}

body[data-page="home"] .product-card {
  padding: 14px;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
  overflow: hidden;
  background: #fff;
}

body[data-page="home"] .product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 18px 40px rgba(99, 102, 241, 0.14);
}

body[data-page="home"] .product-card__image {
  overflow: hidden;
  border-radius: var(--radius-md);
}

body[data-page="home"] .product-card__image .product-card__img,
body[data-page="home"] .product-card__image picture img {
  transition: transform 420ms var(--ease-out);
}

body[data-page="home"] .product-card:hover .product-card__image .product-card__img,
body[data-page="home"] .product-card:hover .product-card__image picture img {
  transform: scale(1.05);
}

body[data-page="home"] .product-card__price {
  color: var(--color-accent-dark);
}

body[data-page="home"] .service-card {
  padding: clamp(18px, 2.5vw, 24px);
  border-radius: calc(var(--radius-lg) + 2px);
}

body[data-page="home"] .service-card:hover {
  border-color: rgba(99, 102, 241, 0.24);
  box-shadow: 0 18px 40px rgba(99, 102, 241, 0.12);
}

body[data-page="home"] .service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.14), rgba(192, 38, 211, 0.08));
}

body[data-page="home"] .blog-card {
  padding: 14px;
  border-radius: calc(var(--radius-lg) + 2px);
}

body[data-page="home"] .blog-card:hover {
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 18px 40px rgba(99, 102, 241, 0.12);
}

body[data-page="home"] .blog-card__image {
  margin-bottom: 14px;
  overflow: hidden;
}

body[data-page="home"] .blog-card:hover .blog-card__image img,
body[data-page="home"] .blog-card:hover .blog-card__image .blog-card__img {
  transform: scale(1.04);
}

body[data-page="home"] .blog-card__image img,
body[data-page="home"] .blog-card__image .blog-card__img {
  transition: transform 420ms var(--ease-out);
}

/* Testimonials */
.testimonial-card {
  padding: clamp(18px, 2.5vw, 24px);
  border-radius: calc(var(--radius-lg) + 2px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  inset-inline-end: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
}

.testimonial-card__stars {
  color: #F59E0B;
  letter-spacing: 2px;
  font-size: 14px;
}

.testimonial-card__text {
  flex: 1;
  font-size: 14px;
  line-height: 1.75;
}

.testimonial-card__name {
  font-size: 13px;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px solid rgba(99, 102, 241, 0.1);
}

/* CTA */
body[data-page="home"] .cta-banner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(36px, 6vw, 56px) clamp(24px, 4vw, 40px);
  border-radius: calc(var(--radius-xl) + 4px);
  border: 1px solid rgba(99, 102, 241, 0.16);
  background:
    radial-gradient(ellipse 70% 80% at 15% 20%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 70% at 90% 80%, rgba(236, 72, 153, 0.08), transparent 50%),
    #fff;
  box-shadow: 0 24px 56px rgba(99, 102, 241, 0.08);
}

.cta-banner__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary-dark);
  border: 1px solid rgba(99, 102, 241, 0.16);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.cta-banner__eyebrow [data-lucide] {
  width: 14px;
  height: 14px;
}

body[data-page="home"] .cta-banner h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  margin-bottom: 10px;
}

.cta-banner__text {
  color: var(--color-text-muted);
  font-size: clamp(14px, 1.5vw, 16px);
  margin-bottom: 24px;
  max-width: 42ch;
  margin-inline: auto;
  line-height: 1.7;
}

.cta-banner__actions {
  gap: 12px;
}

.cta-banner__actions .btn {
  min-height: 46px;
  padding-inline: 24px;
}

/* ==========================================================================
   DARK MODE — same layout, richer surfaces (brand colors kept)
   ========================================================================== */
[data-theme="dark"] .home-hero {
  background: #0B1220;
}

[data-theme="dark"] .home-hero__title {
  color: #fff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

[data-theme="dark"] .home-cats__item,
[data-theme="dark"] .home-trust__bar,
[data-theme="dark"] .testimonial-card {
  background: rgba(26, 35, 50, 0.85);
  border-color: rgba(129, 140, 248, 0.16);
}

.home-seo-links__box {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: calc(var(--radius-xl) + 2px);
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.08), transparent 40%),
    #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.home-seo-links__head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
}

.home-seo-links__head p {
  margin: 0 0 16px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.home-seo-links__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-seo-links__grid a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: var(--radius-full);
  color: var(--color-text);
  background: rgba(99, 102, 241, 0.05);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.home-seo-links__grid a:hover {
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .home-seo-links__box {
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.16), transparent 40%),
    rgba(26, 35, 50, 0.9);
  border-color: rgba(129, 140, 248, 0.18);
}

[data-theme="dark"] .home-seo-links__grid a {
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.18);
  color: #e2e8f0;
}

[data-theme="dark"] .home-trust__item + .home-trust__item {
  border-inline-start-color: rgba(129, 140, 248, 0.14);
}

[data-theme="dark"] body[data-page="home"] .product-card,
[data-theme="dark"] body[data-page="home"] .cta-banner {
  background: rgba(26, 35, 50, 0.9);
  border-color: rgba(129, 140, 248, 0.18);
}

[data-theme="dark"] body[data-page="home"] .product-card__price {
  color: #FCA5A5;
}

[data-theme="dark"] .cta-banner__eyebrow {
  background: rgba(99, 102, 241, 0.18);
  color: #C7D2FE;
  border-color: rgba(129, 140, 248, 0.28);
}

[data-theme="dark"] body[data-page="home"] .cta-banner {
  background:
    radial-gradient(ellipse 70% 80% at 15% 20%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 70% at 90% 80%, rgba(236, 72, 153, 0.12), transparent 50%),
    rgba(26, 35, 50, 0.9);
}

/* ==========================================================================
   RESPONSIVE (non-hero sections)
   ========================================================================== */
@media (max-width: 1024px) {
  .home-cats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-cats__item,
  .home-cats__item:nth-child(-n + 2) {
    grid-column: span 1;
    min-height: 240px;
  }

  .home-trust__bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-trust__item:nth-child(2) {
    border-inline-start: none;
  }

  .home-trust__item:nth-child(n + 3) {
    border-top: 1px solid rgba(99, 102, 241, 0.1);
  }
}

@media (max-width: 767px) {
  .home-cats__header {
    align-items: center;
    margin-bottom: 14px;
  }

  .home-cats__header h2 {
    font-size: 21px;
  }

  .home-cats__all {
    font-size: 11px;
  }

  .home-cats__grid {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }

  .home-cats__item,
  .home-cats__item:nth-child(-n + 2) {
    grid-column: auto;
    min-height: 230px;
  }

  .home-cats__content {
    width: 72%;
    padding: 18px;
  }

  .home-cats__label {
    font-size: 21px;
  }

  .home-trust__bar {
    grid-template-columns: 1fr;
  }

  .home-trust__item,
  .home-trust__item + .home-trust__item {
    border-inline-start: none;
  }

  .home-trust__item + .home-trust__item {
    border-top: 1px solid rgba(99, 102, 241, 0.1);
  }

  body[data-page="home"] .promo-banner,
  body[data-page="home"] .promo-banner__content {
    min-height: 168px;
  }

  .cta-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-banner__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-cats__media img,
  body[data-page="home"] .product-card:hover .product-card__image .product-card__img,
  body[data-page="home"] .product-card:hover .product-card__image picture img,
  body[data-page="home"] .blog-card:hover .blog-card__image img,
  body[data-page="home"] .blog-card:hover .blog-card__image .blog-card__img {
    transform: none;
  }
}

