/*
 * Homepage Growing-Up Roadmap — story-led age cards.
 *
 * Each milestone uses a responsive image layer, live HTML copy and transform-
 * only motion. The winding route remains visual context rather than content.
 */

.browse-age {
  --age-overlay-opacity: .82;
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 7vw, 92px);
  border: 0;
  background: var(--isp-home-surface-sky, #f2f9fd);
}

.age-panel { width: 100%; margin: 0; padding: 0; }

.browse-age .home-section-head,
.browse-age .home-section-head--center {
  justify-content: center;
  margin-bottom: 32px;
  text-align: center;
}

.browse-age .home-section-head > div {
  width: min(100%, 760px);
  margin-inline: auto;
}

.browse-age .section-kicker {
  margin-bottom: 10px;
  color: #347da8;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.browse-age .home-section-head h2 {
  margin: 0 0 12px;
  color: var(--isp-ink, #444);
  font-size: clamp(2.25rem, 4vw, 3.35rem);
  font-weight: 850;
  letter-spacing: -.047em;
  line-height: 1.04;
  text-wrap: balance;
}

.browse-age .home-section-head p {
  max-width: 660px;
  margin-inline: auto;
  color: #666366;
  line-height: 1.6;
}

.age-roadmap__question,
.age-roadmap__support { display: block; }

.age-roadmap__question {
  margin-bottom: 5px;
  color: #c95887;
  font-size: clamp(1.08rem, 1.8vw, 1.38rem);
  font-weight: 850;
  letter-spacing: -.018em;
}

.age-roadmap__support { color: #696568; font-size: .98rem; }

.age-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  width: 100%;
}

.age-card {
  --age-accent: #3f8fbc;
  --age-soft: #edf8fe;
  position: relative;
  z-index: 2;
  display: block;
  min-width: 0;
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(68, 68, 68, .09);
  border-radius: 22px;
  background: #fffaf3;
  color: var(--isp-ink, #444);
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(68, 68, 68, .07), inset 0 -3px 0 color-mix(in srgb, var(--age-accent) 62%, transparent);
  transform: translateZ(0);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.age-card:nth-child(3n + 1) { --age-accent: #cf5d89; --age-soft: #fff0f6; }
.age-card:nth-child(3n + 2) { --age-accent: #2f84b5; --age-soft: #eaf7fd; }
.age-card:nth-child(3n) { --age-accent: #9a6b24; --age-soft: #fff3d9; }

.age-card:hover,
.age-card:focus-visible {
  z-index: 3;
  border-color: color-mix(in srgb, var(--age-accent) 28%, transparent);
  box-shadow: 0 17px 36px rgba(68, 68, 68, .09), inset 0 -3px 0 color-mix(in srgb, var(--age-accent) 72%, transparent);
  transform: translateY(-3px);
}

.age-card:focus-visible {
  outline: 3px solid rgba(115, 192, 238, .48);
  outline-offset: 5px;
}

.age-card__scene {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: var(--age-soft);
}

.age-card__scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 252, 246, .92) 0%, rgba(255, 252, 246, .84) 46%, rgba(255, 252, 246, .18) 76%, transparent 100%);
  background:
    linear-gradient(90deg, rgba(255, 252, 246, var(--age-overlay-opacity)) 0%, rgba(255, 252, 246, calc(var(--age-overlay-opacity) * .98)) 32%, rgba(255, 252, 246, calc(var(--age-overlay-opacity) * .78)) 50%, rgba(255, 252, 246, calc(var(--age-overlay-opacity) * .25)) 72%, transparent 100%),
    linear-gradient(0deg, rgba(255, 250, 243, .14), transparent 46%);
  pointer-events: none;
}

.age-card__scene-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.035);
  transition: transform .75s cubic-bezier(.2, .72, .3, 1);
  will-change: transform;
}

.has-scene-motion .age-card__scene-image {
  animation: isp-age-scene-drift 14s ease-in-out infinite alternate;
}

.has-scene-motion .age-card:nth-child(2) .age-card__scene-image { animation-delay: -3s; animation-duration: 16s; }
.has-scene-motion .age-card:nth-child(3) .age-card__scene-image { animation-delay: -7s; animation-duration: 15s; }
.has-scene-motion .age-card:nth-child(4) .age-card__scene-image { animation-delay: -10s; animation-duration: 17s; }
.has-scene-motion .age-card:nth-child(5) .age-card__scene-image { animation-delay: -5s; animation-duration: 15.5s; }
.has-scene-motion .age-card:nth-child(6) .age-card__scene-image { animation-delay: -12s; animation-duration: 18s; }

.age-card:hover .age-card__scene-image,
.age-card:focus-visible .age-card__scene-image {
  animation-play-state: paused;
  transform: scale(1.085) translate3d(-.6%, -.4%, 0);
}

.age-card__content {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(68%, 240px);
  min-height: 220px;
  padding: 18px 0 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.age-card__number {
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--age-accent);
  box-shadow: 0 6px 16px rgba(68, 68, 68, .055);
  backdrop-filter: blur(8px);
  font-size: .7rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.age-card__label {
  display: block;
  max-width: 12ch;
  margin-bottom: 6px;
  color: #363638;
  font-size: clamp(1.16rem, 1.45vw, 1.38rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.age-card__description {
  display: block;
  max-width: 21ch;
  color: #565154;
  font-size: .82rem;
  font-weight: 720;
  line-height: 1.4;
  text-wrap: balance;
}

.age-card__arrow {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 68, 68, .06);
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--age-accent);
  box-shadow: 0 6px 16px rgba(68, 68, 68, .04);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.2;
  transition: transform .18s ease, background-color .18s ease;
}

.age-card__cta-label { display: none; }

.age-card__arrow svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: currentColor;
  transition: transform .22s ease;
}

.age-card:hover .age-card__arrow svg,
.age-card:focus-visible .age-card__arrow svg { transform: translateX(2px); }

.age-card:hover .age-card__arrow,
.age-card:focus-visible .age-card__arrow {
  background: #fff;
  transform: translateX(3px);
}

@keyframes isp-age-scene-drift {
  0% { transform: scale(1.035) translate3d(0, 0, 0); }
  50% { transform: scale(1.055) translate3d(-.55%, -.35%, 0); }
  100% { transform: scale(1.045) translate3d(.35%, .45%, 0); }
}

@media (max-width: 960px) {
  .age-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
}

@media (max-width: 700px) {
  .browse-age { padding-block: 56px 64px; }

  .browse-age .home-section-head,
  .browse-age .home-section-head--center {
    justify-content: center;
    margin-bottom: 30px;
    text-align: center;
  }

  .browse-age .home-section-head > div,
  .browse-age .home-section-head p { margin-inline: auto; }

  .browse-age .home-section-head h2 { font-size: clamp(2.05rem, 10vw, 2.8rem); }

  .age-grid {
    grid-template-columns: 1fr;
    max-width: none;
    gap: 12px;
  }

  .age-card { min-height: 176px; border-radius: 19px; }

  .age-card__content {
    width: min(70%, 280px);
    min-height: 176px;
    padding: 17px 0 16px 17px;
  }

  .age-card__scene-image { object-position: 65% center; }

  .age-card__scene::after {
    background: linear-gradient(90deg, rgba(255, 252, 246, var(--age-overlay-opacity)) 0%, rgba(255, 252, 246, calc(var(--age-overlay-opacity) * .98)) 39%, rgba(255, 252, 246, calc(var(--age-overlay-opacity) * .73)) 58%, rgba(255, 252, 246, .08) 84%, transparent 100%);
  }

  .age-card__label { font-size: clamp(1.16rem, 5.6vw, 1.36rem); }
  .age-card__arrow {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 390px) {
  .age-card { min-height: 168px; }

  .age-card__content {
    width: 72%;
    min-height: 168px;
    padding-left: 15px;
  }
}

@media (hover: none) {
  .age-card:hover {
    border-color: rgba(68, 68, 68, .09);
    box-shadow: 0 12px 30px rgba(68, 68, 68, .07), inset 0 -3px 0 color-mix(in srgb, var(--age-accent) 62%, transparent);
    transform: none;
  }

  .age-card:hover .age-card__scene-image { animation-play-state: running; }
}

@media (prefers-reduced-motion: reduce) {
  .age-card,
  .age-card__scene-image,
  .age-card__arrow svg {
    animation: none !important;
    transition: none !important;
  }

  .age-card__scene-image,
  .age-card:hover .age-card__scene-image,
  .age-card:focus-visible .age-card__scene-image { transform: scale(1.035); }
}
