/* =========================================================
   RED DZAO — LAYOUT
   Cấu trúc tổng thể: container, section, sidebar nav, grid
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

.chapter {
  position: relative;
  padding-block: var(--section-padding-y);
  scroll-margin-top: 1rem;
}

.chapter__inner {
  display: grid;
  gap: var(--space-lg);
}

.chapter__eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  margin-bottom: var(--space-xs);
}

.chapter__heading {
  max-width: 18ch;
}

.chapter--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.chapter--dark h1, .chapter--dark h2, .chapter--dark h3 {
  color: var(--text-on-dark);
}

/* ---------------------------------------------
   SIDEBAR ĐIỀU HƯỚNG CHƯƠNG (Desktop)
--------------------------------------------- */
.chapter-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: var(--sidebar-width);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  z-index: var(--z-nav);
  background: linear-gradient(180deg, rgba(32,35,38,0.02), rgba(32,35,38,0.06));
  border-right: 1px solid var(--border-soft);
  padding-block: var(--safe-top) var(--safe-bottom);
}

.chapter-nav__thread {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 2px;
  background: var(--border-soft);
  transform: translateX(-50%);
}

.chapter-nav__thread-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent-primary);
  transition: height var(--dur-normal) var(--ease-story);
}

.chapter-nav__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  z-index: 1;
}

.chapter-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  writing-mode: vertical-rl;
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
}

.chapter-nav__dot {
  writing-mode: horizontal-tb;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-ivory-soft);
  border: 2px solid var(--border-soft);
  transition: all var(--dur-fast) ease;
}

.chapter-nav__link[aria-current="true"] {
  color: var(--accent-primary);
}
.chapter-nav__link[aria-current="true"] .chapter-nav__dot {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(181, 38, 30, 0.15);
}

/* ---------------------------------------------
   ĐIỀU HƯỚNG MOBILE: progress + dots
--------------------------------------------- */
.mobile-progress {
  position: fixed;
  top: var(--safe-top);
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(32,35,38,0.08);
  z-index: var(--z-nav);
}

.mobile-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  transition: width 120ms linear;
}

.mobile-dots {
  position: fixed;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: var(--z-nav);
}

.mobile-dots__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(32,35,38,0.2);
  transition: all var(--dur-fast) ease;
}

.mobile-dots__dot[aria-current="true"] {
  background: var(--accent-primary);
  height: 22px;
  border-radius: 5px;
}

@media (min-width: 1024px) {
  .chapter-nav { display: flex; }
  .mobile-dots, .mobile-progress { display: none; }
  body { padding-left: var(--sidebar-width); }
}

/* ---------------------------------------------
   HERO
--------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(180deg, #EFE2CB 0%, var(--color-ivory) 70%);
}

.hero__layers {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__layer {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: var(--space-lg) var(--container-padding-x) var(--space-2xl);
}

.hero__eyebrow {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.06em;
  color: var(--color-wood-dark);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: var(--fs-display);
  max-width: 14ch;
}

.hero__subtitle {
  margin-top: var(--space-sm);
  max-width: 40ch;
}

.hero__cta {
  margin-top: var(--space-md);
}

/* ---------------------------------------------
   GALLERY NGANG (swipe trong section)
--------------------------------------------- */
.swipe-gallery {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
  margin-inline: calc(var(--container-padding-x) * -1);
  padding-inline: var(--container-padding-x);
  scrollbar-width: thin;
}

.swipe-gallery__item {
  flex: 0 0 78%;
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .swipe-gallery__item { flex-basis: 46%; }
}
@media (min-width: 1024px) {
  .swipe-gallery__item { flex-basis: 30%; }
}

/* ---------------------------------------------
   BOOKING SECTION
--------------------------------------------- */
.booking {
  background: var(--color-wood-dark);
  color: var(--text-on-dark);
}

.booking__grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .booking__grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
  }
}

/* ---------------------------------------------
   FOOTER
--------------------------------------------- */
.site-footer {
  background: var(--color-charcoal);
  color: var(--text-on-dark);
  padding-block: var(--space-lg);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------------------------------------------
   STICKY CTA MOBILE
--------------------------------------------- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  z-index: var(--z-sticky-cta);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -6px 20px rgba(0,0,0,0.15);
}

@media (min-width: 1024px) {
  .sticky-cta { display: none; }
}
