/* ==========================================================================
   Wonders Kids — About Us page
   1. Our story + counters   2. Ribbon   3. Milestones timeline   4. Founders
   Loaded after style.css, header.css and pages.css (banner).
   ========================================================================== */

/* 1. OUR STORY ============================================================= */
.story { padding-top: 100px; }
.story__rocket { width: 80px; top: 30px; left: 0; }
.story__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }

.story__media { position: relative; max-width: 500px; width: 100%; margin-inline: auto; }
.story__img {
  aspect-ratio: 5 / 4.6; overflow: hidden;
  border-radius: 30% 46% 38% 36% / 36% 44% 40% 46%;
  box-shadow: 0 30px 60px -30px rgba(22, 20, 57, .45);
}
.story__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.story__media:hover .story__img img { transform: scale(1.05); }
.story__since {
  position: absolute; left: -10px; bottom: 30px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--yellow); color: var(--heading); text-align: center;
  border: 6px solid #fff; box-shadow: 6px 8px 0 rgba(22, 20, 57, .18);
  animation: float 6s ease-in-out infinite;
}
.story__since-label, .story__since-sub { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; line-height: 1.2; }
.story__since strong { font-family: var(--font-heading); font-size: 38px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.story__media .about__star { right: 6px; bottom: -14px; }

.story__content .section-title { font-size: 38px; max-width: 520px; margin-bottom: 22px; }
.story__text { font-size: 17px; line-height: 1.8; margin-bottom: 32px; max-width: 560px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.stat {
  position: relative; padding: 20px 18px; border-radius: 18px; background: #fff;
  border: 1px solid #EEEEF4; box-shadow: 0 14px 34px -24px rgba(22, 20, 57, .35);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.stat::before { content: ""; position: absolute; left: 18px; top: 0; width: 34px; height: 4px; border-radius: 0 0 4px 4px; background: var(--primary); }
.stat--1::before { background: var(--yellow); }
.stat--2::before { background: #86C04C; }
.stat:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -22px rgba(87, 81, 225, .5); }
.stat__value { display: block; font-family: var(--font-heading); font-size: 32px; font-weight: 800; color: var(--heading); line-height: 1.1; letter-spacing: -.02em; }
.stat__label { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--body); }

.story__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }

/* 2. RIBBON ================================================================ */
.ribbon { position: relative; padding: 50px 0 70px; overflow: hidden; }
.ribbon__band { width: 110%; margin-left: -5%; overflow: hidden; padding: 18px 0; }
.ribbon__band--yellow { background: var(--yellow); transform: rotate(2.2deg); position: absolute; top: 60px; left: 0; opacity: .95; }
.ribbon__band--purple { position: relative; background: var(--primary); transform: rotate(-2.2deg); box-shadow: 0 20px 40px -20px rgba(87, 81, 225, .7); }
.ribbon__track { display: flex; align-items: center; gap: 30px; width: max-content; animation: marquee 32s linear infinite; }
.ribbon__band--yellow .ribbon__track { animation-direction: reverse; animation-duration: 40s; }
.ribbon__track span { font-family: var(--font-heading); font-weight: 800; font-size: 34px; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.ribbon__band--purple span { color: #fff; }
.ribbon__band--yellow span { color: var(--heading); }
.ribbon__track i { font-style: normal; font-size: 28px; line-height: 1; }
.ribbon__band--purple i { color: var(--yellow); }
.ribbon__band--yellow i { color: var(--primary); }
.ribbon:hover .ribbon__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 3. MILESTONES ============================================================ */
.milestones { background: var(--hero-bg); padding: 120px 0 110px; overflow: hidden; }
.milestones::before, .milestones::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 108 22'%3E%3Cpath d='M0 22C14 2 40 0 54 0s40 2 54 22Z' fill='%23F4F4F4'/%3E%3C/svg%3E") 0 0 / 108px 22px repeat-x;
}
.milestones::before { top: 0; background-color: #fff; }
.milestones::after { bottom: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 108 22'%3E%3Cpath d='M0 22C14 2 40 0 54 0s40 2 54 22Z' fill='%23fff'/%3E%3C/svg%3E"); }
.milestones__flower { width: 58px; top: 90px; left: max(20px, calc(50% - 620px)); animation: spin 22s linear infinite; }
.milestones__zigzag { width: 90px; top: 130px; right: max(20px, calc(50% - 600px)); }
.milestones .section-head { margin-bottom: 70px; }

.timeline { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 1040px; display: grid; gap: 34px; }
.timeline__line { position: absolute; top: 10px; bottom: 10px; left: 50%; width: 4px; margin-left: -2px; border-radius: 4px; background: #E3E3EC; overflow: hidden; }
.timeline__fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, #5751E1, #A855F7, #EC4B95, #FFC224);
  transform-origin: 50% 0; transform: scaleY(var(--fill, 0));
}
html:not(.js) .timeline__fill { transform: none; }

.timeline__item { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 90px; }
.timeline__item .milestone { grid-column: 1; }
.timeline__item--right .milestone { grid-column: 2; }
.timeline__dot {
  position: absolute; left: 50%; top: 26px; transform: translateX(-50%); z-index: 1;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 16px;
  border: 5px solid var(--hero-bg); box-shadow: 0 0 0 2px #fff;
}

.milestone {
  position: relative; display: flex; gap: 18px; padding: 26px 26px 28px; border-radius: 22px; background: #fff;
  box-shadow: 0 18px 44px -26px rgba(22, 20, 57, .35); border: 1px solid #EEEEF4;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.milestone:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -28px rgba(87, 81, 225, .5); }
.milestone::after { /* little pointer towards the line */
  content: ""; position: absolute; top: 44px; right: -9px; width: 18px; height: 18px;
  background: #fff; transform: rotate(45deg); border-top: 1px solid #EEEEF4; border-right: 1px solid #EEEEF4; border-radius: 0 4px 0 0;
}
.timeline__item--right .milestone::after { right: auto; left: -9px; transform: rotate(-135deg); }
.milestone__icon {
  flex-shrink: 0; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  transition: transform .4s var(--ease);
}
.milestone:hover .milestone__icon { transform: rotate(-8deg) scale(1.07); }
.milestone__icon svg { width: 28px; height: 28px; }
.milestone__step { font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #9A99AE; margin-bottom: 4px; }
.milestone__title { font-size: 21px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.milestone__text { font-size: 15.5px; line-height: 1.7; }

.milestones__closing {
  display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  max-width: 760px; margin: 60px auto 0; padding: 18px 26px; border-radius: 50px; background: #fff;
  font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--heading);
  box-shadow: 0 14px 34px -22px rgba(22, 20, 57, .35);
}
.milestones__closing .wk-icon { width: 22px; height: 22px; color: var(--yellow); flex-shrink: 0; }

/* 4. FOUNDERS ============================================================== */
.founders { padding-top: 110px; }
.founders .section-head { max-width: 640px; }
.founders__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: stretch; }

.founder {
  --tone: var(--c-purple); --tone-soft: #EFEEFE;
  position: relative; display: flex; flex-direction: column; border-radius: 26px; background: #fff; overflow: hidden;
  border: 1px solid #EEEEF4; box-shadow: 0 20px 50px -30px rgba(22, 20, 57, .4);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.founder--yellow { --tone: var(--c-yellow); --tone-soft: #FFF5DA; }
.founder--green  { --tone: var(--c-green);  --tone-soft: #EAF6E0; }
.founder:hover { transform: translateY(-10px); box-shadow: 0 36px 70px -34px rgba(87, 81, 225, .55); }

.founder__top { position: relative; height: 150px; }
.founder__blob { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--tone); }
.founder__top::after { /* dotted texture */
  content: ""; position: absolute; top: 18px; right: 22px; width: 64px; height: 50px; opacity: .6;
  background: radial-gradient(rgba(255,255,255,.9) 1.5px, transparent 2px) 0 0 / 12px 12px;
}
.founder__photo {
  position: absolute; left: 50%; bottom: -60px; transform: translateX(-50%);
  width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
  background: var(--tone-soft); border: 6px solid #fff; box-shadow: 0 14px 30px -12px rgba(22, 20, 57, .4);
  display: grid; place-items: center;
}
.founder__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.founder:hover .founder__photo img { transform: scale(1.08); }
.founder__initials { font-family: var(--font-heading); font-weight: 800; font-size: 42px; color: var(--tone); letter-spacing: -.02em; }

.founder__body { flex: 1; padding: 78px 28px 32px; text-align: center; }
.founder__role {
  display: inline-block; padding: 5px 14px; border-radius: 50px; margin-bottom: 10px;
  background: var(--tone-soft); color: var(--heading);
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.founder__name { font-size: 25px; font-weight: 700; margin-bottom: 20px; }
.founder__list { display: grid; gap: 11px; text-align: left; }
.founder__list li { display: flex; align-items: flex-start; gap: 11px; font-size: 15px; line-height: 1.5; color: var(--body); }
.founder__check {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tone-soft); color: var(--tone);
}
.founder__check .wk-icon { width: 13px; height: 13px; stroke-width: 3; }

/* RESPONSIVE =============================================================== */
@media (max-width: 1199px) {
  .story__grid { gap: 50px; }
  .stat__value { font-size: 28px; }
  .founders__grid { gap: 22px; }
  .founder__body { padding-inline: 22px; }
}
@media (max-width: 991px) {
  .story { padding-top: 80px; }
  .story__grid { grid-template-columns: 1fr; gap: 60px; }
  .story__rocket { display: none; }
  .story__content { text-align: center; }
  .story__content .section-title, .story__text { margin-inline: auto; }
  .story__actions { justify-content: center; }

  /* timeline → single column with the line on the left */
  .timeline__line { left: 27px; }
  .timeline__item, .timeline__item--right { grid-template-columns: 1fr; padding-left: 80px; }
  .timeline__item .milestone, .timeline__item--right .milestone { grid-column: 1; }
  .timeline__dot { left: 27px; }
  .milestone::after, .timeline__item--right .milestone::after { right: auto; left: -9px; transform: rotate(-135deg); }

  .founders__grid { grid-template-columns: 1fr 1fr; }
  .founder:last-child { grid-column: 1 / -1; max-width: calc(50% - 11px); justify-self: center; width: 100%; }
}
@media (max-width: 767px) {
  .story__content .section-title { font-size: 30px; }
  .story__text { font-size: 16px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 16px 10px; text-align: center; }
  .stat::before { left: 50%; margin-left: -17px; }
  .stat__value { font-size: 24px; }
  .stat__label { font-size: 12.5px; }
  .story__since { width: 112px; height: 112px; left: 0; bottom: 10px; }
  .story__since strong { font-size: 30px; }

  .ribbon { padding: 40px 0 50px; }
  .ribbon__track span { font-size: 24px; }
  .ribbon__track { gap: 20px; }
  .ribbon__band--yellow { top: 46px; }

  .milestones { padding: 90px 0 80px; }
  .milestones .section-head { margin-bottom: 44px; }
  .timeline { gap: 22px; }
  .timeline__line { left: 21px; }
  .timeline__dot { left: 21px; width: 44px; height: 44px; font-size: 13px; border-width: 4px; top: 22px; }
  .timeline__item, .timeline__item--right { padding-left: 58px; }
  .milestone { flex-direction: column; gap: 14px; padding: 22px 20px; }
  .milestone__icon { width: 50px; height: 50px; border-radius: 15px; }
  .milestone__title { font-size: 19px; }
  .milestones__closing { border-radius: 20px; font-size: 15.5px; text-align: left; }
  .milestones__flower, .milestones__zigzag { display: none; }

  .founders__grid { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; }
  .founder:last-child { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ribbon__track { animation: none; }
  .story__since { animation: none; }
}