/* ==========================================================================
   Franchise page — Figma "Franchise – Desktop 1680" (68-47) / "Franchise – Mobile 390" (110-428)
   The application form section (#apply) and the modal use assets/css/apply-modal.css.
   ========================================================================== */

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.criterion__icon svg,
.acc__icon svg,
.step__icon svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 1. Hero ---------- */
.franchise-hero {
  background:
    radial-gradient(55.56% 38.46% at 27.78% 50%, rgba(227, 25, 55, .85) 0%, rgba(140, 24, 30, .35) 50%, rgba(34, 30, 31, 0) 100%),
    var(--char);
}
/* Figma v4: 630×720 at x 1010 (1680 frame), 540×617 at x 874 (1440 frame) — linear in between */
.franchise-hero .page-hero__media {
  left: min(calc(56.667% + 58px), calc(50% + 170.3px)); top: 130px;
  width: min(37.5%, 629.7px); height: auto; aspect-ratio: 629.7 / 720;
  transform-origin: 0 0;
  transform: rotate(6deg);
}
/* stamp: 184 at x 840 (1680), 158 at x 726 (1440) */
.franchise-hero .stamp {
  left: max(calc(47.5% + 42px), 50%); top: 557px;
  width: min(calc(10.833% + 2px), 184px); height: auto; aspect-ratio: 1;
  transform-origin: 0 0; transform: rotate(12deg);
}

/* ---------- 3. Key metrics (home .proof band) ---------- */
.page-franchise .proof { padding-bottom: 72px; }
.page-franchise .proof__note { margin-top: 36px; text-align: center; font-size: 16px; line-height: 19px; color: var(--white); }

/* ---------- 4. Opportunity ---------- */
.opportunity { padding-top: 96px; padding-bottom: 40px; background: var(--cream); }
.opportunity__box {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  grid-template-areas: "icon text figure";
  align-items: center;
  column-gap: 32px;
  padding: 40px 48px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(34, 30, 31, .06);
  background: var(--white);
}
.opportunity__icon {
  grid-area: icon;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--red); color: var(--white);
  display: grid; place-items: center;
  font-size: 40px; font-weight: 900; line-height: 1;
}
.opportunity__text { grid-area: text; display: flex; flex-direction: column; gap: 8px; }
.opportunity__title { font-size: 32px; font-weight: 800; line-height: 1.18; letter-spacing: -0.015em; }
.opportunity__figure { grid-area: figure; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.opportunity__figure strong { font-size: 72px; font-weight: 900; line-height: 86px; letter-spacing: -0.04em; color: var(--red); }
.opportunity__figure span { font-size: 14px; font-weight: 700; line-height: 17px; color: var(--muted); }

/* ---------- 5. Formats (Figma v4: heading only, subtitle, three format blocks) ---------- */
.formats {
  display: flex; flex-direction: column;
  gap: clamp(40px, calc(152px - 6.667vw), 56px); /* 40 at 1680, 56 in the 1440 frame */
  padding-top: 80px; padding-bottom: 100px;
  background: var(--cream);
}
.formats__head .h2 { max-width: 1200px; }
.criteria__head .h2,
.process__head .h2 { max-width: 820px; }
.formats__sub { font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--char); }

