/* ============================================
   SHARED CSS — used by all pages
   ============================================ */

/* ========== CUSTOM PROPERTIES ========== */
:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --accent: #c9a96e;
  --accent-hover: #d4b87a;
  --text: #e8e8e8;
  --text-muted: #888;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(201, 169, 110, 0.15);
  --font-heading: 'Cormorant Garamond', 'Noto Serif Thai', serif;
  --font-body: 'Inter', 'Noto Sans Thai', sans-serif;
  --font-ui: 'DM Sans', 'Noto Sans Thai', sans-serif;
  --nav-height: 72px;
  --container: 1200px;
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ========== SKIP LINK ========== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* ========== LAYOUT ========== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

/* ========== TYPOGRAPHY ========== */
h1, h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.3;
}

/* ========== SHARED ELEMENTS ========== */
.gold-rule {
  width: 60px;
  height: 2px;
  background: var(--accent);
  border: none;
}
.section-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-padding {
  padding: clamp(80px, 10vw, 140px) 0;
}

/* ========== FOCUS STYLES ========== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ========== ANIMATIONS ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 3px;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== NAVIGATION ========== */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: background var(--transition), backdrop-filter var(--transition), -webkit-backdrop-filter var(--transition), border-color var(--transition);
  will-change: background, backdrop-filter;
  transform: translateZ(0);
}
.nav-scrolled {
  background: rgba(15, 15, 15, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-solid {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: none;
  gap: 2.5rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.lang-selector {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.lang-btn {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 3px;
  transition: color var(--transition);
  letter-spacing: 0.05em;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--accent); }
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}
body.menu-open .hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== MOBILE MENU ========== */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu .lang-selector { margin-top: 1rem; }

/* Nav responsive */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
}

/* ========== FOOTER ========== */
.footer {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.footer-logo span { color: var(--accent); }
.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer responsive */
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; }
}
