/*
 * AFROTUNDA — Global Design Tokens v2
 * Loaded on every page via functions.php
 * Do not add component CSS here — tokens only.
 */

:root {
  /* ── Core palette ── */
  --at-red:         #5e1600;
  --at-red-mid:     #7a2008;
  --at-amber:       #d88b34;
  --at-amber-pale:  #f0c47a;
  --at-black:       #0e0e0e;
  --at-charcoal:    #1c1c1c;
  --at-slate:       #4B4F58;
  --at-warm:        #f5f0ea;
  --at-parchment:   #ede6dc;
  --at-cream:       #faf7f3;
  --at-border:      #ddd5c8;
  --at-white:       #ffffff;

  /* ── Legacy aliases (keep for backward compat with existing CSS) ── */
  --red:    var(--at-red);
  --amber:  var(--at-amber);
  --black:  var(--at-black);
  --slate:  var(--at-slate);
  --warm:   var(--at-warm);
  --border: var(--at-border);
  --cream:  var(--at-cream);

  /* ── Typography ── */
  --at-font-display: 'Barlow Semi Condensed', sans-serif;
  --at-font-serif:   'Lora', 'Georgia', serif;
  --at-font-body:    'DM Sans', 'Roboto', sans-serif;

  /* ── Spacing scale ── */
  --at-space-xs:  8px;
  --at-space-sm:  16px;
  --at-space-md:  32px;
  --at-space-lg:  64px;
  --at-space-xl:  120px;
  --at-space-2xl: 160px;

  /* ── Transitions ── */
  --at-transition: 0.25s ease;
  --at-transition-slow: 0.75s ease;

  /* ── Section max-width ── */
  --at-max-width: 1200px;
  --at-gutter: clamp(24px, 5vw, 80px);
}

/*
 * Global body font update — applies site-wide.
 * DM Sans is loaded via Google Fonts in functions.php.
 * Roboto is kept as fallback (already loaded by Astra).
 */
body {
  font-family: var(--at-font-body);
}

/*
 * Headings — Barlow Semi Condensed site-wide.
 * This reinforces what Astra's customiser already sets,
 * ensuring consistency across Dokan and WooCommerce outputs.
 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--at-font-display);
}

/*
 * Global label tag utility — used across all page templates.
 * Scoped with .afrotunda-label to avoid conflicts.
 */
.afrotunda-label {
  font-family: var(--at-font-display);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--at-amber);
}
.afrotunda-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}

/*
 * Global grain texture overlay — applied to the page body.
 * Fixed position, pointer-events:none, sits above everything at z-index 9999.
 * Opacity is very low (3.5%) — adds atmosphere without being visible.
 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
}

/*
 * Global button reset — ensures all Afrotunda buttons
 * share the same base before component-level styling.
 */
.afrotunda-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--at-font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--at-transition), color var(--at-transition), transform var(--at-transition);
  border-radius: 0;
}
.afrotunda-btn--primary {
  background: var(--at-amber);
  color: var(--at-white);
  padding: 16px 40px;
}
.afrotunda-btn--primary:hover {
  background: var(--at-white);
  color: var(--at-red);
  transform: translateY(-2px);
}
.afrotunda-btn--outline {
  background: transparent;
  color: var(--at-red);
  border: 1.5px solid var(--at-red);
  padding: 12px 28px;
}
.afrotunda-btn--outline:hover {
  background: var(--at-red);
  color: var(--at-white);
}

/*
 * Global scroll reveal — used on all page templates.
 */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
