/* ============================================
   SONGKRAN V5 — PREMIUM HERITAGE DESIGN
   ============================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* -- THEME: HERITAGE GOLD -- */
  --blue: #C5A059;       /* Primary Gold */
  --blue-dark: #8A6B32;  /* Deep Antique Gold */
  --blue-light: #E6C887; /* Soft Gold */
  --blue-50: #FAF6ED;    /* Pearl Gold */
  --blue-100: #F0E3C2;   /* Champagne Gold */
  --navy: #1F1714;       /* Dark Teak Wood */
  --gold: #D4A853;
  --gold-light: #F0D68A;
  --white: #FFFFFF;
  --gray-50: #FAFBFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --black: #020617;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.06);
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
  --font-sans: 'Prompt', 'Noto Sans Thai', -apple-system, sans-serif;
  --font-serif: 'Noto Serif Thai', 'Prompt', serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--gray-700);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.hide-mobile { display: inline; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 50px;
  background: var(--blue-50);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: .95rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

.text-left { text-align: left; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background .4s, box-shadow .4s, backdrop-filter .4s;
  background: rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.navbar.scrolled {
  background: rgba(255,255,255,.95);
  box-shadow: 0 1px 20px rgba(0,0,0,.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--gray-900);
}

.logo-icon {
  font-size: 1.3rem;
}

.logo-text {
  text-transform: uppercase;
}

.logo-accent {
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gray-900);
  background: var(--gray-100);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta {
  padding: 10px 24px;
  border-radius: 50px;
  background: var(--blue);
  color: var(--white);
  font-size: .82rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(21,101,192,.25);
}

.nav-cta:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(21,101,192,.35);
}

.lang-toggle {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 12px;
}

.lang-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 60%);
}

.hero-water-top {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  max-width: 1400px;
  opacity: .25;
  pointer-events: none;
  z-index: 1;
}

.hero-splash-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0));
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0));
}

.hero-water-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(227,242,253,.3) 0%, rgba(255,255,255,.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(21,101,192,.08);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeIn 1s ease-out;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6.5vw, 3.8rem);
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 20px;
  animation: fadeUp .8s ease-out;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(.88rem, 2vw, 1.05rem);
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 40px;
  animation: fadeUp .8s ease-out .15s both;
}

.hero-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp .8s ease-out .3s both;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: .88rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(21,101,192,.3);
  position: relative;
  overflow: hidden;
}

.btn-hero-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.2) 50%, transparent 60%);
  transform: translateX(-150%);
  transition: transform .6s;
}

.btn-hero-primary:hover::after {
  transform: translateX(150%);
}

.btn-hero-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(21,101,192,.4);
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  background: var(--white);
  color: var(--gray-700);
  font-family: var(--font-sans);
  font-size: .88rem;
  font-weight: 500;
  border: 1.5px solid var(--gray-200);
  transition: var(--transition);
}

.btn-hero-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue);
  font-size: .7rem;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeUp .8s ease-out .5s both;
}

.scroll-line {
  width: 2px;
  height: 48px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 16px;
  background: var(--blue);
  border-radius: 2px;
  animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: 0; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ============================================
   THREE PILLARS
   ============================================ */
.pillars-section {
  background: var(--gray-50);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pillar-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .4s, box-shadow .4s;
  border: 1px solid var(--gray-200);
}

.pillar-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.pillar-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.pillar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.pillar-card:hover .pillar-img {
  transform: scale(1.05);
}

.pillar-icon {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  z-index: 2;
  border: 2px solid var(--gray-100);
}

.pillar-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  padding: 28px 24px 8px;
  text-align: center;
}

.pillar-desc {
  font-size: .85rem;
  color: var(--gray-500);
  line-height: 1.7;
  padding: 0 24px 28px;
  text-align: center;
}

/* ============================================
   BENTO GRID — REGIONAL HERITAGE
   ============================================ */
.heritage-section {
  background: var(--white);
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 280px 220px;
  gap: 16px;
}

.bento-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}

.bento-item:hover img {
  transform: scale(1.06);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: background .4s;
}

.bento-item:hover .bento-overlay {
  background: linear-gradient(0deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 60%, rgba(0,0,0,.05) 100%);
}

