/* ═══════════════════════════════════════════════════════════════
   IMASOFA — Global Stylesheet v1.0
   Design System: idea/imasofa-design-system.md
   Fonts: Cormorant Garamond (serif) + Inter (sans) — loaded via header.php
   Scope: tokens, reset, base, global utilities, nav, buttons, reveal
   Page-specific styles live in each page's own <style> block.
═══════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ──────────────────────────────────────────
   Màu sắc: Warmth & Restraint — da, gỗ, ánh sáng vàng.
   Không dùng trắng tinh (#fff) hay đen thuần (#000).
─────────────────────────────────────────────────────────────── */
:root {
  --white:    #FDFAF5;   /* Trắng ấm — nền trang chính */
  --cream:    #F5F0E8;   /* Kem nhạt — nền section xen kẽ */
  --warm:     #EDE6D6;   /* Kem đậm — hover, card bg */
  --leather:  #8B5E3C;   /* Nâu da — màu thương hiệu chính */
  --dust:     #C4A882;   /* Vàng da — accent trên nền tối */
  --mid:      #4A3728;   /* Nâu trung — body text trên nền sáng */
  --muted:    #7A6458;   /* Nâu nhạt — secondary text, caption */
  --dark:     #1A1410;   /* Nâu đen — nền section tối */
  --paper:    #F4F3EF;  /* Giấy — nền trang phụ, footer */
  --serif:    'Cormorant SC', Georgia, serif;
  --sans:     'Readex Pro', system-ui, sans-serif;
  /* --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'Inter', system-ui, sans-serif; */
  --nav-h:    80px;
  --nav-h-mb: 64px;
}


/* ── 2. Reset ──────────────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }


/* ── 3. Base ───────────────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
body {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--mid);
  background: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: clamp(52px, 7vw, 96px); line-height: .95; }
h2 { font-size: clamp(32px, 4vw, 56px); }
h3 { font-size: clamp(22px, 2.5vw, 32px); font-weight: 400; }
h4, h5, h6 { font-weight: 400; }

p { line-height: 1.85; }
a { color: var(--leather); text-decoration: none; transition: color .2s; }
a:hover { color: var(--mid); }
img { max-width: 100%; display: block; }

/* Không dùng font-weight 700 (bold) trong toàn site */
b, strong { font-weight: 500; }


/* ── 4. Topbar spacer ──────────────────────────────────────────
   Bù chiều cao navbar fixed.
─────────────────────────────────────────────────────────────── */
.topbar-100 {
  height: var(--nav-h);
  width: 100%;
  background: transparent;
  display: block;
}
@media (max-width: 900px) {
  .topbar-100 { height: var(--nav-h-mb); }
}


/* ── 5. Eyebrow label ──────────────────────────────────────────
   Dòng nhỏ context trên heading — 10px, uppercase, letter-spacing.
─────────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--leather);
  display: block;
  margin-bottom: 16px;
}
.eyebrow--light { color: var(--dust); }
.eyebrow--muted { color: var(--muted); }

/* Variant có đường kẻ trước */
.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.eyebrow-line::before {
  content: '';
  width: 40px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}


/* ── 6. Section title ──────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--dark);
}
.section-title--light { color: var(--white); }

/* em trong heading: italic Cormorant, màu leather hoặc dust */
.section-title em {
  font-style: italic;
  color: var(--leather);
}
.section-title--light em { color: var(--dust); }

.section-header { margin-bottom: 64px; }

.section-sub {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.75;
  margin-top: 16px;
  max-width: 560px;
}
.section-sub--light { color: rgba(253,250,245,.65); }


/* ── 7. Body text utilities ────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.body-text {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--mid);
}
.body-sm {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted);
}
.caption {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}


/* ── 8. Buttons ────────────────────────────────────────────────
   IMA không dùng border-radius, shadow, hay bold trên nút.
   Không dùng màu nền ngoài --leather cho primary.
─────────────────────────────────────────────────────────────── */

/* Primary */
.btn-ima {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: var(--leather);
  color: var(--white);
  padding: 16px 36px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
  border-radius: 0;
}
.btn-ima:hover { background: #A07040; color: var(--white); }
.btn-ima--sm   { padding: 10px 22px; font-size: 11px; }
.btn-ima--lg   { padding: 18px 44px; }

/* Ghost — trên nền sáng */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid);
  border: 1px solid rgba(139,94,60,.3);
  padding: 15px 32px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  border-radius: 0;
}
.btn-ghost:hover { border-color: var(--leather); color: var(--leather); }

/* Ghost dark — trên nền tối */
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(253,250,245,.6);
  border: 1px solid rgba(253,250,245,.2);
  padding: 15px 32px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  border-radius: 0;
}
.btn-ghost-dark:hover { border-color: var(--dust); color: var(--dust); }

