/**
 * assets/css/base.css
 * File DÙNG CHUNG cho toàn bộ trang - luôn load đầu tiên, trước mọi CSS
 * riêng của từng section. Gồm: @font-face, design tokens, reset, các class
 * typography/tiện ích dùng lại nhiều nơi, smooth-scroll, và hệ lưới 12 cột.
 *
 * QUY TẮC khi thêm section mới:
 * 1. Tạo file CSS riêng: assets/css/<ten-section>.css
 * 2. KHÔNG định nghĩa lại token màu/font ở file section - luôn dùng biến
 *    từ đây (var(--green), var(--font-display)...).
 * 3. Thêm 1 dòng <link> gọi file mới đó vào index.php, đặt SAU base.css.
 */

/* ================= FONT FACES ================= */
/* Đường dẫn tương đối từ assets/css/*.css -> ../fonts/ (mọi file css đều
   nằm cùng cấp thư mục assets/css/, nên đường dẫn này áp dụng chung). */

@font-face {
  font-family: "Beautique Display";
  src: url("../fonts/BeautiqueDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Beautique Display";
  src: url("../fonts/BeautiqueDisplay-Italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ================= DESIGN TOKENS ================= */

:root {
  --cream: #fffbf4;
  --champagne: #feeecd;
  --green: #17403e;
  --green-deep: #17403e;
  --gold: #c6934c;
  --ink: #2a2620;
  --ink-soft: #5b5548;

  /* Font tokens - dùng biến này trong toàn bộ CSS, không gõ tên font lại nhiều nơi */
  --font-display: "Beautique Display", Georgia, serif;
  --font-body: "Montserrat", Arial, sans-serif;

  /* Khoảng cách chuẩn cho hệ lưới 12 cột - dùng chung để mọi section thẳng hàng nhau */
  --grid-max-width: 1440px;
  --grid-gap: clamp(16px, 2.5vw, 24px);
  --grid-padding: clamp(16px, 4vw, 24px);
}

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

html {
  scroll-padding-top: 92px; /* bù trừ chiều cao sticky nav khi click mỏ neo */
  overflow-x: hidden; /* Safari iOS KHÔNG tôn trọng overflow-x:hidden ở body,
                          phải đặt ở html mới thực sự chặn được cuộn ngang */
  width: 100%;
}

body {
  overflow-x: hidden; /* an toàn khi có phần tử tràn ngang (VD hero-gallery coverflow) */
  max-width: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ================= TYPOGRAPHY UTILITY CLASSES ================= */

/* Heading: dùng cho h1/h2/h3 và mọi headline lớn (Hero, tên section...) */
h1,
h2,
h3,
.serif {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.01em;
}

/* Từ nhấn cảm xúc trong headline, luôn in nghiêng */
.italic-accent {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
}

/* Nhãn viết hoa, tracking rộng - dùng cho eyebrow text, ví dụ "EXCLUSIVE IN HCMC" */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

/* Nút CTA, nav link - cần chữ chắc tay hơn body thường */
.btn,
nav a,
.nav-links a {
  font-family: var(--font-body);
  font-weight: 600;
}

/* ================= HỆ LƯỚI 12 CỘT (Yêu cầu #3) =================
   Dùng cho MỌI section mới để bố cục thẳng hàng nhau trên toàn trang.
   Cách dùng trong PHP:

   <div class="grid-12">
     <div class="col-8">... chiếm 8/12 cột ...</div>
     <div class="col-4">... chiếm 4/12 cột ...</div>
   </div>

   Mobile mặc định MỌI cột tự động full-width (col-span-12), tự thu gọn xuống
   xếp chồng - không cần viết riêng CSS mobile cho từng section. Từ 768px trở
   lên mới thực sự chia theo đúng số cột đã khai báo trong class. */

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--grid-padding);
}

.col-1 {
  grid-column: span 12;
}
.col-2 {
  grid-column: span 12;
}
.col-3 {
  grid-column: span 12;
}
.col-4 {
  grid-column: span 12;
}
.col-5 {
  grid-column: span 12;
}
.col-6 {
  grid-column: span 12;
}
.col-7 {
  grid-column: span 12;
}
.col-8 {
  grid-column: span 12;
}
.col-9 {
  grid-column: span 12;
}
.col-10 {
  grid-column: span 12;
}
.col-11 {
  grid-column: span 12;
}
.col-12 {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .col-1 {
    grid-column: span 1;
  }
  .col-2 {
    grid-column: span 2;
  }
  .col-3 {
    grid-column: span 3;
  }
  .col-4 {
    grid-column: span 4;
  }
  .col-5 {
    grid-column: span 5;
  }
  .col-6 {
    grid-column: span 6;
  }
  .col-7 {
    grid-column: span 7;
  }
  .col-8 {
    grid-column: span 8;
  }
  .col-9 {
    grid-column: span 9;
  }
  .col-10 {
    grid-column: span 10;
  }
  .col-11 {
    grid-column: span 11;
  }
  .col-12 {
    grid-column: span 12;
  }
}

/* Container thường (không chia cột) nhưng vẫn thẳng hàng với .grid-12 -
   dùng cho section chỉ cần căn giữa + max-width, không cần chia lưới. */
.container {
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--grid-padding);
}
