/* base.css — reset, type, shared bits (kicker, buttons, paper sections). */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.is-gated,
html.is-gated body { overflow: hidden; height: 100%; }

body {
  margin: 0;
  background: var(--rose);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 18px;
  line-height: 1.5;
  /* Cormorant's default old-style figures turn "11" into "II" */
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }

.kicker {
  font-family: var(--f-ui);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* foil text: a gold gradient clipped to the glyphs; the sheen moves on .is-in */
.foil {
  background: var(--foil);
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* script swashes overhang their box; keep the ink inside the painted area */
  padding: 0 0.12em;
  margin: 0 -0.12em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--gold {
  background: linear-gradient(100deg, var(--gold-1), var(--gold-3) 50%, var(--gold-2));
  color: #3a2410;
  box-shadow: 0 8px 22px -10px rgba(120, 72, 20, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ghost { border-color: currentColor; background: transparent; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
}

.paper {
  position: relative;
  background: var(--paper) url("../assets/img/paper.webp") center / cover no-repeat;
  color: var(--ink);
}

/* sound toggle */
.sound {
  position: fixed;
  z-index: 40;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(120, 70, 64, 0.28);
  color: #fff;
  cursor: pointer;
}
.sound svg { width: 20px; height: 20px; fill: currentColor; }
.sound[aria-pressed="true"] .sound__off,
.sound[aria-pressed="false"] .sound__on { display: none; }

/* the one fixed sparkle canvas: exactly viewport-sized (iOS layer budget) */
.sparkle {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  pointer-events: none;
}
