/* ==========================================================================
   base.css — Reset, typography, global styles
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--color-ivory);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-maroon);
  text-wrap: balance;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p {
  margin: 0 0 var(--space-sm);
}

a {
  color: var(--color-rose-gold-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-elegant);
}

a:hover {
  color: var(--color-maroon);
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

blockquote {
  margin: 0;
}

address {
  font-style: normal;
}

/* Script font utility */
.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.1;
}

/* Visible keyboard focus (gold) */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: var(--color-blush);
  color: var(--color-maroon);
}

/* Elements emptied by render.js */
[hidden] {
  display: none !important;
}

/* Visually hidden but available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link */
.skip-link {
  position: fixed;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: var(--z-skip);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-maroon);
  color: var(--color-ivory);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-elegant);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--color-ivory);
}

.skip-link:not(:focus) { clip-path: inset(100%); }
