/* =========================================================================
   Ethan & Lauryn — The Valiant, Boston Harbor
   Nautical navy & gold design system
   ========================================================================= */

:root {
  --navy:        #0f2238;
  --navy-deep:   #0a1726;
  --navy-soft:   #16314f;
  --gold:        #c9a35e;
  --gold-light:  #e3c987;
  --gold-deep:   #a8843f;
  --cream:       #f6f1e7;
  --cream-soft:  #efe7d6;
  --ink:         #11161c;
  --paper:       #fbf8f1;

  --shadow-soft: 0 18px 50px -20px rgba(10, 23, 38, 0.45);
  --shadow-card: 0 24px 60px -28px rgba(10, 23, 38, 0.55);

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:  "Inter", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}

.wrap { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }

/* ---------- Eyebrow / section labels ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 1rem;
  font-weight: 600;
}

.section-title {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  color: var(--navy);
  margin-bottom: 0.5rem;
}

/* Decorative gold rule with a center diamond. */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 1.2rem 0 2.6rem;
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: min(90px, 18vw);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider span {
  width: 8px; height: 8px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 163, 94, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all 0.4s var(--ease);
  background: transparent;
  color: var(--navy);
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  border-color: var(--gold-deep);
  box-shadow: 0 12px 30px -12px rgba(201, 163, 94, 0.7);
}
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); color: var(--navy-deep); }
.btn-ghost { color: var(--cream); border-color: rgba(227, 201, 135, 0.6); }
.btn-ghost:hover { background: rgba(227, 201, 135, 0.12); color: var(--cream); }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(20px, 4vw, 48px);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 23, 38, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.6);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.nav .monogram {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--cream);
  letter-spacing: 0.05em;
}
.nav .monogram .amp { color: var(--gold); font-style: italic; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--cream);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  height: 1px; width: 0;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-color: var(--navy-deep);
  background-image:
    linear-gradient(180deg, rgba(10,23,38,0.55) 0%, rgba(10,23,38,0.35) 40%, rgba(10,23,38,0.85) 100%),
    url('../img/hero.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.05);
  will-change: transform;
}
.hero__inner { position: relative; z-index: 2; padding: 0 24px; }
.hero__pre {
  font-size: 0.8rem; letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 1.6rem;
}
.hero__names {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  font-weight: 500;
  line-height: 0.95;
  margin: 0;
  text-shadow: 0 6px 40px rgba(0,0,0,0.4);
}
.hero__names .amp {
  display: block;
  font-style: italic;
  font-size: 0.5em;
  color: var(--gold);
  margin: 0.1em 0;
}
.hero__meta {
  margin-top: 1.8rem;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.hero__meta .dot { color: var(--gold); margin: 0 0.7rem; }

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  margin-top: 3rem;
}
.countdown__unit { min-width: 64px; }
.countdown__num {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  color: var(--gold-light);
  line-height: 1;
}
.countdown__label {
  font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream); opacity: 0.75; margin-top: 0.5rem;
}

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--cream); opacity: 0.7;
  font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase;
}
.scroll-cue::after {
  content: ""; display: block; width: 1px; height: 40px; margin: 10px auto 0;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { 0%,100%{opacity:0.3; transform:scaleY(0.6);} 50%{opacity:1; transform:scaleY(1);} }

/* =========================================================================
   GENERIC SECTION
   ========================================================================= */
section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section--navy { background: var(--navy); color: var(--cream); }
.section--navy .section-title { color: var(--cream); }
.section--cream { background: var(--cream); }
.section--center { text-align: center; }

/* =========================================================================
   OUR STORY
   ========================================================================= */
.story__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.story__body p { margin: 0 0 1.2rem; color: #2c3744; }
.story__lead { font-family: var(--serif); font-size: 1.5rem; color: var(--navy); font-style: italic; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 3.5rem;
}
.frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cream-soft), #dfd3bd);
  box-shadow: var(--shadow-soft);
}
.frame.wide { aspect-ratio: 3 / 2; grid-column: span 2; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.frame:hover img { transform: scale(1.06); }
.frame.placeholder {
  display: grid; place-items: center; text-align: center;
  border: 1px dashed var(--gold-deep); color: var(--gold-deep);
}
.frame.placeholder span {
  font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; padding: 0 1rem;
}
.frame.placeholder::before {
  content: "❖"; display: block; font-size: 1.4rem; margin-bottom: 0.4rem; opacity: 0.6;
}

/* =========================================================================
   CELEBRATION / DETAILS
   ========================================================================= */
.vessel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.vessel__media {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: linear-gradient(135deg, #1b3a5c, #0a1726);
}
.vessel__media img { width: 100%; height: 100%; object-fit: cover; }
.specs { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.7rem; }
.specs li { display: flex; gap: 0.8rem; align-items: baseline; color: var(--cream); }
.specs li::before { content: "❖"; color: var(--gold); font-size: 0.8rem; }

/* Timeline */
.timeline {
  margin-top: 4.5rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.tl {
  text-align: center; position: relative;
}
.tl__dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--gold);
  margin: 12px auto 1rem; box-shadow: 0 0 0 5px rgba(201,163,94,0.18);
  position: relative; z-index: 2;
}
.tl__time { font-family: var(--serif); font-size: 1.5rem; color: var(--gold-light); }
.tl__what { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; margin-top: 0.3rem; }

.notes {
  margin-top: 4rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.note {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(227,201,135,0.22);
  border-radius: 8px; padding: 1.8rem;
}
.note h4 { color: var(--gold-light); font-size: 1.3rem; }
.note p { margin: 0; font-size: 0.95rem; opacity: 0.9; }

/* =========================================================================
   TRAVEL / LOGISTICS
   ========================================================================= */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.card {
  background: var(--paper);
  border: 1px solid rgba(15,34,56,0.1);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card h3 { color: var(--navy); font-size: 1.7rem; display: flex; align-items: center; gap: 0.6rem; }
.card h3 .ic { color: var(--gold-deep); font-size: 1.1rem; }
.card ul { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.card li { padding: 0.55rem 0; border-bottom: 1px dashed rgba(15,34,56,0.12); }
.card li:last-child { border-bottom: 0; }
.card li strong { color: var(--navy); }
.muted { color: #5a6671; font-size: 0.9rem; }
.addr-banner {
  text-align: center; margin-bottom: 2.6rem;
  background: var(--navy); color: var(--cream);
  border-radius: 10px; padding: 2rem; box-shadow: var(--shadow-card);
}
.addr-banner .big { font-family: var(--serif); font-size: clamp(1.6rem,3.4vw,2.4rem); color: var(--gold-light); }
.addr-banner a { color: var(--cream); border-bottom: 1px solid var(--gold); padding-bottom: 2px; }

/* =========================================================================
   INTERACTIVE MAP
   ========================================================================= */
.map-shell { margin: 2.6rem 0 0; }
#logistics-map {
  height: clamp(360px, 52vh, 540px);
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15,34,56,0.12);
  z-index: 1; /* keep tiles/controls below the sticky nav */
}
.map-caption { text-align: center; margin: 0.9rem 0 0; font-size: 0.85rem; }

/* Teardrop pins (CSS only — no marker image dependency) */
.map-pin {
  width: 32px; height: 32px;
  background: var(--pin, var(--navy));
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 6px 14px -4px rgba(10,23,38,0.6);
  display: grid; place-items: center;
}
.map-pin__glyph {
  transform: rotate(45deg);
  color: #fff; font-weight: 700; font-size: 0.82rem; line-height: 1;
  font-family: var(--sans);
}
.map-pin--big {
  width: 42px; height: 42px;
  box-shadow: 0 0 0 6px rgba(201,163,94,0.25), 0 8px 18px -4px rgba(10,23,38,0.6);
}
.map-pin--big .map-pin__glyph { font-size: 1.15rem; }

/* Popups */
.leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: var(--shadow-card); }
.leaflet-popup-content { margin: 0.9rem 1.1rem; font-family: var(--sans); }
.map-pop { display: flex; flex-direction: column; gap: 0.25rem; min-width: 180px; }
.map-pop strong { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); }
.map-pop__addr { color: #46525f; font-size: 0.86rem; }
.map-pop__note { color: #5a6671; font-size: 0.82rem; font-style: italic; }
.map-pop__dir {
  margin-top: 0.4rem; align-self: flex-start;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  color: var(--gold-deep);
}

/* Legend / filter control */
.map-legend {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(4px);
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  box-shadow: 0 8px 22px -10px rgba(10,23,38,0.5);
  font-family: var(--sans);
}
.map-legend__title {
  margin: 0 0 0.5rem; font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold-deep); font-weight: 700;
}
.map-legend__row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--navy); cursor: pointer; padding: 0.15rem 0;
}
.map-legend__row input { accent-color: var(--gold-deep); cursor: pointer; }
.map-legend__dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.leaflet-bar a { color: var(--navy); }

