/* ==========================================================================
   Kimberly & Ian — Wedding Website
   Rustic & Warm theme
   ========================================================================== */

:root {
  /* Palette drawn from the engagement photos: sapphire blue, rose pink, blush white */
  --cream: #fbf4f6;
  --ivory: #fffdfd;
  --walnut: #1e2b4f;          /* deep navy — main text, footer */
  --walnut-light: #4a5680;    /* softer navy — secondary text */
  --terracotta: #c9406f;      /* rose pink — buttons, accents */
  --terracotta-dark: #a8305a; /* deeper rose — links, hover */
  --sage: #1f47b0;            /* sapphire blue — eyebrows, icons */
  --sage-light: #3f66c8;      /* lighter sapphire — labels, banners */
  --gold: #c9a227;
  --border: #efd9e0;          /* blush border */

  --font-heading: "Cormorant Garamond", "Georgia", serif;
  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--walnut);
  background-color: var(--cream);
  line-height: 1.6;
}

/* Shared hero background photo (all pages except the gallery) */
.hero.photo-hero {
  background-image: linear-gradient(rgba(251, 244, 246, 0.74) 0%, rgba(251, 244, 246, 0.66) 50%, rgba(251, 244, 246, 0.12) 100%),
    url("../images/engagement-hands-landscape.JPG");
  background-size: cover;
  background-position: center top, center 16%;
  /* Tall enough to show the V of the arms and the ring; scales with the screen width. */
  min-height: clamp(260px, 33vw, 460px);
  background-repeat: no-repeat;
}

/* On wider screens, pin the bottom edge of the banner to a fixed spot in the photo just
   below the ring (57% of the way down). The ring is then always visible, and the top
   of the photo (the V of the arms) is what gets trimmed when the banner is short.
   28.67vw = 43% of the photo's height when it is scaled to the screen width. */
@media (min-width: 900px) {
  .hero.photo-hero {
    /* Two layers: the tint stays put; only the photo is pinned to the bottom. */
    background-position: center top, center calc(100% + 28.67vw);
  }

  /* Home page: leave room under the countdown so the ring sits below it, not behind it. */
  .hero.photo-hero:not([style]) {
    padding-bottom: 120px;
  }
}

a {
  color: var(--terracotta-dark);
  text-decoration: none;
}

a:hover {
  color: var(--sage);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--walnut);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Botanical divider ---------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--sage);
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 60px;
  background: var(--border);
}

.divider svg {
  width: 28px;
  height: 28px;
  fill: var(--sage);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 244, 246, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--terracotta-dark);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  white-space: nowrap;
  color: var(--walnut);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--terracotta-dark);
  border-bottom-color: var(--terracotta);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--walnut);
  display: block;
}

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

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    max-height: 400px;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sage);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero .amp {
  color: var(--terracotta);
  font-style: italic;
}

.hero-date {
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: var(--walnut-light);
  margin-bottom: 40px;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 40px auto 0;
}

.countdown .unit {
  background: rgba(255, 253, 253, 0.62);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  min-width: 90px;
}

.countdown .unit .num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--terracotta-dark);
  display: block;
}

.countdown .unit .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--walnut-light);
}

/* ---------- Sections ---------- */
section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--walnut-light);
  max-width: 620px;
  margin: 0 auto 40px;
}

.story {
  background: var(--ivory);
}

.story-text {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}

