/* Bảng màu theo moonstonewellness.vn */
:root {
  --bg: #fcfbf9;
  --bg-soft: #faf4f1;
  --ink: #514b44;
  --muted: #78716c;
  --primary: #b0a599;
  --accent: #eedbcd;
  --line: #e7e5e4;
  --white: #ffffff;
  --sans: "Josefin Sans", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --gutter: clamp(1rem, 5vw, 4rem);
  --header-h: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.eyebrow { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--primary); margin-bottom: 1rem; }
.title { font-weight: 300; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.15; }
.script { font-family: var(--serif); font-style: italic; font-weight: 400; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: background 0.3s, transform 0.3s;
}
.btn:hover { background: var(--ink); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 var(--gutter);
  color: var(--white);
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}
.header.solid { background: rgba(252, 251, 249, 0.96); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { font-size: 15px; letter-spacing: 0.22em; text-transform: uppercase; line-height: 1.2; }
.brand-text small { display: block; font-family: var(--serif); font-style: italic; font-size: 13px; letter-spacing: 0.04em; text-transform: none; opacity: 0.8; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
.btn { white-space: nowrap; }
.nav a { position: relative; padding: 0.3rem 0; opacity: 0.85; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right 0.3s; }
.nav a:hover, .nav a.active { opacity: 1; }
.nav a:hover::after, .nav a.active::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 1.2rem; }
.lang { display: flex; gap: 0.3rem; font-size: 12px; letter-spacing: 0.15em; }
.lang button { opacity: 0.5; }
.lang button.active { opacity: 1; font-weight: 600; }
.header .btn { padding: 0.6rem 1.3rem; font-size: 11px; }
.burger { display: none; flex-direction: column; gap: 6px; width: 26px; padding: 6px 0; }
.burger span { height: 1px; background: currentColor; }

/* Menu điện thoại */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2rem;
  padding: 0 var(--gutter);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s ease, visibility 0.45s;
}
.drawer.open { transform: none; visibility: visible; }
.drawer a { font-size: 1.6rem; letter-spacing: 0.12em; text-transform: uppercase; }
.drawer .btn { align-self: flex-start; margin-top: 1rem; font-size: 12px; }
.drawer-close { position: absolute; top: 1.6rem; right: var(--gutter); font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; }

/* ---------- Khung ảnh (có ảnh thay thế khi thiếu file) ---------- */
.frame { position: relative; overflow: hidden; border-radius: 4px; background: linear-gradient(135deg, var(--accent), var(--primary)); }
.frame.missing img { display: none; }
.frame.missing::after {
  content: attr(data-file);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(81, 75, 68, 0.55);
}

/* ---------- Trang chủ: ảnh nền + tab lớp ---------- */
.home-hero { position: relative; height: 100vh; min-height: 560px; color: var(--white); overflow: hidden; background: var(--ink); }
.slide {
  position: absolute;
  inset: 0;
  border-radius: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 6s ease;
}
.slide.active { opacity: 1; transform: scale(1); }
.slide.missing::after { place-items: start end; padding: calc(var(--header-h) + 1rem) var(--gutter); color: rgba(255, 255, 255, 0.55); }
.page-hero .frame.missing::after { place-items: end end; padding: 1.2rem var(--gutter); color: rgba(255, 255, 255, 0.55); }
.home-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.45)); pointer-events: none; }
.home-copy { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 1rem; }
.home-copy .title { font-size: clamp(1.8rem, 5vw, 3.6rem); }
.home-copy .script { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 0.6rem; }
.home-tabs {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.home-tabs a {
  padding: 1.8rem 1rem;
  text-align: center;
  font-size: clamp(0.9rem, 1.6vw, 1.2rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.7;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transition: opacity 0.3s, background 0.3s;
}
.home-tabs a:last-child { border-right: 0; }
.home-tabs a.active { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.home-hint { position: absolute; z-index: 3; bottom: 6.5rem; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.8; }

/* ---------- Ảnh đầu trang (các trang con) ---------- */
.page-hero { position: relative; height: 78vh; min-height: 460px; overflow: hidden; color: var(--white); background: var(--ink); }
.page-hero .frame { position: absolute; inset: -10% 0 0 0; border-radius: 0; will-change: transform; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.45)); }
.page-hero-copy { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(2.5rem, 8vh, 5rem); }
.page-hero-copy .title { font-size: clamp(2.4rem, 7vw, 5rem); }
.page-hero-copy .script { font-size: clamp(1.3rem, 3vw, 2rem); }
.page-hero-copy p { max-width: 34rem; margin-top: 0.8rem; opacity: 0.9; }

/* ---------- Khối so le ảnh / chữ ---------- */
.zigzag { padding: clamp(4rem, 10vw, 8rem) var(--gutter); display: grid; gap: clamp(4rem, 9vw, 7rem); }
.zz {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.zz:nth-child(even) .frame { order: 2; }
.zz .frame { aspect-ratio: 4 / 5; max-height: 640px; }
.zz .num { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--primary); }
.zz h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: 0.4rem 0 1.2rem; }
.zz p { color: var(--muted); max-width: 32rem; margin-bottom: 2rem; }

