/* Homepage sections: USP strip, category tiles, age cards, size guide, FAQ, newsletter. */

/* USP strip */
.usp {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 16px; border: 1px solid var(--color-line); border-radius: var(--radius-lg);
}
.usp__item { display: flex; align-items: center; gap: 14px; padding: 20px 24px; }
.usp__item + .usp__item { border-left: 1px solid var(--color-line); }
.usp__item .icon { width: 28px; height: 28px; color: var(--color-brand); stroke-width: 1.5; }
.usp__item div { display: grid; line-height: 1.35; }
.usp__item b { font-size: 15px; color: var(--color-ink); }
.usp__item span { font-size: 13px; color: var(--color-muted); }

/* category tiles */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tile { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); text-align: left; color: #fff; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 14, 22, .78) 0%, rgba(10, 14, 22, .1) 55%, rgba(10, 14, 22, 0) 100%); }
.tile > img { transition: transform .7s var(--ease); }
.tile:hover > img { transform: scale(1.05); }
.tile__content { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; padding: 20px; }
.tile__title { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.tile__text { font-size: 13px; color: rgba(255, 255, 255, .82); line-height: 1.4; }
.tile__cta { margin-top: 2px; font-size: 13px; font-weight: 700; color: #fff; }
.tile:hover .tile__cta { text-decoration: underline; text-underline-offset: 3px; }

/* age cards */
.ages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.age-card {
  display: flex; flex-direction: column; text-align: left;
  border: 1px solid var(--color-line); border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .25s, border-color .25s;
}
.age-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.age-card__media { aspect-ratio: 4 / 3; }
.age-card__media > img { transition: transform .7s var(--ease); }
.age-card:hover .age-card__media > img { transform: scale(1.05); }
.age-card__body { display: grid; gap: 2px; padding: 18px 20px 20px; }
.age-card__range { font-size: 13px; font-weight: 700; color: var(--color-brand); }
.age-card__name { font-size: 19px; font-weight: 800; color: var(--color-ink); letter-spacing: -.02em; }
.age-card__cta { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--color-muted); }
.age-card__cta .icon { width: 16px; height: 16px; transition: transform .2s; }
.age-card:hover .age-card__cta { color: var(--color-ink); }
.age-card:hover .age-card__cta .icon { transform: translateX(3px); }

/* bike size guide */
.guide {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden;
}
.guide__media { min-height: 420px; }
.guide__body { padding: 48px; align-self: center; }
.guide__table { width: 100%; margin: 24px 0 28px; border-collapse: collapse; font-size: 14px; }
.guide__table th, .guide__table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--color-line-strong); }
.guide__table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); font-weight: 700; }
.guide__table tbody th { font-size: 18px; font-weight: 800; color: var(--color-ink); }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; align-items: start; }
.help-card {
  display: flex; gap: 14px; margin-top: 28px; padding: 20px;
  background: var(--color-surface); border-radius: var(--radius);
}
.help-card .icon { color: var(--color-brand); width: 26px; height: 26px; }
.help-card div { display: grid; gap: 2px; font-size: 14px; }
.help-card b { color: var(--color-ink); font-size: 15px; }
.help-card a { color: var(--color-text); }
.help-card a:hover { color: var(--color-brand); }

/* newsletter */
.newsletter {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--color-navy); border-radius: var(--radius-lg); overflow: hidden;
}
.newsletter__media { min-height: 340px; }
.newsletter__body { padding: 56px; align-self: center; }
.newsletter .section-title { color: #fff; }
.newsletter .section-sub { color: #b9c0cf; }
.newsletter__form { display: flex; gap: 10px; margin-top: 28px; }
.newsletter__form input {
  flex: 1; min-width: 0; height: 54px; padding: 0 20px; /* matches .btn--lg */
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 15px;
}
.newsletter__form input::placeholder { color: #9aa3b5; }
.newsletter__form input:focus { outline: none; border-color: #fff; }

@media (max-width: 1100px) {
  /* five tiles as 3 + 2: six columns, the last two tiles share the second row (no gap) */
  .tiles { grid-template-columns: repeat(6, 1fr); }
  .tile { grid-column: span 2; }
  .tile:nth-child(4):nth-last-child(2), .tile:nth-child(5):last-child { grid-column: span 3; aspect-ratio: 3 / 2; }
}
@media (max-width: 900px) {
  .usp { grid-template-columns: 1fr 1fr; }
  .usp__item:nth-child(3) { border-left: 0; }
  .usp__item:nth-child(n + 3) { border-top: 1px solid var(--color-line); }
  /* tablets keep four age cards in a row, with shorter photos */
  .age-card__media { aspect-ratio: 1 / 1; }
  .age-card__body { padding: 14px 16px 16px; }
  .age-card__name { font-size: 16px; }
  .guide, .newsletter, .faq { grid-template-columns: 1fr; }
  .faq { gap: 28px; }
  /* stacked: fixed landscape crops, so a portrait photo can't make the section half a screen tall */
  .guide__media, .newsletter__media { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 700px) {
  .ages { grid-template-columns: 1fr 1fr; gap: 12px; }
  .age-card__media { aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  /* compact 2×2 service strip */
  .usp__item { gap: 10px; padding: 12px 14px; }
  .usp__item .icon { width: 22px; height: 22px; }
  .usp__item b { font-size: 13.5px; }
  .usp__item span { font-size: 12px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile, .tile:nth-child(4):nth-last-child(2) { grid-column: auto; aspect-ratio: 4 / 5; }
  /* an odd last tile spans the full width as a banner instead of sitting alone */
  .tile:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
  .tile__content { padding: 14px; }
  .tile__title { font-size: 16px; }
  .tile__text { display: none; } /* name + product count are enough on a phone */
  .age-card__body { padding: 12px 14px 14px; }
  .guide__body, .newsletter__body { padding: 28px 20px; }
  .guide__table { font-size: 13px; }
  .guide__table th, .guide__table td { padding: 10px 6px; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form input { flex: none; width: 100%; } /* in a column, flex:1 would collapse its height */
}
