/* =========================================================================
   mobile.css — d'compose 480px optimisation layer
   Loaded AFTER styles.css. Inline-style grids are flattened via !important.

   Breakpoints
     ≤ 720px — mobile layout: hamburger nav, single-column grids, tight type
     ≤ 480px — fine tuning for true phones
   ========================================================================= */

/* Hidden by default; only revealed inside the mobile media query */
.nav-burger { display: none; }
.mobile-menu { display: none; }

/* =========================================================================
   ≤ 720px — primary mobile breakpoint
   ========================================================================= */
@media (max-width: 720px) {

  /* ============ NAV — hide desktop menu, show hamburger ============ */
  .nav {
    grid-template-columns: 1fr auto !important;
    padding: 14px 20px !important;
  }
  body[data-scrolled="true"] .nav {
    padding: 12px 20px !important;
  }
  .nav-menu,
  .nav-right { display: none !important; }
  .brand-mark { font-size: 17px; }

  .nav-burger {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    width: 32px; height: 32px;
    background: none; border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    justify-self: end;
  }
  .nav-burger span {
    display: block;
    width: 22px; height: 1px;
    background: currentColor;
    transition: width 200ms var(--ease);
  }
  .nav-burger span:nth-child(2) { width: 16px; }
  .nav-burger:hover span:nth-child(2) { width: 22px; }

  /* ============ MOBILE MENU — full-screen drawer ============ */
  .mobile-menu {
    display: flex !important;
    flex-direction: column;
    position: fixed; inset: 0;
    z-index: 200;
    background: var(--carbon-black);
    color: var(--paper);
    padding: 18px 24px 32px;
    overflow-y: auto;
    animation: mm-fade-in 320ms var(--ease);
  }
  @keyframes mm-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .mobile-menu .mm-top {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 8px;
  }
  .mobile-menu .mm-top .brand-mark { font-size: 18px; }
  .mobile-menu .mm-close {
    background: none; border: 0; color: inherit;
    font-family: var(--font-latin); font-weight: 200;
    font-size: 34px; line-height: 1;
    padding: 4px 10px;
    cursor: pointer;
  }
  .mobile-menu .mm-nav {
    display: flex; flex-direction: column;
    margin-top: 72px;
  }
  .mobile-menu .mm-nav button,
  .mobile-menu .mm-nav a {
    font-family: var(--font-latin);
    font-stretch: 75%;
    font-weight: 300;
    font-size: clamp(44px, 14vw, 64px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-transform: lowercase;
    color: inherit;
    background: none; border: 0;
    padding: 18px 0;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.55;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: opacity 200ms var(--ease);
  }
  .mobile-menu .mm-nav .active,
  .mobile-menu .mm-nav button:hover,
  .mobile-menu .mm-nav a:hover { opacity: 1; }
  .mobile-menu .mm-nav .mm-num {
    font-size: 10px;
    letter-spacing: 0.32em;
    opacity: 0.4;
    transform: translateY(-1.4em);
    flex-shrink: 0;
    font-weight: 400;
  }
  .mobile-menu .mm-foot {
    margin-top: auto;
    padding-top: 56px;
    display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    font-family: var(--font-latin);
    font-stretch: 75%; font-size: 10px;
    letter-spacing: 0.28em; text-transform: uppercase;
    opacity: 0.45;
  }

  /* ============ SECTIONS — tighter padding, no min-height ============ */
  .section { padding: 80px 20px !important; }
  .section.deep { padding: 96px 20px !important; }
  .section.full { min-height: auto; }

  /* Hanging label — collapse from vertical to a horizontal eyebrow */
  .hanging-label {
    position: relative !important;
    top: auto !important; left: auto !important;
    writing-mode: horizontal-tb !important;
    display: block;
    margin-bottom: 32px;
    letter-spacing: 0.28em !important;
    font-size: 10px;
  }
  .hanging-label .dot {
    display: inline-block !important;
    height: auto !important;
    width: 14px;
  }

  /* ============ DISPLAY TYPE — narrower scales ============ */
  .display-en {
    font-size: clamp(48px, 16vw, 96px) !important;
    letter-spacing: -0.02em !important;
  }
  .display-en.giant {
    font-size: clamp(64px, 19vw, 110px) !important;
  }
  .display-kr {
    font-size: clamp(22px, 6.6vw, 30px) !important;
    line-height: 1.35 !important;
  }
  .display-kr.small {
    font-size: clamp(17px, 4.6vw, 21px) !important;
    line-height: 1.55 !important;
  }
  .kicker-kr { font-size: 14px !important; line-height: 1.7 !important; }
  .eyebrow { font-size: 10px !important; letter-spacing: 0.24em !important; }
  .roman { margin-bottom: 20px; }
  .foot-display { font-size: clamp(48px, 16vw, 72px) !important; }

  /* Poem indents collapse hard on narrow viewports */
  .poem .ln.i2 { padding-left: 0.6em !important; }
  .poem .ln.i3 { padding-left: 1.4em !important; }

  /* ============ FLATTEN INLINE GRIDS ============
     Targets every multi-column inline `grid-template-columns` declaration
     the page uses, while leaving narrow tracker grids (e.g. "24px 1fr 1fr")
     untouched. Inline styles need !important to lose. */
  [style*="1fr 1fr"],
  [style*="1.1fr 1fr"],
  [style*="1.1fr  1fr"],
  [style*="1fr 1.1fr"],
  [style*="1fr 1.4fr"],
  [style*="1.4fr"],
  [style*="2fr 1fr"],
  [style*="repeat(3"],
  [style*="repeat(5"],
  [style*="repeat(auto-fit"],
  [style*="1fr auto"] {
    grid-template-columns: 1fr !important;
    align-items: flex-start !important;
  }

  /* Right-borders (column dividers) become no-borders on stacked layout */
  [style*="border-right"][style*="1px"] {
    border-right: none !important;
  }

  /* ============ HOME — HERO ============ */
  /* The photo has a baked-in "Step into the Spotlight" slogan in the
     bottom-right corner. On a narrow portrait viewport `object-fit: cover`
     crops the sides — push the focal point to the showerhead so the
     slogan gets cropped off the right edge instead of fighting the CTAs. */
  .hero-frame .hero-photo {
    object-position: 32% center !important;
  }
  /* Strengthen the bottom veil so any residual text behind the buttons
     reads as shadow, not type. */
  .hero-frame .hero-veil {
    background:
      linear-gradient(180deg,
        rgba(8,8,10,0.55) 0%,
        rgba(8,8,10,0.30) 40%,
        rgba(8,8,10,0.55) 75%,
        rgba(8,8,10,0.85) 100%) !important;
  }
  .hero-frame .hero-stage {
    padding: 96px 22px 56px !important;
    min-height: 86vh !important;
  }
  /* The hero poem is constrained to "min(720px, 60%)" inline — break that */
  .hero-frame .hero-stage > div[style*="60%"],
  .hero-frame .hero-stage > div[style*="min(720px"] {
    max-width: 100% !important;
  }
  .hero-frame .display-en.giant {
    font-size: clamp(56px, 18vw, 92px) !important;
  }
  .hero-frame .display-kr {
    font-size: clamp(18px, 5.4vw, 24px) !important;
    margin-top: 18px !important;
  }
  .hero-scroll { display: none !important; }
  .hero-frame .btn { padding: 14px 20px; font-size: 11px; }

  /* ============ HOME — OPENING ============ */
  [data-screen-label*="02 opening"] .section-inner {
    padding-left: 0 !important;
    gap: 40px !important;
  }
  [data-screen-label*="02 opening"] .display-en {
    font-size: clamp(48px, 15vw, 88px) !important;
  }

  /* ============ HOME — PRODUCT (③) ============ */
  [data-screen-label*="03 product"] .section-inner { gap: 56px !important; }
  [data-screen-label*="03 product"] .product-stage img {
    max-width: 78% !important;
  }
  [data-screen-label*="03 product"] .display-en {
    font-size: clamp(44px, 13vw, 72px) !important;
  }

  /* ============ HOME — PHILOSOPHY ============ */
  .philosophy-frame .section-inner {
    min-height: auto !important;
    padding: 96px 22px !important;
    gap: 56px;
  }
  .philosophy-frame .display-kr {
    font-size: clamp(24px, 7vw, 36px) !important;
    line-height: 1.4 !important;
  }

  /* ============ HOME — COMING SOON (④) ============ */
  [data-screen-label*="coming-soon"] .section-inner > div:nth-of-type(2) {
    /* the 3-col grid */
    border-top: none !important;
  }
  [data-screen-label*="coming-soon"] .coming-stage {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }
  [data-screen-label*="coming-soon"] .display-en {
    font-size: clamp(44px, 14vw, 80px) !important;
  }

  /* ============ PRODUCT — HERO ============ */
  [data-screen-label*="product / 01 hero"] .section-inner {
    padding: 88px 20px 64px !important;
    gap: 48px !important;
  }
  [data-screen-label*="product / 01 hero"] img[alt*="bottle"],
  [data-screen-label*="product / 01 hero"] img[src*="bottle"] {
    max-width: 280px !important;
  }
  [data-screen-label*="product / 01 hero"] .display-en {
    font-size: clamp(48px, 15vw, 88px) !important;
  }

  /* ============ PRODUCT — PROMISE (②) ============ */
  [data-screen-label*="02 promise"] .display-kr {
    font-size: clamp(22px, 6.4vw, 30px) !important;
    line-height: 1.45 !important;
  }

  /* ============ PRODUCT — WHY (③) ============ */
  [data-screen-label*="03 why"] .display-en {
    font-size: clamp(56px, 17vw, 96px) !important;
  }

  /* ============ PRODUCT — 3 STEPS (④) ============ */
  [data-screen-label*="04 steps"] .display-en {
    font-size: clamp(36px, 11vw, 60px) !important;
  }

  /* ============ PRODUCT — INSIDE accordion (⑤) ============ */
  [data-screen-label*="05 inside"] h3.display-kr {
    font-size: clamp(18px, 4.8vw, 22px) !important;
  }
  [data-screen-label*="05 inside"] .display-en {
    font-size: clamp(48px, 15vw, 80px) !important;
  }

  /* ============ PRODUCT — VOICES (⑥') ============ */
  [data-screen-label*="06b voices"] .display-en {
    font-size: clamp(72px, 24vw, 132px) !important;
  }

  /* ============ PRODUCT — CARE (⑦) ============ */
  [data-screen-label*="07 care"] .display-en {
    font-size: clamp(34px, 10vw, 64px) !important;
  }
  [data-screen-label*="07 care"] .section-inner > div:nth-of-type(2) {
    /* the 3-col grid */
    padding-top: 32px !important;
  }

  /* ============ PRODUCT — FAQ (⑥) ============ */
  [data-screen-label*="06 faq"] .display-en {
    font-size: clamp(40px, 13vw, 72px) !important;
  }

  /* ============ LINEUP — NEXT (②) ============ */
  [data-screen-label*="02 next"] .lineup-photo {
    max-width: 320px !important;
    margin: 0 auto;
  }
  [data-screen-label*="02 next"] .display-en {
    font-size: clamp(40px, 13vw, 72px) !important;
  }

  /* ============ LINEUP — HORIZON (③) ============ */
  [data-screen-label*="03 horizon"] .display-en {
    font-size: clamp(56px, 17vw, 96px) !important;
  }

  /* ============ LINEUP — STAY CONNECTED (④) ============ */
  [data-screen-label*="04 connect"] .section-inner > div:nth-of-type(2) > a {
    min-height: auto !important;
    padding: 36px 28px !important;
    gap: 18px !important;
  }
  [data-screen-label*="04 connect"] .display-kr {
    font-size: clamp(24px, 7vw, 36px) !important;
  }

  /* ============ LINEUP — SYSTEM (⑤): 5-col card row ============ */
  [data-screen-label*="05 system"] .section-inner > div:last-of-type {
    /* the 5-col grid: each child becomes a stacked row with bottom rule */
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  [data-screen-label*="05 system"] .section-inner > div:last-of-type > div {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 36px 20px !important;
  }
  [data-screen-label*="05 system"] .section-inner > div:last-of-type > div:last-child {
    border-bottom: none !important;
  }
  [data-screen-label*="05 system"] .display-en {
    font-size: clamp(48px, 14vw, 80px) !important;
  }

  /* ============ FOOTER ============ */
  .foot { padding: 72px 22px 28px !important; }
  .foot-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }
  .foot-base {
    flex-direction: column !important;
    align-items: flex-start;
    gap: 12px !important;
    font-size: 9px !important;
    letter-spacing: 0.24em !important;
  }

  /* ============ BUTTONS ============ */
  .btn { padding: 14px 22px; font-size: 11px; letter-spacing: 0.18em; }
  .btn.large { padding: 18px 28px; font-size: 12px; }

  /* ============ TWEAKS PANEL — keep inside viewport ============ */
  .tweaks-panel {
    width: calc(100vw - 32px) !important;
    max-width: 360px !important;
    right: 16px !important;
    bottom: 16px !important;
  }
}

/* =========================================================================
   ≤ 480px — true phone fine tuning
   ========================================================================= */
@media (max-width: 480px) {
  .section { padding: 64px 18px !important; }
  .section.deep { padding: 80px 18px !important; }
  .foot { padding: 64px 18px 24px !important; }

  .display-en { font-size: clamp(44px, 14vw, 78px) !important; }
  .display-en.giant { font-size: clamp(54px, 17vw, 92px) !important; }

  /* Final CTA — slimmer block */
  [data-screen-label*="08 final-cta"] .section-inner {
    padding: 88px 18px !important;
    gap: 40px !important;
  }
  [data-screen-label*="08 final-cta"] .display-kr {
    font-size: clamp(22px, 7vw, 32px) !important;
  }
}
