/* ==============================================
   리벨서스 가이드 — style.css
   라이트 사이드바 + 딥 와인 히어로, 웜 뉴트럴 톤 (Pretendard)
   ============================================== */

/* 1. Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: #221c1e;
  background: #fff;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; }

/* 2. Tokens */
:root {
  --primary:       #8a2f3c;
  --primary-light: #f7ecee;
  --primary-hover: #75242f;
  --primary-dark:  #5c1d27;
  --accent:        #a5772a;
  --ink:           #292123;
  --bg:            #ffffff;
  --bg-alt:        #f7f5f1;
  --side-bg:       #faf8f5;
  --text:          #221c1e;
  --text-sub:      #756c66;
  --border:        #e8e2d9;
  --radius:        10px;
  --radius-lg:     14px;
  --max-w:         1060px;
  --sec-pad:       80px;
  --hdr:           64px;
  --util-h:        34px;
  --sidebar-w:     256px;
}

/* 3. Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* 4. Section typography */
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 12px; }
.section-title { font-size: clamp(23px, 3vw, 31px); font-weight: 800; line-height: 1.38; letter-spacing: -0.02em; color: var(--text); margin-bottom: 10px; }
.accent { color: var(--primary); }

/* 5. Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; padding: 13px 26px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; letter-spacing: -0.01em; white-space: nowrap; line-height: 1; }
.btn-lg { font-size: 15px; padding: 15px 32px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-alt); }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { background: #f3ece6; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: #fff; }
/* 와인 배경(히어로) 위 버튼 */
.hero .btn-primary { background: #fff; color: var(--primary-dark); }
.hero .btn-primary:hover { background: #f3ece6; }
.hero .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* 6. Header — 좌측 라이트 사이드바 (데스크톱) */
.site-header {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 220;
  width: var(--sidebar-w); height: auto; background: var(--side-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.hdr-inner {
  max-width: none; margin: 0; padding: 34px 22px 26px; height: 100%;
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
}
.hdr-logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; text-decoration: none; margin-bottom: 40px; padding: 0 10px; }
.hdr-logo img { height: 26px; width: auto; }
.hdr-logo .logo-text { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1.3; }
.hdr-nav { display: flex; flex-direction: column; align-items: stretch; gap: 3px; flex: 1; }
.hdr-nav a { font-size: 14px; font-weight: 600; color: var(--text-sub); transition: background .15s, color .15s; white-space: nowrap; padding: 11px 14px; border-radius: 9px; }
.hdr-nav a:hover { color: var(--text); background: #f0ece5; }
.hdr-nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 700; }
.hdr-cta { margin-left: 0; margin-top: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; color: #fff; background: var(--primary); padding: 13px 16px; border-radius: var(--radius); transition: background .15s; white-space: nowrap; }
.hdr-cta:hover { background: var(--primary-hover); }
.nav-toggle { display: none; margin-left: auto; background: none; border: none; padding: 6px; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }

/* 사이드바만큼 본문 오프셋 */
.info-banner, main, .site-footer { margin-left: var(--sidebar-w); }

/* 7. Mobile nav */
.site-nav-mobile { display: none; position: fixed; top: calc(var(--hdr) + var(--util-h)); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); z-index: 199; flex-direction: column; padding: 8px; }
.site-nav-mobile.open { display: flex; }
.site-nav-mobile a { display: flex; align-items: center; gap: 6px; padding: 13px 16px; font-size: 15px; font-weight: 600; color: var(--text); border-radius: 9px; }
.site-nav-mobile a:hover { background: var(--bg-alt); }

/* 8. Info banner — 상단 유틸리티 바 */
.info-banner {
  position: sticky; top: 0; z-index: 210; height: var(--util-h);
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: rgba(255,255,255,.68);
  text-align: center; padding: 0 24px; font-size: 11px; line-height: 1.4;
}

/* 9. Hero — 딥 와인 풀블리드 */
.hero { padding: 76px 0 0; background: var(--primary); color: #fff; }
.hero .container { max-width: var(--max-w); text-align: left; }
.hero-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #fff; background: rgba(255,255,255,.14); padding: 7px 15px; border-radius: 999px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(29px, 4.6vw, 48px); font-weight: 800; line-height: 1.32; letter-spacing: -0.02em; color: #fff; margin-bottom: 20px; }
.hero-sub { font-size: clamp(14px, 1.8vw, 16px); color: rgba(255,255,255,.75); line-height: 1.85; margin-bottom: 36px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* 용량 적정 — 더 짙은 와인 밴드 */
.titration { margin-top: 60px; padding: 38px 0 44px; background: var(--primary-dark); }
.titration .container { max-width: var(--max-w); text-align: left; }
.titration-label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.55); margin-bottom: 24px; letter-spacing: .1em; }
.titration-row { display: flex; align-items: stretch; gap: 0; max-width: 680px; margin: 0; }
.titration-step { flex: 1; text-align: left; padding: 0 28px; }
.titration-step:first-child { padding-left: 0; }
.titration-dose { display: block; width: auto; height: auto; border: none; background: none; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 4px; letter-spacing: -0.02em; }
.titration-period { font-size: 13px; color: rgba(255,255,255,.6); }
.titration-connector { flex: 0 0 auto; width: 1px; height: auto; background: rgba(255,255,255,.22); align-self: stretch; margin-top: 0; }

/* 10. 핵심 정보 — 웜 헤어라인 카드 2×2 */
.cards-section { padding: var(--sec-pad) 0; }
.cards-section .section-title { margin-bottom: 34px; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; counter-reset: infonum; gap: 16px; border: none; }
.info-card { counter-increment: infonum; position: relative; display: block; padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color .15s, background .15s; }
.info-card:hover { border-color: #cdb9a4; background: #fffdfa; }
.info-card::before {
  content: counter(infonum, decimal-leading-zero);
  display: block; font-size: 13px; font-weight: 800; color: var(--accent);
  letter-spacing: .08em; margin-bottom: 14px; font-variant-numeric: tabular-nums;
}
.card-icon { display: none; }
.info-card h3 { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.4; margin-bottom: 8px; letter-spacing: -0.01em; }
.info-card p { font-size: 14px; color: var(--text-sub); line-height: 1.75; margin-bottom: 18px; }
.card-link-row { display: flex; gap: 20px; flex-wrap: wrap; }
.card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--primary); white-space: nowrap; transition: gap .2s; }
.card-link:hover { gap: 7px; }
.card-link svg { width: 13px; height: 13px; stroke: var(--primary); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* 11. Overview table */
.overview-section { background: var(--bg-alt); padding: var(--sec-pad) 0; }
.overview-section .section-title { margin-bottom: 28px; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.overview-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.overview-table th { width: 150px; background: var(--side-bg); font-weight: 700; color: var(--text-sub); padding: 14px 20px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; white-space: nowrap; font-size: 14px; }
.overview-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--text); line-height: 1.7; }
.overview-table tr:last-child th, .overview-table tr:last-child td { border-bottom: none; }

/* 12. 계열 제품 비교 — 헤어라인 카드 3장 */
.mechanism-section { padding: var(--sec-pad) 0; }
.mech-flow { display: flex; align-items: stretch; gap: 16px; margin-top: 38px; border: none; background: none; }
.mech-step { flex: 1; max-width: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; text-align: left; }
.mech-step:last-child { border-right: 1px solid var(--border); }
.mech-step .step-num { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 14px; }
.mech-icon { display: none; }
.mech-step h4 { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px; line-height: 1.4; letter-spacing: -0.01em; }
.mech-step p { font-size: 14px; color: var(--text-sub); line-height: 1.8; }
.mech-arrow { display: none; }
.mech-footnote { margin-top: 28px; text-align: left; font-size: 13px; color: var(--text-sub); }
.mech-footnote strong { color: var(--text); font-weight: 700; }

/* 13. Bottom CTA — 딥 와인 패널 */
.bottom-cta { background: var(--primary-dark); padding: var(--sec-pad) 0; text-align: center; color: #fff; }
.bottom-cta .container.narrow { max-width: 680px; margin: 0 auto; text-align: center; }
.bottom-cta h2 { font-size: clamp(23px, 3.5vw, 34px); font-weight: 800; line-height: 1.4; letter-spacing: -0.02em; margin-bottom: 16px; }
.bottom-cta .sub { font-size: 15px; color: rgba(255,255,255,.72); margin-bottom: 32px; line-height: 1.8; }
.bottom-cta .hero-cta { justify-content: center; }
.bottom-cta .notice { margin-top: 20px; font-size: 12px; color: rgba(255,255,255,.45); }

/* 14. Footer — 다크 웜 톤 */
.site-footer { background: var(--ink); padding: 48px 0; border-top: none; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-brand { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.footer-disclaimer { font-size: 12px; line-height: 1.9; color: rgba(255,255,255,.5); max-width: 700px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.55); }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.32); }

/* 15. Breadcrumb */
.breadcrumb { padding: 14px 0; font-size: 13px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; border-bottom: none; }
.breadcrumb a { color: var(--text-sub); transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); }

/* 16. Page hero (서브페이지) — 딥 와인 */
.page-hero { background: var(--primary); padding: 44px 0 48px; border-bottom: none; }
.page-hero .container { max-width: var(--max-w); }
.page-hero .eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #fff; background: rgba(255,255,255,.14); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(25px, 3.8vw, 38px); font-weight: 800; line-height: 1.35; letter-spacing: -0.02em; color: #fff; margin-bottom: 14px; }
.page-hero .lead { font-size: 15px; color: rgba(255,255,255,.75); line-height: 1.85; max-width: 620px; }

/* 17. Content sections */
.content-sec { padding: 58px 0; }
.content-sec + .content-sec { border-top: 1px solid var(--border); }
.content-sec.bg-alt { background: var(--bg-alt); border-top: none; }
.content-h2 { font-size: clamp(20px, 2.4vw, 25px); font-weight: 800; line-height: 1.4; letter-spacing: -0.02em; color: var(--text); margin-bottom: 20px; }
.content-body { font-size: 15px; color: var(--text-sub); line-height: 1.9; }
.content-body p + p { margin-top: 14px; }
.content-body strong { color: var(--text); font-weight: 700; }

/* 18. Data table */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; margin-top: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table thead th { background: var(--side-bg); color: var(--text-sub); font-weight: 700; padding: 12px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
.data-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); line-height: 1.7; vertical-align: top; }
.data-table tbody tr:nth-child(even) td { background: transparent; }
.data-table tbody tr:last-child td { border-bottom: none; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-right: 4px; white-space: nowrap; }
.tag-warn { background: #f8eed7; color: #8a5e0e; }
.tag-info { background: var(--primary-light); color: var(--primary); }
.tag-stop { background: #fbe7e4; color: #ab3226; }

/* 19. Highlight / Disclaimer boxes */
.highlight-box { background: var(--primary-light); border: none; border-radius: var(--radius); padding: 20px 24px; font-size: 14px; color: var(--text); line-height: 1.85; margin-top: 24px; }
.highlight-box strong { color: var(--primary); }
.disclaimer-box { background: #faf4e1; border: none; border-radius: var(--radius); padding: 20px 24px; font-size: 13px; color: #6e5716; line-height: 1.9; margin-top: 24px; }
.caution-box { background: #fbe9e6; border: none; border-radius: var(--radius); padding: 20px 24px; font-size: 13px; color: #8f2f23; line-height: 1.9; margin-top: 24px; }

/* 20. Steps */
.step-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; border: none; }
.step-item { display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step-badge { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); border: none; color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.step-content h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text-sub); line-height: 1.75; }

/* 21. Timeline */
.timeline-list { display: flex; flex-direction: column; margin-top: 32px; }
.tl-item { display: flex; gap: 20px; padding-bottom: 32px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-aside { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 42px; }
.tl-dot { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); border: none; color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-line { flex: 1; width: 1px; background: var(--border); margin-top: 8px; }
.tl-item:last-child .tl-line { display: none; }
.tl-body { padding-top: 6px; }
.tl-body h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.tl-body p { font-size: 14px; color: var(--text-sub); line-height: 1.8; }
.tl-badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 3px 11px; border-radius: 999px; margin-bottom: 6px; }

/* 22. FAQ accordion */
.faq-list { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); background: #fff; border-radius: var(--radius); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-size: 15px; font-weight: 700; color: var(--text); background: none; border: none; cursor: pointer; text-align: left; line-height: 1.55; }
.faq-q svg { flex-shrink: 0; stroke: var(--text-sub); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; width: 18px; height: 18px; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .3s ease; font-size: 14px; color: var(--text-sub); line-height: 1.9; }
.faq-a-inner { padding: 0 22px 20px; }
.faq-item.open .faq-a { max-height: 800px; }

/* 23. CTA card */
.cta-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; }
.cta-card-text h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.cta-card-text p { font-size: 14px; color: var(--text-sub); line-height: 1.7; }
.cta-notice { font-size: 12px; color: var(--text-sub); margin-top: 8px; line-height: 1.5; }
.cta-btns { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }

/* 24. 가로 스크롤 테이블 래퍼 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); margin-top: 24px; }
.table-scroll .data-table { margin-top: 0; min-width: 560px; }

/* 25. 쇼핑몰 CTA */
.shop-cta-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 34px; margin-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.shop-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 8px; }
.shop-name { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); margin-bottom: 6px; }
.shop-desc { font-size: 14px; color: var(--text-sub); line-height: 1.7; }
.shop-notice { font-size: 12px; color: var(--text-sub); margin-top: 8px; line-height: 1.5; }
.shop-cta-btns { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }

