/* ============================================================
   BASE — Custom Properties, Reset, Typography, Utilities
   Gwensi Koekie Spensie
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  /* Brand Palette — Purple */
  --purple-deep:  #4C1D95;
  --purple-mid:   #6D28D9;
  --purple-500:   #8B5CF6;
  --purple-light: #C4B5FD;
  --purple-wash:  #EDE9FE;
  --purple-tint:  #F5F3FF;

  /* Brand Palette — Green (WhatsApp) */
  --wa-green:     #16A34A;
  --wa-green-h:   #22C55E;
  --wa-dark:      #128C7E;
  --green-50:     #F0FDF4;

  /* Brand Palette — Gold */
  --gold:         #EAB308;
  --gold-light:   #FEF9C3;
  --gold-100:     #FEF9C3;

  /* Neutrals */
  --white:        #FFFFFF;
  --off-white:    #FDFCFF;
  --gray-50:      #F9FAFB;
  --gray-100:     #F3F4F6;
  --gray-300:     #D1D5DB;
  --gray-500:     #6B7280;
  --gray-700:     #374151;
  --gray-900:     #111827;

  /* Legacy aliases (keep for backward compat) */
  --text-dark:    #111827;
  --text-mid:     #374151;
  --text-light:   #6B7280;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Jost', 'Segoe UI', system-ui, sans-serif;

  /* Spacing — Section rhythm */
  --section-gap-desktop: 100px;
  --section-gap-mobile:  64px;
  --content-gap-desktop: 48px;
  --content-gap-mobile:  32px;

  /* Legacy spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  /* Radius — Universal system */
  --btn-border-radius:  12px;
  --card-border-radius: 16px;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-pill: 9999px;

  /* Buttons */
  --btn-padding:       14px 32px;
  --btn-font-size:     1rem;
  --btn-font-weight:   600;

  /* Cards */
  --card-padding-desktop: 32px;
  --card-padding-mobile:  24px;
  --card-gap: 24px;

  /* Max widths */
  --max-width:        1200px;
  --max-width-narrow: 800px;

  /* Shadows */
  --shadow-card:  0 4px 6px -1px rgba(76,29,149,0.06),
                  0 12px 24px -4px rgba(76,29,149,0.10);
  --shadow-hover: 0 8px 16px -2px rgba(76,29,149,0.14),
                  0 24px 48px -8px rgba(76,29,149,0.16);
  --shadow-cta:   0 4px 20px rgba(234,179,8,0.35);
  --shadow-wa:    0 4px 12px rgba(22,163,74,0.3);

  /* Motion */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration:    200ms;
  --duration-lg: 500ms;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-mid);
  background-color: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

button {
  outline: none; /* buttons have :focus-visible styles */
}

button {
  cursor: pointer;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3vw + 0.75rem, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem); }
h4 { font-size: clamp(1.1rem, 1.5vw + 0.4rem, 1.35rem); }

p {
  color: var(--text-mid);
  line-height: 1.75;
}

strong { font-weight: 600; color: var(--text-dark); }

em { font-style: italic; }

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container--narrow {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

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

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

.section--alt {
  background: var(--gray-50);
}

@media (max-width: 767px) {
  .section { padding-block: var(--section-gap-mobile); }
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-mid);
  margin-bottom: 0.75rem;
}

.eyebrow--gold {
  color: var(--gold);
}

.lead {
  font-size: 1.1rem;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 60ch;
  margin-inline: auto;
}

.section-heading {
  margin-bottom: 0.5rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  max-width: 55ch;
  margin-inline: auto;
}

/* ── Divider Ornament ───────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1rem;
  opacity: 0.6;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.divider span {
  color: var(--gold);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-lg) var(--ease-smooth),
              transform var(--duration-lg) var(--ease-smooth);
}

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

.reveal--delay-1 { transition-delay: 100ms; }
.reveal--delay-2 { transition-delay: 200ms; }
.reveal--delay-3 { transition-delay: 300ms; }
.reveal--delay-4 { transition-delay: 400ms; }

/* ── Grid Helpers ───────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

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

/* ── Accessibility ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--purple-mid);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ── Badge / Chip ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--purple {
  background: var(--purple-wash);
  color: var(--purple-deep);
}

.badge--gold {
  background: linear-gradient(135deg, var(--gold), #C9A227);
  color: var(--text-dark);
}

.badge--white {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.35);
}

/* ── Flavour Chip ───────────────────────────────────────────── */
.flavour-chip {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--purple-wash);
  color: var(--purple-deep);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--purple-light);
  transition: background var(--duration) var(--ease-smooth),
              transform var(--duration) var(--ease-smooth);
}

.flavour-chip:hover {
  background: var(--purple-light);
  transform: translateY(-2px);
}

/* ── Notice Strip ───────────────────────────────────────────── */
.notice-strip {
  background: linear-gradient(135deg, var(--gold) 0%, #C9A227 100%);
  color: var(--text-dark);
  padding: 0.85rem 1.5rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.notice-strip a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Star Rating ────────────────────────────────────────────── */
.star-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 0.75rem;
}

.star-rating span {
  color: var(--gold);
  font-size: 1rem;
}

/* ── Scroll-to-top Button ───────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 7rem;
  right: 2rem;
  z-index: 199;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--purple-mid);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth),
              background 0.2s var(--ease-smooth);
  box-shadow: 0 2px 8px rgba(76,29,149,0.25);
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--purple-500);
}

.scroll-top-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
