/* ==========================================================================
   Base — Reset, global typography, accessibility, utilities
   Depends on: tokens.css (must load first)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Box-sizing reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   HTML / Body
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--charcoal);
  background-color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

/* Display / heading font */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--charcoal);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  }
h5 { font-size: var(--text-lg);  }
h6 { font-size: var(--text-md);  }

p {
  max-width: 68ch;
  line-height: var(--leading-relaxed);
}

a {
  color: var(--rose-gold);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--transition-fast),
              text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--rose-gold-dark);
  text-decoration-color: currentColor;
}

/* Prevent layout shift while web fonts load */
@font-face {
  font-display: swap;
}

/* Uppercase label utility (applied globally) */
.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold-accent);
}

/* --------------------------------------------------------------------------
   Images & media
   -------------------------------------------------------------------------- */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */
ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Horizontal rule
   -------------------------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--champagne-dark);
  margin: var(--space-xl) 0;
}

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

/* Hide focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   Text selection
   -------------------------------------------------------------------------- */
::selection {
  background-color: var(--champagne);
  color: var(--charcoal);
}

/* --------------------------------------------------------------------------
   Reduced-motion kill-switch
   All transitions and animations are disabled for users who prefer it.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
    scroll-behavior:           auto   !important;
  }
}

/* --------------------------------------------------------------------------
   Scroll-reveal utility
   Driven by IntersectionObserver in app.js
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow),
              transform var(--transition-slow);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* --------------------------------------------------------------------------
   Common button styles
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75em 1.75em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast),
              color            var(--transition-fast),
              box-shadow       var(--transition-fast),
              transform        var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--rose-gold);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--rose-gold-dark);
  color: var(--white);
  text-decoration-color: transparent;
}

.btn-outline {
  background-color: transparent;
  color: var(--rose-gold);
  border: 1.5px solid var(--rose-gold);
}

.btn-outline:hover {
  background-color: var(--soft-pink);
  color: var(--rose-gold-dark);
  text-decoration-color: transparent;
}

/* --------------------------------------------------------------------------
   Section spacing helpers
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--space-3xl);
}

.section-sm {
  padding-block: var(--space-2xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--charcoal-muted);
  text-align: center;
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-2xl);
}

/* --------------------------------------------------------------------------
   Divider ornament
   -------------------------------------------------------------------------- */
.ornament {
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--rose-gold), var(--gold-accent));
  margin-inline: auto;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-full);
}
