/* =========================================================
   Wren & Sawyer — Rustic / Boho Wedding Site Styles
   ========================================================= */

:root {
  --color-cream: #f8f1e4;
  --color-linen: #f1e4c9;
  --color-terracotta: #c1702f;
  --color-terracotta-dark: #9c5324;
  --color-ochre: #d9a441;
  --color-sage: #8a9a6b;
  --color-sage-dark: #5c6e4f;
  --color-brown: #5b3a29;
  --color-brown-dark: #3f2716;
  --color-ink: #3a2c22;

  --font-display: "Fraunces", "Amatic SC", Georgia, serif;
  --font-script: "Amatic SC", cursive;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --header-height: 76px;

  --section-padding: 5rem;
}

/* =========================================================
   Reset / base
   ========================================================= */

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

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-cream);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-brown);
  color: var(--color-cream);
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-brown-dark);
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

.eyebrow {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--color-terracotta-dark);
  letter-spacing: 0.05em;
  margin: 0 0 0.25rem;
}

.eyebrow.center {
  text-align: center;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 2rem;
}

.section-title.center {
  text-align: center;
}

.amp {
  font-family: var(--font-script);
  color: var(--color-terracotta);
  padding: 0 0.1em;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background-color: var(--color-terracotta);
  color: var(--color-cream);
  box-shadow: 0 4px 0 var(--color-terracotta-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--color-terracotta-dark);
}

.btn-cta {
  background-color: transparent;
  border-color: var(--color-brown-dark);
  color: var(--color-brown-dark);
  padding: 0.55rem 1.3rem;
  font-size: 0.85rem;
}

.btn-cta:hover {
  background-color: var(--color-brown-dark);
  color: var(--color-cream);
}

/* =========================================================
   Header / Nav
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background-color: rgba(248, 241, 228, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(91, 58, 41, 0.15);
  height: var(--header-height);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-brown-dark);
  text-decoration: none;
}

/* Desktop inline nav (lives inside the sticky header) */
.primary-nav-inline {
  display: flex;
}

#primary-nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Mobile overlay nav — deliberately placed OUTSIDE the header in the DOM
   (as a sibling, not a descendant) so its `position: fixed` is relative to
   the viewport, not to the header. Note: an ancestor with `backdrop-filter`
   (like .site-header) creates a new containing block for fixed-position
   descendants, which would make `top/left/right/bottom: 0` resolve against
   the header's box instead of the viewport — shrinking the "full screen"
   overlay down to just the header's height. Keeping this nav as a sibling
   of the header avoids that trap entirely. */
.primary-nav-mobile {
  display: none;
}

.primary-nav ul,
#primary-nav-desktop ul,
.primary-nav-mobile ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-ink);
  position: relative;
}

.nav-link:hover {
  color: var(--color-terracotta-dark);
}

.nav-cta {
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 600;
}

.nav-toggle .bar {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--color-brown-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  padding: 6rem 1.5rem var(--section-padding);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(217, 164, 65, 0.25), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(138, 154, 107, 0.25), transparent 45%),
    linear-gradient(180deg, var(--color-linen) 0%, var(--color-cream) 100%);
}

.hero-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(91, 58, 41, 0.035) 0px,
      rgba(91, 58, 41, 0.035) 2px,
      transparent 2px,
      transparent 26px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(91, 58, 41, 0.02) 0px,
      rgba(91, 58, 41, 0.02) 1px,
      transparent 1px,
      transparent 18px
    );
}

.hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.sprig {
  position: absolute;
  width: 70px;
  opacity: 0.85;
}

.sprig-left {
  top: -10px;
  left: -10px;
  transform: rotate(-15deg);
}

.sprig-right {
  top: -10px;
  right: -10px;
  transform: rotate(15deg) scaleX(-1);
}

.hero-names {
  font-size: clamp(2.8rem, 9vw, 5.2rem);
  line-height: 1.05;
  margin: 0.25rem 0 0.75rem;
}

.hero-date {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-terracotta-dark);
  margin-bottom: 0.25rem;
}

.hero-venue {
  font-size: 1.05rem;
  color: var(--color-sage-dark);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  color: var(--color-ink);
}

/* =========================================================
   Sections (generic)
   ========================================================= */

