/* The invitation keeps its own colours: it opts out of browser dark mode */
:root {
  color-scheme: only light;
  /* Palette from the first invitation */
  --cream: #F5E9CC;
  --cream-light: #FBF3DE;
  --field: #FDF0CF;
  --burgundy: #5A0F1F;
  --burgundy-deep: #3F0914;
  --gold: #A67C3D;
  --gold-soft: #C9A66B;
  --ink-soft: #8A6D3B;
  --ink-body: #6F5428;

  /* Names the second invitation's pages already use, mapped to the new palette */
  --ivory: var(--cream);
  --paper: var(--cream-light);
  --paper-deep: #F1E2BE;
  --envelope: #F1E2BE;
  --envelope-deep: #E3CFA0;
  --ink: var(--burgundy-deep);
  --ink-faint: var(--ink-soft);
  --gold-deep: #7A5A25;
  --gold-bright: #E4CF9A;
  --line: rgba(166, 124, 61, 0.55);
  --wax: #6E1A2C;
  --danger: #9A2B2B;

  /* Fonts from the first invitation */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", "Segoe Script", cursive;
  --slab: "Arbutus Slab", Georgia, serif;
  --numeric: "Average", Georgia, serif;
  --caps: var(--serif);

  --shadow: 0 18px 40px rgba(90, 15, 31, 0.12);
  --measure: 38rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[hidden] { display: none !important; }

h1, h2, h3, p, figure { margin: 0; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--burgundy);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background:
    radial-gradient(120% 80% at 20% 0%, #FBF3DE 0%, transparent 60%),
    linear-gradient(170deg, #F8EED6 0%, #F1E2BE 100%);
  background-attachment: fixed;
}

/* Fixed page background (the cream silk texture) */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url("/assets/bg.jpg") center / cover no-repeat;
}

img { max-width: 100%; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--burgundy); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--burgundy);
  color: var(--cream-light);
  padding: 0.5rem 0.8rem;
}

.skip-link:focus { top: 1rem; }