.format-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.format-block {
  display: flex; flex-direction: column;
  min-height: 419px;
  padding: 20px 28px 28px;
  border-radius: var(--radius-card);
}
.format-block__img { align-self: center; width: 302px; max-width: 100%; aspect-ratio: 302 / 260; }
.format-block__img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .3)); }
.format-block__title { margin-top: 18px; font-size: 34px; font-weight: 900; line-height: 1.02; letter-spacing: -0.02em; }
.format-block__text { margin-top: 10px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.format-block--dark { background: var(--char); color: var(--white); }
.format-block--red { background: var(--red); color: var(--white); }
.format-block--yellow { background: var(--yellow); color: var(--char); }

/* Mobile slider nav (arrows + dots, built by main.js [data-slider]); desktop shows the grid */
.fslider__nav { display: none; }

/* ---------- 6. Franchise criteria ---------- */
.criteria {
  display: flex; flex-direction: column; align-items: center; gap: 64px;
  padding-top: 80px; padding-bottom: 130px;
  background: var(--cream);
}
.criteria__head, .criteria .fslider { align-self: stretch; }
.criteria__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.criterion {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 338px;
  padding: 32px 32px 40px;
  border-radius: var(--radius-card);
}
.criterion__icon {
  flex: none;
  width: 72px; height: 72px;
  margin-bottom: 54px; /* 40px spacer + 14px gap, as in Figma */
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(34, 30, 31, .14);
}
.criterion__icon svg { width: 40px; height: 40px; }
.criterion__title { font-size: 26px; font-weight: 800; line-height: 1.19; letter-spacing: -0.015em; }
.criterion__text { font-size: 16px; line-height: 1.55; letter-spacing: -0.001em; opacity: .85; }
.criterion--yellow { background: var(--yellow); color: var(--char); }
.criterion--red { background: var(--red); color: var(--cream); }
.criterion--sand { background: var(--sand); color: var(--char); }
.criterion--dark { background: var(--char); color: var(--cream); }
.criterion--red .criterion__icon,
.criterion--dark .criterion__icon { background: rgba(245, 241, 232, .14); }

.mid-cta { position: relative; }
.mid-cta__box {
  display: flex; align-items: center; gap: 24px;
  padding: 16px 16px 16px 40px;
  border-radius: var(--radius-img);
  background: var(--char);
}
.mid-cta__text { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--white); }
/* 164×208, 45px right of the box and 10px above it at 1680; 141×178, 4px right / 35px above in the 1440 frame */
.mid-cta__chibboq {
  position: absolute;
  left: calc(100% + clamp(4px, calc(17.083vw - 242px), 45px));
  top: clamp(-35px, calc(10.417vw - 185px), -10px);
  width: clamp(141px, calc(9.583vw + 3px), 164px); height: auto; aspect-ratio: 164 / 208;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .18));
  pointer-events: none;
}

/* ---------- Accordions (benefits + FAQ): native <details>, one open at a time via name="" ---------- */
.acc { display: flex; flex-direction: column; }
.acc__item { interpolate-size: allow-keywords; }
.acc__head { display: flex; align-items: center; cursor: pointer; list-style: none; }
.acc__head::-webkit-details-marker { display: none; }
.acc__head::marker { content: ""; }
.acc__title { flex: 1; min-width: 0; }
.acc__toggle { position: relative; flex: none; transition: background-color .2s ease; }
.acc__toggle::before,
.acc__toggle::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 12px; height: 2.4px;
  margin: -1.2px 0 0 -6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease;
}
.acc__toggle::after { transform: rotate(90deg); }
.acc__item[open] .acc__toggle::after { transform: rotate(0deg); }
.acc__item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .3s ease, content-visibility .3s allow-discrete;
}
.acc__item[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) {
  .acc__item::details-content { transition: none; }
}

/* dark variant (Investment and benefits) */
.acc--dark { gap: 14px; }
.acc--dark .acc__item {
  padding: 20px 24px 20px 20px;
  border-radius: var(--radius-img);
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(90deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .03) 100%);
  transition: border-color .2s ease;
}
.acc--dark .acc__item:hover { border-color: rgba(255, 255, 255, .22); }
.acc--dark .acc__head { gap: 20px; }
.acc--dark .acc__icon {
  flex: none;
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--bubble, var(--red)); color: var(--ink, var(--white));
  display: grid; place-items: center;
}
.acc--dark .acc__icon svg { width: 34px; height: 34px; }
.acc--dark .acc__title { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--white); }
.acc--dark .acc__toggle { width: 44px; height: 44px; border-radius: var(--radius-btn); background: rgba(255, 255, 255, .12); color: var(--white); }
.acc--dark .acc__item[open] .acc__toggle { background: var(--red); }
.acc--dark .acc__text { margin-top: 16px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .82); }

/* light variant (FAQ) */
.acc--light { gap: 12px; }
.acc--light .acc__item { padding: 24px 28px; border-radius: 8px; background: rgba(255, 255, 255, .6); transition: background-color .2s ease; }
.acc--light .acc__item[open],
.acc--light .acc__item:hover { background: var(--white); }
.acc--light .acc__head { gap: 16px; }
.acc--light .acc__title { font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--char); }
.acc--light .acc__toggle { width: 44px; height: 44px; border-radius: var(--radius-btn); background: var(--char); color: var(--cream); }
.acc--light .acc__item[open] .acc__toggle { background: var(--red); }
.acc--light .acc__text { margin-top: 14px; font-size: 16px; line-height: 1.55; letter-spacing: -0.001em; color: var(--muted); }