/* Longer story copy: left-aligned for readability */
.story-copy {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.story-copy p + p {
  margin-top: 1.1em;
}

/* Story page: paragraphs and photos alternate as separate blocks */
.story-copy + .story-copy {
  margin-top: 1.1em;
}

.photo-row + .story-copy,
.photo-wide + .story-copy {
  margin-top: 40px;
}

.story-copy a {
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.story-copy a:hover {
  text-decoration-color: currentColor;
}

/* ---------- Card grid (quick links) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(30, 43, 79, 0.12);
}

.card svg {
  width: 36px;
  height: 36px;
  fill: var(--terracotta);
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--walnut-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  background: var(--terracotta);
  color: var(--ivory);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn:hover {
  background: var(--terracotta-dark);
  color: var(--ivory);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--terracotta);
  color: var(--terracotta-dark);
}

.btn-outline:hover {
  background: var(--terracotta);
  color: var(--ivory);
}

/* ---------- Detail blocks (Event / Travel) ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.detail-card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
}

.detail-card h3 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.detail-card .meta {
  color: var(--sage-light);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.detail-card p {
  margin-bottom: 10px;
}

.detail-card .btn {
  margin-top: 14px;
}

.roomblock-note {
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terracotta);
  border-radius: 6px;
  padding: 16px 18px;
  margin: 16px 0 6px;
}

.roomblock-note p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

.roomblock-note .btn {
  margin-top: 12px;
}

/* ---------- Map (Travel) ---------- */
.map-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}

#map,
.map-canvas-far {
  height: 420px;
  width: 100%;
  background: var(--cream);
}

.map-pin {
  background: none;
  border: none;
}

.map-pin span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--ivory);
  font: 700 0.95rem var(--font-body);
  border: 2px solid var(--ivory);
  box-shadow: 0 2px 6px rgba(30, 43, 79, 0.4);
}

.map-pin-venue span {
  background: var(--terracotta);
  width: 40px;
  height: 40px;
  margin: -3px 0 0 -3px;
  font-size: 1.2rem;
}

.map-canvas {
  height: 460px;
  width: 100%;
  background: var(--cream);
}

.map-pin-area span {
  background: var(--terracotta);
}

.map-dot {
  background: none;
  border: none;
}

.map-dot span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sage);
  border: 3px solid var(--ivory);
  box-shadow: 0 2px 6px rgba(30, 43, 79, 0.45);
}

.leaflet-tooltip.map-label {
  font: 700 0.85rem var(--font-body);
  color: var(--walnut);
  background: rgba(255, 253, 253, 0.92);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(30, 43, 79, 0.25);
}

@media (max-width: 600px) {
  #map,
  .map-canvas-far {
    height: 340px;
  }

  .map-canvas {
    height: 380px;
  }
}

/* ---------- Info banner (dress code, notes) ---------- */
.info-banner {
  background: var(--sage-light);
  color: var(--ivory);
  text-align: center;
  padding: 28px 24px;
  border-radius: 10px;
  margin-top: 40px;
}

.info-banner strong {
  color: var(--ivory);
}

/* ---------- Event Details: one combined card ---------- */
.event-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.event-card + .event-card {
  margin-top: 32px;
}

.event-venue {
  color: var(--walnut-light);
}

.event-blurb {
  margin-top: 18px;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.event-timeline {
  list-style: none;
  margin: 24px 0 8px;
  padding: 0;
  border-top: 1px solid var(--border);
}

.event-timeline li {
  display: grid;
  gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.event-timeline .when {
  color: var(--sage);
  font-size: 0.82rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.event-timeline .what {
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.event-timeline .what strong {
  font-weight: 600;
}

@media (min-width: 600px) {
  .event-timeline li {
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
    text-align: left;
    gap: 16px;
  }

  .event-timeline .when {
    text-align: right;
  }
}

/* ---------- Text blocks (Travel / Things to Do) ---------- */
.info-stack {
  display: grid;
  gap: 24px;
  max-width: 820px;
  margin: 0 auto 48px;
}

.info-block {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terracotta);
  border-radius: 10px;
  padding: 28px 36px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.info-block h2 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.info-block p + p {
  margin-top: 0.9em;
}

.detail-grid + .info-block {
  margin-top: 40px;
}

@media (max-width: 600px) {
  .info-block {
    padding: 22px 22px;
  }
}

/* ---------- Things to Do: neighborhood blocks ---------- */
.area-list {
  display: grid;
  gap: 24px;
  max-width: 1000px;
  margin: 40px auto 0;
}

.area-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: stretch;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terracotta);
  border-radius: 10px;
  padding: 32px 36px;
  scroll-margin-top: 90px;
}

.area-map {
  min-height: 260px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--cream);
}

.area-block h2 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.area-time {
  display: block;
  margin-top: 2px;
  font: 400 0.95rem var(--font-body);
  color: var(--walnut-light);
}

.area-block a {
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.area-block a:hover {
  text-decoration-color: currentColor;
}

@media (max-width: 760px) {
  .area-block {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 22px;
  }

  .area-map {
    height: 260px;
  }
}

/* ---------- Photos sprinkled through the site ---------- */
.photo-wide {
  margin: 40px 0 0;
}

.photo-wide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 40px auto 0;
}

.photo-row img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* Mirrored copy of a photo so repeated poses feel less repetitive */
.photo-row img.flip {
  transform: scaleX(-1);
}

.photo-row.landscape img {
  aspect-ratio: 3 / 2;
}

.photo-row.two {
  grid-template-columns: 1fr 1fr;
  max-width: 760px;
}

.photo-row.two-tight {
  max-width: 640px;
}

.photo-note {
  text-align: center;
  color: var(--walnut-light);
  font-style: italic;
  margin-top: 14px;
  font-size: 0.95rem;
}

@media (min-width: 941px) and (max-width: 1140px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.8rem;
    letter-spacing: 0.3px;
  }
}

