/* ---------- Tokens (watercolor garden / sage) ---------- */
:root {
  /* Paper / cream */
  --paper: #f3ecdd;
  --paper-2: #f8f2e3;
  --paper-deep: #ece2cc;

  /* Sage palette */
  --sage: #5a315b;
  --sage-deep: #5a315b;
  --sage-soft: #c7d4b0;
  --sage-wash: #e6ecd6;

  /* Ink */
  --ink: #2a2620;
  --ink-soft: #5d564c;

  --line: rgba(42, 38, 32, 0.14);
  --shadow: 0 1px 0 rgba(42, 38, 32, 0.06);

  /* Type */
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  --script: "Caveat", "Snell Roundhand", "Apple Chancery", cursive;
  --script-display: "WindSong", "Snell Roundhand", "Apple Chancery", cursive;

  --max-w: 64rem;
  --measure: 38rem;
  --radius: 2px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 3.75rem;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  /* Subtle paper texture via layered noise gradients */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(199, 212, 176, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(199, 212, 176, 0.08) 0%, transparent 45%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: var(--sage);
  text-underline-offset: 3px;
}

strong,
b {
  font-weight: 600;
}

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

/* ---------- Intro photos (sandwich the nav) ---------- */
.intro-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 4;
  object-fit: cover;
}

.intro-photo-top {
  object-position: center 38%;
}

.intro-photo-bottom {
  aspect-ratio: 2 / 1;
  object-position: center 66%;
}

.intro-photo-frame {
  position: relative;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 236, 221, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.975rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}

.nav-list a {
  font-family: var(--serif);
  text-decoration: none;
  font-size: 0.975rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 150ms ease;
}

.nav-list a:hover {
  color: var(--sage-deep);
}

@media (max-width: 540px) {
  .nav-list {
    gap: 1rem;
  }
  .brand {
    font-size: 0.9rem;
  }
  .nav-list a {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.94rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0.95rem 2.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  background: #5a315b;
  color: var(--paper);
  border-color: #5a315b;
  outline: none;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 5.5rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 540px) {
  .section {
    padding: 3.5rem 1.25rem;
  }
}

.section.narrow {
  max-width: var(--measure);
  margin: 0 auto;
}

.section-heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  text-align: center;
  margin: 0 0 0.5rem;
  letter-spacing: 0.005em;
}

.section-heading .script-em {
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  color: var(--sage-deep);
  font-size: 1.2em;
  line-height: 0.8;
  margin: 0 0.05em;
}

.section-heading::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 1px;
  background: var(--sage);
  margin: 1rem auto 0;
}

.lede {
  font-family: var(--serif);
  text-align: center;
  color: var(--ink-soft);
  margin: 1.5rem 0 0;
  font-size: 1.26rem;
}

/* ---------- Detail grid ---------- */
.detail-grid {
  margin: 2.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2.25rem 1.5rem;
  text-align: center;
}

.detail-grid div {
  margin: 0;
}

.detail-grid dt {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.6rem;
}

.detail-grid dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  line-height: 1.4;
}

/* ---------- Location ---------- */
#location {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 2.5rem;
}

#location .lede {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

/* Triangle layout: ceremony + reception side by side, hotel centered below */
.place-grid {
  margin: 3.25rem auto 0;
  max-width: 44rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.5rem;
  row-gap: 3rem;
  align-items: start;
  justify-items: center;
}

.place-block {
  text-align: center;
  padding: 0 0.5rem;
  position: relative;
  width: 100%;
  max-width: 22rem;
}

/* Subtle vertical divider between Ceremony and Reception (top row) */
.place-block:nth-child(2)::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 1px;
  background: var(--line);
}

/* Hotel — centered below, spanning both columns */
.place-block:nth-child(3) {
  grid-column: 1 / -1;
  padding-top: 2.5rem;
  margin-top: 0.5rem;
}

/* Soft horizontal hairline above the Hotel block */
.place-block:nth-child(3)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5rem;
  height: 1px;
  background: var(--line);
}