/* Text link */
.btn-text {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--leather);
  text-decoration: none;
  border-bottom: 1px solid rgba(139,94,60,.4);
  padding-bottom: 2px;
  transition: all .2s;
}
.btn-text:hover { color: var(--mid); border-color: var(--mid); }
.btn-text--light { color: rgba(253,250,245,.75); border-bottom-color: rgba(253,250,245,.3); }
.btn-text--light:hover { color: var(--white); border-color: var(--white); }


/* ── 9. Section background helpers ────────────────────────────
   Luân phiên: white → leather strip → cream → dark → cream → white → dark → cream → dark
─────────────────────────────────────────────────────────────── */
.bg-white-warm { background: var(--white); }
.bg-cream      { background: var(--cream); }
.bg-warm       { background: var(--warm); }
.bg-dark       { background: var(--dark); }
.bg-leather    { background: var(--leather); }


/* ── 10. Layout utilities ──────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.content-inner   { max-width: 1100px; margin: 0 auto; padding: 0 56px; }
.content-narrow  { max-width: 760px;  margin: 0 auto; }
.content-reading { max-width: 640px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }


/* ── 11. Divider / Rule ────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.ima-rule {
  width: 36px;
  height: 1px;
  background: var(--leather);
  border: none;
  margin: 16px 0 24px;
}
.ima-rule--light { background: rgba(196,168,130,.5); }
.ima-rule--dim   { background: rgba(139,94,60,.2); }


/* ── 12. Card patterns ─────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.content-card {
  background: var(--white);
  padding: 40px 32px;
  border-top: 2px solid var(--leather);
  transition: background .2s;
}
.content-card:hover { background: var(--warm); }

.dark-card {
  background: rgba(255,255,255,.04);
  border-left: 2px solid rgba(139,94,60,.15);
  padding: 40px 32px;
  transition: border-color .3s, background .3s;
}
.dark-card:hover {
  border-color: var(--leather);
  background: rgba(139,94,60,.08);
}


/* ── 13. Pull quote ────────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.pull-quote {
  margin: 36px 0;
  padding: 28px 32px;
  background: var(--dark);
  position: relative;
}
.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: -20px; left: 24px;
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 400;
  color: var(--leather);
  line-height: 1;
}
.pq-text {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  line-height: 1.5;
  margin-bottom: 12px;
}
.pq-attr {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dust);
}

.insight-box {
  background: var(--cream);
  border-left: 3px solid var(--leather);
  padding: 20px 24px;
  font-size: 14px;
  color: var(--mid);
  line-height: 1.7;
}
.insight-box strong { color: var(--leather); font-weight: 500; }


/* ── 14. Stat strip ────────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.stat-strip {
  background: var(--leather);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  padding: 36px 32px;
  border-right: 1px solid rgba(255,255,255,.12);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 400;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(253,250,245,.6);
  font-weight: 400;
  line-height: 1.5;
}


/* ── 15. Marquee strip ─────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.marquee-bar {
  background: var(--leather);
  padding: 14px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  animation: ima-marquee 22s linear infinite;
  white-space: nowrap;
}
.marquee-item {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: rgba(253,250,245,.85);
  font-weight: 400;
  padding: 0 40px;
  flex-shrink: 0;
}
.marquee-dot { color: rgba(253,250,245,.4); padding: 0 8px; }
@keyframes ima-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ── 16. Watermark decorative ──────────────────────────────────
─────────────────────────────────────────────────────────────── */
.watermark-dark {
  font-family: var(--serif);
  font-weight: 400;
  color: rgba(255,255,255,.025);
  pointer-events: none;
  user-select: none;
  position: absolute;
}
.watermark-light {
  font-family: var(--serif);
  font-weight: 400;
  color: rgba(139,94,60,.06);
  pointer-events: none;
  user-select: none;
  position: absolute;
}


/* ── 17. Reveal animation ──────────────────────────────────────
   Dùng chung toàn site — JS thêm class .visible khi vào viewport.
─────────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }


/* ── 18. Nav (global) ──────────────────────────────────────────
   Style cho navbar được dùng ở header.php.
   Mobile override: @media (max-width: 900px)
─────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(26,20,16,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139,94,60,.12);
  transition: background .3s, transform .3s;
}
.navbar.scrolled { background: var(--dark) !important; }
.navbar-hidden   { transform: translateY(-100%); }

.nb-inner {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 0 56px;
  position: relative;
}

/* Brand — flex:1 để tạo cân bằng với actions */
.nb-brand { flex: 1; text-decoration: none; min-width: 0; }
.nb-brand-name {
  font-family: 'Cormorant SC', serif; /* logo giữ SC — ngoại lệ của design system */
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1;
  color: var(--white);
  letter-spacing: .04em;
}
.nb-brand-tag {
  font-family: var(--sans);
  font-size: .58rem;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(253,250,245,.45);
  margin-top: 5px;
}

/* Desktop center nav — flex:0 auto để tự căn giữa */
.nb-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 40px);
}
.nb-link {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(253,250,245,.78);
  text-decoration: none;
  transition: color .25s;
  white-space: nowrap;
}
.nb-link:hover,
.nb-link.active { color: var(--white); }

