/* ============================================================
   GENESIS x SONESTA LOCAL FRANCHISE — Design System
   Cream/Gold/Serif Editorial — Published-Book Quality
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --gold: #C5A258;
  --gold-light: #D4B76A;
  --gold-dark: #A68942;
  --dark: #1A1A2E;
  --darker: #0F0F1A;
  --cream: #FAF8F5;
  --cream-dark: #F0EDE8;
  --warm-white: #FDFCFA;
  --text-primary: #2C2C2C;
  --text-secondary: #5A5A5A;
  --text-light: #8A8A8A;
  --sonesta-blue: #003B5C;
  --success: #2D7A4F;
  --accent-warm: #D4956A;
  --border: #E8E4DD;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-gold: 0 4px 20px rgba(197,162,88,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --max-width: 1100px;
  --max-width-narrow: 780px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--dark);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h4 { font-size: 1.2rem; font-weight: 700; font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--gold); }
p { margin-bottom: 1.2rem; color: var(--text-secondary); }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
strong { color: var(--text-primary); font-weight: 600; }
blockquote {
  border-left: 3px solid var(--gold);
  padding: 1.2rem 1.8rem;
  margin: 2rem 0;
  background: var(--warm-white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}
blockquote strong { color: var(--dark); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253,252,250,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
}
.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.02em;
}
.nav-brand span { color: var(--gold); }
.nav-links { display: flex; gap: 1.8rem; align-items: center; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--dark); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--dark); }
.nav-links a.active::after { width: 100%; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: var(--transition);
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--warm-white);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
}

/* --- Hero Sections --- */
.hero {
  padding: 10rem 2rem 5rem;
  text-align: center;
  background: linear-gradient(170deg, var(--darker) 0%, var(--dark) 50%, #1E2744 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(197,162,88,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(0,59,92,0.1) 0%, transparent 50%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}
.hero h4 {
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}
.hero h1 {
  color: white;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 2rem;
}

/* --- Page Sections --- */
.section {
  padding: 5rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 5rem 2rem;
}
.section-dark {
  background: var(--dark);
  color: white;
  padding: 5rem 2rem;
}
.section-dark h2, .section-dark h3 { color: white; }
.section-dark p { color: rgba(255,255,255,0.7); }
.section-cream {
  background: var(--cream-dark);
  padding: 5rem 2rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h4 { margin-bottom: 0.8rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.gold-line {
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin: 1.5rem auto;
}

/* --- Cards --- */
.card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card-gold {
  border-left: 3px solid var(--gold);
  position: relative;
}
.card-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -3px;
  width: 3px;
  height: 0;
  background: var(--gold-light);
  transition: height 0.4s ease;
}
.card-gold:hover::before {
  height: 100%;
}
.card h3 { margin-bottom: 0.8rem; font-size: 1.3rem; }
.card p:last-child { margin-bottom: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
}
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.92rem;
}
thead { background: var(--dark); }
thead th {
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 1rem 1.2rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tbody td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--cream); }
.table-highlight td {
  background: rgba(197,162,88,0.08);
  font-weight: 600;
  color: var(--dark);
}

/* --- Stats / Metrics --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  font-weight: 500;
}

/* Dark stats */
.section-dark .stat-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
.section-dark .stat-label { color: rgba(255,255,255,0.5); }

/* --- Letter / Prose --- */
.letter {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 4rem 3rem;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
}
.letter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.letter-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.letter-meta strong { color: var(--text-secondary); }
.letter p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}
.letter .signature {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.letter .signature strong {
  display: block;
  font-size: 1.1rem;
  color: var(--dark);
}
.letter .ps {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* --- Buttons / CTA --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-gold {
  background: var(--gold);
  color: white;
}
.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
  color: white;
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: white;
}
.btn-dark {
  background: var(--dark);
  color: white;
}
.btn-dark:hover {
  background: var(--darker);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

/* --- Lists --- */
.check-list {
  list-style: none;
  padding: 0;
}
.check-list li {
  padding: 0.6rem 0 0.6rem 2rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.6;
}
.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.65rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  border: 3px solid var(--cream);
}
.timeline-item h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

/* --- Footer --- */
.footer {
  background: var(--darker);
  color: rgba(255,255,255,0.5);
  padding: 3rem 2rem;
  text-align: center;
  font-size: 0.85rem;
}
.footer a { color: var(--gold); }
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(170deg, var(--dark) 0%, var(--darker) 100%);
  color: white;
}
.cta-section h2 { color: white; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.7); margin-bottom: 2rem; }

/* --- Focus States (Accessibility) --- */
a:focus-visible, .btn:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.nav-links a:focus-visible::after { width: 100%; }

/* --- Hero Entrance Animation --- */
@keyframes heroFadeIn {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
.hero-content {
  animation: heroFadeIn 1.2s ease-out;
}

/* --- Gold Line Draw (GSAP handles, but base state needed) --- */
.gold-line {
  display: block;
  overflow: hidden;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- Responsive --- */
/* --- Photo Strip (index page) --- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 220px;
  overflow: hidden;
}
.photo-strip > div {
  filter: brightness(0.9);
  transition: filter 0.4s ease;
}
.photo-strip > div:hover {
  filter: brightness(1.05);
}

@media (max-width: 768px) {
  .hero { padding: 8rem 1.5rem 3.5rem; }
  .section, .section-narrow { padding: 3rem 1.5rem; }
  .section-dark, .section-cream { padding: 3rem 1.5rem; }
  .letter { padding: 2.5rem 1.8rem; }
  .card { padding: 1.8rem; }
  .card-grid, .card-grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 2.2rem; }
  .nav-inner { padding: 0.8rem 1.2rem; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); height: 180px; }
}

/* --- Print --- */
@media print {
  .nav, .footer, .cta-section { display: none !important; }
  .hero { padding: 2rem 0; background: white !important; color: black !important; }
  .hero::before { display: none; }
  .hero h1, .hero h4, .hero p { color: black !important; }
  .hero-divider { background: #999; }
  .section-dark { background: #f5f5f5 !important; color: black !important; }
  .section-dark h2, .section-dark h3, .section-dark h4 { color: black !important; }
  .section-dark p { color: #333 !important; }
  .section-dark .stat-card { background: white !important; border: 1px solid #ddd !important; }
  .section-dark .stat-label { color: #666 !important; }
  body { font-size: 11pt; background: white; }
  section { padding: 30px 0 !important; }
  .card, .stat-card, .letter {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    background: white !important;
  }
  .card-grid, .card-grid-3 { display: block !important; }
  .card-grid > *, .card-grid-3 > * { margin-bottom: 16px; }
  h2 { page-break-after: avoid; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #666; }
  .nav-links a::after { display: none; }
  .btn::after { display: none; }
  @page { margin: 1.5cm; }
}
