@container page (max-width: 75rem) {
  [data-cim-layout-mode="mobile"] .header-inner{
    gap: 1rem;
  }

  [data-cim-layout-mode="mobile"] .brand-lockup{
    gap: 0.8rem;
  }

  [data-cim-layout-mode="mobile"] .brand-slot{
    width: 3.7rem;
  }

  [data-cim-layout-mode="mobile"] .primary-nav{
    gap: clamp(0.7rem, 1.55vw, 1.2rem);
  }

  [data-cim-layout-mode="mobile"] .primary-nav a{
    font-size: 0.68rem;
  }

  .cta-inner {
    padding-inline: 3rem;
  }
}

@container page (max-width: 68.75rem) {
  [data-cim-layout-mode="mobile"] .header-inner{
    grid-template-columns: 1fr auto;
  }

  [data-cim-layout-mode="mobile"] .primary-nav{
    display: none;
  }

  [data-cim-layout-mode="mobile"] .header-actions{
    grid-column: 2;
    grid-row: 1;
  }

  .stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-card:last-child {
    grid-column: 1 / -1;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-card-featured {
    grid-column: 1 / -1;
  }

  .lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-card,
  .video-card,
  .lower-card {
    min-height: 10rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .footer-brand {
    max-width: 49rem;
  }

  .footer-directory {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2.5rem;
  }

  .social-slot {
    display: grid;
    grid-template-columns: 1fr;
    padding-top: 0;
    padding-left: 2rem;
    border-top: 0;
    border-left: 1px solid rgba(232, 235, 236, 0.11);
    gap: 1rem;
  }
}

@container page (max-width: 47.5rem) {
  :root {
    --content-gutter: 1.15rem;
    --header-gutter: 1.15rem;
    --header-height: 4.75rem;
  }

  [data-cim-layout-mode="mobile"] .brand-slot{
    width: 3rem;
  }

  [data-cim-layout-mode="mobile"] .brand-name{
    font-size: 0.82rem;
  }

  [data-cim-layout-mode="mobile"] .hero{
    min-height: calc(max(var(--hero-height), 31rem) + var(--hero-extension-height));
  }

  [data-cim-layout-mode="mobile"] .hero-inner{
    width: calc(100% - 2.3rem);
    height: calc(max(var(--hero-height), 31rem) + var(--hero-extension-height));
    min-height: calc(max(var(--hero-height), 31rem) + var(--hero-extension-height));
    padding: 7.7rem 0 2rem;
  }

  [data-cim-layout-mode="mobile"] .hero-extension{
    top: max(var(--hero-height), 31rem);
  }

  [data-cim-layout-mode="mobile"] h1:not(.sr-only) {
    margin-bottom: 1.2rem;
    transform: none;
    font-size: clamp(2.2rem, 10.5vw, 3.25rem);
    letter-spacing: -0.065em;
  }

  [data-cim-layout-mode="mobile"] .hero-lead{
    font-size: 0.94rem;
  }

  [data-cim-layout-mode="mobile"] .hero-brand-slot{
    top: auto;
    right: 0;
    bottom: 1.6rem;
    width: 5.6rem;
  }

  [data-cim-layout-mode="mobile"] .hero-glow-slot{
    top: 66%;
    right: 24%;
  }

  [data-cim-layout-mode="mobile"] .hero-copy{
    width: 100%;
  }

  [data-cim-layout-mode="mobile"] .hero-title-art{
    top: clamp(5rem, var(--hero-title-art-y), 7.5rem);
    left: clamp(0.25rem, var(--hero-title-art-x), 1rem);
    width: min(var(--hero-title-art-width), calc(100% - 1.15rem));
  }

  [data-cim-layout-mode="mobile"] .hero-tagline-art{
    top: min(var(--hero-tagline-art-y), 14.7rem);
    left: clamp(0.35rem, var(--hero-tagline-art-x), 1.05rem);
    width: min(var(--hero-tagline-art-width), calc(100% - 1.3rem));
  }

  [data-cim-layout-mode="mobile"] .hero-cta-group{
    top: min(var(--hero-cta-y), 19.4rem);
    left: clamp(0.35rem, var(--hero-cta-x), 1.05rem);
    max-width: calc(100% - 1.3rem);
  }

  [data-cim-layout-mode="mobile"] .scene-slot-label{
    display: none;
  }

  .stories-grid,
  .video-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .story-card:last-child,
  .video-card-featured {
    grid-column: auto;
  }

  .story-card,
  .video-card,
  .lower-card {
    min-height: 10.5rem;
  }

  .video-card-featured .video-overlay {
    left: 7rem;
    width: min(16rem, calc(100% - 8rem));
  }

  .video-card-featured .play-button {
    left: 1.5rem;
  }

  .bilkroken-cta {
    min-height: auto;
  }

  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
    gap: 0.9rem;
  }

  .bilkroken-cta h2 {
    font-size: 1.05rem;
    white-space: normal;
  }

  .cta-button {
    width: 100%;
    margin-left: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding-block: 2.75rem 2.1rem;
    gap: 2.35rem;
  }

  .footer-brand {
    grid-template-columns: 1fr;
    gap: 1.45rem;
  }

  .footer-brand-slot {
    width: 4.4rem;
  }

  .footer-brand h2 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .footer-links {
    gap: 1.25rem;
  }

  .footer-directory {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .social-slot {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 1.15rem;
    padding-left: 0;
    border-top: 1px solid rgba(232, 235, 236, 0.11);
    border-left: 0;
    gap: 1.5rem;
  }

  .footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: flex-start;
    padding-block: 1.2rem;
    gap: 1rem 1.5rem;
  }

  .footer-bottom > p {
    grid-column: 1 / -1;
  }
}

@container page (max-width: 26rem) {
  [data-cim-layout-mode="mobile"] .brand-name{
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  [data-cim-layout-mode="mobile"] .header-actions{
    gap: 0.25rem;
  }

  [data-cim-layout-mode="mobile"] .button-row{
    gap: 0.65rem;
  }

  [data-cim-layout-mode="mobile"] .button-row .button{
    padding-inline: 0.8rem;
    font-size: 0.68rem;
  }

  [data-cim-layout-mode="mobile"] .hero-cta-group{
    flex-wrap: wrap;
  }

  [data-cim-layout-mode="mobile"] .hero-brand-slot{
    width: 4.8rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1rem;
  }

  .footer-links div:last-child {
    grid-column: 1 / -1;
  }

  .footer-legal {
    gap: 1.25rem;
  }

  .footer-top-link {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .hero-art::before,
  .hero-art::after,
  .hero-art__image,
  .hero-cta-group .button,
  .hero-cta-group .button::before {
    animation: none !important;
  }

  .hero-cta-group .button:hover,
  .hero-cta-group .button:focus-visible {
    transform: none;
  }
}

.mobile-brand { display: none; }

/* F01M content remains width-responsive, independently of hero device mode. */
@container page (max-width: 1023px) {
  body {
    /* Body scope wins over saved desktop variables on :root without rewriting them. */
    --content-gutter: clamp(1rem, 4.8vw, 1.5rem);
    --header-gutter: var(--content-gutter);
    --header-height: 4.5rem;
    --section-spacing: 1.5rem;
    --stories-gap: 1.25rem;
    --footer-spacing: 1.5rem;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.55;
  }

  .section-shell { width: calc(100% - 2 * var(--content-gutter)); }
  .content-section { scroll-margin-top: 1rem; }
  .stories-grid, .video-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 1.25rem; }
  .story-card:last-child, .video-card-featured { grid-column: auto; }
  .story-card, .video-card, .lower-card { display: flex; flex-direction: column; min-height: 0; }
  :is(.story-card, .video-card, .lower-card) > .slot-image,
  :is(.story-card, .video-card, .lower-card) > picture[data-mq-picture] > .slot-image {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    flex: none;
    object-fit: cover;
  }
  .card-body, .video-overlay, .video-card-featured .video-overlay {
    position: relative;
    inset: auto;
    width: auto;
    min-height: 0;
    flex: 1;
    padding: 1.25rem;
    overflow-wrap: anywhere;
    background: linear-gradient(135deg, #111619, #090d0f);
  }
  .card-category, .video-row-label { font-size: .875rem; line-height: 1.4; letter-spacing: .045em; margin-bottom: .6rem; }
  .story-card h3, .lower-card h3, .video-card h3, .video-card-featured h3 { max-width: none; font-size: clamp(1.3rem, 5.6vw, 1.55rem); line-height: 1.22; }
  .card-body > p:not(.card-category), .lower-card .card-body > p:not(.card-category), .video-description {
    max-width: 40ch;
    margin: .65rem 0 0;
    color: #d6dadc;
    font-size: 1rem;
    line-height: 1.6;
  }
  .card-link { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: 1rem; font-size: 1rem; color: #ff9968; }
  .card-link::after { font-size: 1.15rem; }
  .video-duration { margin-top: .75rem; font-size: .9375rem; }
  .video-row-label { top: 1rem; left: 1.25rem; padding: .35rem .5rem; background: rgb(5 7 8 / 85%); border-radius: .25rem; }
  .play-button, .video-card-featured .play-button { top: 1.25rem; left: 1.25rem; width: 3.5rem; background: rgb(5 7 8 / 76%); }
  .video-card-featured .play-button { top: 4rem; }

  .bilkroken-cta { min-height: 0; margin-top: 1.5rem; }
  .cta-inner { min-height: 0; flex-direction: column; align-items: stretch; padding: 1.25rem; gap: 1.1rem; }
  .bilkroken-cta h2 { white-space: normal; font-size: 1.25rem; line-height: 1.5; }
  .cta-button { width: 100%; min-width: 0; min-height: 3rem; margin: 0; font-size: 1rem; white-space: normal; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); padding-block: 2rem; gap: 2.5rem; }
  .footer-brand { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .footer-brand-slot { width: 5rem; }
  .footer-kicker, .footer-label { font-size: .875rem; line-height: 1.5; }
  .footer-brand h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); line-height: 1.2; }
  .footer-intro { font-size: 1rem; line-height: 1.65; }
  .footer-directory { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .footer-links { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 1.5rem; }
  .footer-links div { gap: 0; }
  .footer-links div:last-child { grid-column: 1 / -1; }
  .footer-links .footer-label { margin-bottom: .5rem; }
  .footer-links a { display: flex; align-items: center; min-width: 2.75rem; min-height: 2.75rem; font-size: 1rem; }
  .social-slot { grid-template-columns: minmax(0, 1fr); border-left: 0; border-top: 1px solid var(--cim-border); padding: 1.25rem 0 0; gap: 1rem; }
  .social-icons { gap: .75rem; }
  .social-icons span { --phone-social-size: clamp(44px, var(--social-icon-size), 80px); flex-basis: var(--phone-social-size); width: var(--phone-social-size); height: var(--phone-social-size); font-size: 1rem; }
  .footer-bottom { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 1.5rem; font-size: .9375rem; }
  .footer-bottom > p { grid-column: auto; }
  .footer-legal { flex-wrap: wrap; gap: 1.25rem; }
  .footer-top-link { justify-self: start; min-height: 2.75rem; font-size: .9375rem; }
}

@container page (min-width: 600px) and (max-width: 1023px) {
  .stories-grid, .video-grid, .lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-card:last-child, .video-card-featured { grid-column: 1 / -1; }
  .video-card-featured > .slot-image,
  .video-card-featured > picture[data-mq-picture] > .slot-image,
  .story-card:last-child > .slot-image,
  .story-card:last-child > picture[data-mq-picture] > .slot-image { aspect-ratio: 16 / 8; }
  .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-links div:last-child { grid-column: auto; }
}