/* Right actions — flex:1 justify-end để đối xứng với brand */
.nb-actions {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.nb-book-btn {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dust);
  border: 1px solid rgba(196,168,130,.45);
  padding: 9px 18px;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.nb-book-btn:hover { background: var(--dust); color: var(--dark); border-color: var(--dust); }
.nb-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  color: rgba(253,250,245,.72);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color .2s;
}
.nb-icon:hover { color: var(--white); }

/* Dropdown */
.dropdown-top-menu {
  display: none;
  position: absolute;
  background: rgba(26,20,16,.95);
  list-style: none;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 0;
  border: 1px solid rgba(139,94,60,.15);
  z-index: 10;
}
.nav-item.dropdown { position: relative; }
.nav-item.dropdown:hover .dropdown-top-menu { display: block; }
.dropdown-top-menu li a {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .12em;
  color: rgba(253,250,245,.78);
  text-decoration: none;
  display: block;
  padding: 13px 20px;
  transition: background .15s, color .15s;
}
.dropdown-top-menu li a:hover {
  background: rgba(139,94,60,.2);
  color: var(--white);
}

/* Mobile hamburger */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
}
.navbar-toggler-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  position: relative;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform .3s;
}
.navbar-toggler-icon::before { top: -7px; }
.navbar-toggler-icon::after  { top:  7px; }
.navbar-toggler.open .navbar-toggler-icon { background: transparent; }
.navbar-toggler.open .navbar-toggler-icon::before { transform: rotate(45deg); top: 0; }
.navbar-toggler.open .navbar-toggler-icon::after  { transform: rotate(-45deg); top: 0; }

/* Mobile overlay */
#navbarNav { display: none; }

@media (max-width: 900px) {
  .navbar { height: var(--nav-h-mb); background: rgba(26,20,16,.97) !important; backdrop-filter: none; }
  .nb-inner { padding: 0 20px; }

  .navbar-toggler { display: block; flex-shrink: 0; }
  .nb-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: none;
  }
  .nb-nav  { display: none !important; }
  .nb-book-btn { display: none !important; }
  .nb-icon-fav { display: none !important; }

  #navbarNav {
    display: flex;
    position: fixed;
    top: var(--nav-h-mb);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-h-mb));
    background: rgba(26,20,16,.98);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 0 56px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform .4s ease, opacity .4s ease;
    pointer-events: none;
    z-index: 999;
    overflow-y: auto;
  }
  #navbarNav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nb-mobile-link {
    font-family: var(--serif);
    font-size: 1.9rem;
    font-weight: 400;
    color: rgba(253,250,245,.82);
    text-decoration: none;
    padding: 14px 0;
    display: block;
    transition: color .25s;
  }
  .nb-mobile-link:hover { color: var(--white); }

  .nb-mobile-dropdown .dropdown-top-menu {
    display: none;
    position: static;
    background: transparent;
    border: none;
    padding: 4px 0 12px;
    min-width: 0;
    text-align: center;
  }
  .nb-mobile-dropdown.open .dropdown-top-menu { display: block; }
  .nb-mobile-link.dropdown-toggle::after { display: none; }
  .nb-mobile-dropdown .dropdown-top-menu li a {
    font-size: 1.15rem;
    color: rgba(253,250,245,.55);
    padding: 10px 0;
    letter-spacing: .12em;
  }
  .nb-mobile-dropdown .dropdown-top-menu li a:hover {
    background: transparent;
    color: var(--dust);
  }

  .nb-book-mobile {
    font-family: var(--sans);
    font-size: .75rem;
    font-weight: 400;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--dust);
    border: 1px solid rgba(196,168,130,.4);
    padding: 12px 28px;
    text-decoration: none;
    margin-top: 20px;
    transition: all .2s;
  }
  .nb-book-mobile:hover { background: var(--dust); color: var(--dark); }
}


/* ── 19. Footer (global) ───────────────────────────────────────
─────────────────────────────────────────────────────────────── */
.ima-footer {
  background: var(--dark);
  border-top: 1px solid rgba(139,94,60,.15);
  padding: 40px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ima-footer__logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(253,250,245,.35);
}
.ima-footer__logo span { color: var(--leather); }
.ima-footer__copy {
  font-size: 12px;
  font-weight: 400;
  color: rgba(253,250,245,.2);
}


/* ── 20. Responsive ────────────────────────────────────────────
─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .content-inner { padding: 0 24px; }
  .section-header { margin-bottom: 40px; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1px solid rgba(255,255,255,.12); }
  .stat-item:nth-child(4) { border-right: none; border-top: 1px solid rgba(255,255,255,.12); }
  .ima-footer { flex-direction: column; gap: 12px; text-align: center; padding: 28px 24px; }
}
@media (max-width: 600px) {
  .content-inner { padding: 0 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .btn-ima, .btn-ghost, .btn-ghost-dark { padding: 14px 24px; }
}
