/* ==========================================================================
   AD!KTED — pages/our-story.css
   ========================================================================== */

/* ---------- Motion ----------
   Scroll reveals are driven by js/reveal.js, which adds .is-visible. The
   no-JS / reduced-motion fallback lives at the bottom of this block so
   nothing can be left permanently invisible. */
/* Hero copy eases in on load rather than on scroll — it's already in view. */
.story-hero__content {
  animation: story-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes story-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Full-bleed hero with blue wash over a photo ---------- */
.story-hero {
  position: relative;
  min-height: clamp(320px, 42vw, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--brand-blue);
}

.story-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Brand-blue wash so the white/orange headline stays readable over any photo. */
.story-hero__scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 81, 246, 0.72);
}

.story-hero__content {
  position: relative;
  z-index: 1;
  padding: var(--space-7) var(--container-pad);
}

.story-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  color: var(--brand-white);
  line-height: 1;
}

.story-hero__title .accent {
  color: var(--brand-orange);
}

.story-hero__tagline {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-script);
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--brand-yellow);
}

/* ---------- Statement: fanned photo stack above a centred pitch ----------
   Three cards overlap and tilt like snapshots dropped on a table. Widths are
   percentages and the overlap uses negative margins, so the whole
   arrangement scales down intact rather than breaking apart on small
   screens. No hover transform here — these sit still by design. */
.trio {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--space-5);
}

