/* ============================================================
   TNJ - Ngọc Quý Nhi | Main CSS
   Design System: Gold × White × Brown Minimalist Art
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --gold:          #C9A84C;
  --gold-light:    #E8D5A3;
  --gold-dark:     #8B6914;
  --gold-muted:    #b8953e88;
  --brown-deep:    #1E1008;
  --brown-dark:    #2A1A0A;
  --brown-mid:     #3D2410;
  --brown-warm:    #5C3A1E;
  --cream:         #F5F0E8;
  --cream-light:   #FDFAF5;
  --white:         #FFFFFF;
  --text-primary:  #F5F0E8;
  --text-secondary: #C9A884;
  --text-dark:     #2A1A0A;
  --text-muted:    #8B7355;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-2xl: 10rem;

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Montserrat', 'Segoe UI', sans-serif;

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-mid:  0.4s ease;
  --transition-slow: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Shadows */
  --shadow-gold: 0 4px 30px rgba(201, 168, 76, 0.2);
  --shadow-dark: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--brown-dark);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
}

/* --- Typography Scale --- */
.serif { font-family: var(--font-serif); }
.sans  { font-family: var(--font-sans); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}

h1 { font-size: clamp(3rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

/* --- Gold Divider Line --- */
.gold-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: var(--space-sm) auto;
}

.gold-line-left {
  margin: var(--space-sm) 0;
}

/* --- Section Labels --- */
.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition-mid);
  position: relative;
  overflow: hidden;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  color: var(--brown-deep);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(201, 168, 76, 0.4);
}

.btn-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --- Section Padding --- */
.section {
  padding: var(--space-xl) 0;
}

.section-sm {
  padding: var(--space-lg) 0;
}

/* --- Background variants --- */
.bg-dark    { background-color: var(--brown-dark); }
.bg-deeper  { background-color: var(--brown-deep); }
.bg-mid     { background-color: var(--brown-mid); }
.bg-cream   { background-color: var(--cream); color: var(--text-dark); }

/* --- Text Colors --- */
.text-gold    { color: var(--gold); }
.text-cream   { color: var(--cream); }
.text-muted   { color: var(--text-muted); }

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* --- Gold Shimmer Animation --- */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.gold-shimmer {
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 40%, var(--gold) 50%, var(--gold-light) 60%, var(--gold-dark) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* --- Particle / Grain Texture overlay --- */
.texture-overlay {
  position: relative;
}
.texture-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--brown-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* --- Selection --- */
::selection {
  background: rgba(201, 168, 76, 0.3);
  color: var(--cream-light);
}

/* --- Page Banner (sub pages) --- */
.page-banner {
  position: relative;
  height: 45vh;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.page-banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35);
  transform: scale(1.05);
  transition: transform 8s ease;
}

.page-banner:hover .page-banner__bg {
  transform: scale(1.08);
}

.page-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,16,8,0.2) 0%, rgba(30,16,8,0.6) 100%);
}

.page-banner__content {
  position: relative;
  z-index: 2;
}

/* ── Responsive ──────────────────────────────── */

/* Tablet 1024px */
@media (max-width: 1024px) {
  .featured__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid    { grid-template-columns: repeat(2, 1fr); }
}

/* Large tablet / phablet 768px */
@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
  }

  .container, .container-wide {
    padding: 0 1.25rem;
  }

  /* Hero */
  .hero__title    { font-size: clamp(2.6rem, 11vw, 4rem); }
  .hero__subtitle { font-size: 0.9rem; max-width: 100%; }
  .hero__actions  { flex-direction: column; gap: 0.75rem; }
  .hero__actions .btn { text-align: center; justify-content: center; }
  .hero__scroll   { display: none; }

  /* Highlights */
  .highlights__grid { grid-template-columns: 1fr; }
  .highlight-item   { padding: 2rem 1.5rem; }

  /* Stats */
  .stats__grid    { grid-template-columns: repeat(2, 1fr); }

  /* Intro band */
  .intro-band__inner { grid-template-columns: 1fr; }
  .intro-band__image { max-height: 280px; }
}

/* Phone 480px */
@media (max-width: 480px) {
  :root {
    --space-lg: 2.5rem;
    --space-xl: 3rem;
  }

  /* Hero smaller phones */
  .hero { min-height: 580px; }
  .hero__title  { font-size: clamp(2.2rem, 12vw, 3rem); }
  .hero__label  { margin-bottom: 1rem; }
  .hero__content { padding-top: 1rem; }

  /* Featured grid 1 col */
  .featured__grid { grid-template-columns: 1fr; }

  /* Stats 2 col still */
  .stat-item__number { font-size: 2.2rem; }

  /* Intro band */
  .intro-band__image { max-height: 220px; }

  /* Quote section */
  .quote-mark   { font-size: 3.5rem; }
}

/* Small phone 390px (iPhone 14) */
@media (max-width: 390px) {
  .hero__title { font-size: 2rem; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item   { padding: 1.25rem 1rem; }
  .stat-item__number { font-size: 2rem; }
}