/* ---------- Lịch tập ---------- */
.schedule { background: var(--bg-soft); padding: clamp(4rem, 10vw, 7rem) var(--gutter); }
.schedule-head { text-align: center; margin-bottom: 3rem; }
.schedule-head .title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.schedule-head .from { color: var(--muted); margin-top: 0.5rem; }
.schedule-head .from strong { font-weight: 600; color: var(--ink); }
.timetable { width: 100%; max-width: 980px; margin: 0 auto; border-collapse: collapse; }
.timetable th { font-weight: 400; font-size: 14px; letter-spacing: 0.15em; padding: 0.8rem 0.4rem; border-bottom: 1px solid var(--accent); }
.timetable th.today { color: var(--white); background: var(--primary); border-radius: 4px 4px 0 0; }
.timetable td { text-align: center; padding: 1.1rem 0.4rem; border-bottom: 1px solid var(--accent); }
.timetable td.time { text-align: left; font-size: 1.15rem; letter-spacing: 0.08em; width: 90px; }
.timetable td.today { background: rgba(238, 219, 205, 0.35); }
.session {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.session:hover { background: var(--primary); color: var(--white); }
.schedule-hint { text-align: center; color: var(--muted); font-size: 14px; margin-top: 1.6rem; }

.day-tabs { display: none; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; margin-bottom: 1.2rem; }
.day-tabs button { flex: 0 0 auto; min-width: 52px; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; letter-spacing: 0.1em; background: var(--white); }
.day-tabs button.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.day-tabs button small { display: block; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.day-list { display: none; list-style: none; }
.day-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--accent); }
.day-list .t { font-size: 1.15rem; letter-spacing: 0.08em; }
.day-list .n { font-family: var(--serif); font-style: italic; font-size: 1.2rem; flex: 1; }
.day-list .btn { padding: 0.5rem 1rem; font-size: 10px; }
.day-list .empty { justify-content: center; color: var(--muted); }

/* ---------- Kêu gọi đặt lớp ---------- */
.cta { text-align: center; padding: clamp(4rem, 10vw, 7rem) var(--gutter); }
.cta .title { font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.cta p { color: var(--muted); max-width: 32rem; margin: 0 auto 2rem; }

/* ---------- Liên hệ ---------- */
.contact-body { padding: clamp(4rem, 10vw, 7rem) var(--gutter); max-width: 1100px; margin: 0 auto; }
.contact-intro { text-align: center; max-width: 36rem; margin: 0 auto 3rem; color: var(--muted); }
.interested { display: inline-block; margin-top: 1rem; padding: 0.4rem 1rem; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 14px; }
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 4rem; }
.channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 2.4rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.channel:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(81, 75, 68, 0.08); }
.channel svg { width: 34px; height: 34px; stroke: var(--primary); fill: none; stroke-width: 1.4; }
.channel strong { font-weight: 400; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; }
.channel span { color: var(--muted); font-size: 14px; }
.visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.visit h3 { font-weight: 400; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 0.6rem; }
.visit p { color: var(--muted); margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.footer { background: var(--accent); padding: 4rem var(--gutter) 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer .brand { color: var(--ink); margin-bottom: 1rem; }
.footer h4 { font-weight: 400; font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 0.8rem; }
.footer p, .footer a { font-size: 15px; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-links { display: flex; flex-direction: column; gap: 0.3rem; }
.copy { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); padding-top: 1.5rem; border-top: 1px solid rgba(81, 75, 68, 0.15); }

/* ---------- Hiện dần khi cuộn ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .nav, .header-actions .btn { display: none; }
  .burger { display: flex; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .brand-text { font-size: 12px; }
  .home-tabs { grid-template-columns: repeat(2, 1fr); }
  .home-tabs a { padding: 1.1rem 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
  .home-hint { bottom: 8.5rem; }
  .zz { grid-template-columns: 1fr; }
  .zz:nth-child(even) .frame { order: 0; }
  .zz .frame { aspect-ratio: 4 / 3; }
  .timetable, .schedule-hint { display: none; }
  .day-tabs { display: flex; }
  .day-list { display: block; }
  .visit, .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