/* ---------- 8. Investment and benefits ---------- */
.benefits {
  display: flex; gap: 96px;
  padding-top: 140px; padding-bottom: 140px;
  color: var(--white);
  background:
    radial-gradient(55.56% 35.71% at 66.67% 42.86%, rgba(227, 25, 55, .45) 0%, rgba(140, 24, 30, .14) 50%, rgba(34, 30, 31, 0) 100%),
    var(--char);
}
.benefits__head { flex: 0 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.benefits__head .lead { max-width: 460px; color: rgba(255, 255, 255, .8); }
.benefits__cutout { position: relative; width: 480px; max-width: 100%; height: 300px; pointer-events: none; }
.benefits__cutout img {
  position: absolute; left: 34px; top: 0;
  width: 420px; height: 244px; max-width: none;
  object-fit: contain;
  transform-origin: 0 0;
  transform: rotate(8deg);
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, .45));
}
.benefits__body { flex: 1 1 864px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.benefits__note { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .55); }

/* ---------- 9. Process ---------- */
.process {
  display: flex; flex-direction: column; align-items: center; gap: 72px;
  padding-top: 140px; padding-bottom: 140px;
  color: var(--white);
  background:
    radial-gradient(55.56% 27.78% at 50% 16.67%, rgba(34, 30, 31, 0) 0%, rgba(140, 24, 30, .35) 60%, rgba(94, 17, 24, .6) 100%),
    var(--red);
}
.process__head .h2 { color: var(--white); }
.steps {
  position: relative;
  align-self: stretch;
  --steps-gap: clamp(0px, calc(13.333vw - 192px), 32px); /* 32 at 1680; the 1440 frame keeps 262-wide steps with no gap */
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--steps-gap);
}
.steps::before { /* dashed timeline through the icon centres */
  content: "";
  position: absolute; top: 51px;
  left: calc((100% - 4 * var(--steps-gap)) / 10); right: calc((100% - 4 * var(--steps-gap)) / 10);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 6px, transparent 6px 14px);
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.step__rail { margin-bottom: 36px; }
.step__icon {
  position: relative;
  width: 104px; height: 104px;
  border-radius: 50%;
  background: var(--cream); color: var(--char);
  display: grid; place-items: center;
}
.step__icon--first { background: var(--yellow); }
.step__icon svg { width: 39px; height: 39px; }
.step__body { display: flex; flex-direction: column; gap: 14px; }
.step__title { font-size: 22px; font-weight: 800; line-height: 1.19; letter-spacing: -0.01em; }
.step__text { font-size: 16px; line-height: 1.5; color: var(--white); }

