/* Shared responsive refinements for the V7 pages. Desktop styling stays untouched. */
@media (max-width: 719px) {
  html,
  body {
    width: 100%;
    min-width: 320px;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
  }

  body > div {
    width: 100%;
    overflow: clip;
  }

  header[style*="position:fixed"] {
    min-height: 64px;
    padding: max(12px, env(safe-area-inset-top)) 18px 12px !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  }

  header[style*="position:fixed"] > a:last-child {
    font-size: 9px !important;
    letter-spacing: .2em !important;
  }

  header[style*="position:fixed"] img {
    height: 29px !important;
  }

  #dc-menu > div:first-child {
    padding: max(18px, env(safe-area-inset-top)) 20px 22px !important;
    padding-bottom: max(22px, env(safe-area-inset-bottom)) !important;
  }

  #dc-menu ul a {
    font-size: clamp(28px, 8vw, 42px) !important;
    gap: 14px !important;
  }

  #top {
    height: 100svh !important;
    min-height: min(720px, 100svh) !important;
  }

  #top > div[style*="left:clamp"] {
    left: 20px !important;
    right: 20px !important;
    bottom: max(104px, calc(env(safe-area-inset-bottom) + 92px)) !important;
    max-width: 100% !important;
  }

  #top h1 {
    max-width: 100%;
    font-size: clamp(54px, 15vw, 76px) !important;
    line-height: .96 !important;
    overflow-wrap: anywhere;
  }

  #top > div[style*="linear-gradient(90deg"] {
    background: linear-gradient(0deg, #0B0A09 0%, #0B0A09a8 30%, #0B0A0933 68%, #0B0A0900 100%) !important;
  }

  section:has(> div[style*="width:min(44vw"]) > img {
    object-position: 38% center !important;
  }

  #top .js-sound {
    top: auto !important;
    right: 18px !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    left: auto !important;
    padding: 8px 12px 8px 8px !important;
    gap: 9px !important;
    font-size: 9px !important;
  }

  #top .js-sound > span:first-child {
    width: 24px !important;
    height: 24px !important;
  }

  #top > div[style*="translateX(-50%)"] {
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    left: 22px !important;
    transform: none !important;
    flex-direction: row !important;
    gap: 8px !important;
    font-size: 8px !important;
  }

  .dc-hero-partner {
    top: max(72px, calc(env(safe-area-inset-top) + 62px)) !important;
  }

  section[id] {
    scroll-margin-top: 72px;
  }

  section[style*="padding:clamp(100px"],
  section[style*="padding:clamp(120px"],
  section[style*="padding:clamp(80px"] {
    padding: 72px 20px !important;
  }

  #collection {
    padding: 0 20px 72px !important;
  }

  section[style*="padding:0 clamp(20px"][style*="clamp(100px"] {
    padding: 0 20px 72px !important;
  }

  section > div[style*="width:min(44vw"] {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 20px max(52px, env(safe-area-inset-bottom)) !important;
  }

  section > div[aria-hidden="true"] {
    background: linear-gradient(0deg, #0B0A09 0%, #0B0A09d9 34%, #0B0A0966 62%, #0B0A0900 100%) !important;
  }

  section:has(> div[style*="width:min(44vw"]) {
    min-height: 100svh !important;
    align-items: flex-end !important;
  }

  section:has(> div[style*="width:min(44vw"]) h2 {
    font-size: clamp(42px, 12vw, 64px) !important;
  }

  section:not(#top):not(#collection):not(#commission):not(#viewing):not(#bespoke):not(#together) h2 {
    font-size: clamp(36px, 10vw, 56px) !important;
    line-height: 1.04 !important;
  }

  section:not(#top):not(#collection):not(#commission):not(#viewing):not(#bespoke):not(#together) h3 {
    font-size: clamp(32px, 9vw, 48px) !important;
  }

  section#finishes > div[style*="grid-template-columns:repeat(auto-fit"] {
    gap: 42px !important;
  }

  section#finishes > div > div:last-child {
    min-height: min(112vw, 440px) !important;
  }

  section#finishes .js-finish-img {
    object-fit: contain !important;
    object-position: center !important;
  }

  section[id="commission"]:has(> img),
  section[id="viewing"] {
    min-height: 78svh !important;
  }

  section#commission > div[style*="padding:120px"],
  section#viewing > div[style*="padding:120px"] {
    width: 100%;
    padding: 88px 22px !important;
  }

  section#commission h2,
  section#viewing h2 {
    font-size: clamp(42px, 12vw, 64px) !important;
  }

  section#bespoke,
  section#together {
    min-height: 82svh !important;
  }

  section#bespoke > div[style*="width:100%"],
  section#together > div[style*="width:100%"] {
    padding: 0 20px max(48px, env(safe-area-inset-bottom)) !important;
  }

  section#collection > div:first-child,
  section[id="characters"] > div:first-child,
  section[id="forms"] > div:first-child {
    margin-bottom: 32px !important;
    gap: 14px !important;
  }

  section#collection > div:first-child h2,
  section[id="characters"] > div:first-child h2,
  section[id="forms"] > div:first-child h2 {
    font-size: 34px !important;
  }

  section#collection a[style*="margin-top:clamp"] {
    margin-top: 20px !important;
  }

  section#collection .dc-card-grid h3 {
    font-size: clamp(38px, 11vw, 54px) !important;
  }

  section div[style*="grid-template-columns:1.3fr 1fr"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, .82fr) !important;
    gap: 10px !important;
  }

  section div[style*="grid-template-columns:1.3fr 1fr"] img:last-child {
    margin-bottom: 28px !important;
  }

  section div[style*="grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)"] {
    grid-template-columns: minmax(92px, .72fr) minmax(0, 1.28fr) !important;
    column-gap: 14px !important;
  }

  section div[style*="grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))"],
  section ol[style*="grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 14px !important;
  }

  section div[style*="grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))"] figure > div {
    aspect-ratio: 4 / 4.8 !important;
  }

  section ol[style*="grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))"] li {
    padding: 22px 10px 0 0 !important;
  }

  section dl {
    column-gap: 14px !important;
  }

  section dl dt {
    letter-spacing: .18em !important;
    font-size: 10px !important;
  }

  section dl dd {
    font-size: 17px !important;
  }

  body > div > div[style*="grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr))"] {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
  }

  body > div > div[style*="grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr))"] > div:first-child {
    min-height: min(62svh, 540px) !important;
  }

  body > div > div[style*="grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr))"] > div:last-child {
    padding: 64px 20px 72px !important;
  }

  .js-interest {
    min-height: 60px;
    font-size: 14px !important;
    line-height: 1.2 !important;
    padding: 12px 6px !important;
    overflow-wrap: anywhere;
  }

  .pv-submit,
  .dc-cta {
    max-width: 100%;
    text-align: center;
    line-height: 1.5 !important;
  }

  .pv-submit {
    align-self: stretch !important;
  }

  .v7-cal {
    width: 100% !important;
    max-width: 100% !important;
  }

  footer {
    padding: 64px 20px 28px !important;
    padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
  }

  footer > img[alt="V7 Robotics"] {
    margin-bottom: 44px !important;
  }

  footer > ul {
    gap: 16px 22px !important;
    margin-bottom: 40px !important;
    letter-spacing: .2em !important;
  }

  .dc-nl {
    margin-bottom: 48px !important;
  }

  .dc-social {
    margin-bottom: 48px !important;
  }

  footer > div[style*="justify-content:space-between"] {
    justify-content: center !important;
    text-align: center;
  }
}

