/* SELF ENTOURAGE — QUALITY COMPLETION V12
   Finishes the premium system with interaction polish, accessibility,
   performance containment, form usability, safe-area support, and overflow control. */

html {
  overflow-x: clip;
  scroll-padding-top: 6rem;
}

body {
  min-width: 320px;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

main,
section,
.wrap,
.card-grid,
.feature-grid,
.number-grid,
.related-grid,
.catalog-grid,
.standards-grid {
  min-width: 0;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

h1,
h2,
h3,
.eyebrow,
.btn,
.card-action {
  text-wrap: balance;
}

p,
li,
.lede {
  text-wrap: pretty;
}

/* Keep the global centered composition while preserving high-utility reading patterns. */
:is(form,.form-grid,.field-group,.faq-list,.accordion-panel-inner,table,.legal-copy,.policy-copy,.long-form-copy) {
  text-align: left;
}

:is(input,select,textarea,button,.btn,a[role="button"]) {
  font: inherit;
}

:is(input,select,textarea) {
  width: 100%;
  min-height: 3rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(45,77,89,.24);
  border-radius: 12px;
  background: #fff;
  color: #16262c;
  box-shadow: inset 0 1px 2px rgba(8,25,31,.05);
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

:is(input,select,textarea):focus-visible {
  outline: 3px solid rgba(237,203,123,.68);
  outline-offset: 2px;
  border-color: #2d4d59;
}

label {
  display: inline-block;
  margin-bottom: .45rem;
  font-weight: 750;
}

button,
.btn,
.nav-links a,
.nav-dropdown > button,
.nav-butler-button,
.footer-grid a {
  min-height: 44px;
}

.btn {
  transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 18px 42px rgba(193,73,64,.34);
}

/* Shared centered panels retain a readable internal rhythm. */
body[data-se-page] :is(.hero-aside,.decision-panel,.contact-panel,.notice),
body[data-se-canonical-product="true"] :is(.price-card,.product-offer-panel,.next-step,.delivery-card) {
  container-type: inline-size;
}

body[data-se-page] :is(.hero-aside,.decision-panel,.contact-panel,.notice) > * + *,
body[data-se-canonical-product="true"] :is(.price-card,.product-offer-panel,.next-step,.delivery-card) > * + * {
  margin-top: .8rem;
}

body[data-se-page] .hero-aside .cta-row,
body[data-se-page] .decision-panel .cta-row,
body[data-se-canonical-product="true"] .next-actions {
  width: min(100%, 34rem);
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Footer columns stay centered and visually balanced at every breakpoint. */
.footer-grid > div {
  min-width: 0;
}

.footer-grid a {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.footer-bottom > * {
  min-width: 0;
}

/* Performance: defer deep sections without changing layout or accessibility. */
@supports (content-visibility: auto) {
  main > .section:nth-of-type(n+3) {
    content-visibility: auto;
    contain-intrinsic-size: auto 720px;
  }
}

/* Mobile navigation state is explicit and does not leave the page visually broken. */
body[data-nav-open="true"] {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 1100px) {
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav-links[data-open="true"] {
    max-height: min(76vh, 44rem) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .nav-dropdown-menu[data-open="false"] {
    display: none !important;
  }

  .nav-dropdown-menu[data-open="true"] {
    display: block !important;
  }

  .nav-links a[aria-current="page"] {
    border: 1px solid rgba(237,203,123,.22);
    border-radius: 999px;
    background: rgba(45,77,89,.24);
    color: #edcb7b !important;
  }
}

/* Product sticky CTA and Butler stay above phone safe areas. */
.sticky-cta {
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)) !important;
}

.crown-butler-trigger {
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
}

/* Avoid accidental overlap between the Butler and sticky product CTA. */
body:has(.sticky-cta[data-visible="true"]) .crown-butler-trigger {
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

/* Small-screen final polish. */
@media (max-width: 700px) {
  .wrap {
    width: 100%;
    padding-inline: clamp(1rem,4vw,1.35rem) !important;
  }

  .site-header .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .site-header .brand-lockup-inline {
    min-width: 0;
  }

  .site-header .brand-copy-inline {
    min-width: 0;
    overflow: hidden;
  }

  .site-header .brand-copy-inline > span {
    flex: 0 0 auto;
  }

  .nav-toggle {
    flex: 0 0 auto;
  }

  body[data-se-page] .hero-aside,
  body[data-se-page] .decision-panel,
  body[data-se-page] .contact-panel,
  body[data-se-canonical-product="true"] :is(.price-card,.product-offer-panel,.next-step,.delivery-card) {
    width: 100% !important;
  }

  :is(.feature-grid,.card-grid,.related-grid,.catalog-grid,.standards-grid) > * {
    width: 100%;
  }

  .footer-grid {
    row-gap: 2.25rem !important;
  }

  .footer-grid h4 {
    margin-bottom: .65rem !important;
  }

  .footer-grid a {
    min-height: 40px;
  }
}

@media (max-width: 430px) {
  .site-header .brand-copy .self {
    letter-spacing: .1em !important;
  }

  .site-header .brand-copy .entourage {
    letter-spacing: .04em !important;
  }

  .page-hero .cta-row,
  .product-hero .cta-row,
  .next-actions {
    width: 100% !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .btn:focus-visible {
    transform: none;
  }
}