/* ---------- 10. FAQ ---------- */
.faq {
  display: flex; align-items: flex-start; gap: 96px;
  padding-top: 140px; padding-bottom: 140px;
  background: var(--cream);
}
.faq__head {
  position: sticky; top: 136px;
  flex: 0 1 460px; min-width: 0;
  display: flex; flex-direction: column; gap: 24px;
}
.faq__head .lead { max-width: 440px; line-height: 1.55; letter-spacing: 0; }
.faq__body { flex: 1 1 884px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.faq__note { font-size: 13px; font-weight: 500; line-height: 16px; color: rgba(107, 96, 92, .95); }

/* ==========================================================================
   Large desktop → tablet
   ========================================================================== */
@media (min-width: 1440px) {
  /* the 1440 frame keeps the 480 / 460 heading columns and narrows the accordions */
  .benefits__head, .faq__head { flex-shrink: 0; }
}
@media (max-width: 1439px) {
  .benefits, .faq { gap: 64px; }
}

@media (max-width: 1199px) {
  .franchise-hero { flex-direction: column; gap: 32px; padding-top: 150px; }
  .franchise-hero .page-hero__media {
    position: relative; left: auto; top: auto; order: -1;
    width: min(100%, 560px); height: auto; aspect-ratio: 840 / 599;
    transform: none;
  }
  .franchise-hero .stamp { left: auto; right: 6%; top: 150px; width: 140px; height: 140px; }

  .opportunity__box { grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "icon figure" "text text"; row-gap: 24px; }

  .criteria__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .format-block { padding-inline: 20px; }
  .format-block__title { font-size: 28px; }
  .mid-cta__chibboq { display: none; }

  .benefits { flex-direction: column; gap: 48px; }
  .benefits__head { flex-basis: auto; }
  .benefits__cutout { display: none; }
  .benefits__body { flex-basis: auto; }

  /* vertical timeline */
  .steps { display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 640px; align-self: center; }
  .steps::before { display: none; }
  .step { flex-direction: row; align-items: stretch; gap: 16px; padding-bottom: 24px; text-align: left; }
  .step:last-child { padding-bottom: 0; }
  .step__rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 62.4px; margin: 0; }
  .step__rail::after { content: ""; flex: 1; width: 2px; background: rgba(255, 255, 255, .4); }
  .step:last-child .step__rail::after { display: none; }
  .step__icon { flex: none; width: 62.4px; height: 62.4px; }
  .step__icon svg { width: 23.4px; height: 23.4px; stroke-width: 1.8; }
  .step__body { flex: 1; min-width: 0; gap: 6px; padding-top: 6px; }

  .faq { flex-direction: column; align-items: stretch; gap: 48px; }
  .faq__head { position: static; flex-basis: auto; }
  .faq__body { flex-basis: auto; }
}

/* ==========================================================================
   Mobile (390 reference)
   ========================================================================== */
