/*
  VIVIDEAR Home Page
  Homepage-specific section layouts and decorative treatments.
*/


/* Hero */

.hero {
  min-height: calc(100vh - 184px);
  padding: 56px 0 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(86, 215, 209, .22), transparent 30%),
    linear-gradient(180deg, var(--white) 0%, var(--warm-bg) 82%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(520px, 7fr);
  align-items: center;
  min-height: calc(100vh - 264px);
  gap: 48px;
}
.hero__content p {
  max-width: 620px;
  margin-block: 24px 32px;
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  line-height: 32px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.hero__visual {
  position: relative;
  min-height: 690px;
  border-radius: var(--radius-hero);
}
.hero__visual::before {
  position: absolute;
  inset: 54px 0 0 52px;
  content: "";
  background: linear-gradient(135deg, var(--blue-light), var(--teal-light));
  border-radius: var(--radius-hero);
  transform: rotate(-2deg);
}
.hero__visual img {
  position: absolute;
  inset: 0 46px 56px 0;
  width: calc(100% - 46px);
  height: calc(100% - 56px);
  object-fit: cover;
  border: 10px solid var(--white);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-lg);
}
.float-card--top {
  top: 52px;
  left: -12px;
}
.float-card--mid {
  right: 8px;
  top: 210px;
}
.float-card--bottom {
  right: 50px;
  bottom: 92px;
}
.product-float {
  left: 38px;
  bottom: 0;
  width: min(420px, 78%);
}
.product-float__image {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  background:
    radial-gradient(circle at 50% 42%, rgba(61, 126, 255, .22) 0 18%, transparent 19%),
    linear-gradient(135deg, #f6fbff, #dfeaff);
  border-radius: 22px;
}


/* Trust and Section Layouts */

.trust {
  margin-top: -22px;
  position: relative;
  z-index: var(--z-base);
}
.trust__panel {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-md);
}
.trust__panel article,
.why-grid article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border-radius: var(--radius-md);
}
.trust__panel strong,
.why-grid h3 {
  color: var(--deep-navy);
  font-size: var(--font-size-base);
  line-height: 24px;
}


/* Shop Categories and Brands */

.brand-panel {
  display: grid;
  grid-template-columns: .8fr 1.4fr;
  align-items: center;
  gap: 32px;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-sm);
}
.brand-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.brand-strip span {
  display: grid;
  place-items: center;
  min-height: 82px;
  color: var(--deep-navy);
  background: var(--warm-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.category-card {
  position: relative;
  min-height: 360px;
  padding: 32px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.category-card::after {
  position: absolute;
  right: -56px;
  bottom: -56px;
  width: 180px;
  height: 180px;
  content: "";
  border-radius: 999px;
  opacity: .9;
}
.category-card__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 32px;
  color: var(--white);
  border-radius: 26px;
  font-size: 34px;
  font-weight: var(--font-weight-extrabold);
}
.category-card h3 {
  margin-bottom: 14px;
  font-size: 32px;
}
.category-card p {
  margin-bottom: 28px;
}
.category-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--deep-navy);
  font-weight: var(--font-weight-black);
}
.category-card a span {
  transition: transform var(--transition-fast);
}
.category-card--blue .category-card__icon { background: var(--primary-blue); }
.category-card--gold .category-card__icon { background: var(--gold-accent); }
.category-card--teal .category-card__icon { background: var(--soft-teal); }
.category-card--purple .category-card__icon { background: var(--purple); }
.category-card--blue::after { background: var(--blue-light); }
.category-card--gold::after { background: var(--gold-light); }
.category-card--teal::after { background: var(--teal-light); }
.category-card--purple::after { background: rgba(122, 90, 248, .12); }


/* Product Carousel */

.products {
  overflow: hidden;
}
.product-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(310px, 1fr);
  gap: 24px;
  overflow-x: auto;
  padding: 2px 2px 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}


/* Needs and Tracking */

.need-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.need-card {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 30px;
  overflow: hidden;
  color: var(--white);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.need-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(23, 50, 77, .08), rgba(23, 50, 77, .78));
}
.need-card > * {
  position: relative;
}
.need-card span {
  align-self: start;
  margin-bottom: 12px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-black);
  backdrop-filter: blur(8px);
}
.need-card h3 {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 32px;
}
.need-card a {
  font-weight: var(--font-weight-black);
}
.need-card--one { background-image: url("../images/about/about-1.jpg"); }
.need-card--two { background-image: url("../images/about/about-2.jpg"); }
.need-card--three { background-image: url("../images/about/about-3.jpg"); }
.need-card--four { background-image: url("../images/about/about-4.jpg"); }
.need-card--five { background-image: url("../images/about/about-5.jpg"); }
.need-card--six { background-image: url("../images/about/about-6.jpg"); }
.tracking {
  color: var(--white);
  background:
    radial-gradient(circle at 20% 10%, rgba(86, 215, 209, .16), transparent 28%),
    linear-gradient(135deg, var(--deep-navy), #0f263c);
  border-radius: var(--radius-hero);
  margin-inline: auto;
  width: min(calc(100% - 32px), var(--max-page));
}
.tracking__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
}
.tracking h2 {
  color: var(--white);
}
.tracking p {
  max-width: 640px;
  margin-block: 20px 32px;
  color: rgba(255, 255, 255, .74);
  font-size: var(--font-size-lg);
  line-height: 32px;
}
.tracking__panel {
  padding: 24px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-xxl);
}
.tracking-card {
  padding: 28px;
  color: var(--text-primary);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.tracking-card__top {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.thumb {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--blue-light), var(--teal-light));
  border-radius: 22px;
}
.tracking-card small,
.tracking-card strong {
  display: block;
}
.tracking-card small {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 22px;
}
.tracking-card strong,
.tracking-card__top span {
  color: var(--deep-navy);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-black);
}
.progress {
  height: 12px;
  margin-bottom: 26px;
  overflow: hidden;
  background: var(--divider);
  border-radius: var(--radius-pill);
}
.progress span {
  display: block;
  width: 62%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), var(--aqua));
  border-radius: inherit;
}
.timeline {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  padding-inline-start: 34px;
  color: var(--text-secondary);
  font-weight: var(--font-weight-extrabold);
}
.timeline li::before {
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  content: "";
  background: var(--divider);
  border-radius: var(--radius-pill);
}
.timeline .is-done,
.timeline .is-active {
  color: var(--deep-navy);
}
.timeline .is-done::before {
  background: var(--soft-teal);
}
.timeline .is-active::before {
  background: var(--primary-blue);
  box-shadow: 0 0 0 6px var(--blue-light);
}