.place-eyebrow {
  font-family: var(--serif);
  margin: 0 0 1rem;
  font-size: 0.84rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.place-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 0.65rem;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.place-address {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.place-blurb {
  font-family: var(--serif);
  margin: 0 auto 1.75rem;
  max-width: 22rem;
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.place-cta {
  margin: 0;
}

/* Mobile: single column, horizontal hairlines between rows */
@media (max-width: 560px) {
  .place-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
    max-width: 24rem;
  }
  /* Drop the vertical Ceremony/Reception divider on stacked layout */
  .place-block:nth-child(2)::before {
    content: none;
  }
  /* Hotel no longer needs the spanning rules — it's already alone in its row */
  .place-block:nth-child(3) {
    grid-column: auto;
    padding-top: 0;
    margin-top: 0;
  }
  .place-block:nth-child(3)::before {
    content: none;
  }
  /* Uniform thin separator between every stacked block */
  .place-block + .place-block {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
  }
}

/* ---------- FAQ ---------- */
#faq {
  padding-top: 2.5rem;
}

.faq-list {
  margin: 2.75rem 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 2.5rem 1.35rem 0;
  font-family: var(--serif);
  font-size: 1.728rem;
  color: var(--ink);
  line-height: 1.4;
  transition: color 150ms ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--sage-deep);
  line-height: 1;
  transition: transform 200ms ease;
}

.faq-item[open] summary::after {
  content: "\2013"; /* en-dash */
}

.faq-item summary:hover {
  color: var(--sage-deep);
}

.faq-item summary:focus-visible {
  outline: 1px dotted var(--sage-deep);
  outline-offset: 4px;
}

.faq-body {
  font-family: var(--serif);
  padding: 0 2.5rem 1.5rem 0;
  color: var(--ink-soft);
  font-size: 1.44rem;
  line-height: 1.7;
}

.faq-body p {
  margin: 0;
}

/* ---------- Form ---------- */
.form {
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.6rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field label,
.field legend {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  font: inherit;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.1rem;
  border-radius: 0;
  transition: border-color 150ms ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--sage-deep);
}

.field textarea {
  resize: vertical;
  min-height: 4.75rem;
  border: 1px solid var(--line);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.4);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 0.5rem;
}

.radio,
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}

.radio input,
.checkbox input {
  accent-color: var(--sage-deep);
  width: 1rem;
  height: 1rem;
}

.error {
  margin: 0;
  color: #8a3a3a;
  font-size: 0.85rem;
}

.form .btn {
  justify-self: center;
  margin-top: 0.75rem;
}

.form-status {
  text-align: center;
  margin: 0;
  min-height: 1.4rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.form-status.success {
  color: var(--sage-deep);
  font-family: var(--script);
  font-size: 1.4rem;
  line-height: 1.2;
}

.form-status.error {
  color: #8a3a3a;
}

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  max-width: 42rem;
  margin: 2.75rem auto 0;
  border: 10px solid var(--paper-2);
  outline: 1px solid var(--sage-deep);
  outline-offset: -10px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 1px 2px rgba(42, 38, 32, 0.06), 0 14px 32px rgba(42, 38, 32, 0.14);
}

#about {
  max-width: 46rem;
  padding-top: 2.5rem;
}

.carousel-track {
  display: flex;
  transition: transform 450ms ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: rgba(248, 242, 227, 0.85);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: var(--sage-deep);
  color: var(--paper);
  border-color: var(--sage-deep);
  outline: none;
}

.carousel-prev {
  left: 0.75rem;
}

.carousel-next {
  right: 0.75rem;
}

.carousel-dots {
  position: absolute;
  bottom: 0.85rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 1px solid var(--paper);
  background: rgba(248, 242, 227, 0.5);
  padding: 0;
  cursor: pointer;
  transition: background 150ms ease;
}

.carousel-dot.is-active {
  background: var(--paper);
}

@media (max-width: 540px) {
  .carousel {
    max-width: 100%;
  }
  .carousel-btn {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 1.1rem;
  }
}

/* Fade the About page's content in on load */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#about > .section-heading,
#about > .lede,
#about > .carousel {
  animation: fade-in-up 0.7s ease-out both;
}

#about > .section-heading {
  animation-delay: 0s;
}

#about > p.lede:nth-of-type(1) {
  animation-delay: 0.15s;
}

#about > .carousel {
  animation-delay: 0.3s;
}

#about > p.lede:nth-of-type(2) {
  animation-delay: 0.45s;
}

#about > p.lede:nth-of-type(3) {
  animation-delay: 0.55s;
}

/* ---------- Scroll reveal (site-wide fade-in) ---------- */
.reveal {
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.reveal-hidden {
  opacity: 0;
  transform: translateY(16px);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  text-align: center;
  padding: 2.8rem 1.5rem 3.2rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--sage-deep);
  background: var(--paper-2);
}

.site-footer::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--sage);
  margin: 0 auto 1.2rem;
  opacity: 0.6;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  #rsvp,
  .site-footer {
    display: none;
  }
}
