/* ============================================================
   Mereke — Base element defaults & brand helpers
   Imported last so it can consume every token above.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Headings: Playfair display by default ---------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: var(--lh-snug);
  font-weight: var(--fw-bold);
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: var(--fw-black); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--text-accent); text-decoration: none; }
a:hover { color: var(--red-400); }

strong, b { font-weight: var(--fw-bold); }
small { font-size: var(--fs-caption); }

::selection { background: var(--amber-300); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   Brand helpers — small, composable utilities
   ============================================================ */

/* Eyebrow / overline label */
.mk-overline {
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-overline);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--text-accent);
}

/* Display headline on red panels, amber ink */
.mk-amber-head {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  color: var(--text-amber);
}

/* The festive paper surface (page background) */
.mk-paper {
  background-color: var(--surface-page);
  background-image:
    radial-gradient(rgba(180, 150, 110, 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
}

/* Red festive panel */
.mk-panel-red {
  background: var(--gradient-red);
  color: var(--text-on-red);
}

/* Four-point spark / star — the Mereke twinkle motif.
   Use as a small inline accent: <span class="mk-spark"></span> */
.mk-spark {
  display: inline-block;
  width: 0.8em; height: 0.8em;
  background: currentColor;
  -webkit-mask: var(--mk-spark-mask) center / contain no-repeat;
          mask: var(--mk-spark-mask) center / contain no-repeat;
  vertical-align: middle;
}
:root {
  --mk-spark-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0 C54 32 68 46 100 50 C68 54 54 68 50 100 C46 68 32 54 0 50 C32 46 46 32 50 0 Z'/%3E%3C/svg%3E"); /* @kind other */
}

/* Hairline divider in the brand's warm tone */
.mk-rule {
  border: 0;
  border-top: var(--bw-hair) solid var(--border-warm);
}
