/* VibrantYou Yoga: main.css
   Design tokens, reset, typography, layout grid */

/* =========================================================
   TOKENS
   ========================================================= */
:root {
  /* Brand palette: forest + gold (vyy_design_system.html) */
  --color-primary:       #1b3a2b;
  --color-primary-dark:  #0d1f16;
  --color-primary-light: rgba(127, 168, 143,.15);
  --color-primary-xlight:#f5f4f0;

  /* Gold accent (wireframe --gold) */
  --color-warm:          #7fa88f;
  --color-warm-dark:     #5f8a70;
  --color-warm-light:    #eef3ef;
  --color-warm-xlight:   #f4f8f5;
  --color-gold:          #7fa88f;
  --color-gold-2:        #5f8a70;

  /* Surfaces */
  --color-surface:       #fafafa;
  --color-surface-alt:   #f0ede8;
  --color-cream:         #f5f4f0;
  --color-cream-2:       #eeece6;
  --color-forest:        #1b3a2b;
  --color-forest-2:      #3a6349;
  --color-forest-3:      #0d1f16;
  --color-eggshell:      #f4f2ee;

  /* Text */
  --color-text:          #1a1a18;
  --color-text-muted:    #767670;
  --color-border:        #e2dfd7;
  --color-white:         #ffffff;
  --color-black:         #111111;

  /* Fonts */
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  /* Type scale: 1.25 modular ratio from 17px base */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1.0625rem;   /* 17px */
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-hero: clamp(2.75rem, 5.5vw + 1rem, 5rem);

  /* Line heights */
  --leading-tight:  1.15;
  --leading-snug:   1.3;
  --leading-normal: 1.6;
  --leading-body:   1.75;

  /* Font weights */
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Sections */
  --section-py:    9rem;
  --section-py-sm: var(--space-16);

  /* Layout */
  --container-max: 1320px;
  --container-px:  var(--space-6);

  /* Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   28px;
  --radius-2xl:  48px;
  --radius-full: 9999px;

  /* Organic blob radius for images */
  --radius-organic: 60% 40% 55% 45% / 50% 60% 40% 50%;
  --radius-organic-alt: 45% 55% 40% 60% / 60% 40% 55% 45%;

  /* Shadows */
  --shadow-sm:  0 1px 4px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md:  0 2px 8px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.08);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.10), 0 24px 64px rgba(0,0,0,.12);
  --shadow-warm: 0 4px 20px rgba(127, 168, 143,.25);

  /* Transitions */
  --ease:       cubic-bezier(.4,0,.2,1);
  --ease-out:   cubic-bezier(0,.55,.45,1);
  --duration:   240ms;
  --duration-slow: 380ms;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

ul, ol { list-style: none; }

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

button { cursor: pointer; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color: var(--color-text);
  font-weight: var(--weight-bold);
}

h1 { font-size: var(--text-5xl); font-weight: 400; }
h2 { font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -.02em; font-weight: 700; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  font-weight: var(--weight-semibold); font-family: var(--font-body); }
h5 { font-size: var(--text-lg);  font-weight: var(--weight-semibold); font-family: var(--font-body); }
h6 { font-size: var(--text-base); font-weight: var(--weight-bold); font-family: var(--font-body); }

p { max-width: 68ch; }
p + p { margin-top: var(--space-4); }

strong { font-weight: var(--weight-semibold); }
em     { font-style: italic; }

/* Italic serif accent used for pull phrases */
.italic-accent {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-primary);
}

.italic-accent--warm { color: var(--color-warm); }

/* Prose modifier */
.prose { max-width: 660px; }
.prose p + p { margin-top: var(--space-4); }
.prose ul, .prose ol { list-style: disc; padding-left: var(--space-6); margin-top: var(--space-4); }
.prose li + li { margin-top: var(--space-2); }

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

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

