/* ============================================================
   WQHolystic — Global Stylesheet
   Design: Relume Concept 1
   ============================================================

   TABLE OF CONTENTS
   1. Custom Properties (Design Tokens)
   2. Reset & Base
   3. Typography
   4. Layout Utilities
   5. Buttons
   6. Section Utilities
   7. Animations
   ============================================================ */

/* ============================================================
   1. CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* --- Colors --- */
  --color-green:        #2E5A45;   /* Stromboli — primary dark green */
  --color-green-dark:   #1E3D2F;   /* Deeper green for hover/dark sections */
  --color-green-light:  #3D7A5E;   /* Lighter green for accents */
  --color-gold:         #8ca771;   /* Twine — primary accent/gold */
  --color-gold-light:   #D4B577;   /* Lighter gold for hover states */
  --color-gold-dark:    #A88340;   /* Darker gold for pressed states */
  --color-gold-button:  #4d6b3d;   /* Darker green-gold for buttons/strip (white text, WCAG AA) */
  --color-gold-on-dark: #d0eeb2;   /* Lighter gold for text on dark green (WCAG AA) */
  --color-blue:         #7B9CC6;   /* Polo Blue — secondary accent */
  --color-blue-light:   #9AB4D4;
  --color-brown:        #8C6B3E;   /* Potters Clay — warm earth */
  --color-cream:        #F9F5EF;   /* Warm off-white background */
  --color-cream-dark:   #EDE5D8;   /* Slightly darker cream for borders/cards */
  --color-white:        #FFFFFF;
  --color-black:        #000000;
  --color-text:         #2C2C2C;   /* Near-black body text */
  --color-text-muted:   #5A5A5A;   /* Subtler body text */
  --color-text-light:   #888888;   /* Metadata, captions */
  --color-overlay:      rgba(30, 61, 47, 0.75); /* Dark green overlay for hero images */

  /* --- Typography --- */
  --font-heading: 'ivymode', sans-serif;
  --font-body:    'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;

  /* --- Font Sizes (fluid-friendly rem scale) --- */
  --text-xs:   0.75rem;    /*  12px */
  --text-sm:   0.875rem;   /*  14px */
  --text-base: 1rem;       /*  16px */
  --text-lg:   1.20rem;   /*  18px */
  --text-xl:   1.25rem;    /*  20px */
  --text-2xl:  1.5rem;     /*  24px */
  --text-3xl:  1.875rem;   /*  30px */
  --text-4xl:  2.25rem;    /*  36px */
  --text-5xl:  3rem;       /*  48px */
  --text-6xl:  3.75rem;    /*  60px */
  --text-7xl:  5.5rem;     /*  72px */

  /* --- Font Weights --- */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    700;

  /* --- Line Heights --- */
  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* --- Letter Spacing --- */
  --tracking-tight:  -0.02em;
  --tracking-normal: 0em;
  --tracking-wide:   0.05em;
  --tracking-widest: 0.12em;

  /* --- Spacing Scale --- */
  --space-1:  0.25rem;   /*  4px */
  --space-2:  0.5rem;    /*  8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */

  /* --- Section Padding --- */
  --section-py:       var(--space-20);
  --section-py-lg:    var(--space-32);
  --section-py-sm:    var(--space-12);

  /* --- Layout --- */
  --container-max:    1200px;
  --container-narrow: 768px;
  --container-wide:   1400px;
  --nav-height:       80px;

  /* --- Border Radius --- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* --- Borders --- */
  --border-color:       var(--color-cream-dark);
  --border-color-gold:  rgba(197, 160, 89, 0.3);
  --border-color-green: rgba(46, 90, 69, 0.2);

  /* --- Shadows (MUI-style layered elevation) --- */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-md:  0 2px 4px rgba(0,0,0,0.07), 0 4px 8px rgba(0,0,0,0.06), 0 1px 12px rgba(0,0,0,0.04);
  --shadow-lg:  0 4px 8px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.06), 0 2px 24px rgba(0,0,0,0.05);
  --shadow-xl:  0 6px 12px rgba(0,0,0,0.09), 0 12px 24px rgba(0,0,0,0.07), 0 4px 40px rgba(0,0,0,0.06);

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* --- Z-index --- */
  --z-base:   0;
  --z-raised: 10;
  --z-nav:    100;
  --z-modal:  200;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

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

::selection {
  background-color: var(--color-gold);
  color: var(--color-white);
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

/* --- Body text --- */
p {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

p + p {
  margin-top: var(--space-4);
}

/* --- Overline / label text --- */
.overline {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold);
}

/* --- Lead paragraph --- */
.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
}

/* --- Rich text (blog content) --- */
.prose h2 { margin-top: var(--space-12); margin-bottom: var(--space-4); }
.prose h3 { margin-top: var(--space-8); margin-bottom: var(--space-3); }
.prose p  { margin-bottom: var(--space-6); max-width: 68ch; }
.prose ul, .prose ol { margin-bottom: var(--space-6); padding-left: var(--space-6); }
.prose li { margin-bottom: var(--space-2); line-height: var(--leading-loose); color: var(--color-text-muted); }
.prose ul li { list-style-type: disc; }
.prose ol li { list-style-type: decimal; }
.prose blockquote {
  border-left: 4px solid var(--color-gold);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  color: var(--color-text);
  font-size: var(--text-lg);
}
.prose a { color: var(--color-green); text-decoration: underline; }
.prose a:hover { color: var(--color-gold); }
.prose strong { font-weight: var(--weight-bold); color: var(--color-text); }


