/* ==========================================================================
   Cathy & Tim — design system
   Classic editorial × vintage sophistication × destination romance
   ========================================================================== */

:root {
  --burgundy: #5a1825;
  --burgundy-deep: #351017;
  --ivory: #f7f1e7;
  --cream: #ede2d1;
  --charcoal: #24211f;
  --gold: #b49a68;
  --gold-soft: rgba(180, 154, 104, 0.45);
  --ink-soft: rgba(36, 33, 31, 0.72);
  --ink-muted: rgba(36, 33, 31, 0.56);
  --rule: rgba(90, 24, 37, 0.18);
  --rule-strong: rgba(90, 24, 37, 0.38);
  --on-dark: #f7f1e7;
  --on-dark-soft: rgba(247, 241, 231, 0.74);

  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(22px, 5vw, 56px);
  --section: clamp(88px, 14vw, 168px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--burgundy);
  color: var(--ivory);
}
:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow {
  max-width: 720px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--burgundy);
  color: var(--ivory);
  padding: 10px 16px;
  font-size: 0.8rem;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.005em;
}
.smallcaps,
.eyebrow {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.eyebrow {
  color: var(--burgundy);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before,
.eyebrow.ruled::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.eyebrow.plain::before {
  display: none;
}
.h-section {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1;
  color: var(--burgundy);
  margin-top: 18px;
}
.h-section em {
  font-style: italic;
}
.lead {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  line-height: 1.45;
  color: var(--ink-soft);
}
.prose p + p {
  margin-top: 1.1em;
}
.gold {
  color: var(--gold);
}
.center {
  text-align: center;
}

/* ---------- Ornaments ---------- */
.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}
.diamond-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  justify-content: center;
}
.diamond-rule::before,
.diamond-rule::after {
  content: "";
  height: 1px;
  width: 64px;
  background: currentColor;
  opacity: 0.6;
}
.diamond-rule span {
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--burgundy);
  background: var(--burgundy);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover {
  background: var(--burgundy-deep);
  border-color: var(--burgundy-deep);
}
.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}
.btn.ghost {
  background: transparent;
  color: var(--burgundy);
}
.btn.ghost:hover {
  background: var(--burgundy);
  color: var(--ivory);
}
.btn.on-dark {
  background: transparent;
  border-color: var(--gold);
  color: var(--ivory);
}
.btn.on-dark:hover {
  background: var(--gold);
  color: var(--burgundy-deep);
}
.btn.small {
  min-height: 38px;
  padding: 0 18px;
  font-size: 0.66rem;
}
.text-link {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--burgundy);
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 4px;
  transition: border-color 0.3s;
}
.text-link:hover {
  border-color: var(--burgundy);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  height: var(--nav-h);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
  color: var(--ivory);
}
.nav.solid {
  background: rgba(247, 241, 231, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: var(--rule);
  color: var(--burgundy);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  text-decoration: none;
  white-space: nowrap;
}
.brand .short {
  display: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  list-style: none;
}
.nav-links a {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.86;
  transition: opacity 0.2s;
}
.nav-links a:hover {
  opacity: 1;
}
.nav-cta {
  min-height: 38px;
  padding: 0 20px;
  font-size: 0.66rem;
  border-color: currentColor;
  background: transparent;
  color: inherit;
}
.nav.solid .nav-cta {
  background: var(--burgundy);
  color: var(--ivory);
  border-color: var(--burgundy);
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle::before {
  top: 16px;
}
.nav-toggle span {
  top: 22px;
}
.nav-toggle::after {
  top: 28px;
}
.menu-open .nav-toggle::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-open .nav-toggle span {
  opacity: 0;
}
.menu-open .nav-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--ivory);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
}
.menu-open .nav {
  color: var(--burgundy);
  background: var(--ivory);
}
.mobile-menu a {
  font-family: var(--display);
  font-size: 2.1rem;
  color: var(--burgundy);
  text-decoration: none;
  padding: 4px 0;
}
.mobile-menu .smallcaps {
  margin-top: 28px;
  color: var(--gold);
}

@media (max-width: 860px) {
  .nav-links .link {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .brand .full {
    display: none;
  }
  .brand .short {
    display: inline;
  }
  .nav-links {
    gap: 6px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section) 0;
  position: relative;
}
.section.cream {
  background: var(--cream);
}
.section.burgundy {
  background: var(--burgundy);
  color: var(--on-dark);
}
.section.deep {
  background: var(--burgundy-deep);
  color: var(--on-dark);
}
.section.burgundy .eyebrow,
.section.deep .eyebrow {
  color: var(--gold);
}
.section.burgundy .h-section,
.section.deep .h-section {
  color: var(--ivory);
}
.section-head {
  margin-bottom: clamp(48px, 8vw, 88px);
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

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

/* ---------- Form controls (shared by RSVP & admin) ---------- */
.field {
  display: grid;
  gap: 8px;
}
.field label,
.field .label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  font-size: 16px;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--rule-strong);
}
.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--burgundy);
}
.hint {
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.error-text {
  color: #8f1d2c;
  font-size: 0.9rem;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
