/* ---------------------------------------------------------------------------
   Campaign sections (photo-timeline, circle-chain, plan-cards).
   Loaded on demand by the section components (see @once <link> in each);
   not part of the global bundle. Plain CSS — no Tailwind @apply here.
--------------------------------------------------------------------------- */

/* Shared title measure, matching story-sections.css so headings across a page
   built from both families wrap at the same width. */
.section-photo-timeline h2,
.section-circle-chain h2,
.section-plan-cards h2 {
  max-width: 52rem;
}

/* ===========================================================================
   photo-timeline — full-bleed marquee of captioned archive photos. Rides the
   global .marquee-wrapper / .marquee-container animation (components/marquee.css);
   the component's own script clones the track so the loop is seamless.
=========================================================================== */
/* Duration is for one full pass of the track, so it scales with how many
   photos are in the strip — raise it to slow the drift, lower it to speed up.
   This overrides marquee.css's own mobile override, so the pace is the same
   at every width. */
.section-photo-timeline .pt-marquee {
  --gap: 1.25rem;
  --animation-duration: 140s;
}

/* Hovering pauses both halves so a photo can actually be looked at */
.section-photo-timeline .pt-marquee:hover .marquee-container {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .section-photo-timeline .pt-marquee .marquee-container {
    animation: none;
  }

  /* No motion means no seamless loop to rely on — let the reader scroll it */
  .section-photo-timeline .pt-marquee {
    overflow-x: auto;
  }
}