@media (max-width: 380px) {
  #top h1 {
    font-size: clamp(48px, 14vw, 58px) !important;
  }

  header[style*="position:fixed"] {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  header[style*="position:fixed"] > a:last-child {
    letter-spacing: .14em !important;
  }

  section div[style*="grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)"] {
    grid-template-columns: minmax(78px, .68fr) minmax(0, 1.32fr) !important;
  }
}

@media (max-height: 520px) and (max-width: 719px) {
  #top {
    min-height: 480px !important;
  }

  #top > div[style*="left:clamp"] {
    bottom: 74px !important;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* Full-frame companion product photography */
.companion-hero > img {
  object-fit: contain !important;
  object-position: center bottom !important;
}

.js-menu-img {
  object-fit: contain !important;
  background: transparent;
}

@media (max-width: 719px) {
  #top.companion-hero {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  #top.companion-hero > img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4 !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  #top.companion-hero > div[style*="linear-gradient"] {
    display: none !important;
  }

  #top.companion-hero > div[style*="left:clamp"] {
    position: relative !important;
    inset: auto !important;
    max-width: none !important;
    padding: 26px 20px 34px !important;
    background: #fff !important;
  }

  #top.companion-hero .dc-scroll {
    display: none !important;
  }

  .founder-card {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 320px !important;
  }
}