/* 26. Responsive */
@media (max-width: 900px) {
  /* 사이드바 → 상단 바로 전환 */
  .site-header { position: sticky; top: var(--util-h); left: 0; bottom: auto; width: 100%; height: var(--hdr); border-right: none; border-bottom: 1px solid var(--border); overflow-y: visible; }
  .hdr-inner { flex-direction: row; align-items: center; padding: 0 20px; height: 100%; gap: 16px; }
  .hdr-logo { margin-bottom: 0; padding: 0; }
  .hdr-nav { flex-direction: row; align-items: center; gap: 2px; }
  .hdr-nav a { padding: 7px 11px; font-size: 13px; }
  .hdr-cta { margin-top: 0; margin-left: auto; width: auto; padding: 9px 16px; }
  .info-banner, main, .site-footer { margin-left: 0; }

  .card-grid { grid-template-columns: 1fr; }
  .mech-flow { flex-direction: column; }
  .mech-step { max-width: 100%; width: 100%; }
  .cta-card { flex-direction: column; align-items: flex-start; }
  .cta-btns { flex-direction: row; flex-wrap: wrap; }
  .shop-cta-btns { flex-direction: row; flex-wrap: wrap; }
  .titration-row { max-width: 100%; }
  .titration-step { padding: 0 18px; }
  .titration-dose { font-size: 24px; }
}
@media (max-width: 768px) {
  :root { --sec-pad: 54px; --hdr: 58px; }
  .hero { padding-top: 52px; }
  .titration { margin-top: 44px; }
  .hdr-nav { display: none; }
  .hdr-cta { padding: 8px 12px; font-size: 12px; }
  .hdr-cta svg { display: none; }
  .nav-toggle { display: flex; margin-left: 0; }
  .overview-table th { width: 100px; font-size: 13px; }
  .overview-table td { font-size: 13px; }
  .info-card { padding: 24px 22px; }
  .cta-card, .shop-cta-card { padding: 26px 24px; }
}
@media (max-width: 480px) {
  .data-table { font-size: 13px; }
  .data-table thead th, .data-table tbody td { padding: 10px 12px; }
  .titration-row { flex-wrap: wrap; gap: 16px 0; }
  .titration-connector { display: none; }
  .titration-step { flex: 0 0 50%; padding: 0; }
}
