/*
 * End of the Line Studios — 070 sanity / responsive consolidation
 *
 * This layer replaces the accumulated 065/067/068 responsive-nav experiments
 * with one authoritative system while preserving the 062 publisher design,
 * 063 contrast/admin work, 064 interaction rules, and 069 legal/preorder work.
 *
 * Contracts:
 *   - desktop primary nav above 1180px;
 *   - native <details>/<summary> hamburger at <=1180px (no JS required to open);
 *   - shop 3 columns desktop / 2 tablet / 1 mobile;
 *   - property nav genuinely sticky on mobile, tablet, and desktop;
 *   - property logo stays fixed while only property links may scroll horizontally;
 *   - Luckiest Guy display type + Poppins UI/body;
 *   - body/page-shell never become vertical scroll containers that break sticky;
 *   - touch controls and form inputs remain mobile-safe.
 */

:root {
  --e070-display: "Luckiest Guy", "Bangers", Impact, sans-serif;
  --e070-paper: #f1f5f5;
  --e070-ink: #111111;
  --e070-purple: #7631a0;
  --e070-yellow: #e9c116;
  --e070-touch: 44px;
}

/* ============================================================
   SCROLL / OVERFLOW SANITY
   ============================================================ */
html {
  max-width: 100%;
  overflow-x: clip;
}

body.eotls-070,
body.eotls-070 .page-shell,
body.eotls-070 main {
  max-width: 100%;
  overflow: visible !important;
}

body.eotls-070 img,
body.eotls-070 video,
body.eotls-070 iframe,
body.eotls-070 svg {
  max-width: 100%;
}

/* ============================================================
   DISPLAY TYPOGRAPHY
   ============================================================ */
body.eotls-070 :is(
  h1,
  h2,
  h3,
  .project-title,
  .story-title,
  .release-title,
  .card-title,
  .footer-brand,
  .e062-feature-strip strong,
  .e062-tier-grid .tier-body h3,
  .e062-shop-grid-section .product-card h3
) {
  font-family: var(--e070-display) !important;
  font-weight: 400 !important;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  letter-spacing: .028em !important;
  line-height: 1.03 !important;
}

body.eotls-070 h1 { letter-spacing: .035em !important; }
body.eotls-070 h2 { letter-spacing: .032em !important; }

/* ============================================================
   FOOTER HOME WORDMARK
   ============================================================ */
