@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@300;400;500;600&family=Noto+Sans+Lao:wght@300;400;500;600&family=Noto+Serif+Lao:wght@400;500;600&display=swap');

/* ============================================
   Design Tokens
   ============================================ */

:root {
  /* Colors — cinematic black + champagne gold */
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-surface-elevated: #1a1a1a;
  --color-border: #2a2a2a;
  --color-border-strong: #3a3a3a;

  --color-text: #f5f5f5;
  --color-text-muted: #a0a0a0;
  --color-text-subtle: #6b6b6b;

  --color-accent: #c8a55c;
  --color-accent-hover: #d9b876;
  --color-accent-muted: #8a7442;

  --color-overlay: rgba(10, 10, 10, 0.7);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale — mobile-first */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 4rem;

  /* Spacing (4px step) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max: 1440px;
  --container-padding: 1.25rem;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 800ms;

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Elevation */
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
  :root {
    --text-3xl: 2.75rem;
    --text-4xl: 4rem;
    --text-5xl: 5.5rem;
    --container-padding: 2rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --text-4xl: 5rem;
    --text-5xl: 7rem;
    --container-padding: 3rem;
  }
}

/* ============================================
   Reset
   ============================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

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

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
}

/* ============================================
   Typography
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h1 {
  font-size: var(--text-5xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

small {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

strong {
  font-weight: 500;
  color: var(--color-text);
}

/* ============================================
   Accents & Interactions
   ============================================ */

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

a:hover {
  color: var(--color-accent);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================
   Utility
   ============================================ */

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-accent {
  color: var(--color-accent);
}

.text-muted {
  color: var(--color-text-muted);
}

.font-display {
  font-family: var(--font-display);
}

/* Lao font utility classes — add to any element containing Lao text */

.font-lao-serif {
  font-family: 'Cormorant Garamond', 'Noto Serif Lao', Georgia, serif;
}

.font-lao-sans {
  font-family: 'Inter', 'Noto Sans Lao', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Lao subtitle — small italic supporting text under English headings/quotes */

.lao-subtitle {
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-accent);
  line-height: 1.6;
  margin-top: var(--space-2);
  margin-bottom: var(--space-6);
}

.lao-subtitle--sm {
  font-size: var(--text-sm);
}

.lao-subtitle--muted {
  color: rgba(245, 245, 245, 0.6);
}

/* Fade-in on scroll — reveal an element when it enters the viewport */

[data-fade-in] {
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-fade-in].is-in-view {
  opacity: 1;
}

@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;
  }
}