.trio__item {
  position: relative;
  flex: 0 0 auto;
  width: 32%;
  max-width: 330px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.trio__item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.trio__item:nth-child(1) {
  transform: rotate(-9deg) translateY(4%);
  margin-right: -5%;
  z-index: 1;
}

/* The middle card sits highest and on top of the other two. */
.trio__item:nth-child(2) {
  transform: rotate(2deg) translateY(-7%);
  z-index: 3;
}

.trio__item:nth-child(3) {
  transform: rotate(9deg) translateY(4%);
  margin-left: -5%;
  z-index: 2;
}

/* Lift on hover: the card rises and its shadow deepens. Each rule has to
   restate its own rotation, otherwise hovering would flatten the tilt.
   z-index brings the hovered card above its neighbours as it rises. */
.trio__item:hover {
  z-index: 4;
  box-shadow: 0 34px 60px rgba(0, 0, 0, 0.3);
}

.trio__item:nth-child(1):hover {
  transform: rotate(-9deg) translateY(-3%);
}

.trio__item:nth-child(2):hover {
  transform: rotate(2deg) translateY(-14%);
}

.trio__item:nth-child(3):hover {
  transform: rotate(9deg) translateY(-3%);
}

.statement {
  position: relative;
  max-width: 640px;
  margin: var(--space-8) auto 0;
  text-align: center;
}

/* Hand-drawn crown perched on the first letter of the headline.
   The title is inline-block so its box shrinks to the text — that makes its
   left edge the "C", which the crown can then be anchored to at any
   viewport width. `isolation` gives the title its own stacking context so
   the crown's negative z-index tucks it behind the letters without
   escaping behind the page background. */
.statement__title {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

/* crown.png carries a blurred grey halo, so it's used as a mask and filled
   with brand yellow rather than dropped in as an <img>, which would show
   the halo on this light background. */
.statement__crown {
  position: absolute;
  z-index: -1;
  top: -20px;
  /* crown.png has transparent padding baked around the artwork, so the
     visible crown sits inset from this box — the offset compensates so the
     art actually meets the letter instead of floating away from it. */
  left: 32px;
  width: clamp(38px, 4.6vw, 62px);
  aspect-ratio: 1 / 1;
  transform: rotate(-24deg);
  pointer-events: none;
  background-color: var(--brand-yellow);
  -webkit-mask-image: url("../../Assets/images/crown.png");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("../../Assets/images/crown.png");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

@media (max-width: 640px) {
  .statement__crown {
    top: -14px;
    left: 18px;
  }
}

.statement__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

.statement__title .accent {
  color: var(--brand-orange);
}

.statement p {
  color: #4a4a4a;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ---------- Split: image one side, copy the other ---------- */
.split {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  align-items: center;
  text-align: center;
}

.split__copy {
  text-align: center;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    text-align: left;
  }

  .split__copy {
    text-align: left;
  }
}

.split__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.split__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

@media (min-width: 860px) {
  .split__title {
    justify-content: flex-start;
    width: auto;
  }
}

.split__title .crown {
  width: clamp(28px, 3.4vw, 42px);
  aspect-ratio: 1 / 1;
  transform: rotate(10deg);
  background-color: var(--brand-yellow);
  -webkit-mask-image: url("../../Assets/images/crown.png");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("../../Assets/images/crown.png");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.split__title .accent {
  color: var(--brand-orange);
}

.split__copy p {
  color: #4a4a4a;
  line-height: 1.75;
}

.split__copy p + p {
  margin-top: var(--space-3);
}

/* ---------- Values: numbered cards ---------- */
.values {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  margin-top: var(--space-7);
  counter-reset: value;
}

@media (min-width: 860px) {
  .values {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value {
  border-top: 3px solid var(--brand-orange);
  padding-top: var(--space-4);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.value:hover {
  transform: translateY(-6px);
}

/* Rule sweeps across under the heading on hover. */
.value__title {
  position: relative;
  display: inline-block;
}

.value__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--brand-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.value:hover .value__title::after {
  transform: scaleX(1);
}

.value__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--brand-orange);
  margin-bottom: var(--space-3);
}

.value__num::before {
  counter-increment: value;
  content: "/0" counter(value);
}

.value__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: var(--space-1);
}

.value__eyebrow {
  display: block;
  font-family: var(--font-script);
  color: var(--brand-orange);
  font-size: 1rem;
  margin-bottom: var(--space-3);
}

.value p {
  color: #4a4a4a;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Milestones timeline ----------
   Stacked cards on small screens; on wide screens it becomes a horizontal
   run of numbered markers joined by dashed rails. */
.milestones {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  margin-top: var(--space-8);
  counter-reset: milestone;
}

@media (min-width: 560px) {
  .milestones {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .milestones {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-4);
  }
}

.milestone {
  position: relative;
  text-align: center;
  padding-top: 76px;
}

.milestone__num {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: var(--brand-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  z-index: 1;
}

.milestone__num::before {
  counter-increment: milestone;
  content: counter(milestone);
}

.milestone__num {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* translateX(-50%) is what centres the marker, so the hover scale has to
   be composed with it or the marker jumps sideways. */
.milestone:hover .milestone__num {
  transform: translateX(-50%) scale(1.12);
}

.milestone__year {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brand-orange);
  margin-bottom: var(--space-1);
}

.milestone__desc {
  color: #4a4a4a;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Hidden until the milestones sit in a single row and the rails appear. */
.milestone__dot {
  display: none;
}

/* Straight dashed rails between the markers — wide screens only, where the
   items actually sit in one row. `top: 28px` centres the rail on the 56px
   marker. */
@media (min-width: 1024px) {
  .milestone::before,
  .milestone::after {
    content: "";
    position: absolute;
    top: 28px;
    border-top: 3px dashed var(--brand-orange);
  }

  .milestone::before {
    left: 0;
    right: 50%;
    margin-right: 36px;
  }

  .milestone::after {
    left: 50%;
    right: 0;
    margin-left: 36px;
  }

  .milestone:first-child::before,
  .milestone:last-child::after {
    display: none;
  }

  /* Filled dot sitting in the grid gutter, midway between two markers.
     It's a real element rather than a background on the rails because the
     gap falls outside the rails' boxes, where a background would be clipped.
     left = half the gutter out, minus the dot's radius to centre it. */
  .milestone__dot {
    display: block;
    position: absolute;
    top: 25px;
    left: calc(var(--space-4) / -2 - 4.5px);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-orange);
  }

  .milestone:first-child .milestone__dot {
    display: none;
  }
}

/* ---------- Crew: role cards ---------- */
.crew-roles {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(2, 1fr);
  margin-top: var(--space-7);
}

@media (min-width: 960px) {
  .crew-roles {
    grid-template-columns: repeat(4, 1fr);
  }
}

.crew-role {
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.crew-role:hover {
  transform: translateY(-6px);
}

.crew-role__img {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin-bottom: var(--space-3);
}

.crew-role__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crew-role__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brand-white);
}

.crew-role__desc {
  font-size: 0.88rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* ---------- Feed strip ---------- */
.feed__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.feed__handle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--brand-orange);
}

.feed__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .feed__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .feed__grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.feed__grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

/* ---------- Join-the-crew CTA ---------- */
.story-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.story-cta__title .accent {
  color: var(--brand-orange);
}

.story-cta__lead {
  max-width: 52ch;
  margin: var(--space-3) auto 0;
  color: #6b6b6b;
}

.story-cta__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

.story-cta__actions .btn {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Careers flips to brand yellow. The label switches to ink because white
   text on yellow is unreadable. */
.story-cta__actions .btn--primary:hover {
  background: var(--brand-yellow);
  color: var(--brand-ink);
}

/* Franchise fills with brand orange. */
.story-cta__actions .btn--outline-brand:hover {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: var(--brand-white);
}

/* ---------- Reduced motion ----------
   Must be the LAST block in this file: it overrides the hover/transition
   rules defined above, and same-specificity rules are won by whichever
   comes last. */
@media (prefers-reduced-motion: reduce) {
  .story-hero__content {
    animation: none;
  }

  .value,
  .value:hover,
  .crew-role,
  .crew-role:hover {
    transition: none;
    transform: none;
  }

  .value__title::after,
  .value:hover .value__title::after {
    transition: none;
    transform: scaleX(0);
  }

  .milestone__num {
    transition: none;
  }

  .milestone:hover .milestone__num {
    transform: translateX(-50%);
  }

  /* Hover colours still change (that's feedback, not motion) — only the
     fade between them is dropped. */
  .story-cta__actions .btn {
    transition: none;
  }

  /* Keep the fanned tilts (they're layout, not motion) but drop the lift. */
  .trio__item {
    transition: none;
  }

  .trio__item:nth-child(1):hover {
    transform: rotate(-9deg) translateY(4%);
  }

  .trio__item:nth-child(2):hover {
    transform: rotate(2deg) translateY(-7%);
  }

  .trio__item:nth-child(3):hover {
    transform: rotate(9deg) translateY(4%);
  }
}