body.eotls-070 .e067-footer-home {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: min(330px, 76vw);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

body.eotls-070 .e067-footer-home img {
  display: block;
  width: 100%;
  height: auto;
  filter: none !important;
  opacity: 1 !important;
}

body.eotls-070 .e067-footer-home:focus-visible {
  outline: 3px solid var(--e070-yellow);
  outline-offset: 6px;
}

/* ============================================================
   PRIMARY NAV — DESKTOP + NATIVE COMPACT DISCLOSURE
   ============================================================ */
body.eotls-070 .e062-header {
  position: relative !important;
  top: auto !important;
  z-index: 1200 !important;
  overflow: visible !important;
}

body.eotls-070 .e070-mobile-nav {
  display: none;
}

body.eotls-070 .e070-desktop-nav {
  display: flex !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  min-height: 48px !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

@media (max-width: 1180px) {
  body.eotls-070 .e062-utility {
    grid-template-columns: 1fr auto !important;
    min-height: 34px !important;
    gap: .75rem !important;
  }

  body.eotls-070 .e062-utility > span { display: none !important; }
  body.eotls-070 .e062-utility > div { gap: .8rem !important; white-space: nowrap; }

  body.eotls-070 .e062-mast {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 72px !important;
    height: auto !important;
    padding-top: .45rem !important;
    padding-bottom: .45rem !important;
  }

  body.eotls-070 .e062-brand {
    width: clamp(145px, 34vw, 210px) !important;
    height: 58px !important;
  }

  body.eotls-070 .e070-desktop-nav {
    display: none !important;
  }

  body.eotls-070 .e070-mobile-nav {
    position: static;
    display: block;
    flex: 0 0 50px;
    width: 50px;
    margin: 0;
    padding: 0;
  }

  body.eotls-070 .e070-mobile-nav > summary {
    display: grid;
    place-content: center;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid rgba(255,255,255,.52);
    background: #000;
    color: var(--e070-paper);
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  body.eotls-070 .e070-mobile-nav > summary::-webkit-details-marker { display: none; }
  body.eotls-070 .e070-mobile-nav > summary::marker { content: ""; }

  body.eotls-070 .e070-mobile-nav > summary span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 3px auto;
    background: var(--e070-paper);
  }

  /* Keep the familiar three-line hamburger instead of morphing it into an X. */
  body.eotls-070 .e070-mobile-nav[open] > summary {
    border-color: var(--e070-yellow);
    background: #111;
  }

  body.eotls-070 .e070-mobile-nav > summary:focus-visible {
    outline: 3px solid var(--e070-yellow);
    outline-offset: 3px;
  }

  body.eotls-070 .e070-mobile-nav-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1300;
    display: none;
    width: 100%;
    max-height: min(70svh, 620px);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid rgba(255,255,255,.16);
    background: #000;
    box-shadow: 0 18px 36px rgba(0,0,0,.42);
    -webkit-overflow-scrolling: touch;
  }

  body.eotls-070 .e070-mobile-nav[open] .e070-mobile-nav-panel {
    display: block;
  }

  body.eotls-070 .e070-mobile-nav-panel .nav-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: .3rem 0 .6rem !important;
    gap: 0 !important;
  }

  body.eotls-070 .e070-mobile-nav-panel .nav-links a {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 56px !important;
    padding: .95rem var(--e062-pad) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 0 !important;
    background: #000 !important;
    color: var(--e070-paper) !important;
    box-shadow: none !important;
    transform: none !important;
    font-family: "Poppins", Arial, sans-serif !important;
    font-size: .82rem !important;
    font-weight: 800 !important;
    letter-spacing: .09em !important;
    line-height: 1.2 !important;
    text-transform: uppercase;
  }

  body.eotls-070 .e070-mobile-nav-panel .nav-links a:hover,
  body.eotls-070 .e070-mobile-nav-panel .nav-links a:focus-visible,
  body.eotls-070 .e070-mobile-nav-panel .nav-links a.is-active {
    background: #171717 !important;
    color: #fff !important;
  }

  body.eotls-070 :is(.e062-btn, .btn, button:not(.product__img-button):not(.admin-sigil), input[type="submit"], input[type="button"]) {
    min-height: var(--e070-touch);
  }

  body.eotls-070 :is(input, select, textarea) {
    font-size: 16px !important;
  }
}

@media (max-width: 680px) {
  body.eotls-070 { --e062-pad: 1rem; }
  body.eotls-070 .e062-utility { padding-left: 1rem !important; padding-right: 1rem !important; font-size: .6rem; }
  body.eotls-070 .e062-utility > a:first-child { display: none; }
  body.eotls-070 .e062-mast { padding-left: 1rem !important; padding-right: 1rem !important; }
  body.eotls-070 .e062-brand { width: min(56vw, 185px) !important; height: 54px !important; }
}

/* ============================================================
   PROPERTY NAV — ONE CONSISTENT STICKY IMPLEMENTATION
   ============================================================ */
body.eotls-070 .e062-property-nav.e063-property-sticky {
  position: sticky !important;
  top: 0 !important;
  z-index: 1100 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 58px !important;
  padding: 0 var(--e062-pad) !important;
  overflow: visible !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.18) !important;
  background: rgba(241,245,245,.985) !important;
  color: var(--e070-ink) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.eotls-070 .e063-property-mark {
  flex: 0 0 48px;
  align-self: center;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: .35rem;
  padding: 3px;
}

body.eotls-070 .e063-property-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none !important;
}

body.eotls-070 .e063-property-links {
  flex: 1 1 auto;
  display: flex !important;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
  overflow: visible;
}

body.eotls-070 .e063-property-spacer {
  flex: 0 0 48px;
}

body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 1.05rem;
  color: #202020 !important;
  font-family: "Poppins", Arial, sans-serif !important;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 1 !important;
}

body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--e070-purple);
  transform: translateX(-50%);
  transition: width 150ms ease;
}

body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a:hover,
body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a.is-section-active {
  color: #000 !important;
}

body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a:hover::after,
body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a.is-section-active::after {
  width: calc(100% - 1.5rem);
}

body.eotls-070 .e062-property [id],
body.eotls-070.e062-property [id] {
  scroll-margin-top: 78px;
}