.section {
  padding: var(--section-padding) 1.5rem;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

.story {
  background-color: var(--color-cream);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  border: 6px solid var(--color-linen);
  box-shadow: 0 10px 30px rgba(91, 58, 41, 0.15);
}

.story-copy p:last-child {
  margin-bottom: 0;
}

.wax-seal-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.wax-seal {
  width: 92px;
  filter: drop-shadow(0 6px 10px rgba(91, 58, 41, 0.25));
}

/* Details */

.details {
  background:
    linear-gradient(180deg, rgba(217, 164, 65, 0.12), transparent 30%),
    var(--color-linen);
}

.arrow-accent {
  display: block;
  margin: 0 auto 2.5rem;
  width: 140px;
  opacity: 0.8;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.detail-card {
  background-color: var(--color-cream);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(91, 58, 41, 0.08);
  border-top: 4px solid var(--color-terracotta);
}

.detail-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.detail-time {
  font-weight: 700;
  color: var(--color-terracotta-dark);
  margin-bottom: 0.75rem;
}

.detail-note {
  font-size: 0.9rem;
  color: var(--color-sage-dark);
  font-style: italic;
  margin-bottom: 0;
}

/* Travel */

.travel {
  background-color: var(--color-cream);
}

.travel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.travel-card {
  background-color: var(--color-linen);
  border-radius: 14px;
  padding: 2rem;
}

.travel-card h3 {
  margin-bottom: 0.75rem;
  color: var(--color-sage-dark);
}

.travel-card p:last-child {
  margin-bottom: 0;
}

/* RSVP */

.rsvp {
  background:
    radial-gradient(circle at 90% 10%, rgba(138, 154, 107, 0.18), transparent 40%),
    var(--color-linen);
}

.rsvp-lede {
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.rsvp-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-color: var(--color-cream);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(91, 58, 41, 0.12);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.form-row label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-brown-dark);
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid rgba(91, 58, 41, 0.25);
  border-radius: 8px;
  background-color: #fffdf8;
  color: var(--color-ink);
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--color-terracotta);
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form .btn {
  align-self: center;
  margin-top: 0.5rem;
}

.rsvp-thankyou {
  text-align: center;
  background-color: rgba(138, 154, 107, 0.18);
  border: 1px solid var(--color-sage);
  color: var(--color-sage-dark);
  padding: 1rem;
  border-radius: 10px;
  font-weight: 600;
  margin: 0;
}

/* FAQ */

.faq {
  background-color: var(--color-cream);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.faq-item {
  background-color: var(--color-linen);
  border-radius: 10px;
  padding: 1rem 1.4rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-brown-dark);
  font-size: 1.05rem;
  padding: 0.3rem 0;
}

.faq-item p {
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
}

/* Footer */

.site-footer {
  background-color: var(--color-brown-dark);
  color: var(--color-linen);
  text-align: center;
  padding: 3rem 1.5rem;
}

.footer-names {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-cream);
  margin-bottom: 0.4rem;
}

.footer-date {
  margin-bottom: 0.75rem;
  color: var(--color-ochre);
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: 0;
}

/* =========================================================
   Mobile nav (overlay)
   ========================================================= */

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  /* Hide the desktop inline nav; the fixed overlay nav (a sibling of
     .site-header, not nested inside it) takes over on mobile. */
  .primary-nav-inline {
    display: none;
  }

  .primary-nav-mobile {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 550;
    background-color: var(--color-cream);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 2rem 1.5rem 3rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    visibility: hidden;
  }

  .primary-nav-mobile.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .primary-nav-mobile ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .primary-nav-mobile ul li {
    border-bottom: 1px solid rgba(91, 58, 41, 0.12);
  }

  .primary-nav-mobile .nav-link {
    display: block;
    padding: 1.1rem 0.25rem;
    font-size: 1.15rem;
  }

  .primary-nav-mobile .nav-cta {
    margin-top: 1.5rem;
    text-align: center;
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* =========================================================
   Responsive layout adjustments
   ========================================================= */

@media (max-width: 900px) {
  .story-grid,
  .travel-grid {
    grid-template-columns: 1fr;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --section-padding: 3.5rem;
    --header-height: 64px;
  }

  .hero {
    padding: 3.5rem 1.25rem 3.5rem;
  }

  .section {
    padding: var(--section-padding) 1.25rem;
  }

  .rsvp-form {
    padding: 1.75rem 1.25rem;
  }

  .sprig {
    width: 50px;
  }

  .header-inner {
    padding: 0 1rem;
  }
}