@media (max-width: 767px) {
  .formats .h2, .criteria .h2, .benefits .h2, .process .h2, .faq .h2 { font-size: 32px; line-height: 1.06; letter-spacing: -0.02em; }

  /* 1. Hero */
  .franchise-hero {
    padding: 140px 20px 48px; gap: 24px;
    background:
      radial-gradient(50% 50% at 50% 50%, rgba(227, 25, 55, .5) 0%, rgba(140, 24, 30, .15) 60%, rgba(34, 30, 31, 0) 100%),
      var(--char);
  }
  .franchise-hero .page-hero__text { gap: 24px; }
  .franchise-hero .page-hero__text .lead { font-weight: 500; }
  .franchise-hero .page-hero__media { width: calc(100% + 20px); max-width: none; margin-right: -20px; aspect-ratio: 370 / 257; }
  .franchise-hero .page-hero__media img { filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .5)); }
  .franchise-hero .stamp { left: 16px; right: auto; top: 316px; width: 101.2px; height: 101.2px; transform-origin: 0 0; transform: rotate(12deg); }

  /* 3. Key metrics */
  .page-franchise .proof { padding: 40px 20px; }
  .page-franchise .proof__item { gap: 8px; }
  .page-franchise .proof__num { line-height: 48px; }
  .page-franchise .proof__label { font-weight: 500; line-height: 1.4; }
  .page-franchise .proof__note { margin-top: 28px; text-align: left; font-size: 14px; font-weight: 500; line-height: 1.2; color: rgba(255, 255, 255, .8); }

  /* 4. Opportunity */
  .opportunity { padding: 48px 20px 16px; }
  .opportunity__box { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; row-gap: 14px; padding: 22px; border: 0; border-radius: var(--radius-img); }
  .opportunity__icon { width: 56px; height: 56px; font-size: 26px; }
  .opportunity__text { gap: 14px; }
  .opportunity__title { font-size: 22px; letter-spacing: -0.01em; }
  .opportunity__figure { gap: 0; }
  .opportunity__figure strong { font-size: 44px; line-height: 53px; letter-spacing: -0.03em; }
  .opportunity__figure span { font-size: 12px; line-height: 14px; }

  /* 5. Formats + 6. Criteria: cards swipe sideways (full-bleed rows), arrows + dots below */
  .formats { gap: 20px; padding: 40px 0 48px; }
  .criteria { align-items: stretch; gap: 20px; padding: 40px 0 86px; }
  .section-head.formats__head, .section-head.criteria__head { gap: 14px; padding-inline: 20px; }
  .formats__sub { padding-inline: 20px; font-size: 18px; line-height: 1.28; }
  .fslider { display: flex; flex-direction: column; gap: 20px; }
  .format-blocks,
  .criteria__list {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 0 20px; scroll-padding-inline: 20px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .format-blocks::-webkit-scrollbar,
  .criteria__list::-webkit-scrollbar { display: none; }
  .fslider__nav { display: flex; justify-content: space-between; gap: 24px; margin: 0; padding: 0 20px; }
  .fslider .slider__arrow { display: grid; transition: opacity .2s ease; }
  .fslider:has(> [data-slider-viewport] > :first-child.is-active) [data-slider-prev],
  .fslider:has(> [data-slider-viewport] > :last-child.is-active) [data-slider-next] { opacity: .4; }
  .fslider .slider__dots { gap: 8px; }
  .fslider .slider__dot { width: 8px; height: 8px; }
  .fslider .slider__dot.is-active { width: 24px; }

  .format-block { flex: 0 0 280px; align-self: stretch; min-height: 371px; padding: 20px; border-radius: var(--radius-img); scroll-snap-align: start; }
  .format-block__img { width: 222px; aspect-ratio: 222 / 188; }
  .format-block__img img { filter: none; }
  .format-block__title { margin-top: 14px; font-size: 28px; }
  .format-block__text { margin-top: 14px; font-size: 15px; }

  .criterion { flex: 0 0 250px; min-height: 0; padding: 22px 22px 26px; border-radius: var(--radius-img); scroll-snap-align: start; }
  .criterion__title { font-size: 22px; }
  .mid-cta { align-self: flex-start; width: min(300px, calc(100% - 70px)); margin-left: 20px; }
  .mid-cta__box { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; border-radius: var(--radius-img); }
  .mid-cta__text { font-size: 22px; line-height: 1.15; }
  .mid-cta__chibboq { /* overlaps the box's lower right corner (Figma 268,641 in the section) */
    display: block;
    left: calc(100% - 52px); top: 94px;
    width: 102px; height: 130px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18));
  }

  /* 8. Investment and benefits */
  .benefits {
    gap: 18px; padding: 56px 20px;
    background:
      radial-gradient(50% 50% at 50% 50%, rgba(227, 25, 55, .5) 0%, rgba(140, 24, 30, .15) 60%, rgba(34, 30, 31, 0) 100%),
      var(--char);
  }
  .benefits__head { display: contents; }
  .benefits__head .lead { font-size: 16px; line-height: 1.52; }
  .benefits__body { gap: 18px; }
  .acc--dark { gap: 10px; }
  .acc--dark .acc__item { padding: 14px; border-radius: var(--radius-img); }
  .acc--dark .acc__icon { width: 53px; height: 53px; }
  .acc--dark .acc__icon svg { width: 26.5px; height: 26.5px; stroke-width: 1.8; }
  .acc--dark .acc__title { font-size: 18px; }
  .acc--dark .acc__text { font-size: 15px; }
  .benefits__note { font-size: 13px; }

  /* 9. Process */
  .process { align-items: stretch; gap: 20px; padding: 56px 20px; background: var(--red); }
  .process__head { gap: 20px; }
  .steps { max-width: none; }
  .step__title { font-size: 20px; line-height: 1.15; }
  .step__text { font-size: 15px; line-height: 1.48; }

  /* 10. FAQ */
  .faq { gap: 18px; padding: 56px 20px; }
  .faq__head { display: contents; }
  .faq__head .lead { font-size: 16px; line-height: 1.5; color: rgba(34, 30, 31, .75); }
  .faq__body { order: 1; }
  .faq__cta { order: 2; }
  .acc--light { gap: 10px; }
  .acc--light .acc__item,
  .acc--light .acc__item[open] { padding: 16px; border-radius: 8px; background: var(--white); }
  .acc--light .acc__head { gap: 12px; }
  .acc--light .acc__title { font-size: 16px; line-height: 1.3; }
  .acc--light .acc__toggle { width: 44px; height: 44px; border-radius: var(--radius-btn); background: var(--cream); color: var(--char); }
  .acc--light .acc__item[open] .acc__toggle { background: var(--red); color: var(--white); }
  .acc--light .acc__text { margin-top: 10px; font-size: 15px; line-height: 1.5; letter-spacing: 0; color: rgba(34, 30, 31, .75); }
}
