/* ==========================================================================
   home.css — home page sections  (fully responsive rewrite)
   ========================================================================== */

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 85% 20%, rgba(var(--accent-rgb), 0.22), transparent 70%),
    var(--ink);
  color: var(--white);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding-block: clamp(48px, 8vw, 104px);
}

.hero__title {
  margin-bottom: 20px;
  /* Tighter minimum so the huge display font never overflows on narrow screens */
  font-size: clamp(2.5rem, 6.5vw, 6.5rem);
  line-height: 0.9;
}

.hero__title span {
  color: var(--accent);
}

.hero__lead {
  max-width: 54ch;
  margin-bottom: 32px;
  font-size: clamp(1rem, 2.4vw, 1.1875rem);
  color: var(--on-dark);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--ink-line);
}

.hero__facts > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 28px 0 0;
}

.hero__facts > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--ink-line);
}

.hero__facts dt {
  order: 2;
  max-width: 14ch;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.hero__facts dd {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

/* ---- Product showcase (hero carousel) ---------------------------------- */
.showcase {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
}

.showcase__bracket {
  position: absolute;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0 solid var(--accent);
  pointer-events: none;
}

.showcase__bracket--tl {
  top: -10px;
  left: -10px;
  border-top-width: 3px;
  border-left-width: 3px;
}

.showcase__bracket--br {
  right: -10px;
  bottom: 60px;
  border-right-width: 3px;
  border-bottom-width: 3px;
}

.showcase__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--white);
}

.showcase__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.showcase__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.showcase__photo {
  position: relative;
  flex: 1;
  min-height: 0;
}

.showcase__photo img {
  position: absolute;
  inset: 28px;
  width: calc(100% - 56px);
  height: calc(100% - 56px);
  object-fit: contain;
  transform: scale(0.96);
  transition: transform 1.2s ease;
}

.showcase__slide.is-active .showcase__photo img {
  transform: scale(1);
}

.showcase__caption {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "index name link"
    "index badge link";
  align-items: center;
  column-gap: 12px;
  padding: 12px 16px;
  background: var(--ink-2);
  border-top: 3px solid var(--accent);
}

.showcase__index {
  grid-area: index;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-bright);
}

.showcase__name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3vw, 1.625rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

.showcase__badge {
  grid-area: badge;
  font-size: 0.8125rem;
  color: var(--on-dark-muted);
}

.showcase__link {
  grid-area: link;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.2s;
}

.showcase__link:hover {
  color: var(--hover);
}

.showcase__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.showcase__btn {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  transition: border-color 0.2s, background-color 0.2s;
}

.showcase__btn:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.showcase__dots {
  display: flex;
  gap: 8px;
}

.showcase__dot {
  width: 22px;
  height: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  border: 0;
  transition: background-color 0.25s, width 0.25s;
}

.showcase__dot.is-active {
  width: 36px;
  background: var(--accent);
}

/* ---- Product families -------------------------------------------------- */
.family-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.family__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: var(--ink);
  color: var(--white);
  transition: transform 0.25s, box-shadow 0.25s;
}

.family__link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.family__photo {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--white);
  overflow: hidden;
}

.family__photo img {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.family__link:hover .family__photo img {
  transform: scale(1.05);
}

.family__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 20px 22px;
  border-top: 3px solid var(--accent);
}

.family__count {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.family__name {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.family__blurb {
  flex: 1;
  margin-bottom: 16px;
  font-size: 0.9375rem;
  color: var(--on-dark-muted);
}

.family__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: gap 0.2s, color 0.2s;
}

.family__link:hover .family__go {
  gap: 12px;
  color: var(--hover);
}

/* ---- Authorised distributor band -------------------------------------- */
.authorised {
  position: relative;
  overflow: hidden;
  background: var(--ink-3);
  color: var(--white);
}

.authorised::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000);
  mask-image: linear-gradient(90deg, transparent 20%, #000);
}

.authorised__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
  padding-block: clamp(56px, 8vw, 104px);
}

.authorised__title {
  margin-bottom: 20px;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
}

.authorised__copy > p {
  max-width: 54ch;
  color: var(--on-dark);
}

.authorised__list {
  display: grid;
  gap: 16px;
  margin-block: 24px 28px;
}

.authorised__list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--on-dark);
}

.authorised__list strong {
  color: var(--white);
}

.authorised__tick {
  display: grid;
  width: 26px;
  height: 26px;
  flex: none;
  place-items: center;
  margin-top: 2px;
  background: var(--accent);
  color: var(--white);
}

.authorised__docs {
  position: relative;
  min-height: 380px;
}

