/* EIM 브랜드 사이트 공통 스타일
   - 레이아웃 시안(캔버스)의 스타일을 그대로 옮기고, 모바일 대응과 메뉴·모션만 더했습니다.
   - 색: 플럼 #4E2A4F · 딥 플럼 #2E1A33 · 라벤더 그레이 #F6F3F8 · 잉크 #1F1B24 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #FFFFFF; color: #1F1B24; font-family: 'Noto Sans KR', sans-serif; word-break: keep-all; overflow-wrap: break-word; }
img, video { max-width: 100%; }
a { color: #4E2A4F; }
a:hover { color: #2E1A33; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #4E2A4F; outline-offset: 3px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; box-sizing: border-box; }
.display { font-family: 'Cinzel', serif; letter-spacing: 0.08em; }
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.navlink { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 0.14em; color: #1F1B24; text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 28px; background: #4E2A4F; color: #FFFFFF; text-decoration: none; font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 0.16em; border-radius: 2px; border: 0; cursor: pointer; text-align: center; }
.btn:hover { color: #FFFFFF; background: #2E1A33; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 28px; border: 1px solid #4E2A4F; color: #4E2A4F; text-decoration: none; font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 0.16em; border-radius: 2px; }
.btn-line:hover { background: #F6F3F8; }
.rule { height: 1px; background: #DDD6E3; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: #4E2A4F; color: #FFFFFF; padding: 10px 16px; text-decoration: none; }
.skip-link:focus { top: 12px; color: #FFFFFF; }

/* ---------- 헤더 ---------- */
.site-header { border-bottom: 1px solid #ECE6F0; background: #FFFFFF; position: relative; z-index: 20; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.logo img { height: 26px; width: auto; display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 28px; }
.site-nav a[aria-current="page"] { color: #4E2A4F; text-decoration: underline; text-underline-offset: 4px; }
.site-nav a:hover { color: #4E2A4F; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px 0 8px; background: none; border: 0; cursor: pointer; font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 0.14em; color: #1F1B24; }
.menu-toggle .bars { position: relative; width: 20px; height: 12px; display: inline-block; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 1.5px; background: currentColor; transition: transform 0.25s ease, top 0.25s ease; }
.menu-toggle .bars::before { top: 1px; }
.menu-toggle .bars::after { top: 9px; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 5px; transform: rotate(-45deg); }

/* 다크 헤더 (DERMAPHORIX 페이지) */
.site-header.is-dark { background: #2E1A33; border-bottom-color: #3F2A47; }
.site-header.is-dark .navlink, .site-header.is-dark .menu-toggle { color: #F4EEF7; }
.site-header.is-dark .site-nav a[aria-current="page"] { color: #FFFFFF; }
.site-header.is-dark .btn { background: #F4EEF7; color: #2E1A33; }
.site-header.is-dark .btn:hover { background: #FFFFFF; }

/* ---------- 푸터 ---------- */
.site-footer { background: #2E1A33; color: #E9DFF0; padding: 80px 0 48px; margin-top: auto; }
.site-footer a { color: #E9DFF0; }
.site-footer a:hover { color: #FFFFFF; }

/* STEP 01 같은 짧은 라벨은 줄바꿈하지 않음 */
[style*="align-items: baseline"] > .mono { white-space: nowrap; flex-shrink: 0; }

/* ---------- 메인 영상 ---------- */
.video-toggle { position: absolute; top: 20px; right: 20px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(78,42,79,0.28); background: rgba(250,248,245,0.7); color: #4E2A4F; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.video-toggle:hover { background: rgba(250,248,245,0.95); }
.video-toggle svg { width: 14px; height: 14px; display: block; }
.video-toggle .i-play { display: none; }
.video-toggle[aria-pressed="true"] .i-play { display: block; }
.video-toggle[aria-pressed="true"] .i-pause { display: none; }

/* ---------- 인스타그램 (No.06 Journal) ---------- */
.ig-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ig-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: #F1ECF5; color: #A99BB8; }
.ig-tile svg { width: 28px; height: 28px; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.ig-tile:hover img, .ig-tile:focus-visible img { transform: scale(1.03); }

/* ---------- INGREDIENTS 필터·카드 ---------- */
.tab { min-height: 44px; padding: 0 24px; border: 1px solid #4E2A4F; background: #FFFFFF; color: #4E2A4F; font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 0.14em; cursor: pointer; border-radius: 2px; }
.tab[aria-pressed="true"] { background: #4E2A4F; color: #FFFFFF; }
.card { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 12px; text-align: left; transition: opacity 0.35s ease; }
.card:focus-visible { outline: 2px solid #4E2A4F; outline-offset: 4px; }
.card img { transition: box-shadow 0.3s ease; }
.card[aria-pressed="true"] img { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3px #4E2A4F; }
.card.is-dim { opacity: 0.25; }

/* ---------- 벤 다이어그램 (모바일용 목록은 작은 화면에서만) ---------- */
.venn-list { display: none; }

/* ---------- 제품 상세: 모바일 하단 고정 SHOP ---------- */
.mobile-shop-bar { display: none; }

/* ---------- 모션 (움직임 줄이기 설정을 켠 사람에게는 꺼짐) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .manifesto p { opacity: 0.22; transition: opacity 0.9s ease; }
  .js .manifesto p.is-lit { opacity: 1; }
  .js .venn .venn-a { transform: translateX(-14%); transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .venn .venn-b { transform: translateX(14%); transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .venn .venn-lens { transform: translateX(-28%); transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .venn .venn-label { opacity: 0; transition: opacity 0.8s ease 0.9s; }
  .js .venn.is-in .venn-a, .js .venn.is-in .venn-b, .js .venn.is-in .venn-lens { transform: none; }
  .js .venn.is-in .venn-label { opacity: 1; }
}

/* ================= 반응형 =================
   시안은 1440px 기준이라 인라인 스타일이 많아, 작은 화면에서는 !important 로 덮어씁니다. */

@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; order: 3; width: 100%; flex-direction: column; gap: 0; padding: 8px 0 20px; }
  .site-nav.is-open { display: flex; }
  .site-nav .navlink { display: block; padding: 14px 0; border-top: 1px solid #ECE6F0; font-size: 14px; }
  .site-header.is-dark .site-nav .navlink { border-top-color: #3F2A47; }

  /* DERMAPHORIX 02 — 리포좀 그림을 위로, 성분 목록은 그 아래 두 줄로 */
  .lipo-row { gap: 40px 32px !important; }
  .lipo-img { order: -1; flex: 0 1 100% !important; max-width: 440px; }
  .lipo-list { flex: 1 1 280px !important; max-width: 420px !important; gap: 28px !important; }
  .lipo-left .lipo-item { flex-direction: row-reverse; justify-content: flex-end; }
  .lipo-left .lipo-item > div { flex: 0 1 auto !important; align-items: flex-start !important; text-align: left !important; }
}

@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  h1.display { font-size: 52px !important; }
  [style*="gap: 64px"] { gap: 48px !important; }
}

@media (max-width: 768px) {
  .g3 { grid-template-columns: minmax(0, 1fr) !important; }
  section[style*="padding: 140px 0"], section[style*="padding: 120px 0"], section[style*="padding: 100px 0"] { padding-top: 88px !important; padding-bottom: 88px !important; }
  section[style*="padding: 0 0 140px"], section[style*="padding: 0 0 120px"] { padding-bottom: 88px !important; }
  section[style*="padding: 96px 0 140px"] { padding-top: 64px !important; padding-bottom: 88px !important; }
  section[style*="padding: 120px 0 80px"] { padding-top: 72px !important; padding-bottom: 48px !important; }
  section[style*="padding: 64px 0 120px"] { padding-top: 24px !important; padding-bottom: 88px !important; }
  section[style*="min-height: 760px"], section[style*="min-height: 720px"], section[style*="min-height: 640px"], section[style*="min-height: 620px"] { min-height: 600px !important; }
  .mobile-shop-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,0.96); border-top: 1px solid #ECE6F0; }
  .mobile-shop-bar .btn { width: 100%; }
  body.has-shop-bar { padding-bottom: 72px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .header-inner { min-height: 64px; gap: 12px; }
  .logo img { height: 22px; }
  .site-header .btn { min-height: 40px; padding: 0 18px; }
  .g2 { grid-template-columns: minmax(0, 1fr) !important; }
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  h1.display { font-size: clamp(28px, 8.6vw, 40px) !important; }
  .card .display { font-size: 14px !important; }
  h2.display { font-size: 26px !important; }
  p.display[style*="font-size: 24px"], p.display[style*="font-size: 26px"], p.display[style*="font-size: 28px"] { font-size: 20px !important; }
  p[style*="font-size: 22px"] { font-size: 18px !important; }
  p[style*="font-size: 20px"] { font-size: 17px !important; }
  .big-number { font-size: 72px !important; }
  .big-number .unit { font-size: 26px !important; }
  .mid-number { font-size: 44px !important; }
  [style*="gap: 64px"] { gap: 40px !important; }
  [style*="padding: 40px 32px"], [style*="padding: 40px;"] { padding: 28px 22px !important; }
  [style*="padding: 28px 32px"] { padding: 24px 20px !important; }
  .site-footer { padding: 64px 0 40px; }
  .video-toggle { top: 14px; right: 14px; }

  /* 벤 다이어그램: 원 안 글씨는 제목만 남기고, 내용은 아래 목록으로 */
  .venn .venn-label > :not(.display) { display: none !important; }
  .venn .venn-center { display: none !important; }
  .venn-list { display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 480px; border-top: 1px solid #DDD6E3; }
  .venn-list > div { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; border-bottom: 1px solid #DDD6E3; }
  .venn-list .both { background: #4E2A4F; color: #FFFFFF; padding: 18px 20px; border-bottom: 0; }
  .venn-list .both .mono { color: #D9C8E0; }
  .venn-list span { font-size: 15px; line-height: 1.7; color: inherit; }

  .lipo-list { flex-basis: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
