/**
 * MH Ornaments — Global Design System
 * Shared tokens, typography, motion, and base UX polish.
 * Keep page CSS variable names (--olive, --gold-*, etc.) for compatibility.
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* ── Brand yellow (primary) ── */
  --olive: #E6A800;
  --dark-olive: #C48900;
  --gold-bright: #F5C518;
  --gold-muted: #D4A017;
  --gold-light: #FFE566;
  --gold-pale: #FFF3B0;

  /* ── Surfaces ── */
  --nav-bg: #14110B;
  --primary: #14110B;
  --section-dark: #FFF8E7;
  --section-mid: #FFF9E8;
  --section-warm: #FFF3D1;
  --section-gold: #FFE999;
  --section-cream: #FFFEF9;
  --section-ivory: #FFFBF0;
  --section-parch: #FFF3D1;
  --section-accent: #14110B;
  --beige: #FFF9E8;
  --cream: #FFFEF9;
  --cream-dark: #FFF3D1;

  /* ── Borders ── */
  --border: rgba(230, 168, 0, 0.32);
  --border-bright: rgba(245, 197, 24, 0.55);
  --border-dark: rgba(230, 168, 0, 0.16);

  /* ── Text ── */
  --text: #1A160F;
  --text-light: #FFFEF9;
  --text-muted: rgba(26, 22, 15, 0.62);
  --text-muted-lt: rgba(255, 254, 249, 0.70);
  --text-gold: #A67C00;
  --muted: rgba(26, 22, 15, 0.62);

  /* ── Elevation ── */
  --shadow: 0 18px 48px rgba(20, 17, 11, 0.08);
  --shadow-lg: 0 28px 70px rgba(20, 17, 11, 0.14);
  --shadow-gold: 0 12px 36px rgba(230, 168, 0, 0.28);
  --shadow-card: 0 8px 28px rgba(20, 17, 11, 0.07);

  /* ── Shape ── */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --r: 14px;
  --r-sm: 8px;
  --r-pill: 999px;

  /* ── Typography ── */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', sans-serif;
  --fd: var(--font-display);
  --fb: var(--font-body);
  --font-family: var(--font-display);

  /* ── Motion ── */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
  --transition: all 0.35s var(--ease);
  --duration-fast: 0.2s;
  --duration: 0.35s;
  --duration-slow: 0.55s;

  /* ── Layout ── */
  --nav-height: 72px;
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 64px);
}

/* ── Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--duration-fast) ease;
}

button {
  font-family: var(--font-body);
}

h1, h2, h3, h4, .BannerHeading, .Featured-Text, .SectionHeading,
.sec-title, .Logo, .exclusive-footer-logo, .product-title {
  font-family: var(--font-display);
}

/* Prefer Outfit / Fraunces over legacy stacks when Global.css loads */
body,
.NavLinks a,
.mobile-nav a,
.btn,
.PrimaryBtn,
.SecondaryBtn,
.View-All,
button,
input,
textarea,
select {
  font-family: var(--font-body) !important;
}

.Logo,
.BannerHeading,
.Featured-Text,
.SectionHeading,
.sec-title,
.exclusive-footer-logo,
.profile-header h4,
.product-card .product-title,
.CategoryTitle {
  font-family: var(--font-display) !important;
}

/* ── Focus (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Selection ── */
::selection {
  background: rgba(245, 197, 24, 0.35);
  color: var(--text);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--section-mid);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-bright), var(--olive));
  border-radius: 10px;
  border: 2px solid var(--section-mid);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--olive);
}

/* ── Shared motion utilities ── */
@keyframes mh-fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mh-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mh-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mh-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.mh-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-slow) var(--ease),
    transform var(--duration-slow) var(--ease);
}

.mh-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mh-reveal-delay-1 { transition-delay: 0.08s; }
.mh-reveal-delay-2 { transition-delay: 0.16s; }
.mh-reveal-delay-3 { transition-delay: 0.24s; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 18px;
  background: var(--gold-bright);
  color: var(--nav-bg);
  font-weight: 600;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ── Main content offset under fixed nav ── */
#main-content {
  padding-top: 0;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mh-reveal {
    opacity: 1;
    transform: none;
  }
}
