/* ============================================================
   MODERN BEATRICES ARCHIVE — Global Stylesheet
   Design system: Light Scholarly / Editorial Warmth
   Palette: Warm White, Old Gold, Terracotta
   Typography: Playfair Display + DM Sans
   ============================================================ */

/* --- Google Fonts ------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

/* --- Design Tokens ----------------------------------------- */
:root {
  /* Palette */
  --mba-bg:           #FAFAF7;
  --mba-surface:      #F2EDE4;
  --mba-surface-2:    #EAE3D6;
  --mba-text:         #1A1A18;
  --mba-text-mid:     #4A4A44;
  --mba-text-muted:   #7A7A72;
  --mba-gold:         #B8952A;
  --mba-gold-light:   #D4AE50;
  --mba-gold-pale:    #F0E6C4;
  --mba-terracotta:   #C4756A;
  --mba-terracotta-pale: #F5E8E6;
  --mba-border:       #DDD8CF;
  --mba-border-dark:  #C8C2B8;

  /* Typography */
  --font-display:     'Playfair Display', Georgia, serif;
  --font-body:        'DM Sans', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   6rem;
  --space-2xl:  9rem;

  /* Layout */
  --max-w:        1200px;
  --max-w-text:   720px;
  --gutter:       clamp(1.5rem, 5vw, 4rem);
}

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--mba-bg);
  color: var(--mba-text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.75;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--mba-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--mba-text);
  text-decoration-color: var(--mba-gold);
}

a:focus-visible {
  outline: 2px solid var(--mba-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Typography Scale -------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--mba-text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.2rem; }

p {
  max-width: var(--max-w-text);
  margin-bottom: 1.25em;
}

p:last-child { margin-bottom: 0; }

/* --- Utility: Layout --------------------------------------- */
.mba-container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mba-section {
  padding-block: var(--space-xl);
}

.mba-section--lg {
  padding-block: var(--space-2xl);
}

/* --- Utility: Decorative rule ------------------------------ */
.mba-rule {
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--mba-gold);
  margin-bottom: var(--space-md);
}

.mba-rule--center {
  margin-inline: auto;
  margin-bottom: var(--space-md);
}

/* --- Utility: Label / eyebrow ------------------------------ */
.mba-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mba-text-muted);
  margin-bottom: 0.75rem;
  display: block;
}

/* --- Utility: Tag pill ------------------------------------- */
.mba-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mba-terracotta);
  background: var(--mba-terracotta-pale);
  border: 1px solid rgba(196, 117, 106, 0.2);
  padding: 0.2em 0.65em;
  border-radius: 2px;
  text-decoration: none;
}

.mba-tag:hover {
  background: var(--mba-terracotta);
  color: #fff;
}

/* --- Utility: Button --------------------------------------- */
.mba-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75em 1.75em;
  border: 1.5px solid var(--mba-text);
  color: var(--mba-text);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mba-btn:hover {
  background: var(--mba-text);
  color: var(--mba-bg);
  text-decoration: none;
}

.mba-btn--gold {
  border-color: var(--mba-gold);
  color: var(--mba-gold);
}

.mba-btn--gold:hover {
  background: var(--mba-gold);
  color: #fff;
}

.mba-btn--filled {
  background: var(--mba-text);
  color: var(--mba-bg);
}

.mba-btn--filled:hover {
  background: var(--mba-gold);
  border-color: var(--mba-gold);
  color: #fff;
}

/* --- Scroll animation utility ------------------------------ */
.mba-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.mba-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mba-reveal--delay-1 { transition-delay: 0.1s; }
.mba-reveal--delay-2 { transition-delay: 0.2s; }
.mba-reveal--delay-3 { transition-delay: 0.35s; }
.mba-reveal--delay-4 { transition-delay: 0.5s; }

/* --- Divider / texture break ------------------------------- */
.mba-texture-break {
  background-color: var(--mba-surface);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      var(--mba-border) 28px,
      var(--mba-border) 29px
    );
  border-top: 1px solid var(--mba-border);
  border-bottom: 1px solid var(--mba-border);
}

/* --- Card base --------------------------------------------- */
.mba-card {
  background: var(--mba-surface);
  border: 1px solid var(--mba-border);
  padding: var(--space-md);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mba-card:hover {
  box-shadow: 0 8px 32px rgba(26, 26, 24, 0.1);
  transform: translateY(-2px);
}

/* --- Responsive helpers ------------------------------------ */
@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
  }
}