/* =========================================================================
   RSVP
   ========================================================================= */
.rsvp { max-width: 680px; margin-inline: auto; }
.form {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.col-2 { grid-column: span 2; }
.field label {
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-light); font-weight: 600;
}
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(227,201,135,0.35);
  background: rgba(255,255,255,0.05);
  color: var(--cream);
  transition: border 0.3s var(--ease), background 0.3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(246,241,231,0.45); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); background: rgba(255,255,255,0.09);
}
.field select option { color: var(--ink); }
.field textarea { resize: vertical; min-height: 90px; }
.form .actions { grid-column: span 2; text-align: center; margin-top: 0.5rem; }
.form-msg {
  grid-column: span 2; text-align: center; min-height: 1.4rem;
  font-size: 0.95rem; letter-spacing: 0.04em;
}
.form-msg.ok { color: var(--gold-light); }
.form-msg.err { color: #ff9a8a; }

/* radio pills */
.pills { display: flex; gap: 0.8rem; }
.pill {
  flex: 1; position: relative;
}
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span {
  display: block; text-align: center; padding: 0.85rem;
  border: 1px solid rgba(227,201,135,0.35); border-radius: 6px;
  letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.78rem;
  transition: all 0.3s var(--ease); color: var(--cream);
}
.pill input:checked + span {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--navy-deep); border-color: var(--gold-deep); font-weight: 600;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  background: var(--navy-deep); color: var(--cream);
  text-align: center; padding: 4.5rem 24px 3rem;
}
.footer .compass { font-size: 2rem; color: var(--gold); margin-bottom: 1rem; }
.footer .f-names { font-family: var(--serif); font-size: 2.4rem; }
.footer .f-meta { letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.74rem; opacity: 0.8; margin-top: 0.6rem; }
.footer .f-small { font-size: 0.78rem; opacity: 0.5; margin-top: 2rem; }
.footer a { color: var(--gold-light); }

/* =========================================================================
   SCROLL REVEAL
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-cue::after { animation: none; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
  .story__grid, .vessel, .cards { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .timeline::before { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; justify-content: center; gap: 2rem;
    background: rgba(10,23,38,0.97); backdrop-filter: blur(8px);
    transform: translateX(100%); transition: transform 0.45s var(--ease);
    padding: 2rem;
  }
  .nav-links.open { transform: none; }
  .nav-toggle { display: block; z-index: 60; }
  .nav-toggle span { display:block; width:26px; height:2px; background:var(--cream); margin:5px 0; transition:0.3s; }
  .form, .gallery { grid-template-columns: 1fr; }
  .frame.wide { grid-column: span 1; }
  .field.col-2, .form .actions, .form-msg { grid-column: span 1; }
}