/* Learning and Guidance */

.home-learning__header {
  max-width: 760px;
  margin-inline: auto;
}
.home-learning__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.home-learning__card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.home-learning__media {
  aspect-ratio: 16 / 10;
  height: auto;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .78), transparent 28%),
    linear-gradient(135deg, #e1ecff, #f8fbff 48%, #dff8f4);
}
.home-learning__media.article-card__image--tinnitus {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .78), transparent 28%),
    linear-gradient(135deg, #ffe4de, #fff7f2 48%, #e8f0ff);
}
.home-learning__media.article-card__image--wax {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .76), transparent 26%),
    linear-gradient(135deg, #fff2d5, #fffaf0 48%, #eaf1ff);
}
.home-learning__media.article-card__image--protect {
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, .78), transparent 26%),
    linear-gradient(135deg, #dff8f4, #f8fbff 48%, #e9ecff);
}
.home-learning__media.article-card__image--work {
  background:
    radial-gradient(circle at 76% 20%, rgba(255, 255, 255, .8), transparent 28%),
    linear-gradient(135deg, #ece9ff, #f7f8ff 48%, #e5f7ff);
}
.home-learning__card .badge {
  align-self: flex-start;
  margin-block-end: 12px;
}
.home-learning__card h3 {
  font-size: 24px;
  line-height: var(--line-height-heading);
}
.home-learning__card p {
  flex: 1;
  color: var(--text-secondary);
}
.home-learning__card > a:last-child {
  align-self: flex-start;
  margin-block-start: auto;
}
.home-learning__actions {
  display: flex;
  justify-content: center;
  margin-block-start: 36px;
}

.article-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
}
.guidance__panel {
  padding: 48px;
  background: linear-gradient(135deg, var(--white), #f6fbff);
  border: 1px solid var(--border);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-sm);
}
.guidance__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.connected-article__image {
  height: 190px;
  margin-bottom: 18px;
  background:
    linear-gradient(180deg, rgba(23, 50, 77, .04), rgba(23, 50, 77, .1)),
    url("../images/Noise-Management-in-Hearing-Aids.webp") center/cover;
  border-radius: var(--radius-lg);
}
.connected-article {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.connected-article h3 {
  margin-bottom: 12px;
  font-size: 32px;
}
.connected-article p {
  margin-bottom: 20px;
}
.connected-article a {
  color: var(--primary-blue);
  font-weight: var(--font-weight-black);
}
.related-products {
  display: grid;
  align-content: start;
  gap: 16px;
}
.related-products article {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.mini-product {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, var(--blue-light), var(--teal-light));
  border-radius: 26px;
}
.mini-product--two { background: linear-gradient(135deg, var(--gold-light), var(--blue-light)); }
.mini-product--three { background: linear-gradient(135deg, rgba(122, 90, 248, .12), var(--teal-light)); }
.related-products h3 {
  font-size: 22px;
}
.related-products a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 18px;
  color: var(--white);
  background: var(--deep-navy);
  border-radius: 16px;
  font-weight: var(--font-weight-black);
}


/* Comparison, Proof, and Newsletter */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-grid article {
  display: block;
  min-height: 250px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.why-grid .outline-icon {
  margin-bottom: 24px;
}
.why-grid h3 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 26px;
}
.testimonial-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.stars {
  margin-bottom: 18px;
  color: var(--gold-accent);
  font-size: var(--font-size-lg);
  letter-spacing: 0;
}
.testimonial-card p {
  margin-bottom: 24px;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  line-height: 32px;
}
.testimonial-card strong,
.testimonial-card span {
  display: block;
}
.testimonial-card strong {
  color: var(--deep-navy);
  font-weight: var(--font-weight-black);
}
.testimonial-card span {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-extrabold);
  line-height: 22px;
}
.newsletter__panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 48px;
  background:
    radial-gradient(circle at 100% 0%, rgba(86, 215, 209, .45), transparent 34%),
    linear-gradient(135deg, var(--blue-light), var(--teal-light));
  border: 1px solid rgba(61, 126, 255, .14);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .home-learning__grid {
    grid-auto-columns: minmax(280px, 82vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    margin-inline: calc((100vw - 100%) / -2);
    padding-inline: calc((100vw - 100%) / 2);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: calc((100vw - 100%) / 2);
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .home-learning__card {
    scroll-snap-align: start;
  }

  .home-learning__actions {
    margin-block-start: 28px;
  }
}


/* Shared Homepage Hover States */

.category-card:hover,
.product-card:hover,
.need-card:hover,
.article-card:hover,
.why-grid article:hover,
.testimonial-card:hover,
.related-products article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.category-card:hover a span {
  transform: translateX(4px);
}
