/* ============================================
   BASE.CSS — The Moksha Retreat
   Boho Himalayan Luxury
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Color Palette */
  --sand: #E8D5B7;
  --sand-light: #F2E8D5;
  --clay: #7C4A2B;
  --clay-dark: #5C3420;
  --forest: #2A4A1F;
  --forest-light: #3D6B2C;
  --ivory: #FAF7F2;
  --charcoal: #1C1C1C;
  --warm-white: #F8F4EE;
  --gold: #C9A96E;
  --gold-light: #E8C98A;

  /* Derived / UI Colors */
  --text-primary: #1C1C1C;
  --text-secondary: #4A4A4A;
  --text-muted: #7A7A7A;
  --border-light: rgba(124, 74, 43, 0.15);
  --border-mid: rgba(124, 74, 43, 0.25);
  --overlay-dark: rgba(28, 28, 28, 0.55);
  --overlay-darker: rgba(28, 28, 28, 0.72);
  --glass-bg: rgba(250, 247, 242, 0.12);
  --glass-border: rgba(250, 247, 242, 0.2);
  --glass-bg-light: rgba(250, 247, 242, 0.85);
  --glass-border-light: rgba(201, 169, 110, 0.3);

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'Plus Jakarta Sans', 'system-ui', sans-serif;

  /* Fluid Type Scale */
  --text-xs:   clamp(0.70rem, 0.65rem + 0.25vw, 0.80rem);
  --text-sm:   clamp(0.85rem, 0.80rem + 0.25vw, 0.938rem);
  --text-base: clamp(1rem,    0.95rem + 0.25vw, 1.063rem);
  --text-md:   clamp(1.063rem,1rem + 0.35vw, 1.188rem);
  --text-lg:   clamp(1.125rem,1rem + 0.65vw, 1.375rem);
  --text-xl:   clamp(1.25rem, 1rem + 1.25vw, 1.75rem);
  --text-2xl:  clamp(1.5rem,  1rem + 2.5vw, 2.5rem);
  --text-3xl:  clamp(2rem,    1rem + 4vw, 3.5rem);
  --text-4xl:  clamp(2.5rem,  1rem + 6vw, 5rem);
  --text-5xl:  clamp(3rem,    1rem + 8vw, 6.5rem);

  /* Spacing */
  --space-xs:  0.375rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;

  /* Layout */
  --container-max: 1280px;
  --container-wide: 1440px;
  --navbar-h: 70px;
  --navbar-h-mobile: 60px;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(28,28,28,0.08), 0 1px 2px rgba(28,28,28,0.06);
  --shadow-md:  0 4px 16px rgba(28,28,28,0.10), 0 2px 6px rgba(28,28,28,0.08);
  --shadow-lg:  0 10px 40px rgba(28,28,28,0.14), 0 4px 16px rgba(28,28,28,0.10);
  --shadow-xl:  0 20px 60px rgba(28,28,28,0.18), 0 8px 24px rgba(28,28,28,0.12);
  --shadow-clay: 0 8px 32px rgba(124,74,43,0.20);
  --shadow-gold: 0 4px 20px rgba(201,169,110,0.30);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   280ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base:      1;
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-overlay:   300;
  --z-modal:     400;
  --z-toast:     500;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--sand-light);
}
::-webkit-scrollbar-thumb {
  background: var(--clay);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clay-dark);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--clay) var(--sand-light);
}

/* --- Base Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); font-weight: 400; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.75;
}

.serif { font-family: var(--font-serif); }
.sans  { font-family: var(--font-sans); }

strong, b { font-weight: 600; }
em, i { font-style: italic; }

/* --- Utility: Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}
.container--wide {
  max-width: var(--container-wide);
}
.container--narrow {
  max-width: 780px;
}

/* --- Utility: Section --- */
.section {
  padding-block: clamp(4rem, 10vw, 7rem);
}
.section--sm {
  padding-block: clamp(2rem, 6vw, 4rem);
}
.section--lg {
  padding-block: clamp(5rem, 12vw, 10rem);
}

/* --- Utility: Grid --- */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

/* --- Utility: Flex --- */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm     { gap: var(--space-sm); }
.gap-md     { gap: var(--space-md); }
.gap-lg     { gap: var(--space-lg); }

/* --- Utility: Text --- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }

.text-clay    { color: var(--clay); }
.text-forest  { color: var(--forest); }
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-ivory   { color: var(--ivory); }
.text-sand    { color: var(--sand); }

.font-light    { font-weight: 300; }
.font-regular  { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

/* --- Utility: Background --- */
.bg-ivory      { background-color: var(--ivory); }
.bg-warm-white { background-color: var(--warm-white); }
.bg-sand       { background-color: var(--sand); }
.bg-sand-light { background-color: var(--sand-light); }
.bg-clay       { background-color: var(--clay); }
.bg-forest     { background-color: var(--forest); }
.bg-charcoal   { background-color: var(--charcoal); }

/* --- Utility: Spacing --- */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.py-sm  { padding-block: var(--space-sm); }
.py-md  { padding-block: var(--space-md); }
.py-lg  { padding-block: var(--space-lg); }
.px-sm  { padding-inline: var(--space-sm); }
.px-md  { padding-inline: var(--space-md); }
.px-lg  { padding-inline: var(--space-lg); }

/* --- Utility: Display --- */
.hidden   { display: none; }
.block    { display: block; }
.inline-block { display: inline-block; }
.relative { position: relative; }
.absolute { position: absolute; }

/* --- Utility: Overflow --- */
.overflow-hidden { overflow: hidden; }

/* --- Utility: Section Label --- */
.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: var(--space-md);
}
.section-label--light {
  color: var(--gold-light);
}

/* --- Utility: Decorative Line --- */
.deco-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--clay), var(--gold));
  border-radius: var(--radius-full);
  margin: var(--space-md) auto;
}
.deco-line--left {
  margin-left: 0;
}

/* --- Divider --- */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  margin-block: var(--space-xl);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --navbar-h: var(--navbar-h-mobile);
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }
}
