/*
 * 0.3.3 – only the low, wide viewport of a rotated phone.
 * No changes to portrait or to the desktop rules in hero-desktop-v032.css.
 * Keep the complete approved source image: contain instead of cover.
 * The section grows with its content; it is not clipped to the screen height.
 */
@media (orientation: landscape) and (max-width: 1024px) and (max-height: 600px) {
  .page-home .desktop-nav { display: none; }
  .page-home .menu-toggle { display: inline-flex; }
  .page-home .header-inner {
    min-height: 68px;
    gap: 16px;
    width: calc(100% - 48px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .page-home .brand-lockup { padding-block: 8px; }
  .page-home .brand { font-size: 14px; }
  .page-home .header-actions { gap: 10px; }
  .page-home .mobile-nav { max-height: calc(100dvh - 68px); }

  #home-hero.cf-hero-v03.cf-hero-layout-v033 .hero-mug { display: none; }
}

@media (min-width: 601px) and (orientation: landscape) and (max-width: 1024px) and (max-height: 600px) {
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 {
    display: block;
    background: #f7f6f8;
  }

  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-mask-image: none;
    mask-image: none;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-image picture,
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-image img {
    display: block;
    width: 100%;
    height: 100%;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-image img {
    object-fit: contain;
    object-position: center bottom;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-inner {
    width: 88.4%;
    max-width: none;
    min-height: calc(100vw * 615 / 1648);
    height: auto;
    margin-inline: auto;
    padding-block: 14px 24px;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    align-items: center;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-copy {
    width: 45.5%;
    max-width: none;
    min-width: 0;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 h1 {
    font-size: clamp(25px, 4.45vw, 45px);
    line-height: 1.07;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-copy > p {
    max-width: 100%;
    margin-top: 13px;
    font-size: 13px;
    line-height: 1.5;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-buttons {
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
  }
  #home-hero.cf-hero-v03.cf-hero-wide-v032.cf-hero-layout-v033 .hero-buttons .button {
    min-width: 0;
    min-height: 42px;
    padding: 10px 13px;
    font-size: 12px;
  }

  /* Custom admin images have no guaranteed text-safe area. Show them whole
     below the text, rather than cropping them or overwriting the saved image. */
  #home-hero.cf-hero-layout-v033:not(.cf-hero-wide-v032) {
    display: flex;
    flex-direction: column;
  }
  #home-hero.cf-hero-layout-v033:not(.cf-hero-wide-v032) .hero-inner {
    order: 0;
    min-height: 0;
    padding-block: 24px;
  }
  #home-hero.cf-hero-layout-v033:not(.cf-hero-wide-v032) .hero-copy {
    width: 100%;
    max-width: none;
  }
  #home-hero.cf-hero-layout-v033:not(.cf-hero-wide-v032) .hero-copy > p { max-width: 560px; }
  #home-hero.cf-hero-layout-v033:not(.cf-hero-wide-v032) .hero-image {
    position: relative;
    order: 1;
    inset: auto;
    width: 100%;
    height: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
  #home-hero.cf-hero-layout-v033:not(.cf-hero-wide-v032) .hero-image picture,
  #home-hero.cf-hero-layout-v033:not(.cf-hero-wide-v032) .hero-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* On very small rotated phones keep the stacked layout, but remove the fixed
   218px photo height. The complete existing mobile image is shown proportionally. */
@media (max-width: 600px) and (orientation: landscape) and (max-height: 600px) {
  #home-hero.cf-hero-v03.cf-hero-layout-v033 .hero-image,
  #home-hero.cf-hero-v03.cf-hero-layout-v033 .hero-image picture,
  #home-hero.cf-hero-v03.cf-hero-layout-v033 .hero-image img {
    height: auto;
    width: 100%;
  }
  #home-hero.cf-hero-v03.cf-hero-layout-v033 .hero-image {
    -webkit-mask-image: none;
    mask-image: none;
  }
  #home-hero.cf-hero-v03.cf-hero-layout-v033 .hero-image img { object-fit: contain; }
}
