/* ============================================================
   MySkinMentor — Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --cream:      #FBF7F2;
  --cream-dark: #F2EAE0;
  --blush:      #EBC4C4;
  --rose:       #C97B8A;
  --magenta:    #9B3A5C;
  --deep:       #2E1422;
  --sage:       #8BAF9A;
  --sage-light: #D4E8DF;
  --gold:       #C9A96E;
  --text:       #2E1422;
  --text-mid:   #5A3548;
  --text-light: #8A6878;
  --border:     #E8D8D0;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;

  --radius-sm:  4px;
  --radius-md:  12px;
  --radius-lg:  24px;
  --radius-xl:  48px;

  --shadow-sm: 0 2px 8px rgba(46,20,34,.06);
  --shadow-md: 0 8px 32px rgba(46,20,34,.10);
  --shadow-lg: 0 24px 64px rgba(46,20,34,.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: var(--blush); border-radius: 3px; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--deep);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { color: var(--text-mid); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Layout helpers ───────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}
.section { padding: clamp(3rem, 7vw, 6rem) 0; }

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,247,242,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--magenta);
  letter-spacing: .01em;
}

.nav-logo-sub {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
}

.nav-links a {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-mid);
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--magenta);
  background: rgba(155,58,92,.07);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: .2rem;
  background: var(--cream-dark);
  border-radius: var(--radius-xl);
  padding: 3px;
}

.lang-btn {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-light);
  padding: .3rem .55rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
}

.lang-btn.active,
.lang-btn:hover {
  background: white;
  color: var(--magenta);
  box-shadow: var(--shadow-sm);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .4rem;
  border: none;
  background: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 1px;
  transition: all .3s;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--deep);
  color: rgba(255,255,255,.5);
  padding: 2.5rem 0;
  font-size: .8rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: rgba(255,255,255,.8);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: rgba(255,255,255,.45);
  transition: color .2s;
}
.footer-links a:hover { color: var(--blush); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .75rem 1.6rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
}

.btn-primary {
  background: var(--magenta);
  color: white;
}
.btn-primary:hover {
  background: #7a2d48;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(155,58,92,.3);
}

.btn-outline {
  background: transparent;
  color: var(--magenta);
  border: 1.5px solid var(--magenta);
}
.btn-outline:hover {
  background: var(--magenta);
  color: white;
}

.btn-ghost {
  background: rgba(155,58,92,.08);
  color: var(--magenta);
}
.btn-ghost:hover {
  background: rgba(155,58,92,.14);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all .3s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blush);
  transform: translateY(-2px);
}

/* ── Tag / Badge ──────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .28rem .75rem;
  border-radius: 20px;
}
.tag-rose   { background: rgba(201,123,138,.15); color: #7a2d48; }
.tag-sage   { background: rgba(139,175,154,.2);  color: #3a6b55; }
.tag-gold   { background: rgba(201,169,110,.2);  color: #7a5a20; }
.tag-cream  { background: var(--cream-dark);     color: var(--text-mid); }

/* ── Section headings ─────────────────────────────────────── */
.section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: .75rem;
}
.section-title { margin-bottom: .75rem; }
.section-sub   { color: var(--text-light); max-width: 520px; }

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
  color: var(--border);
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span { font-family: var(--font-display); font-size: 1.2rem; color: var(--blush); }

/* ── Page Hero ────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--cream) 0%, #F5ECF2 50%, var(--cream-dark) 100%);
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(201,123,138,.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.animate-up   { animation: fadeUp .6s ease both; }
.delay-1      { animation-delay: .1s; }
.delay-2      { animation-delay: .2s; }
.delay-3      { animation-delay: .3s; }
.delay-4      { animation-delay: .4s; }
.delay-5      { animation-delay: .5s; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: .25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem 1rem; font-size: .85rem; }
  .nav-toggle { display: flex; }

  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── Live indicator ───────────────────────────────────────── */
.live-dot {
  width: 7px; height: 7px;
  background: #4CAF50;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1.5s ease infinite;
  margin-right: .4rem;
}
.live-dot.red   { background: #e53e3e; }
.live-dot.amber { background: #E8A03A; }

/* ── Table ────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.data-table th {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--cream-dark);
  color: var(--text-mid);
}
.data-table tr:hover td { background: rgba(251,247,242,.8); }
.data-table .num { font-family: var(--font-display); font-size: 1rem; color: var(--deep); }
.change-up   { color: #2D8A5A; font-weight: 600; }
.change-down { color: #C0392B; font-weight: 600; }

/* ── Search box ───────────────────────────────────────────── */
.search-box {
  display: flex;
  gap: .5rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: .5rem .5rem .5rem 1.2rem;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(201,123,138,.12);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-light); }

/* ── Accordion ────────────────────────────────────────────── */
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  gap: 1rem;
}
.accordion-trigger .icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .8rem;
  color: var(--rose);
  transition: transform .3s, background .2s;
}
.accordion-trigger[aria-expanded="true"] .icon { transform: rotate(45deg); background: var(--blush); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.accordion-body-inner {
  padding: 0 0 1.25rem;
  color: var(--text-mid);
  font-size: .9rem;
  line-height: 1.8;
}

/* ── Tooltip ──────────────────────────────────────────────── */
[data-tip] { position: relative; cursor: help; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--deep);
  color: white;
  font-size: .72rem;
  padding: .3rem .6rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  z-index: 10;
}
[data-tip]:hover::after { opacity: 1; }

/* ── Notification bar ─────────────────────────────────────── */
.notice-bar {
  background: var(--magenta);
  color: white;
  text-align: center;
  font-size: .75rem;
  letter-spacing: .05em;
  padding: .55rem 1rem;
}

/* ── Progress bar ─────────────────────────────────────────── */
.progress {
  height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--magenta));
  border-radius: 2px;
  transition: width .4s ease;
}