/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */

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

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
}

/* Flex helpers */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* Visibility — hide from view, keep for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip link: visible only on keyboard focus (not on tap/click) so it doesn’t appear randomly */
.sr-only:focus-visible {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 9999;
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-4);
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: var(--color-green-dark);
  color: var(--color-white);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}


/* ============================================================
   5. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

/* Primary — gold fill (darker shade for sufficient contrast with white text) */
.btn--primary {
  background-color: var(--color-gold-button);
  color: var(--color-white);
  border: 2px solid var(--color-gold-button);
}
.btn--primary:hover {
  background-color: var(--color-green-dark);
  border-color: var(--color-green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Secondary — outlined gold */
.btn--secondary {
  background-color: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
}
.btn--secondary:hover {
  background-color: var(--color-green-dark);
  border-color: var(--color-green-dark);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* Ghost — white outlined (for dark backgrounds) */
.btn--ghost {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn--ghost:hover {
  background-color: var(--color-green-dark);
  border-color: var(--color-green-dark);
  color: var(--color-white);
}

/* Large size */
.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn--lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

/* Allow button text to wrap on narrow viewports so CTAs don’t cause horizontal overflow */
@media (max-width: 480px) {
  .btn {
    white-space: normal;
    text-align: center;
  }
}


/* ============================================================
   6. SECTION UTILITIES
   ============================================================ */

/* Base section padding */
.section {
  padding-block: var(--section-py);
}

.section--lg {
  padding-block: var(--section-py-lg);
}

.section--sm {
  padding-block: var(--section-py-sm);
}

/* Background variants */
.section--cream  { background-color: var(--color-cream); }
.section--white  { background-color: var(--color-white); }
.section--dark   { background-color: var(--color-green); }
.section--darker { background-color: var(--color-green-dark); }

/* Text color inversion for dark sections */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--darker h1,
.section--darker h2,
.section--darker h3,
.section--darker h4 {
  color: var(--color-white);
}

.section--dark p,
.section--darker p {
  color: rgba(255, 255, 255, 0.85);
}

/* Override gold to accessible shade when on dark sections */
.section--dark,
.section--darker {
  --color-gold: var(--color-gold-on-dark);
}
.section--dark .overline,
.section--darker .overline {
  color: var(--color-gold);
}

/* Section header block */
.section-header {
  margin-bottom: var(--space-16);
}

.section-header.text-center p {
  margin-inline: auto;
}

/* Dispensaries page: Important Note block — centered in container */
.dispensaries-note {
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--color-cream-dark);
  border-radius: var(--radius-lg);
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
}

.dispensaries-note .overline {
  margin-bottom: var(--space-2);
}

.dispensaries-note p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-inline: auto;
}

/* Divider */
.divider {
  width: 60px;
  height: 2px;
  background-color: var(--color-gold);
  margin-block: var(--space-5);
}

.divider--center {
  margin-inline: auto;
}

/* Divider-2 — diamond with two thin lines (SVG injected by JS, animated on scroll) */
.divider-2 {
  display: block;
  width: 200px;
  height: 16px;
  margin-block: var(--space-5);
  color: var(--color-gold);
}

.divider-2__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.divider-2.divider--center {
  margin-inline: auto;
}

/* Star rating */
.stars {
  display: flex;
  gap: var(--space-1);
  color: var(--color-gold);
  font-size: var(--text-lg);
}


/* ============================================================
   7. ICONS (Lucide)
   ============================================================ */

/* Base — Lucide replaces <i data-lucide> with <svg> */
[data-lucide] { display: inline-block; }

/* Signal items (dark section — gold icons) */
.signal-item__icon {
  display: flex;
  align-items: center;
}
.signal-item__icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-gold);
}

/* Credential cards */
.credential-card__icon {
  display: flex;
  align-items: center;
}
.credential-card__icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-gold);
}

/* Booking detail items */
.booking-detail-item__icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-green);
  flex-shrink: 0;
}

/* Inline card icons (free-detox-guide) */
.card-icon {
  display: block;
  margin-bottom: var(--space-3);
}
.card-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-gold);
}

/* List marker icons (check / info) */
.list-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.list-icon svg { width: 16px; height: 16px; }
.list-icon--check svg { color: var(--color-gold); }
.list-icon--info svg  { color: var(--color-text-light); }


/* ============================================================
   8. ANIMATIONS
   ============================================================ */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.2s; }
.stagger > *:nth-child(3) { animation-delay: 0.3s; }
.stagger > *:nth-child(4) { animation-delay: 0.4s; }
.stagger > *:nth-child(5) { animation-delay: 0.5s; }
