/* ==========================================================================
   Base: fonts, tokens, reset, type, shared components.
   Loaded by every page on the site.
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-italic-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../assets/fonts/jost-var.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  src: url('../assets/fonts/cinzel-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pinyon Script';
  src: url('../assets/fonts/pinyon-script.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Midnight and sapphire */
  --navy-950: #050b1c;
  --navy-900: #0a1430;
  --navy-800: #0f1d45;
  --sapphire-700: #14306e;
  --sapphire-500: #1f4aa8;
  --sapphire-300: #6f96d6;
  --powder: #a9c4e8;

  /* Champagne and antique gold */
  --gold-100: #fff3c9;
  --gold-300: #ecd9a0;
  --gold-400: #dcc07a;
  --gold-500: #c9a55a;
  --gold-600: #a8843f;
  --gold-700: #8f6e2f;
  --gold-ink: #76561b;                 /* gold that stays readable on ivory */

  /* Ivory */
  --ivory: #f6f1e4;
  --ivory-soft: rgba(246, 241, 228, 0.78);
  --ivory-faint: rgba(246, 241, 228, 0.55);
  --paper: #f8f4ea;
  --paper-shade: #efe8d6;

  --foil: linear-gradient(100deg, #a8843f 0%, #e6cd8b 18%, #fff3c9 32%, #cfae64 48%, #9a7632 64%, #e6cd8b 82%, #b8924a 100%);
  --line: rgba(201, 165, 90, 0.55);
  --line-soft: rgba(201, 165, 90, 0.28);

  --font-display: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-script: 'Pinyon Script', 'Snell Roundhand', 'Apple Chancery', cursive;
  --font-body: 'Jost', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --font-caps: 'Cinzel', 'Trajan Pro', 'Cormorant Garamond', Georgia, serif;   /* inscriptional capitals */

  /* Royal ornament: a faint gold brocade lattice, and filigree corners (used as a mask, so they take any colour) */
  --brocade: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c9a55a' stroke-opacity='.05' stroke-width='1'%3E%3Cpath d='M0 32L32 0L64 32L32 64Z'/%3E%3Cpath d='M32 26c3 0 6 3 6 6s-3 6-6 6-6-3-6-6 3-6 6-6z'/%3E%3Cpath d='M32 18v-6M32 46v6M18 32h-6M46 32h6'/%3E%3Cpath d='M0 6c3 0 6-3 6-6M64 6c-3 0-6-3-6-6M0 58c3 0 6 3 6 6M64 58c-3 0-6 3-6 6'/%3E%3C/g%3E%3Cg fill='%23c9a55a' fill-opacity='.06'%3E%3Ccircle cx='32' cy='32' r='1.6'/%3E%3Ccircle cx='0' cy='0' r='1.6'/%3E%3Ccircle cx='64' cy='0' r='1.6'/%3E%3Ccircle cx='0' cy='64' r='1.6'/%3E%3Ccircle cx='64' cy='64' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
  --corner-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cg transform=''%3E%3Cpath d='M3 42V3h39' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9 28V9h19' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M9 21c0-6.6 5.4-12 12-12' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M3 -1l4 4-4 4-4-4z' fill='%23000'/%3E%3Cpath d='M46 3l3-3 3 3-3 3zM3 46l3-3 3 3-3 3z' fill='%23000'/%3E%3Cpath d='M15.5 12.5l3 3-3 3-3-3z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") top left / var(--corner-size) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cg transform='translate%2856 0%29 scale%28-1 1%29'%3E%3Cpath d='M3 42V3h39' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9 28V9h19' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M9 21c0-6.6 5.4-12 12-12' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M3 -1l4 4-4 4-4-4z' fill='%23000'/%3E%3Cpath d='M46 3l3-3 3 3-3 3zM3 46l3-3 3 3-3 3z' fill='%23000'/%3E%3Cpath d='M15.5 12.5l3 3-3 3-3-3z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") top right / var(--corner-size) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cg transform='translate%280 56%29 scale%281 -1%29'%3E%3Cpath d='M3 42V3h39' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9 28V9h19' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M9 21c0-6.6 5.4-12 12-12' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M3 -1l4 4-4 4-4-4z' fill='%23000'/%3E%3Cpath d='M46 3l3-3 3 3-3 3zM3 46l3-3 3 3-3 3z' fill='%23000'/%3E%3Cpath d='M15.5 12.5l3 3-3 3-3-3z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") bottom left / var(--corner-size) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cg transform='translate%2856 56%29 scale%28-1 -1%29'%3E%3Cpath d='M3 42V3h39' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9 28V9h19' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M9 21c0-6.6 5.4-12 12-12' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M3 -1l4 4-4 4-4-4z' fill='%23000'/%3E%3Cpath d='M46 3l3-3 3 3-3 3zM3 46l3-3 3 3-3 3z' fill='%23000'/%3E%3Cpath d='M15.5 12.5l3 3-3 3-3-3z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") bottom right / var(--corner-size) no-repeat;
  --corner-size: 44px;

  --pad: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 13vw, 136px);
  --measure: 34rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Per-section colour roles (overridden by .section--ivory) */
  --bg: var(--navy-900);
  --fg: var(--ivory);
  --fg-soft: var(--ivory-soft);
  --accent: var(--gold-400);
  --rule: var(--line);
  --rule-soft: var(--line-soft);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--navy-950);
}

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 300;
  padding: 10px 16px; background: var(--ivory); color: var(--navy-900);
  font-size: 0.875rem; letter-spacing: 0.08em; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.26em;
  text-indent: 0.26em;              /* optically centre tracked caps */
  text-transform: uppercase;
  color: var(--accent);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.125rem, 8.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.script { font-family: var(--font-script); font-weight: 400; }

