/* ============================================
   BASE.CSS — Biến màu, reset, typography nền
   ============================================ */

:root {
  --cream: #F9F9F9;
  --cream-2: #EEEEEE;
  --ink: #111111;
  --beige: #CCCCCC;
  --rose: #999999;
  --white: #FFFFFF;
}

/* ── Font Faces ── */
@font-face {
  font-family: 'Gustavo';
  src: url('../assets/Font/Gustavo/Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gustavo';
  src: url('../assets/Font/Gustavo/Regular-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Gustavo';
  src: url('../assets/Font/Gustavo/Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gustavo';
  src: url('../assets/Font/Gustavo/Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gustavo';
  src: url('../assets/Font/Gustavo/Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}


html {
  -webkit-tap-highlight-color: transparent;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--cream);
}

/* Trả lại quyền root scroller cho thẻ html trên Chrome/Safari */
body {
  min-width: 0;
  color: var(--ink);
  background-color: var(--cream);
  line-height: 1.55;
  font-size: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  overflow-x: clip; /* Dùng clip thay cho hidden để chống tràn ngang một cách an toàn */
}

@supports (padding-bottom: max(0px, env(safe-area-inset-bottom))) {
  body {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

::selection {
  background: var(--beige);
  color: var(--ink);
}

[aria-current]:not([aria-current="false"]) {
  text-decoration: underline 1.5px var(--ink);
  text-underline-offset: 3px;
}

/* === Typography utilities === */
.editorial-heading {
  font-family: 'Gustavo', serif;
  letter-spacing: -0.02em;
  font-weight: 300;
  line-height: 1.05;
}

.editorial-logo {
  font-family: 'Gustavo', serif;
  letter-spacing: -0.04em;
  font-weight: 300;
  line-height: 0.85;
  text-transform: lowercase;
}

.editorial-section-heading {
  font-family: 'Gustavo', serif;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.editorial-section-label {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ink);
  opacity: 0.8;
  font-weight: 500;
}

/* === Layout container === */
@media (min-width: 768px) {
  .max-content {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Desktop: 64px — giảm từ 96px */
  .section-py {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }
}

/* Mobile: 36px — giảm từ 64px */
.section-py {
  padding-top: 36px;
  padding-bottom: 36px;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {

  *,
  *:before,
  *:after {
    transition-duration: 0.01ms !important;
  }

  .fade-up,
  .logo-char,
  .crossfade-img,
  .gallery-img {
    transition-duration: 0.01ms !important;
  }
}

/* Number input arrows removed */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}
/* ============================================
   /* ============================================
   SCROLL LOCK (Fix bug block touch trên iOS Safari)
   ✅ FIX: --scroll-y giờ đã có đơn vị px sẵn (set từ JS)
           → calc() ổn định hơn trên iOS Safari, không bị
           tính sai khi URL bar co/giãn.
   ============================================ */
html.scroll-locked {
  overflow: hidden !important;
}

html.scroll-locked body {
  position: fixed !important;
  overflow: hidden !important;
  width: 100% !important;
  top: calc(var(--scroll-y, 0px) * -1) !important;
}