@media (max-width: 1180px) {
  body.eotls-070 .e062-property-nav.e063-property-sticky {
    padding-right: .35rem !important;
    padding-left: .35rem !important;
  }

  body.eotls-070 .e063-property-mark {
    flex-basis: 46px;
    width: 40px;
    height: 40px;
    margin-right: .15rem;
  }

  body.eotls-070 .e063-property-spacer { display: none; }

  body.eotls-070 .e063-property-links {
    justify-content: flex-start;
    max-width: calc(100vw - 54px);
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.eotls-070 .e063-property-links::-webkit-scrollbar { display: none; }

  body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a {
    min-height: 56px;
    padding: 0 .78rem;
    font-size: .62rem;
    letter-spacing: .07em;
  }
}

@media (max-width: 480px) {
  body.eotls-070 .e062-property-nav.e063-property-sticky .e063-property-links > a {
    padding: 0 .62rem;
    font-size: .59rem;
  }
}

/* ============================================================
   SHOP GRID — AUTHORITATIVE 3 / 2 / 1
   ============================================================ */
body.eotls-070 .e062-shop-grid-section .product-grid,
body.eotls-070 .e062-shop-grid-section .e062-product-grid,
body.eotls-070 [data-merch-grid].product-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 1.8vw, 1.5rem) !important;
  align-items: stretch;
}

body.eotls-070 .e062-shop-grid-section .product-card,
body.eotls-070 [data-merch-grid] .product-card {
  grid-column: auto !important;
  min-width: 0 !important;
  width: auto !important;
  height: 100%;
}

body.eotls-070 .e062-shop-grid-section .product-card :is(img, video),
body.eotls-070 [data-merch-grid] .product-card :is(img, video) {
  width: 100%;
  height: auto;
}

@media (min-width: 681px) and (max-width: 1180px) {
  body.eotls-070 .e062-shop-grid-section .product-grid,
  body.eotls-070 .e062-shop-grid-section .e062-product-grid,
  body.eotls-070 [data-merch-grid].product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body.eotls-070 .e062-shop-grid-section .product-grid,
  body.eotls-070 .e062-shop-grid-section .e062-product-grid,
  body.eotls-070 [data-merch-grid].product-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem !important;
  }

  body.eotls-070 .e062-shop-grid-section { padding-left: 1rem !important; padding-right: 1rem !important; }
  body.eotls-070 .e062-shop-grid-section .merch-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: .5rem;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.eotls-070 .e062-shop-grid-section .merch-filters button { flex: 0 0 auto; min-height: 42px; white-space: nowrap; }
}

/* ============================================================
   RESPONSIVE PUBLISHER MODULE POLISH
   ============================================================ */
@media (max-width: 1180px) {
  body.eotls-070 :is(
    .e062-feature-strip,
    .e062-news-grid,
    .e062-news-page,
    .e062-cover-rail,
    .e062-world-grid,
    .e062-shop-tease,
    .e062-gallery-grid,
    .e062-tier-grid,
    .e062-character-grid,
    .e062-editorial-columns,
    .e062-video-rail
  ) { max-width: 100%; }
}

@media (max-width: 680px) {
  body.eotls-070 .e062-home-hero,
  body.eotls-070 .e062-property-hero { min-height: min(760px, 82svh); }

  body.eotls-070 .e062-home-hero-copy,
  body.eotls-070 .e062-property-hero-copy { padding-left: 1rem !important; padding-right: 1rem !important; }

  body.eotls-070 .e062-actions { align-items: stretch; flex-direction: column; width: 100%; }
  body.eotls-070 .e062-actions .e062-btn { width: 100%; }
  body.eotls-070 .e062-heading-row { gap: 1rem; }
  body.eotls-070 .e062-shop-hero { min-height: auto !important; padding-left: 1rem !important; padding-right: 1rem !important; }
  body.eotls-070 .e062-shop-hero figure { width: min(88vw, 420px); }

  body.eotls-070 :is(
    .e062-tier-grid,
    .e062-gallery-grid,
    .e062-news-grid,
    .e062-news-page,
    .e062-video-rail,
    .e062-art-strip,
    .e062-editorial-columns,
    .e062-character-grid,
    .e062-footer-top,
    .e062-footer-bottom
  ) { min-width: 0; }

  body.eotls-070 .e062-footer-nav,
  body.eotls-070 .e062-footer-bottom > div { width: 100%; gap: .65rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  body.eotls-070 *,
  body.eotls-070 *::before,
  body.eotls-070 *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