.foil {
  background-image: var(--foil);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.foil--shimmer { animation: foil-sweep 7s ease-in-out infinite; }
@keyframes foil-sweep {
  0%, 55% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: var(--section-y) var(--pad);
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}
.section--deep { --bg: var(--navy-950); background: var(--brocade), var(--bg); }
.section--glow {
  background:
    var(--brocade),
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(31, 74, 168, 0.38), transparent 70%),
    var(--bg);
}
.section--ivory {
  --bg: var(--paper);
  --fg: #16203f;
  --fg-soft: rgba(22, 32, 63, 0.78);
  --accent: var(--gold-ink);
  --rule: rgba(143, 110, 47, 0.55);
  --rule-soft: rgba(143, 110, 47, 0.28);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, #fffdf6, transparent 70%),
    var(--bg);
}

.wrap { position: relative; width: 100%; max-width: 68rem; margin-inline: auto; }

/* Ivory sections read like a letterpress card: a fine double gold rule with filigree corners. */
.section--ivory { padding-inline: max(var(--pad), clamp(36px, 9vw, 72px)); }
.section--ivory::before,
.section--ivory::after {
  content: ''; position: absolute; inset: clamp(10px, 3vw, 26px); pointer-events: none;
}
.section--ivory::before {
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 6px var(--rule-soft);
}
.section--ivory::after {
  --corner-size: clamp(40px, 9vw, 60px);
  background: var(--accent);
  -webkit-mask: var(--corner-mask);
  mask: var(--corner-mask);
}
.wrap--narrow { max-width: var(--measure); }

.section-head { text-align: center; margin-bottom: clamp(36px, 7vw, 64px); }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head .divider { margin: 22px auto 0; }

.divider { width: 230px; height: 23px; max-width: 80%; color: var(--accent); }

.lede { color: var(--fg-soft); max-width: var(--measure); margin-inline: auto; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  border: 1px solid var(--accent);
  color: var(--fg);
  font-family: var(--font-caps); font-weight: 600; font-size: 0.8125rem;
  letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: rgba(201, 165, 90, 0.14); }
.btn--solid {
  background-image: linear-gradient(100deg, #b8924a 0%, #e9d39a 28%, #f6e7b8 42%, #d2b06a 62%, #b08c44 80%, #e3c988 100%);
  background-size: 220% 100%;
  border-color: transparent; color: var(--navy-900); font-weight: 500;
  transition: background-position 0.8s var(--ease), opacity 0.3s;
}
.btn--solid:hover { background-position: 100% 50%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.55; cursor: default; }

/* ---------- Framed card ---------- */

.frame { position: relative; border: 1px solid var(--rule); }
.frame::before {
  content: ''; position: absolute; inset: 6px; border: 1px solid var(--rule-soft); pointer-events: none;
}
.frame::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--accent);
  -webkit-mask: var(--corner-mask);
  mask: var(--corner-mask);
}

/* Laurel crest: a wreath around a monogram */
.crest { position: relative; display: grid; place-items: center; width: var(--crest, 88px); height: var(--crest, 88px); }
.crest__wreath { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--gold-400); }
.crest__mono {
  display: flex; align-items: baseline; gap: 0.04em; transform: translateY(-4%);
  font-family: var(--font-display); font-weight: 600; font-size: calc(var(--crest, 88px) * 0.27); line-height: 1;
}
.crest__mono i { font-style: italic; font-weight: 500; font-size: 0.7em; }

/* ---------- Monogram seal ---------- */

