/* ============================================
   IndiaWildLifeSafari — Shared Design System
   Direction: Warm luxury / Sujan-inspired
   ============================================ */

:root {
  /* Palette — earthy, warm, lived-in */
  --paper: #F3EADB;
  --paper-deep: #EBDFC9;
  --paper-soft: #F7F0E3;
  --ink: #221812;
  --ink-soft: #4A3A2B;
  --ink-muted: #7A6852;
  --sand: #D4BC97;
  --sand-deep: #B8A07C;
  --clay: #B14E29;
  --clay-deep: #8B3A1E;
  --moss: #4A5840;
  --whisper: #E8DCC4;
  --divider: rgba(74, 58, 43, 0.18);

  /* Typography */
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, sans-serif;

  /* Spacing — 8px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;  --s-8: 64px;
  --s-9: 96px; --s-10: 128px; --s-11: 160px; --s-12: 200px;

  /* Layout */
  --max-w: 1440px;
  --gutter: clamp(24px, 5vw, 80px);
  --content-narrow: 68ch;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--paper);
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
  position: relative;
}

/* Paper grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.13  0 0 0 0 0.09  0 0 0 0 0.07  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: opacity 0.3s var(--ease), color 0.3s var(--ease); }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ============================================ TYPOGRAPHY ============================================ */

.display-xl {
  font-family: var(--font-display);
  font-weight: 350;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(3.5rem, 9vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.display-xl em { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100; }

.display-lg {
  font-family: var(--font-display);
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.display-lg em { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100; }

.display-md {
  font-family: var(--font-display);
  font-weight: 380;
  font-variation-settings: "opsz" 72, "SOFT" 40;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.display-md em { font-style: italic; font-variation-settings: "opsz" 72, "SOFT" 100; }

.display-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 36, "SOFT" 30;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-number {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 9, "SOFT" 30;
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  font-feature-settings: "tnum" 1;
}

.lede {
  font-family: var(--font-display);
  font-weight: 380;
  font-variation-settings: "opsz" 72, "SOFT" 70;
  font-size: clamp(1.25rem, 1.75vw, 1.625rem);
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.lede em { font-style: italic; font-variation-settings: "opsz" 72, "SOFT" 100; }

.prose {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ============================================ LAYOUT ============================================ */

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

.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section-deep { background: var(--paper-deep); }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-9);
  align-items: baseline;
}

.section-marker {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  color: var(--ink-muted);
  white-space: nowrap;
}

.section-marker .dash {
  width: 40px;
  height: 1px;
  background: var(--ink-muted);
  display: inline-block;
  vertical-align: middle;
}

.section-title { max-width: 22ch; }

/* ============================================ HEADER ============================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px var(--gutter);
  transition: all 0.4s var(--ease);
}

.site-header.scrolled {
  background: rgba(243, 234, 219, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--divider);
  padding: 14px var(--gutter);
}

.site-header.on-hero:not(.scrolled) .logo,
.site-header.on-hero:not(.scrolled) .nav-link,
.site-header.on-hero:not(.scrolled) .logo-mark { color: var(--paper); }

.site-header.on-hero:not(.scrolled) .nav-cta {
  color: var(--paper);
  border-color: rgba(243, 234, 219, 0.4);
}

.site-header.on-hero:not(.scrolled) .nav-cta:hover {
  background: var(--paper);
  color: var(--ink);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-6);
}

.logo {
  font-family: var(--font-display);
  font-weight: 420;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  transition: color 0.4s var(--ease);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.logo-mark {
  font-family: var(--font-display);
  font-weight: 380;
  font-variation-settings: "opsz" 36, "SOFT" 80;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.4s var(--ease);
  padding-left: 10px;
  border-left: 1px solid currentColor;
}

.primary-nav { display: flex; justify-content: center; gap: var(--s-7); }

.nav-link {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s var(--ease);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 100%;
  height: 1px;
  background: currentColor;
  transition: right 0.4s var(--ease-slow);
}

.nav-link:hover::after, .nav-link.active::after { right: 0; }

.nav-cta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.nav-cta:hover { background: var(--ink); color: var(--paper); }

.mobile-nav-toggle {
  display: none;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================ MEGA MENU ============================================ */

.nav-item { position: static; }
.nav-item.has-mega { position: relative; }

.primary-nav { align-items: center; }

/* Invisible hover bridge — closes the gap between trigger and panel */
.nav-item.has-mega::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -24px;
  right: -24px;
  height: 28px;
  background: transparent;
  pointer-events: none;
}

.nav-item.has-mega:hover::after,
.nav-item.has-mega:focus-within::after,
.nav-item.has-mega.open::after {
  pointer-events: auto;
}

.mega-panel {
  position: fixed;
  left: 0; right: 0;
  top: var(--mega-panel-top, 60px);
  z-index: 60;
  background: var(--paper);
  border-top: 1px solid var(--divider);
  box-shadow: 0 24px 48px -20px rgba(34, 24, 18, 0.15);
  padding: var(--s-7) var(--gutter) var(--s-6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}

.nav-item.has-mega:hover .mega-panel,
.nav-item.has-mega:focus-within .mega-panel,
.nav-item.has-mega.open .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s;
}

/* Lock header padding while mega panel is open to prevent gap shifts */
.site-header:has(.nav-item.has-mega.open),
.site-header:has(.nav-item.has-mega:hover) {
  padding-top: 20px;
  padding-bottom: 20px;
}

.mega-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-5);
  max-width: var(--max-w);
  margin: 0 auto;
}

.mega-inner-3 {
  grid-template-columns: repeat(3, 1fr);
}

.mega-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s var(--ease);
}