.bento-tag {
  display: inline-flex;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.bento-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.bento-desc {
  font-size: .78rem;
  color: rgba(255,255,255,.7);
  margin-top: 6px;
  line-height: 1.6;
}

.bento-large {
  grid-row: 1 / 3;
}

.bento-top-right {
  grid-column: 2;
  grid-row: 1;
}

.bento-btm-right-left,
.bento-btm-right-right {
  /* these will be 2 items in the bottom-right area */
}

/* Make bottom right into 2 columns */
.bento-grid {
  grid-template-columns: 5fr 3fr 2fr;
  grid-template-rows: 300px 220px;
}

.bento-large {
  grid-column: 1;
  grid-row: 1 / 3;
}

.bento-top-right {
  grid-column: 2 / 4;
  grid-row: 1;
}

.bento-btm-right-left {
  grid-column: 2;
  grid-row: 2;
}

.bento-btm-right-right {
  grid-column: 3;
  grid-row: 2;
}

/* ============================================
   TRUE MEANING
   ============================================ */
.meaning-section {
  background: var(--gray-50);
}

.meaning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.meaning-images {
  position: relative;
}

.meaning-img-main {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.meaning-img-main img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.meaning-img-small {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 180px;
  height: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 5px solid var(--white);
  box-shadow: var(--shadow-lg);
}

.meaning-img-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meaning-content .section-label {
  margin-bottom: 12px;
}

.meaning-content .section-title {
  margin-bottom: 32px;
}

.meaning-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.meaning-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}

.meaning-feature:hover {
  background: var(--white);
  border-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.mf-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.mf-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.mf-desc {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ============================================
   MODERN SYNTHESIS
   ============================================ */
.modern-section {
  background: var(--white);
  padding: 60px 0 100px;
}

.modern-card {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue), #1976D2);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.modern-content {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modern-label {
  display: inline-flex;
  width: fit-content;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.modern-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 16px;
}

.modern-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.75);
  line-height: 1.8;
  margin-bottom: 32px;
}

.modern-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-modern-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 50px;
  background: var(--white);
  color: var(--blue-dark);
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-modern-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
}

.btn-modern-ghost {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 50px;
  background: transparent;
  color: rgba(255,255,255,.9);
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 500;
  border: 1.5px solid rgba(255,255,255,.3);
  transition: var(--transition);
}

.btn-modern-ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.5);
  transform: translateY(-2px);
}

.modern-img-wrap {
  position: relative;
  overflow: hidden;
}

.modern-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   TIMELINE — 3 DAYS
   ============================================ */
.timeline-section {
  background: var(--gray-50);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: transform .4s, box-shadow .4s;
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  transform: scaleX(0);
  transition: transform .4s;
}

.timeline-card:hover::before {
  transform: scaleX(1);
}

.timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.tc-day {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 16px;
  opacity: .2;
}

.timeline-card:hover .tc-day {
  opacity: .4;
}

.tc-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.tc-desc {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 20px;
}

.tc-tag {
  display: inline-flex;
  padding: 5px 14px;
  border-radius: 50px;
  background: var(--blue-50);
  color: var(--blue);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.6);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo .logo-text {
  color: var(--white);
}

.footer-tagline {
  font-size: .82rem;
  line-height: 1.7;
  color: rgba(255,255,255,.4);
}

.footer-heading {
  font-size: .75rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 20px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding: 24px 0;
  font-size: .75rem;
  color: rgba(255,255,255,.3);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease-out, transform .7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.pillars-grid .reveal:nth-child(2) { transition-delay: .12s; }
.pillars-grid .reveal:nth-child(3) { transition-delay: .24s; }
.timeline-grid .reveal:nth-child(2) { transition-delay: .12s; }
.timeline-grid .reveal:nth-child(3) { transition-delay: .24s; }
.bento-grid .reveal:nth-child(2) { transition-delay: .1s; }
.bento-grid .reveal:nth-child(3) { transition-delay: .2s; }
.bento-grid .reveal:nth-child(4) { transition-delay: .3s; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* ============================================
   CARD GAME (PREMIUM HERITAGE DESIGN)
   ============================================ */
.cardgame-section {
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.cardgame-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(197, 160, 89, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cardgame-section .section-title {
  color: var(--gold-light);
}

.cardgame-section .section-label {
  background: rgba(255,255,255,0.1);
  color: var(--gold-light);
}

.cardgame-section .section-desc {
  color: rgba(255,255,255,.6);
}

.cg-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 50px;
}

.cg-card-scene {
  perspective: 1200px;
  width: 300px;
  height: 440px;
  margin-bottom: 40px;
  z-index: 10;
}

.cg-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.cg-card:focus-visible {
  outline: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  outline-offset: 6px;
}

.cg-card.flipped {
  transform: rotateY(180deg);
}

.cg-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  background: var(--navy);
  border: 1px solid rgba(197, 160, 89, 0.5);
  overflow: hidden;
}

.cg-card-face::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 8px;
  pointer-events: none;
}

.cg-card-face::before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(197, 160, 89, 0.2);
  border-radius: 4px;
  pointer-events: none;
}

.cg-card-front {
  background: linear-gradient(135deg, #0F172A 0%, #1a1513 50%, #0F172A 100%);
}

.cg-front-logo {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blue-light);
  margin-bottom: 8px;
  line-height: 1;
}

.cg-front-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.cg-front-deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.cg-front-deco span {
  width: 6px;
  height: 6px;
  background-color: var(--gold);
  transform: rotate(45deg);
}
.cg-front-deco span:nth-child(2) {
  width: 10px; height: 10px;
}

