/* Layout contract: mobile < 768 px, tablet 768–1199 px, desktop >= 1200 px.
   The compact scene uses the same content and image as desktop, in document flow. */
@media (width < 75rem) {
  .hero {
    --page-gutter: 1rem;
    --hero-compact-cta-overlap: .25rem;
    --hero-compact-fade-height: clamp(2rem, 6vw, 3.5rem);
    --hero-compact-ratio: 1160 / 860;
    min-height: auto;
    padding-block: .5rem 0;
    background: var(--hero-compact-sky);
    border-radius: 0 0 0 var(--hero-compact-radius);
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Below the sky band under the heading (.hero__media::after). */
    z-index: -3;
    /* The empty left part of the original supplies the sky behind the title. */
    background: var(--hero-sky-image) left top / 350% auto no-repeat;
    /* Keep the sky blend independent of the height of the benefit rows. */
    mask-image: linear-gradient(#000, transparent 22rem);
    pointer-events: none;
  }
  .hero__top { width: calc(100% - 1.5rem); }
  .site-header { min-height: 3rem; gap: .5rem; padding: .1875rem .375rem .1875rem .25rem; }
  .desktop-nav { display: none; }
  .header-contact { display: flex; gap: 0; margin-left: auto; }
  .header-contact :is(.availability, .header-phone) { display: none; }
  .header-contact .icon-link { width: 44px; min-height: 44px; }
  .header-contact .icon-link img { width: 1.1875rem; height: 1.1875rem; }
  .menu-toggle { display: block; margin: 0; }
  .menu-toggle span:last-child { width: 70%; }
  .brand { gap: .5rem; }
  .brand__name { font-size: clamp(.9375rem, calc(.920667rem + .084167vw), .988rem); }
  /* One line only: the header capacity rules below hide it before it would wrap. */
  .brand__tagline { display: block; white-space: nowrap; }
  .brand__mark { flex: 0 0 3.6875em; width: 3.6875em; height: 2.25em; }
  .brand__circle { width: 2.25em; height: 2.25em; }
  .brand__circle--star img { width: 1.5625em; height: 1.5em; }
  .brand__wand { width: 1.125em; height: 1.8125em; }
  .hero__intro { order: 0; }
  .hero__content { width: 100%; padding-block: 1.5rem 2rem; text-align: center; }
  /* Scale each text role toward its own desktop size, without a tablet overshoot. */
  .hero h1 { font-size: clamp(1.875rem, calc(1.472667rem + 2.011667vw), var(--hero-title-font-size)); }
  .hero__location { justify-content: center; font-size: clamp(1.1875rem, calc(1.044333rem + .715833vw), var(--hero-location-font-size)); margin-top: .75rem; gap: .5rem; line-height: 1.15; }
  .hero__location img { width: .8125rem; height: 1.1875rem; }
  .hero__offer { max-width: 100%; margin-top: .875rem; font-size: clamp(.875rem, calc(.826667rem + .241667vw), var(--hero-offer-font-size)); line-height: 1.5; }
  .hero__offer strong::before { inset: 0; }
  .hero__media { order: 1; position: relative; flex: none; width: 100%; aspect-ratio: var(--hero-compact-ratio); min-height: 0; margin: 0; }
  .hero__art { inset: 0; width: 100%; max-width: none; height: 100%; z-index: -1; mask-image: linear-gradient(transparent, #000 min(18%, 5rem)); }
  .hero__art picture { display: block; }
  .hero__art img { object-fit: cover; object-position: right center; }
  .hero__art::after {
    inset: auto 0 0;
    height: var(--hero-compact-fade-height);
    background: var(--hero-compact-fade);
    pointer-events: none;
  }
  .hero__video-area { width: 100%; min-height: 0; }
  .video-trigger { --play-size: clamp(5.5rem, 14vw, 7rem); left: 50%; top: 58%; right: auto; bottom: auto; translate: -50% -50%; }
  .hero__cta {
    order: 2;
    position: relative;
    z-index: 1;
    width: 100%;
    padding-inline: var(--page-gutter);
    margin-top: calc(-1 * var(--hero-compact-cta-overlap));
    text-align: center;
    background: linear-gradient(transparent var(--hero-compact-cta-overlap), var(--color-page) var(--hero-compact-cta-overlap));
  }
  .split-button { --button-height: 3.75rem; width: min(100%, 23.75rem); gap: .375rem; margin: 0; font-size: clamp(1rem, calc(.979167rem + .104167vw), 1.0625rem); }
  .hero__benefits { order: 3; width: 100%; max-width: none; margin: 0; padding: 1.125rem var(--page-gutter) 1.625rem; background: var(--color-page); }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; margin-inline: auto; gap: .625rem; }
  .benefit {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    min-height: 5.25rem;
    height: 100%;
    padding: .5rem .625rem .625rem;
    border-radius: 1.25rem;
    background: var(--color-white);
    box-shadow: var(--hero-compact-card-shadow);
  }
  .benefit__illustration { display: block; width: 2rem; height: 2rem; }
  .benefit__title { font-size: clamp(.8125rem, calc(.791667rem + .104167vw), .875rem); text-wrap: pretty; text-align: center; }
  .benefit__info-trigger { position: absolute; top: .125rem; right: .125rem; margin: 0; }
}

/* Wide phones approach the tablet rhythm without enlarging the scene canvas.
   Benefit rows switch only when their content area can fit two compact pills. */
@media (32rem <= width < 48rem) {
  .hero { --page-gutter: var(--compact-page-gutter); }
  .hero__content { padding-block: clamp(1.5rem, calc(1.25rem + .78125vw), 1.625rem) 2rem; }
  .video-trigger { --play-size: clamp(5.5rem, calc(1rem + 14.0625vw), 7.75rem); }
  .split-button { --button-height: clamp(3.75rem, calc(2.75rem + 3.125vw), 4.25rem); }
  .hero__benefits { padding-block: clamp(1.125rem, calc(.125rem + 3.125vw), 1.625rem) clamp(1.625rem, calc(.375rem + 3.90625vw), 2.25rem); }
  .benefits { gap: clamp(.625rem, calc(.375rem + .78125vw), .75rem) clamp(.625rem, calc(-.125rem + 2.34375vw), 1rem); }

  @container benefits (min-width: 30em) {
    .benefit { flex-direction: row; align-items: center; gap: .625rem; min-height: clamp(4rem, calc(2.5rem + 4.6875vw), 4.75rem); padding: .5rem .5rem .5rem .875rem; border-radius: var(--radius-pill); }
    .benefit__illustration { width: clamp(2.375rem, calc(1.625rem + 2.34375vw), 2.75rem); height: clamp(2.375rem, calc(1.125rem + 3.90625vw), 3rem); }
    .benefit__title { flex: 1; }
    .benefit__info-trigger { position: static; }
  }
}

/* Tablet keeps the full contact group and horizontal benefit pills from the reference. */
@media (48rem <= width < 75rem) {
  .hero {
    --page-gutter: 2rem;
    --hero-compact-radius: 2.125rem;
    /* A taller, eased fade lets the actors dissolve into the page instead of
       ending on a short band just above the CTA, which now rests on the fade. */
    --hero-compact-fade-height: clamp(6rem, 12vw, 9rem);
    --hero-compact-cta-overlap: clamp(2rem, 4vw, 3rem);
    padding-top: .75rem;
  }
  /* The scene rises behind the offer line: its own sky replaces the empty band
     between the copy and the actors. A long eased top edge hides the seam
     between that sky and the header sky, so no horizontal stripe shows. */
  .hero__intro { position: relative; z-index: 1; }
  .hero__media { margin-top: calc(-1 * clamp(4.5rem, 8vw, 6rem)); }
  .hero__art { mask-image: linear-gradient(transparent, rgb(0 0 0 / 8%) 6%, rgb(0 0 0 / 30%) 12%, rgb(0 0 0 / 62%) 18%, rgb(0 0 0 / 88%) 24%, #000 30%); }
  .hero__top { width: calc(100% - 3rem); }
  /* Same thickness as the desktop row, so the header does not jump at 1200 px. */
  .site-header { min-height: 3.0625rem; gap: .875rem; padding: .15625rem .75rem .15625rem .3125rem; }
  .brand { gap: .625rem; }
  .brand__mark { flex-basis: 4.3125em; width: 4.3125em; height: 2.625em; }
  .brand__circle { width: 2.625em; height: 2.625em; }
  .brand__circle--star { margin-left: -.9375em; }
  .brand__circle--star img { width: 1.8125em; height: 1.75em; }
  .brand__wand { width: 1.3125em; height: 2.0625em; }
  .header-contact { gap: .625rem; }
  .header-contact .availability {
    position: relative;
    isolation: isolate;
    display: flex;
    width: 8.125rem;
    min-height: 44px;
    padding: 0 .61083984rem;
    gap: .61094375rem;
    background: none;
    line-height: .99;
  }
  .header-contact .availability::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: calc(50% - .0162124rem);
    translate: 0 -50%;
    height: 1.40507519rem;
    border-radius: inherit;
    background: var(--color-glass);
    backdrop-filter: blur(10px);
    z-index: -1;
  }
  .header-contact .availability__dot { flex-shrink: 0; width: .42763159rem; height: .42763159rem; margin-top: -.032425rem; }
  .header-contact .availability__label { margin-top: -.125rem; }
  .header-contact .header-phone { display: block; font-size: .9375rem; }
  .header-contact .icon-link { width: 36px; }
  .header-contact .icon-link img { width: 1.0625rem; height: 1.0625rem; }
  .hero__content { padding-block: 1.625rem 2rem; }
  .hero__location { margin-top: 1.125rem; gap: .6875rem; }
  .hero__location img { width: 1rem; height: 1.4375rem; }
  .hero__offer { margin-top: 1.25rem; }
  .video-trigger { --play-size: 7.75rem; }
  .split-button { --button-height: 4.25rem; gap: .5rem; }
  .hero__benefits { padding-block: 1.625rem 2.25rem; }
  .benefits { gap: .75rem 1rem; }
  .benefit { flex-direction: row; align-items: center; gap: .625rem; min-height: 4.75rem; padding: .5rem .5rem .5rem .875rem; border-radius: var(--radius-pill); }
  .benefit__illustration { width: 2.75rem; height: 3rem; }
  .benefit__title { flex: 1; }
  .benefit__info-trigger { position: static; }
}

@media (48rem <= width < 75rem) {
  /* Client reference: the seasonal landing's tablet text sizes. */
  .hero--animators h1 { font-size: clamp(1.896875rem, calc(-.09rem + 9.934vw), 3.88375rem); }
  .hero--animators .hero__location { font-size: clamp(1.04625rem, calc(.36375rem + 3.4125vw), 1.72875rem); }
  .hero--animators .hero__offer { font-size: 1.125rem; }
  .hero--animators .hero__media { margin-top: 0; }
  /* Centre the group (source x ≈ 730–1725, centre ≈ 1227) rather than pin the
     crop to the castle side; the castle may lose a little more on the right
     (client 27.10.2026). */
  .hero--animators .hero__art img { object-position: 96.86% center; }
  .hero--animators .hero__art {
    /* Finish the blend in the sky, before the highest head at 10.58%. */
    mask-image: linear-gradient(transparent, rgb(0 0 0 / 8%) 1.8%, rgb(0 0 0 / 30%) 3.6%, rgb(0 0 0 / 62%) 5.4%, rgb(0 0 0 / 88%) 7.2%, #000 9%);
  }

}

/* The hero itself is painted in the sky colour. Where the artwork ends on a
   fractional pixel, a hairline of that sky showed under the CTA (Among Us at
   1144 px). Bridge the boundary by 1 px without moving the scene or the CTA.
   The page colour then covers the hero's lower corner, so its rounding is
   invisible except for the antialiased sky edge, which showed as a thin arc
   (client screenshot, tablet, 22.10.2026): these heroes end square. */
@media (width < 75rem) {
  .hero:is(.hero--agency, .hero--animators, .hero--character, .hero--holidays) { border-radius: 0; }
  .hero:is(.hero--agency, .hero--animators, .hero--character, .hero--holidays) .hero__cta { background: none; }
  .hero:is(.hero--agency, .hero--animators, .hero--character, .hero--holidays) .hero__cta::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: calc(var(--hero-compact-cta-overlap) - 1px) 0 -1px;
    background: var(--color-page);
    pointer-events: none;
  }
}

/* Sky band under the heading (client request 24.10.2026; designer's band
   Figma O4fTlQ9yZ4RTIapRm6rmiC / 6749:4875). The picture's top rows are darker
   than the header sky and than its own glow below, which showed as a stripe
   above the characters. The client asked for a gradient from about the
   location line down to that dark violet: the band, transparent over the
   header sky, darkens into the darkest sky colour of the picture's top and
   continues under its fade, so those rows continue the gradient. The colour
   per sky image and breakpoint comes from heroSkyBlend.json
   (scripts/sample-hero-sky.mjs); without it the band is not painted. The
   picture itself is unchanged (user's decision). */
@media (width < 75rem) {
  .hero {
    --hero-sky-band: var(--hero-sky-top);
    --hero-sky-rise: 9rem;
  }
  .hero__media::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 55%;
    z-index: -2;
    height: calc(var(--hero-sky-rise) + 45%);
    background: linear-gradient(
      transparent,
      color-mix(in srgb, var(--hero-sky-band) 18%, transparent) calc(var(--hero-sky-rise) * .25),
      color-mix(in srgb, var(--hero-sky-band) 42%, transparent) calc(var(--hero-sky-rise) * .5),
      color-mix(in srgb, var(--hero-sky-band) 70%, transparent) calc(var(--hero-sky-rise) * .75),
      var(--hero-sky-band) var(--hero-sky-rise)
    );
    pointer-events: none;
  }
}
@media (48rem <= width < 75rem) {
  .hero { --hero-sky-band: var(--hero-sky-top-tablet); --hero-sky-rise: 10rem; }
}

/* Breadcrumbs: desktop and tablet; phones keep the header and title alone. */
@media (width < 48rem) {
  .breadcrumbs { display: none; }
  /* The animator overview: the phone crop holds the whole group, from the
     girl's raised hand to the sword tip (source x ≈ 730–1725 of 1828, centre
     ≈ 1225), with a little room on both sides. Client 27.10.2026: the
     narrower 828 crop (25.10) cut both and sat right of the group. */
  .hero--animators .hero__art img { object-position: 87.56% center; }
}

/* Main pages (home, animators, holidays; client request 25.10.2026, replaces
   the long eased lower edge of 21.10): the same short strip of haze above the
   CTA as on character pages, so the characters stay visible, and on phones a
   frame 8 % narrower than before (800, 900 and 840 wide), so they are a
   little larger. */
/* The short haze covers the picture's lower edge (client 25.10.2026): an
   eased curve settles into the page colour without a kink and is solid for
   its last 15 %, so the end of the picture shows no line at the CTA. */
@media (width < 75rem) {
  .hero:is(.hero--agency, .hero--animators, .hero--character, .hero--holidays) {
    --hero-compact-fade-height: clamp(2.75rem, 13vw, 4rem);
    --hero-compact-fade: linear-gradient(rgb(245 243 255 / 0%), rgb(245 243 255 / 5%) 9%, rgb(245 243 255 / 17%) 18%, rgb(245 243 255 / 34%) 27%, rgb(245 243 255 / 53%) 36%, rgb(245 243 255 / 71%) 45%, rgb(245 243 255 / 85%) 54%, rgb(245 243 255 / 94%) 63%, rgb(245 243 255 / 99%) 74%, var(--color-page) 85%);
  }
}
@media (48rem <= width < 75rem) {
  .hero:is(.hero--agency, .hero--animators, .hero--character, .hero--holidays) { --hero-compact-fade-height: clamp(6rem, 12vw, 9rem); }
}
@media (width < 48rem) {
  .hero.hero--agency { --hero-compact-ratio: 736 / 697; }
  .hero.hero--animators { --hero-compact-ratio: 1000 / 860; }
  .hero.hero--holidays { --hero-compact-ratio: 773 / 615; }
}

@media (width < 22rem) {
  .hero__offer { max-width: 17rem; margin-inline: auto; }
}

/* Actual header capacity, including enlarged text, governs secondary contact details. */
@container header (max-width: 44em) {
  .header-contact :is(.availability, .header-phone) { display: none; }
}
@media (width < 75rem) {
  /* The one-line tagline stays while the row fits it next to the icons and menu:
     fixed-size marks and buttons (px) plus text that grows with the font (em). */
  @container header (width < calc(196px + 13.5em)) {
    .brand__tagline { display: none; }
  }
}
@container header (max-width: 16em) {
  .site-header { flex-wrap: wrap; }
  .brand { flex-basis: 100%; }
}
@container benefits (max-width: 16em) {
  .benefits { grid-template-columns: minmax(0, 1fr); }
}

/* The base photo hero also needs a capacity check when users enlarge text.
   Character and services variants already provide their own scene reflow. */
.hero:not(.hero--character, .hero--services, .hero--seasonal, .hero--agency, .hero--holidays) { container: hero-capacity / inline-size; }
@media (width >= 75rem) {
  @container hero-capacity (width < 70em) {
    /* Preserve the enlarged-text header spacing when the desktop unit shrinks. */
    .hero__top { margin-top: calc(.875rem - .875 * var(--hero-design-unit, 1rem)); }
    .hero__layout { margin-bottom: calc(-1 * var(--hero-padding-bottom)); }
    .hero__intro { order: 0; }
    .hero__content { width: 100%; padding-block: 1.5rem 2rem; text-align: center; }
    .hero h1 { max-width: none; }
    .hero__location { justify-content: center; }
    .hero__media { order: 1; position: relative; flex: none; width: 100%; min-height: 0; aspect-ratio: 1160 / 860; margin: 0; }
    .hero__art { width: 100%; height: 100%; max-width: none; mask-image: linear-gradient(transparent, #000 min(18%, 5rem)); }
    .hero__art img { object-position: right center; }
    .hero__art::after { inset: auto 0 0; height: clamp(2rem, 6vw, 3.5rem); background: var(--hero-compact-fade); }
    .hero__video-area { width: 100%; }
    .video-trigger { --play-size: clamp(5.5rem, 14vw, 7rem); left: 50%; right: auto; top: 58%; translate: -50% -50%; }
    .hero__cta { order: 2; position: relative; z-index: 1; width: 100%; padding-inline: var(--page-gutter); margin-top: 0; text-align: center; background: var(--color-page); }
    .hero__cta .split-button { margin-top: 0; }
    .hero__benefits { order: 3; width: 100%; max-width: none; padding: 2rem var(--page-gutter); background: var(--color-page); }
  }
}