.section-photo-timeline .pt-frame {
  position: relative;
  flex: 0 0 auto;
  width: 17rem;
  /* matches the source photos (1920x1574) so nothing important is cropped */
  aspect-ratio: 6 / 5;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

@media screen and (min-width: 768px) {
  .section-photo-timeline .pt-frame {
    width: 22rem;
  }
}

.section-photo-timeline .pt-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Year caption sits on the photo, over a bottom scrim so it stays legible
   whatever the photo behind it is doing. */
.section-photo-timeline .pt-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

.section-photo-timeline .pt-year {
  position: absolute;
  left: 1.25rem;
  bottom: 0.9rem;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ===========================================================================
   circle-chain — labelled circles linked by a connector rail. The coloured
   band IS the section, edge to edge, so it can carry .section-top-round and
   tuck under the section above it.
   Horizontal on desktop, vertical rail on mobile.
=========================================================================== */
.section-circle-chain {
  padding-top: 3.5rem;
  padding-bottom: 6rem;
}

@media screen and (min-width: 998px) {
  .section-circle-chain {
    padding-top: 4.5rem;
    padding-bottom: 8rem;
  }
}

.section-circle-chain .cc-chain {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 3rem auto 0;
  max-width: 60rem;
  list-style: none;
  padding: 0;
}

/* The rail. Vertical behind the stack on mobile, horizontal behind the row on
   desktop. It is brightest in the middle so the run reads left-to-right. */
.section-circle-chain .cc-chain::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 2rem;
  bottom: 2rem;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,
      color-mix(in srgb, #fff 20%, transparent),
      color-mix(in srgb, #fff 60%, transparent),
      color-mix(in srgb, #fff 20%, transparent));
}

.section-circle-chain .cc-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 999px;
  background: #fff;
  color: var(--color-blue);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0 0.75rem;
  box-shadow: 0 14px 30px rgba(5, 40, 85, 0.28);
  transition: transform 0.3s ease;
}

.section-circle-chain .cc-node:hover {
  transform: scale(1.05);
}

@media screen and (min-width: 768px) {
  .section-circle-chain .cc-chain {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .section-circle-chain .cc-chain::before {
    left: 4rem;
    right: 4rem;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 3px;
    transform: translateY(-50%);
    background: linear-gradient(90deg,
        color-mix(in srgb, #fff 20%, transparent),
        color-mix(in srgb, #fff 60%, transparent),
        color-mix(in srgb, #fff 20%, transparent));
  }

  .section-circle-chain .cc-node {
    width: 7rem;
    height: 7rem;
    font-size: 0.6875rem;
  }
}

@media screen and (min-width: 998px) {
  .section-circle-chain .cc-node {
    width: 9rem;
    height: 9rem;
    font-size: 0.8125rem;
  }
}

/* ===========================================================================
   plan-cards — two campaign plan cards side by side. Each card carries a
   promo ribbon across its top, a struck-through price, a CTA, a "best for"
   pill and a feature checklist. `highlight` flips one card to the inverse
   (blue) treatment.
=========================================================================== */
.section-plan-cards .pc-grid {
  display: grid;
  gap: 1.75rem;
  max-width: 64rem;
  margin: 0 auto;
}

@media screen and (min-width: 998px) {
  .section-plan-cards .pc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* Cards stretch to the tallest in the row (grid's default) and lay their body
   out as a column, so the shorter plan's background runs the full height
   instead of stopping under its last feature. */
.section-plan-cards .pc-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #fff;
  color: #000;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.section-plan-cards .pc-card--highlight {
  background: linear-gradient(150deg, #0a2fb8 0%, #1054e0 55%, #2b86f5 100%);
  color: #fff;
}

/* Promo ribbon across the card head. The plain card gets the blue gradient,
   the highlighted card gets lime — so the two never read as the same card. */
.section-plan-cards .pc-ribbon {
  display: block;
  padding: 0.85rem 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.0625rem;
  background: linear-gradient(90deg, #0a2fb8, #2b86f5);
  color: #fff;
}

.section-plan-cards .pc-card--highlight .pc-ribbon {
  background: var(--color-yellow);
  color: #000;
}

.section-plan-cards .pc-body {
  flex: 1;
  padding: 2rem 1.75rem 2.25rem;
}

@media screen and (min-width: 768px) {
  .section-plan-cards .pc-body {
    padding: 2.25rem 2.25rem 2.5rem;
  }
}

.section-plan-cards .pc-name {
  margin: 0 0 0.75rem;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.section-plan-cards .pc-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.section-plan-cards .pc-price__currency {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-plan-cards .pc-price__amount {
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.section-plan-cards .pc-price__was {
  font-size: 1.375rem;
  font-weight: 600;
  text-decoration: line-through;
  opacity: 0.55;
}

.section-plan-cards .pc-price__cycle {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.75;
}

/* The CTA is full-width inside the card, so it reads as the card's own action
   rather than a button that happens to sit there. */
.section-plan-cards .pc-cta .btn {
  display: block;
  width: 100%;
  text-align: center;
}

.section-plan-cards .pc-note {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-blue);
}

.section-plan-cards .pc-card--highlight .pc-note {
  color: #fff;
}

/* "Best for" — an outlined pill that labels the block beneath it */
.section-plan-cards .pc-pill {
  display: inline-block;
  margin: 1.75rem 0 0.9rem;
  padding: 0.3rem 1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-blue);
}

.section-plan-cards .pc-card--highlight .pc-pill {
  background: #fff;
  border-color: #fff;
  color: var(--color-blue);
}

.section-plan-cards .pc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.section-plan-cards .pc-list li {
  position: relative;
  padding-left: 1.65rem;
  margin-bottom: 0.55em;
  line-height: 1.4;
}

.section-plan-cards .pc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.05rem;
  height: 1.05rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313ce66' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.2 5.2L20 6.5'/%3E%3C/svg%3E");
}

/* The "best for" list sits above a hairline that separates it from the plan's
   feature list — same list styling, two different jobs. */
.section-plan-cards .pc-list--intro {
  font-size: 1rem;
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.section-plan-cards .pc-list--features {
  font-size: 0.9375rem;
}

.section-plan-cards .pc-list--features li {
  margin-bottom: 0.75em;
}