.cg-front-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.cg-front-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 1px;
  padding: 8px 24px;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 50px;
  background: rgba(197, 160, 89, 0.05);
  animation: pulseCardText 2.5s infinite;
}

.cg-card-back {
  background: linear-gradient(135deg, #181c25 0%, #15100e 100%);
  transform: rotateY(180deg);
}

.cg-back-crown {
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 12px;
  line-height: 1;
}

.cg-back-title {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--gold-light);
  font-size: 1.4rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.cg-back-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 20px;
}

.cg-back-msg {
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.cg-back-for {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cg-back-who {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue-light);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.cg-back-year {
  font-size: 0.7rem;
  color: rgba(197, 160, 89, 0.6);
  letter-spacing: 1px;
}

.cg-deck {
  position: absolute;
  top: 0; left: 50%;
  width: 300px; height: 440px;
  transform: translateX(-50%);
  z-index: 1;
}

.cg-deck-card {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--navy);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(197, 160, 89, 0.2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cg-deck-card.dc-1 { transform: translateY(8px) scale(0.96); opacity: 0.8; }
.cg-deck-card.dc-2 { transform: translateY(16px) scale(0.92); opacity: 0.5; }
.cg-deck-card.dc-3 { transform: translateY(24px) scale(0.88); opacity: 0.2; }

.cg-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
  z-index: 10;
}

.cg-btn {
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cg-btn-draw {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(197, 160, 89, 0.2);
}

.cg-btn-draw:hover {
  background: linear-gradient(135deg, var(--white), var(--gold-light));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(197, 160, 89, 0.4);
}

.cg-btn-copy {
  background: transparent;
  color: var(--gold-light);
  border-color: rgba(197, 160, 89, 0.4);
  display: none;
}

.cg-btn-copy:hover {
  background: rgba(197, 160, 89, 0.1);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.cg-toast {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--white);
  color: var(--navy);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cg-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cg-counter {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cg-hint {
  font-size: 0.75rem;
  color: rgba(197, 160, 89, 0.6);
  max-width: 320px;
  text-align: center;
  line-height: 1.6;
}

@keyframes pulseCardText {
  0% { opacity: 0.6; border-color: rgba(197, 160, 89, 0.2); }
  50% { opacity: 1; border-color: rgba(197, 160, 89, 0.6); }
  100% { opacity: 0.6; border-color: rgba(197, 160, 89, 0.2); }
}

/* Tablet */
@media (max-width: 900px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pillar-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto auto;
  }

  .pillar-img-wrap {
    grid-row: 1 / 3;
    height: 100%;
  }

  .pillar-title {
    text-align: left;
    padding: 20px 20px 4px;
  }

  .pillar-desc {
    text-align: left;
    padding: 0 20px 20px;
  }

  .pillar-icon { display: none; }

  .bento-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
  }

  .bento-large {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .bento-top-right {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .bento-btm-right-left {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .bento-btm-right-right {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  .meaning-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .meaning-img-main img { height: 360px; }
  .meaning-img-small { right: 20px; bottom: -20px; width: 140px; height: 140px; }

  .modern-card { grid-template-columns: 1fr; }
  .modern-img-wrap { height: 280px; }
  .modern-content { padding: 40px 32px; }

  .timeline-grid { grid-template-columns: 1fr; gap: 16px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand { grid-column: 1 / -1; }
}

/* Mobile */
@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    animation: fadeUp .3s ease-out;
  }

  .nav-links.open .nav-link {
    padding: 12px 0;
    font-size: .9rem;
  }

  .hide-mobile { display: none; }

  .section { padding: 64px 0; }
  .section-header { margin-bottom: 40px; }

  .hero-content { padding: 100px 20px 60px; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: .88rem; }
  .hero-btns { flex-direction: column; }
  .btn-hero-primary, .btn-hero-ghost { width: 100%; justify-content: center; }
  .hero-scroll { display: none; }

  .pillar-card {
    grid-template-columns: 1fr;
  }
  .pillar-img-wrap { height: 200px; grid-row: auto; }
  .pillar-title { text-align: center; }
  .pillar-desc { text-align: center; }

  .bento-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  .bento-large,
  .bento-top-right,
  .bento-btm-right-left,
  .bento-btm-right-right {
    grid-column: 1 !important;
    grid-row: auto !important;
    height: 220px;
  }

  .bento-large { height: 300px; }

  .meaning-img-main img { height: 280px; }
  .meaning-img-small { width: 120px; height: 120px; right: 10px; bottom: -16px; }

  .modern-content { padding: 32px 24px; }
  .modern-title { font-size: 1.4rem; }
  .modern-btns { flex-direction: column; }
  .btn-modern-primary, .btn-modern-ghost { width: 100%; justify-content: center; text-align: center; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

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