.paper {
  position: absolute;
  width: 58%;
  background: var(--white);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease;
}

.paper img {
  width: 100%;
  height: auto;
  display: block;
}

.paper--1 {
  top: 0;
  left: 4%;
  transform: rotate(-4deg);
}

.paper--2 {
  right: 2%;
  bottom: 0;
  transform: rotate(3deg);
}

.authorised__docs:hover .paper--1 {
  transform: rotate(-6deg) translateX(-8px);
}

.authorised__docs:hover .paper--2 {
  transform: rotate(5deg) translateX(8px);
}

/* ---- Quality statement ------------------------------------------------- */
.quality {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.quality__title {
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
}

.quality__lead p:not(.eyebrow) {
  max-width: 56ch;
  margin-bottom: 24px;
  color: var(--muted);
}

.quality__steps {
  border-top: 2px solid var(--text);
}

.quality__steps li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quality__steps span {
  min-width: 2ch;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---- Brand strip (kept as fallback — replaced by ticker on home) ------- */
.brand-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.brand-strip__item {
  display: flex;
  height: 100px;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.brand-strip__item img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---- Product card ---------------------------------------------------- */
.product-card__media {
  overflow: hidden;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* ---- Tablet: 900 – 1024px ------------------------------------------ */
@media (max-width: 1024px) {
  .family-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .authorised__inner {
    grid-template-columns: 1fr;
  }

  .authorised__docs {
    min-height: 340px;
    max-width: 480px;
  }

  .quality {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ---- Phablet: 768 – 900px ------------------------------------------ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-block: 40px 48px;
  }

  /* Move showcase above text only if screen is wide enough; on mobile it sits below */
  .hero__copy {
    order: 1;
  }

  .showcase {
    order: 2;
    max-width: 440px;
    margin-inline: auto;
  }

  .hero__title {
    /* Force a tighter clamp on mid-range screens */
    font-size: clamp(2.5rem, 8vw, 4.5rem);
  }

  .hero__lead {
    font-size: 1rem;
  }
}

/* ---- Mobile: ≤ 640px ----------------------------------------------- */
@media (max-width: 640px) {
  /* Hero */
  .hero__inner {
    padding-block: 32px 40px;
    gap: 28px;
  }

  .hero__title {
    font-size: clamp(2.25rem, 11vw, 3rem);
    margin-bottom: 16px;
    line-height: 0.92;
  }

  .hero__lead {
    font-size: 0.9375rem;
    margin-bottom: 24px;
  }

  .hero__actions {
    gap: 10px;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .hero__facts {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 28px;
  }

  .hero__facts > div {
    padding: 14px 12px 0 0;
    gap: 4px;
  }

  .hero__facts > div + div {
    padding-left: 12px;
  }

  .hero__facts dd {
    font-size: 1.75rem;
  }

  .hero__facts dt {
    font-size: 0.6875rem;
  }

  /* Showcase */
  .showcase {
    max-width: 100%;
  }

  .showcase__caption {
    padding: 10px 12px;
    column-gap: 8px;
  }

  .showcase__index {
    font-size: 1.375rem;
  }

  .showcase__name {
    font-size: 1rem;
  }

  .showcase__badge {
    font-size: 0.75rem;
  }

  .showcase__link {
    font-size: 0.875rem;
  }

  .showcase__photo img {
    inset: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
  }

  /* Family grid */
  .family-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .family__body {
    padding: 16px 16px 18px;
  }

  .family__name {
    font-size: 1.5rem;
  }

  /* Brand strip */
  .brand-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Authorised docs */
  .authorised__docs {
    min-height: 260px;
    max-width: 100%;
  }

  .paper {
    width: 54%;
  }

  /* Quality */
  .quality {
    gap: 28px;
  }

  .quality__steps li {
    font-size: 1.375rem;
  }

  /* Card grid */
  .card-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- Very small: ≤ 375px ------------------------------------------- */
@media (max-width: 375px) {
  .hero__title {
    font-size: 2rem;
  }

  .hero__facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero__facts dd {
    font-size: 1.5rem;
  }

  .hero__facts dt {
    font-size: 0.625rem;
  }

  .showcase__caption {
    grid-template-areas:
      "index name"
      "index badge"
      "link link";
    grid-template-columns: auto 1fr;
    row-gap: 4px;
  }

  .showcase__link {
    grid-area: link;
    justify-self: start;
    margin-top: 6px;
  }

  .stats-bar__number {
    font-size: 2.25rem;
  }

  .stats-bar__label {
    font-size: 0.6875rem;
  }
}