/* Section colour variants */
.section--white    { background: var(--color-white); }
.section--light    { background: var(--color-surface-alt); }
.section--cream    { background: var(--color-cream); }
.section--warm     { background: var(--color-warm-xlight); }
.section--brand    { background: var(--color-primary); color: var(--color-white); }
.section--dark     { background: var(--color-primary-dark); color: var(--color-white); }
.section--forest   { background: var(--color-forest); color: var(--color-white); }
.section--black    { background: var(--color-black); color: var(--color-white); }

/* Grid system */
.grid        { display: grid; gap: var(--space-8); }
.grid--2     { grid-template-columns: repeat(2, 1fr); }
.grid--3     { grid-template-columns: repeat(3, 1fr); }
.grid--4     { grid-template-columns: repeat(4, 1fr); }
.grid--auto  { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Split layouts */
.split       { display: grid; gap: var(--space-16); align-items: center; }
.split--6040 { grid-template-columns: 6fr 4fr; }
.split--4060 { grid-template-columns: 4fr 6fr; }
.split--5050 { grid-template-columns: 1fr 1fr; }

/* Flex helpers */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: var(--weight-semibold);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: .02em;
  line-height: 1;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn--warm {
  background: var(--color-warm);
  color: var(--color-white);
}
.btn--warm:hover {
  background: var(--color-warm-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-warm);
}

.btn--dark {
  background: var(--color-primary-dark);
  color: var(--color-white);
}
.btn--dark:hover {
  background: var(--color-forest);
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1.5px var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-primary-dark);
}
.btn--white:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.btn--outline-white {
  background: transparent;
  color: var(--color-white);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 1.5px var(--color-white);
}

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

/* =========================================================
   SECTION TYPOGRAPHY HELPERS
   ========================================================= */
.section__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-warm);
  margin-bottom: var(--space-4);
}

.section--dark  .section__eyebrow,
.section--forest .section__eyebrow { color: var(--color-warm-light); }

.section--brand .section__eyebrow { color: var(--color-primary-light); }

.section__title {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: var(--leading-snug);
  letter-spacing: -.02em;
}

/* Italic serif sub-text below section headings (not used on hero) */
.section__subtitle {
  display: block;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: var(--text-2xl);
  color: var(--color-text-muted);
  letter-spacing: 0;
  line-height: var(--leading-snug);
  margin-bottom: var(--space-8);
}
.section--forest .section__subtitle,
.section--dark   .section__subtitle,
.section--brand  .section__subtitle { color: rgba(255,255,255,.6); }

.section__lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 54ch;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-10);
}

.section--dark  .section__title,
.section--forest .section__title,
.section--brand .section__title { color: var(--color-white); }

.section--dark  .section__lead,
.section--forest .section__lead,
.section--brand .section__lead  { color: rgba(255,255,255,.75); }

.text-center { text-align: center; }
.text-center p, .text-center .section__lead { margin-inline: auto; }

/* =========================================================
   WAVE DIVIDERS
   ========================================================= */
.wave-top,
.wave-bottom {
  display: block;
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.wave-top svg,
.wave-bottom svg { display: block; width: 100%; }

/* =========================================================
   UTILITIES
   ========================================================= */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* Scroll animations: only active when JS has confirmed it loaded (js-ready on body).
   Without JS, all elements remain fully visible. */
body.js-ready .fade-in { opacity: 0; transform: translateY(24px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
body.js-ready .fade-in.visible { opacity: 1; transform: none; }

body.js-ready .fade-in--left  { opacity: 0; transform: translateX(-32px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
body.js-ready .fade-in--left.visible  { opacity: 1; transform: none; }

body.js-ready .fade-in--right { opacity: 0; transform: translateX(32px);  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
body.js-ready .fade-in--right.visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split--6040,
  .split--4060 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root {
    --section-py: var(--space-16);
    --container-px: var(--space-5);
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }

  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; }
  .split--5050 { grid-template-columns: 1fr; }
  .section__title { font-size: var(--text-3xl); }
}

@media (max-width: 480px) {
  :root { --container-px: var(--space-4); }
  h1 { font-size: var(--text-3xl); }
  .btn--lg { width: 100%; justify-content: center; }
}