.mega-card:hover { opacity: 1; }

.mega-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: var(--s-3);
  background: var(--sand-deep);
}

.mega-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 0.6s var(--ease-slow);
}

.mega-card:hover .mega-card-media img {
  transform: scale(1.04);
}

.mega-card-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  font-size: 1.125rem;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-bottom: var(--s-2);
  line-height: 1.2;
}

.mega-card-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 350;
  font-variation-settings: "opsz" 24, "SOFT" 100;
  font-size: 0.9375rem;
  color: var(--clay);
  margin-bottom: var(--s-2);
  line-height: 1.3;
}

.mega-card-meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mega-footer {
  max-width: var(--max-w);
  margin: var(--s-6) auto 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--divider);
  text-align: right;
}

/* ============================================ HERO ANIMATIONS ============================================ */

@keyframes heroReveal {
  from { transform: scale(1.08); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}

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

/* ============================================ BUTTONS & LINKS ============================================ */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--clay);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--clay);
  margin-top: var(--s-6);
  transition: all 0.3s var(--ease);
}

.text-link::after { content: '→'; font-size: 1em; transition: transform 0.3s var(--ease); }
.text-link:hover { color: var(--clay-deep); border-color: var(--clay-deep); }
.text-link:hover::after { transform: translateX(4px); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 20px 36px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 0;
  transition: all 0.4s var(--ease);
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-primary::after { content: '→'; font-size: 1.1em; transition: transform 0.4s var(--ease); }
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-primary:hover::after { transform: translateX(6px); }

.btn-primary.solid-ink { background: var(--ink); color: var(--paper); }
.btn-primary.solid-ink:hover { background: var(--clay); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: rgba(243, 234, 219, 0.85);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(243, 234, 219, 0.4);
  transition: all 0.3s var(--ease);
  background: none;
  cursor: pointer;
}

.btn-ghost:hover { color: var(--paper); border-color: var(--paper); }

.btn-ghost.on-light {
  color: var(--ink-soft);
  border-color: var(--ink-soft);
}
.btn-ghost.on-light:hover { color: var(--ink); border-color: var(--ink); }

/* ============================================ INQUIRY BLOCK ============================================ */

.inquiry-block {
  background: var(--clay);
  color: var(--paper);
  padding: clamp(80px, 12vw, 140px) 0;
  position: relative;
  overflow: hidden;
}

.inquiry-block::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 240, 220, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(0, 0, 0, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.inquiry-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}

.inquiry-headline { color: var(--paper); }

.inquiry-headline em {
  color: rgba(243, 234, 219, 0.75);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.inquiry-body .prose {
  color: rgba(243, 234, 219, 0.88);
  max-width: 40ch;
  margin-top: var(--s-5);
  font-size: 1.0625rem;
}

.inquiry-actions { display: flex; flex-direction: column; gap: var(--s-4); align-items: flex-start; }

/* ============================================ FOOTER ============================================ */

.site-footer {
  background: var(--ink);
  color: rgba(243, 234, 219, 0.72);
  padding: var(--s-9) 0 var(--s-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(30px, 4vw, 64px);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid rgba(243, 234, 219, 0.12);
}

.footer-brand .display-sm { color: var(--paper); margin-bottom: var(--s-4); }
.footer-brand p { max-width: 38ch; font-size: 0.9375rem; color: rgba(243, 234, 219, 0.6); }

.footer-col-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(243, 234, 219, 0.5);
  margin-bottom: var(--s-5);
}

.footer-list { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.footer-list a { font-size: 0.9375rem; color: rgba(243, 234, 219, 0.82); transition: color 0.3s var(--ease); }
.footer-list a:hover { color: var(--clay); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-6);
  font-size: 0.75rem;
  color: rgba(243, 234, 219, 0.5);
  letter-spacing: 0.08em;
  flex-wrap: wrap;
  gap: var(--s-4);
}

.footer-bottom .made-with {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 9, "SOFT" 70;
  letter-spacing: 0;
  font-size: 0.85rem;
}

/* ============================================ SCROLL REVEAL ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-slow), transform 1s var(--ease-slow);
}

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

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

@media (max-width: 1024px) {
  .primary-nav { gap: var(--s-5); }
  .nav-link { font-size: 0.7rem; }
  .inquiry-inner { grid-template-columns: 1fr; gap: var(--s-6); }
  .mega-inner { grid-template-columns: repeat(2, 1fr); }
  .mega-inner-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --gutter: 24px; }
  .primary-nav { display: none; }
  .mega-panel { display: none; }
  .mobile-nav-toggle { display: block; }
  .header-inner { grid-template-columns: 1fr auto; gap: var(--s-4); }
  .nav-cta { display: none; }

  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: var(--s-4); }
  .section-marker .dash { width: 28px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

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