/* About: mission headline, then Think -> Learn -> Create told with the real
   development of Hamster Out (inspiration photo, prototype, playtest build,
   final game). The T / L / C tiles reuse the logo's letter colours.
   assets/js/about.js adds .is-in to play the stages in order. Template rules
   size every p/li/span, so selectors here are prefixed with .about to win. */

.about {
  position: relative;
  padding: 110px 0 120px;
  overflow: hidden;
  isolation: isolate;
}

.about::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 85% 20%, rgba(0, 166, 184, 0.14), transparent 70%),
    radial-gradient(40% 50% at 12% 75%, rgba(107, 91, 214, 0.2), transparent 70%);
}

/* ---------- Heading ---------- */
.about__head {
  max-width: 860px;
  margin: 0 auto 70px;
  text-align: center;
}

.about .about__eyebrow,
.about .about__how {
  margin: 0 0 14px;
  color: var(--primary-color, #ff7a1f);
  font-family: var(--head-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dark .about__title,
.about__title {
  margin: 0 0 20px;
  color: #fff;
  font-family: var(--head-font);
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.08;
  text-transform: none;
}

.about .about__accent {
  display: inline-block;
  font: inherit;
  line-height: inherit;
  background: linear-gradient(90deg, #22d3c5 0%, #8b7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.about .about__lead {
  max-width: 680px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1.7;
}

.about .about__how {
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: none;
  text-align: center;
}

.about .about__how span { font: inherit; color: #fff; }
.about .about__how span:nth-of-type(1) { color: #ff7a80; }
.about .about__how span:nth-of-type(2) { color: #a99cff; }
.about .about__how span:nth-of-type(3) { color: #3fd6e6; }
.about .about__how i { margin: 0 6px; font-size: 14px; opacity: 0.6; }
.about .about__how strong { color: #fff; }

/* ---------- Journey ---------- */
.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jstage {
  --c: #f2545b;
  --edge: #b52f36;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0f35;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
  transition: border-color 0.25s ease;
}

.jstage--learn  { --c: #6b5bd6; --edge: #4536a3; }
.jstage--create { --c: #00a6b8; --edge: #00737f; }

@media (hover: hover) {
  .jstage:hover { border-color: var(--c); }
}

/* The picture area of each stage */
.jstage__stage {
  position: relative;
  height: 430px;
  overflow: hidden;
  border-radius: 22px;
}

.jstage--think .jstage__stage {
  background-color: #f5f1e6;
  background-image:
    linear-gradient(rgba(70, 110, 200, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 110, 200, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
}

.jstage--learn .jstage__stage {
  background: radial-gradient(70% 60% at 50% 55%, rgba(139, 123, 255, 0.55), #15124a 85%);
}

.jstage--create .jstage__stage {
  background:
    radial-gradient(55% 45% at 50% 55%, rgba(255, 220, 120, 0.5), transparent 70%),
    linear-gradient(160deg, #18c2a0 0%, #00a6b8 45%, #4536a3 100%);
}

/* Stage tag */
.about .jtag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--c);
  color: #fff;
  font-family: var(--head-font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 3px 0 var(--edge);
}

.about .jtag i { font-size: 13px; }
.about .jtag--live { background: #18b26b; box-shadow: 0 3px 0 #0d7a47; }

.jtag__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: jpulse 1.6s ease-in-out infinite;
}

@keyframes jpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

/* Think: taped polaroid */
.jpolaroid {
  position: absolute;
  top: 64px;
  left: 50%;
  width: 78%;
  max-width: 300px;
  margin: 0;
  padding: 12px 12px 0;
  background: #fff;
  box-shadow: 0 16px 30px rgba(40, 30, 10, 0.25);
  transform: translateX(-50%) rotate(-4deg);
}

.jpolaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 90px;
  height: 26px;
  margin-left: -45px;
  background: rgba(255, 210, 120, 0.75);
  transform: rotate(3deg);
}

.jpolaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.about .jpolaroid figcaption {
  padding: 12px 4px 16px;
  color: #2b2350;
  font-family: "Comic Sans MS", "Marker Felt", "Segoe Print", cursive;
  font-size: 17px;
  line-height: 1.3;
  text-align: center;
}

/* Phones */
.jphone {
  position: absolute;
  width: 172px;
  aspect-ratio: 9 / 18.5;
  padding: 7px;
  border-radius: 30px;
  background: #11132b;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 22px 40px rgba(0, 0, 0, 0.5);
}

.jphone img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 23px;
  object-fit: cover;
  object-position: top;
}

.about .jphone__label {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  color: #201048;
  font-family: var(--head-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.jphone--back {
  top: 62px;
  left: 9%;
  transform: rotate(-8deg);
}

.jphone--back img { filter: saturate(0.6); }

/* Keep the back phone's label clear of the front phone */
.about .jphone--back .jphone__label { left: 34%; }
.about .jphone--front .jphone__label { left: 62%; }

.jphone--front {
  top: 52px;
  right: 9%;
  transform: rotate(6deg);
}

.jphone--hero {
  top: 50px;
  left: 50%;
  width: 180px;
  margin-left: -90px;
}

.jicon {
  position: absolute;
  right: 12%;
  bottom: 30px;
  z-index: 2;
  width: 76px;
  height: 76px;
  border-radius: 24%;
  border: 3px solid #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  transform: rotate(10deg);
}

/* Text under each stage */
.jstage__body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 12px 12px;
}

.jletter {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--c);
  color: #fff;
  font-family: var(--head-font);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 5px 0 var(--edge);
}

.dark .jstage__title,
.jstage__title {
  margin: 2px 0 8px;
  color: #fff;
  font-family: var(--head-font);
  font-size: 28px;
  line-height: 1.1;
}

.about .jstage__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.6;
}

.about .jstage__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.about .jstage__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: var(--head-font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.about .jstage__links a:hover {
  background: var(--c);
  border-color: var(--c);
}

.about .jstage__links a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ---------- Play-in-order animation (about.js) ---------- */
.will-animate .jstage { opacity: 0; transform: translateY(30px); }
.will-animate .jpolaroid { transform: translateX(-50%) rotate(-14deg) scale(0.85); opacity: 0; }
.will-animate .jphone--back { transform: rotate(0deg) translateX(40px); opacity: 0; }
.will-animate .jphone--front { transform: rotate(0deg) translateX(-40px); opacity: 0; }
.will-animate .jphone--hero { transform: translateY(40px) scale(0.85); opacity: 0; }
.will-animate .jicon { transform: rotate(-20deg) scale(0); }

.will-animate.is-in .jstage {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease;
}
.will-animate.is-in .jstage--learn  { transition-delay: 0.3s, 0.3s, 0s; }
.will-animate.is-in .jstage--create { transition-delay: 0.6s, 0.6s, 0s; }

.will-animate.is-in .jpolaroid,
.will-animate.is-in .jphone,
.will-animate.is-in .jicon {
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1.3);
}
.will-animate.is-in .jpolaroid { transform: translateX(-50%) rotate(-4deg); transition-delay: 0.3s; }
.will-animate.is-in .jphone--back { transform: rotate(-8deg); transition-delay: 0.7s; }
.will-animate.is-in .jphone--front { transform: rotate(6deg); transition-delay: 0.9s; }
.will-animate.is-in .jphone--hero { transform: none; transition-delay: 1.1s; }
.will-animate.is-in .jicon { transform: rotate(10deg); transition-delay: 1.5s; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .jphone { width: 150px; }
  .jphone--hero { width: 164px; margin-left: -82px; }
  .jstage__stage { height: 400px; }
}

@media (max-width: 991px) {
  .about { padding: 80px 0 90px; }
  .about__head { margin-bottom: 50px; }
  .journey { grid-template-columns: 1fr; gap: 24px; max-width: 520px; margin: 0 auto; }
  .jstage__stage { height: 420px; }
  .jphone { width: 168px; }
  .jphone--hero { width: 180px; margin-left: -90px; }
  .jphone--back { left: 12%; }
  .jphone--front { right: 12%; }
}

@media (max-width: 575px) {
  .about { padding: 64px 0 72px; }
  .about .about__lead { font-size: 16px; }
  .about .about__how { font-size: 17px; }
  .jstage__stage { height: 380px; }
  .jphone { width: 142px; border-radius: 24px; padding: 6px; }
  .jphone img { border-radius: 19px; }
  .jphone--back { left: 5%; }
  .jphone--front { right: 5%; }
  .jphone--hero { width: 160px; margin-left: -80px; }
  .jicon { width: 62px; height: 62px; right: 8%; }
  .jletter { width: 48px; height: 48px; font-size: 26px; }
  .jstage__title { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .jstage, .jstage * { transition: none !important; animation: none !important; }
}