.seal {
  --size: 124px;
  position: relative;
  display: grid; place-items: center;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff6d6 0%, #ecd396 22%, #c9a55a 52%, #9a7632 80%, #7c5c22 100%);
  box-shadow:
    inset 0 0 0 calc(var(--size) * 0.022) rgba(255, 246, 214, 0.55),
    inset 0 0 0 calc(var(--size) * 0.075) rgba(124, 92, 34, 0.0),
    inset 0 0 0 calc(var(--size) * 0.085) rgba(124, 92, 34, 0.55),
    inset 0 calc(var(--size) * -0.05) calc(var(--size) * 0.12) rgba(80, 55, 12, 0.45),
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 44px rgba(236, 211, 150, 0.28);
  color: #1a2550;
}
.seal__mono {
  display: flex; align-items: baseline; gap: 0.06em;
  font-family: var(--font-display); font-weight: 600;
  font-size: calc(var(--size) * 0.3); line-height: 1; letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 246, 214, 0.6);
}
.seal__mono i {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 0.74em; margin-inline: 0.04em;
}

/* ---------- Scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Lightbox (couple's gallery and guest photos) ---------- */

html.is-locked, html.is-locked body { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(3, 7, 18, 0.97);
  color: var(--ivory);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
.lightbox__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(8px, env(safe-area-inset-top)) 8px 8px 20px;
}
.lightbox__count { font-size: 0.75rem; letter-spacing: 0.24em; color: var(--ivory-soft); font-variant-numeric: lining-nums; }
.lightbox__btn {
  width: 48px; height: 48px; display: grid; place-items: center;
  color: var(--ivory); border-radius: 50%;
  transition: background-color 0.25s, color 0.25s;
}
.lightbox__btn:hover { background: rgba(246, 241, 228, 0.1); color: var(--gold-300); }
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__stage {
  position: relative; display: grid; place-items: center;
  min-height: 0; padding: 0 8px; overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
/* Fill the space between the top bar and the caption, then shrink the photo to fit inside it, whole. */
.lightbox__img {
  width: 100%; height: 100%; min-height: 0;
  object-fit: contain;
  opacity: 0; transition: opacity 0.35s ease;
}
.lightbox__img.is-ready { opacity: 1; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  background: rgba(3, 7, 18, 0.55);
}
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox__caption {
  min-height: 52px; padding: 14px 20px max(16px, env(safe-area-inset-bottom));
  text-align: center; font-size: 0.875rem; color: var(--ivory-soft);
}

/* ---------- Shared shell for the smaller pages (seat finder, photos) ---------- */

.subpage {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background:
    var(--brocade),
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(31, 74, 168, 0.42), transparent 70%),
    var(--navy-950);
}
.subhead {
  display: grid; justify-items: center; gap: 12px;
  padding: max(22px, env(safe-area-inset-top)) var(--pad) 0;
  text-align: center;
}
.subhead__home { display: block; border-radius: 50%; text-decoration: none; }
.subhead .seal { --size: 60px; }
.subhead__crest { position: relative; display: grid; place-items: center; width: 104px; height: 104px; }
.subhead__crest .crest__wreath { color: var(--gold-400); }
.subhead__names { font-family: var(--font-script); font-size: 1.75rem; line-height: 1.2; color: var(--gold-300); }
.submain { flex: 1; width: 100%; padding: clamp(28px, 7vw, 56px) var(--pad) clamp(48px, 10vw, 80px); }
.subfoot {
  padding: 22px var(--pad) max(26px, env(safe-area-inset-bottom));
  text-align: center; border-top: 1px solid var(--line-soft);
}
.subfoot a {
  font-family: var(--font-caps); font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  color: var(--ivory-soft);
}
.subfoot a:hover { color: var(--gold-300); }

/* Form fields on dark backgrounds (RSVP, seat finder, photos) */
.field { display: grid; gap: 9px; min-width: 0; }
.field__label {
  display: block;
  font-family: var(--font-caps); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-300);
}
.field__input {
  width: 100%; min-height: 52px; padding: 13px 14px;
  background: rgba(246, 241, 228, 0.055);
  border: 1px solid rgba(246, 241, 228, 0.22);
  border-bottom-color: var(--gold-500);
  border-radius: 0;
  color: var(--ivory);
  font-size: 1rem; font-weight: 300; line-height: 1.4;      /* 16px keeps iOS from zooming */
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.25s, background-color 0.25s;
}
.field__input::placeholder { color: rgba(246, 241, 228, 0.42); }
.field__input:focus-visible {
  outline: none; border-color: var(--gold-300);
  box-shadow: 0 0 0 1px var(--gold-300);
  background: rgba(246, 241, 228, 0.09);
}
.field.is-invalid .field__input { border-color: #f1a79d; }
.field__error { font-size: 0.875rem; color: #f6beb6; }
.notice {
  padding: 18px 20px; border: 1px solid var(--line-soft); text-align: center;
  background: rgba(246, 241, 228, 0.04); color: var(--ivory-soft);
}
.notice.is-error { border-color: rgba(241, 167, 157, 0.6); color: #f6beb6; }