/* ---------- Gallery ---------- */
.gallery-section {
  margin-top: 56px;
}

.gallery-section:first-child {
  margin-top: 24px;
}

.gallery-section h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 30px;
  grid-auto-flow: dense;
}

.gallery-item {
  aspect-ratio: 4 / 5;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--walnut-light);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item:has(img) {
  padding: 0;
  border-style: solid;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* Landscape photos get a wider tile so they aren't cropped */
.gallery-item.wide {
  aspect-ratio: 3 / 2;
}

@media (min-width: 560px) {
  .gallery-item.wide {
    grid-column: span 2;
  }
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(16, 22, 42, 0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 88vw;
  max-height: 86vh;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--ivory);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  padding: 8px 16px;
  transition: color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--terracotta);
}

.lightbox-close {
  top: 16px;
  right: 16px;
  font-size: 2.6rem;
}

.lightbox-prev {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.8rem;
    padding: 8px;
  }
}

/* ---------- Placeholder / coming-soon panel ---------- */
.coming-soon {
  max-width: 620px;
  margin: 30px auto 0;
  text-align: center;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 50px 40px;
}

.coming-soon svg {
  width: 48px;
  height: 48px;
  fill: var(--terracotta);
  margin-bottom: 16px;
}

.coming-soon h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.coming-soon p {
  color: var(--walnut-light);
  margin-bottom: 8px;
}

.google-form-embed {
  margin-top: 30px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.google-form-embed iframe {
  width: 100%;
  min-height: 900px;
  border: none;
  display: block;
}

/* ---------- RSVP form ---------- */
.rsvp-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
}

.rsvp-intro {
  text-align: center;
  color: var(--walnut-light);
  margin-bottom: 24px;
}

.guest-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  padding: 20px 22px;
  margin-bottom: 16px;
  display: grid;
  gap: 14px;
}

.guest-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.guest-title {
  font-size: 1.3rem;
}

.rsvp-card label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--walnut-light);
}

.rsvp-card input[type="text"],
.rsvp-card select {
  font: 400 1rem var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  color: var(--walnut);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 12px;
  width: 100%;
}

.rsvp-card input[type="text"]:focus,
.rsvp-card select:focus {
  outline: 2px solid var(--sage-light);
  outline-offset: 1px;
}

.rsvp-card [hidden] {
  display: none !important;
}

.link-btn {
  background: none;
  border: none;
  color: var(--terracotta-dark);
  font: 400 0.85rem var(--font-body);
  cursor: pointer;
  text-decoration: underline;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rsvp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.rsvp-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#rsvp-status {
  text-align: center;
  margin-top: 16px;
  min-height: 1.5em;
  color: var(--walnut-light);
}

#rsvp-status.error {
  color: var(--terracotta-dark);
  font-weight: 700;
}

.rsvp-thanks {
  text-align: center;
  padding: 24px 0;
}

.rsvp-thanks svg {
  width: 40px;
  height: 40px;
  fill: var(--terracotta);
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .rsvp-card {
    padding: 24px 18px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--walnut);
  color: var(--ivory);
  text-align: center;
  padding: 40px 24px;
}

.site-footer .footer-names {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.site-footer p {
  color: #c6d0ec;
  font-size: 0.85rem;
}

.site-footer .footer-credit {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(198, 208, 236, 0.25);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer a {
  color: var(--ivory);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: #f3a6c0;
}
