/* Final layout rules shared by the current demo pages. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; }
main, section, article { min-width: 0; }
img, video { max-width: 100%; }

/* All photographic first-screen banners follow the homepage frame on desktop. */
@media (min-width: 901px) {
  :root { --site-hero-height: clamp(570px, min(44vw, calc(100svh - 300px)), 1200px); }
  body[data-page="home"] .hero.section-shell.container,
  body[data-page="kissel"] .kissel-partner,
  body[data-page="stm"] .page-hero-stm,
  body[data-page="partner"] .partner-hero,
  body[data-page="about"] .page-hero-about,
  body[data-page="where"] .page-hero-where {
    width: calc(100% - 24px);
    height: var(--site-hero-height);
    min-height: var(--site-hero-height);
    aspect-ratio: auto;
  }
  body[data-page="stm"] .page-hero-stm .page-hero-copy,
  body[data-page="about"] .page-hero-about .page-hero-copy,
  body[data-page="where"] .page-hero-where .page-hero-copy { min-height: var(--site-hero-height); }
}

/* A quiet, readable request card sits over the partner photograph. */
body[data-page="partner"] .partner-brief {
  position: absolute; inset: auto clamp(22px,3vw,48px) clamp(22px,3vw,42px) auto;
  z-index: 3; display: block; width: clamp(305px,26vw,390px); max-width: none;
  margin: 0; padding: 21px 24px 17px;
  border: 1px solid rgba(255,255,255,.68); border-radius: 27px;
  background: rgba(255,250,241,.83);
  box-shadow: 0 16px 38px rgba(25,55,51,.14), inset 0 1px rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
body[data-page="partner"] .partner-brief h2 { max-width: 18ch; margin: 0 0 11px; font-size: clamp(1.45rem,1.9vw,1.85rem); }
body[data-page="partner"] .partner-brief ul { display: block; }
body[data-page="partner"] .partner-brief li { grid-template-columns: 74px minmax(0,1fr); align-items: start; gap: 8px; padding: 8px 0; }
body[data-page="partner"] .partner-brief li strong,
body[data-page="partner"] .partner-brief li span { font-size: .88rem; line-height: 1.32; }

/* Keep STM copy on a calm photographic area without a visible hard edge. */
body[data-page="stm"] .page-hero-stm::before {
  background: linear-gradient(90deg,#f8f4e9 0%,rgba(248,244,233,.99) 31%,rgba(248,244,233,.93) 42%,rgba(248,244,233,.52) 55%,transparent 73%);
}
body[data-page="stm"] .page-hero-stm .page-hero-copy { width: min(600px,45%); }

/* Reveal the label with the arrow; keep the whole product card keyboard accessible. */
@media (hover: hover) and (min-width: 681px) {
  body[data-page="home"] .category:hover .category-open:not(:hover) { width: 48px; }
  body[data-page="home"] .category:hover .category-open:not(:hover) .category-open-text { max-width: 0; opacity: 0; }
  body[data-page="home"] .category:hover .category-open:hover,
  body[data-page="home"] .category:focus-visible .category-open { width: 180px; }
  body[data-page="home"] .category-open:hover .category-open-text,
  body[data-page="home"] .category:focus-visible .category-open .category-open-text { max-width: 180px; opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  body[data-page="partner"] .partner-brief { width: 305px; padding: 17px 18px 13px; }
  body[data-page="partner"] .partner-brief h2 { font-size: 1.4rem; }
  body[data-page="stm"] .page-hero-stm .page-hero-copy { width: 52%; }
}

@media (min-width: 701px) and (max-width: 1100px) {
  body[data-page="kissel"] .kissel-partner {
    display: flex; flex-direction: row; align-items: center;
    aspect-ratio: auto; overflow: hidden;
  }
  body[data-page="kissel"] .kissel-partner::after {
    display: block;
    background: linear-gradient(90deg,rgba(255,251,245,.96),rgba(255,251,245,.85) 28%,rgba(255,251,245,.16) 51%,transparent 67%);
  }
  body[data-page="kissel"] .kissel-partner-copy {
    position: relative; z-index: 2; flex: none; align-self: stretch;
    width: 38%; padding: clamp(27px,3.5vw,45px);
    justify-content: center;
  }
  body[data-page="kissel"] .kissel-partner h1 { font-size: clamp(2.2rem,3.8vw,3.1rem); }
  body[data-page="kissel"] .kissel-partner-copy > p:not(.eyebrow) { font-size: clamp(.9rem,1.3vw,1rem); }
  body[data-page="kissel"] .kissel-partner-visual {
    position: absolute; inset: 0; width: 100%; height: 100%;
    aspect-ratio: auto; min-height: 0;
  }
  body[data-page="kissel"] .kissel-partner-visual img {
    position: absolute; inset: 0; width: 100%; max-width: 100%; height: 100%;
    object-fit: cover; object-position: center;
  }
}
@media (min-width: 701px) and (max-width: 900px) {
  body[data-page="kissel"] .kissel-partner { height: clamp(570px,65vw,680px); min-height: 0; }
  body[data-page="partner"] .partner-hero-copy > p { max-width: 29ch; }
}

@media (max-width: 700px) {
  body[data-page="partner"] .partner-brief {
    position: relative; inset: auto; order: 2; flex: none;
    width: calc(100% - 32px); margin: -37px auto 17px;
    border-radius: 25px;
  }
  body[data-page="stm"] .page-hero-stm .page-hero-copy { width: 100%; }
}

@media (max-width: 600px) {
  /* Keep the child product launch image and every word in separate clear areas. */
  body[data-page="kissel"] .kissel-partner {
    display: flex; flex-direction: column; align-items: stretch;
    height: auto; min-height: 0; aspect-ratio: auto; padding: 0;
    background: #fff8ef; overflow: hidden;
  }
  body[data-page="kissel"] .kissel-partner::after { display: none; }
  body[data-page="kissel"] .kissel-partner-copy {
    position: relative; z-index: 1; order: 0; flex: none;
    display: flex; flex-direction: column; align-items: flex-start;
    width: 100%; height: auto; min-height: 0; padding: 27px 25px 25px;
    background: #fff8ef;
  }
  body[data-page="kissel"] .kissel-partner h1 {
    max-width: none; font-size: clamp(2.05rem,8.3vw,2.65rem); line-height: 1.04;
  }
  body[data-page="kissel"] .kissel-partner-copy > p:not(.eyebrow) {
    max-width: 42ch; margin: 15px 0 0;
    font-size: clamp(.92rem,3.7vw,1rem); line-height: 1.43;
  }
  body[data-page="kissel"] .kissel-partner-actions {
    position: static; width: auto; margin-top: 20px;
  }
  body[data-page="kissel"] .kissel-partner-visual {
    position: relative; inset: auto; z-index: 0; order: 1; flex: none;
    width: 100%; height: clamp(350px,52svh,500px); min-height: 0;
    aspect-ratio: auto; margin: 0;
    -webkit-mask-image: none; mask-image: none;
  }
  body[data-page="kissel"] .kissel-partner-visual img {
    position: absolute; inset: 0; width: 100%; max-width: 100%; height: 100%;
    object-fit: cover; object-position: 58% center;
  }

  /* One clear product at a time; pale side packaging looked like artifacts. */
  body[data-page="home"] .bestsellers-track { height: 230px; }
  body[data-page="home"] .bestseller-card { width: 188px; height: 222px; }
  body[data-page="home"] .bestseller-card[data-position="-1"],
  body[data-page="home"] .bestseller-card[data-position="1"] {
    opacity: 0; pointer-events: none;
  }

  body[data-page="stm"] .page-hero-stm {
    display: flex; flex-direction: column; align-items: stretch;
    min-height: 0; height: auto; overflow: hidden;
    background: #f8f4e9;
  }
  body[data-page="stm"] .page-hero-stm::before { display: none; }
  body[data-page="stm"] .page-hero-stm .page-hero-copy {
    position: relative; order: 0; z-index: 2;
    width: 100%; min-height: 0; padding: 29px 25px 25px;
    background: #f8f4e9;
  }
  body[data-page="stm"] .page-hero-stm .page-hero-copy h1 { font-size: clamp(2.2rem,9vw,2.75rem); }
  body[data-page="stm"] .page-hero-stm .page-hero-copy p { max-width: 34ch; margin: 18px 0 0; font-size: clamp(.94rem,3.8vw,1.05rem); line-height: 1.43; }
  body[data-page="stm"] .page-hero-stm .page-hero-copy > .button { margin: 22px 0 0 !important; }
  body[data-page="stm"] .page-hero-stm .page-hero-image {
    position: relative; inset: auto; order: 1; z-index: 0;
    width: 100%; max-width: 100%; height: clamp(350px,54svh,500px);
    object-fit: cover; object-position: 67% center;
    -webkit-mask-image: none; mask-image: none;
  }

  body[data-page="partner"] .partner-hero {
    display: flex; flex-direction: column; min-height: 0; height: auto;
    padding: 0; overflow: hidden; background: #fff8ed;
    box-shadow: var(--shadow);
  }
  body[data-page="partner"] .partner-hero::after { display: none; }
  body[data-page="partner"] .partner-hero-copy {
    position: relative; display: block; order: 0; flex: none;
    width: 100%; height: auto; min-height: 0;
    padding: 29px 25px 24px; background: #fff8ed;
  }
  body[data-page="partner"] .partner-hero-copy h1 {
    width: 100%; max-width: 12ch; margin: 0; padding: 0;
    font-size: clamp(2rem,9vw,2.55rem); line-height: 1.02; text-shadow: none;
  }
  body[data-page="partner"] .partner-hero-copy > p {
    width: 100%; max-width: 31ch; margin: 18px 0 0; padding: 0;
    font-size: clamp(.94rem,3.8vw,1.05rem); line-height: 1.43; text-shadow: none;
  }
  body[data-page="partner"] .partner-hero-actions {
    position: static; display: flex; order: initial; flex-wrap: wrap;
    width: 100%; margin-top: 21px; padding: 0; gap: 8px 18px;
  }
  body[data-page="partner"] .partner-hero-actions .partner-text-link { color: var(--teal); border-color: #c65f24; text-shadow: none; }
  body[data-page="partner"] .partner-hero-media {
    position: relative; inset: auto; order: 1; flex: none;
    display: block; width: 100%; height: clamp(360px,57svh,540px);
    margin: 0; border-radius: 0; overflow: hidden;
    -webkit-mask-image: none; mask-image: none;
  }
  body[data-page="partner"] .partner-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 34%; }
  body[data-page="partner"] .partner-brief { margin-top: -37px; }

  body[data-page="kissel"] .kissel-world {
    display: block;
    width: calc(100% - 18px);
    min-height: max(620px, calc((100vw - 18px) * 1.5));
    background: #f6e6d5; overflow: hidden; border-radius: 30px;
  }
  body[data-page="kissel"] .kissel-world::before {
    content: ""; display: block; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to bottom, rgba(255, 250, 240, .48), transparent 42%);
    pointer-events: none;
  }
  body[data-page="kissel"] .kissel-world-visual {
    position: absolute; inset: 0;
    width: 100%; height: 100%; min-height: 0; aspect-ratio: auto;
  }
  body[data-page="kissel"] .kissel-world-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
  body[data-page="kissel"] .kissel-world-copy {
    position: relative; z-index: 2;
    width: 100%; padding: 26px 23px 22px; background: transparent;
  }
  body[data-page="kissel"] .kissel-world h2 { max-width: none; margin: 0; font-size: clamp(2.05rem,8.3vw,2.65rem); line-height: 1.05; }
  body[data-page="kissel"] .kissel-world h2 span, body[data-page="kissel"] .kissel-world h2 em { display: block; }
  body[data-page="kissel"] .kissel-world h2 em { margin: 0; }
  body[data-page="kissel"] .kissel-world-lead { max-width: 33ch; margin: 12px 0 15px; font-size: clamp(.9rem,3.7vw,1rem); line-height: 1.4; }
  body[data-page="kissel"] .kissel-world-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; font-size: .86rem; }
  body[data-page="kissel"] .kissel-world-actions .button { width: auto; min-height: 43px; padding-inline: 14px; font-size: inherit; }
}

@media (max-width: 360px) {
  body[data-page="partner"] .partner-hero-copy { padding-inline: 20px; }
  body[data-page="partner"] .partner-hero-copy h1 { font-size: 1.95rem; }
  body[data-page="kissel"] .kissel-world-copy { padding-inline: 20px; }
  body[data-page="kissel"] .kissel-world h2 { font-size: 1.95rem; }
}

/* Calm page and control transitions, without scaling the text. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-soft-out .12s ease both; }
::view-transition-new(root) { animation: page-soft-in .2s ease both; }
@keyframes page-soft-out { to { opacity: .84; } }
@keyframes page-soft-in { from { opacity: .84; } to { opacity: 1; } }

/* A deliberately drawn chevron replaces the platform's stock select arrow. */
.contact-dialog-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  background-color: #fffaf1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M3 5l6 6 6-6' fill='none' stroke='%23005461' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 17px center;
  background-size: 18px 16px;
  cursor: pointer;
}
.contact-dialog-form select:hover { border-color: rgba(0,84,97,.46); }
.contact-dialog-form select:focus-visible { outline: 3px solid rgba(0,84,97,.18); outline-offset: 2px; }
.contact-dialog-form select option { color: #005461; background: #fffaf1; }

@media (max-width: 1100px) {
  .site-header .main-nav,
  .site-header.is-scrolled .main-nav {
    transform: translateY(-9px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.22,.75,.25,1), opacity .2s ease, visibility 0s linear .25s;
  }
  .site-header .main-nav.open,
  .site-header.is-scrolled .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform .25s cubic-bezier(.22,.75,.25,1), opacity .2s ease, visibility 0s;
  }
  .site-header .main-nav a[href="kissel.html"] {
    display: flex; align-items: center; gap: 10px;
  }
  .site-header .main-nav a[href="kissel.html"]::before {
    width: 8px; height: 8px; margin: 0;
    border-radius: 3px; transform: none;
  }
}

@media (max-width: 600px) {
  .site-header .header-contact,
  .site-header.is-scrolled .header-contact {
    overflow: visible;
    transition: width .28s cubic-bezier(.22,.75,.25,1), height .28s cubic-bezier(.22,.75,.25,1),
      padding .28s ease, border-radius .28s ease, box-shadow .25s ease;
  }
  .site-header .header-contact:not(.is-open) .header-contact-title,
  .site-header .header-contact:not(.is-open) .header-contact-actions {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility 0s linear .15s;
  }
  .site-header .header-contact:not(.is-open) .header-contact-actions { display: flex; }
  .site-header .header-contact.is-open .header-contact-title,
  .site-header .header-contact.is-open .header-contact-actions {
    opacity: 1;
    visibility: visible;
    transition: opacity .24s ease .07s, visibility 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .site-header .main-nav, .site-header .main-nav.open,
  .site-header .header-contact, .site-header.is-scrolled .header-contact,
  .site-header .header-contact-title, .site-header .header-contact-actions { transition: none !important; }
}
