/* =================================================================
   Michelle & Joshua — Sitges 2027
   Coastal-elegant wedding site styles
   -----------------------------------------------------------------
   QUICK COLOUR EDITS: change the variables in :root below.
   Everything else inherits from them.
   ================================================================= */

:root {
  /* --- Coastal palette --- */
  --ivory:      #FBF8F2;   /* page background, hero panel */
  --sand:       #EFE6D8;   /* soft sand section background */
  --sand-deep:  #E3D5C0;   /* borders, subtle fills */
  --sea:        #4F8190;   /* sea-blue accent */
  --sea-deep:   #2E5663;   /* deep sea-blue (text on light, panels) */
  --gold:       #C2A164;   /* gold accent */
  --gold-soft:  #D8C39A;   /* lighter gold for hairlines */
  --ink:        #34403F;   /* primary body text */
  --ink-soft:   #5E6B6A;   /* secondary text */
  --white:      #FFFFFF;

  /* --- Type --- */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* --- Layout --- */
  --maxw: 1080px;
  --nav-h: 60px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(46, 86, 99, 0.08);
}

/* =================================================================
   BACKGROUND IMAGES  —  EDIT THESE
   -----------------------------------------------------------------
   To swap a photo: save your own image into the images/ folder using
   the SAME filename (e.g. bg-wedding.jpg). Nothing else to change.

   Each line below has two scrim colours — the see-through overlay that
   keeps text readable on top of the photo. The LAST number in each
   rgba(...) is how strong the overlay is (0 = photo fully visible,
   1 = photo hidden). Nudge those up/down to taste.
   Light-text sections (Wedding) use a dark scrim; the others use a
   light scrim.
   ================================================================= */
.bg-hero    { --bg-image: url("../images/bg-hero.jpg");    --scrim-top: rgba(251,248,242,0.22); --scrim-bot: rgba(251,248,242,0.40); }
.bg-welcome { --bg-image: url("../images/bg-welcome.jpg"); --scrim-top: rgba(251,248,242,0.60); --scrim-bot: rgba(239,230,216,0.72); }
.bg-wedding { --bg-image: url("../images/bg-wedding.jpg"); --scrim-top: rgba(46,70,82,0.56);    --scrim-bot: rgba(46,70,82,0.70); }
.bg-day2    { --bg-image: url("../images/bg-day2.jpg");    --scrim-top: rgba(251,248,242,0.58); --scrim-bot: rgba(239,230,216,0.70); }

/* --- Reset-ish --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sea-deep); }

/* =================================================================
   NAV
   ================================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand-deep);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--sea-deep);
  text-decoration: none;
}
.nav__links { display: flex; align-items: center; gap: 1.1rem; }
.nav__links a {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--gold); }
.nav__cta {
  color: var(--white) !important;
  background: var(--sea);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}
.nav__cta:hover { background: var(--sea-deep); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--sea-deep);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* =================================================================
   BUTTONS
   ================================================================= */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: #b08f50; transform: translateY(-2px); }

/* =================================================================
   HERO
   ================================================================= */
.hero {
  /* Fallback colour if the hero photo is ever removed.
     The photo itself is set by the .bg-hero/.has-bg classes. */
  background-color: var(--sand);
  text-align: center;
  padding: clamp(3rem, 12vh, 7rem) 20px clamp(3.5rem, 10vh, 6rem);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__inner { max-width: 720px; }
/* Frosted panel behind the hero text so names stay crisp over the photo. */
.hero.has-bg .hero__inner {
  background: rgba(251, 248, 242, 0.55);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  padding: clamp(2rem, 6vw, 3.2rem) clamp(1.5rem, 5vw, 3rem);
  box-shadow: 0 20px 50px rgba(46, 86, 99, 0.18);
}
.hero__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
.hero__names {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--sea-deep);
  font-size: clamp(2.8rem, 11vw, 5.5rem);
  line-height: 1.02;
  margin: 0;
}
.hero__names .amp { font-style: italic; color: var(--gold); font-weight: 400; }
.hero__location {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0.6rem 0 0.2rem;
}
.hero__date {
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

/* Wave motif */
.wave-divider { color: var(--gold-soft); margin: 1.6rem auto; max-width: 220px; }
.wave-divider svg { width: 100%; height: 16px; display: block; }
.wave-divider--footer { max-width: 160px; margin: 0 auto 1.2rem; color: rgba(255,255,255,0.5); }

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 3.5rem);
  margin: 0.5rem 0 2rem;
}
.countdown__unit { display: flex; flex-direction: column; align-items: center; }
.countdown__num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 14vw, 5.5rem);
  line-height: 1;
  color: var(--sea);
}
.countdown__label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}
.countdown__celebrate {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 9vw, 3.5rem);
  color: var(--gold);
  margin: 1rem 0 2rem;
}

/* =================================================================
   SECTIONS
   ================================================================= */
.section { padding: clamp(3.5rem, 9vh, 6rem) 20px; }
.section--sand { background: var(--sand); }
.section--blue { background: var(--sea-deep); color: var(--ivory); }
.section--blue .section__eyebrow { color: var(--gold-soft); }
.section--blue .section__title { color: var(--ivory); }
.section--blue .info-grid__row { border-color: rgba(255,255,255,0.18); }
.section--blue .info-grid__label { color: var(--gold-soft); }
.section--blue .card { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
.section--blue .card__title { color: var(--ivory); }
.section--blue .link { color: var(--gold-soft); }

.container { max-width: var(--maxw); margin: 0 auto; }

.section__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.4rem;
  text-align: center;
}
.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  color: var(--sea-deep);
  text-align: center;
  margin: 0 0 1.2rem;
}
.section__intro {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* =================================================================
   SCHEDULE TIMELINE
   ================================================================= */
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--gold-soft);
}
.timeline__item {
  position: relative;
  padding: 0 0 1.8rem 2.6rem;
  display: flex;
  flex-direction: column;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ivory);
  border: 3px solid var(--gold);
}
.timeline__item--feature::before { background: var(--gold); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__day {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sea);
  font-weight: 600;
}
.timeline__event {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--sea-deep);
}
.timeline__detail { color: var(--ink-soft); font-size: 0.95rem; }

/* =================================================================
   INFO GRID (event details)
   ================================================================= */
.info-grid {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.section--blue .info-grid { background: rgba(255,255,255,0.05); box-shadow: none; }
.info-grid__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem;
  /* row divider line removed per request */
}
.info-grid__label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea);
  font-weight: 600;
  padding-top: 2px;
}
.info-grid__value { color: var(--ink); }

/* Wedding Day: keep the photo background, but put the details on a solid
   white card with dark text so they stay easy to read. */
#wedding .info-grid { background: var(--white); box-shadow: var(--shadow); }
#wedding .info-grid__label { color: var(--sea); }
#wedding .info-grid__value { color: var(--ink); }
#wedding .info-grid .link { color: var(--sea); }

/* =================================================================
   CARDS
   ================================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
  max-width: 920px;
  margin: 0 auto;
}
.card {
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--sea-deep);
  margin: 0 0 0.6rem;
}
.card__body { margin: 0 0 0.8rem; color: var(--ink-soft); }
.card__meta { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.card__meta li { padding: 0.15rem 0; }
.card__meta strong { color: var(--sea); }
.card__list { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); }
.card__list li { padding: 0.2rem 0; }

/* Callout & notes */
.callout {
  max-width: 820px;
  margin: 2rem auto 0;
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow);
}
.callout__title { font-family: var(--serif); font-size: 1.3rem; color: var(--sea-deep); margin: 0 0 0.4rem; }
.notes {
  max-width: 820px;
  margin: 1.6rem auto 0;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.8rem;
  box-shadow: var(--shadow);
}
.notes__title { font-family: var(--serif); font-size: 1.4rem; color: var(--sea-deep); margin: 0 0 0.6rem; }
.notes ul { margin: 0; padding-left: 1.1rem; }
.notes li { padding: 0.3rem 0; color: var(--ink-soft); }
.notes strong { color: var(--ink); }

.link { color: var(--sea); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--gold); }

/* =================================================================
   RSVP FORM
   ================================================================= */
.rsvp-form {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.3rem; }
.field > label,
.field legend {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sea-deep);
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0;
}
.field input[type="text"],
.field input[type="number"],
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--sand-deep);
  border-radius: 8px;
  background: var(--ivory);
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(79,129,144,0.15);
}
fieldset.field { border: 0; padding: 0; margin: 0 0 1.3rem; }
.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--sea); }
.req { color: var(--gold); }
.hidden-field { position: absolute; left: -9999px; }
.rsvp-thanks {
  max-width: 560px;
  margin: 1.5rem auto 0;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 1.6rem;
  color: var(--sea-deep);
  font-family: var(--serif);
  font-size: 1.3rem;
}

/* =================================================================
   CONTACT
   ================================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  max-width: 720px;
  margin: 0 auto;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.contact-card__role {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
}
.contact-card__name { font-family: var(--serif); font-size: 1.4rem; color: var(--sea-deep); }
.contact-card__phone { color: var(--ink-soft); font-size: 0.95rem; }

/* =================================================================
   GALLERY  (removable — see index.html)
   ================================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
  max-width: 920px;
  margin: 0 auto;
}
.gallery-grid__item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand-deep);
}
.gallery-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-grid__item:hover img { transform: scale(1.05); }

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
  background: var(--sea-deep);
  color: var(--ivory);
  text-align: center;
  padding: 3rem 20px 3.5rem;
}
.footer__names { font-family: var(--serif); font-size: 2rem; margin: 0; }
.footer__detail { font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-soft); margin: 0.4rem 0 0; }

/* =================================================================
   SCROLL REVEAL ANIMATION
   ================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =================================================================
   RESPONSIVE — mobile-first tweaks for larger screens already done
   above via clamp(); here we handle the nav collapse for phones.
   ================================================================= */
@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--sand-deep);
    padding: 0.5rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav__links.is-open { max-height: 520px; }
  .nav__links a { padding: 0.85rem 24px; }
  .nav__cta { border-radius: 0; text-align: center; }
  .info-grid__row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* =================================================================
   APPLY BACKGROUND PHOTOS  (combines the scrim overlay + the photo)
   Defined last so it sits cleanly on top of the section colours.
   Edit the photos/overlays in the "BACKGROUND IMAGES" block at the
   very top of this file, not here.
   ================================================================= */
.has-bg {
  background-image: linear-gradient(var(--scrim-top), var(--scrim-bot)), var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* background-attachment:fixed looks lovely on desktop but is janky on
   phones, so we only enable it on larger screens (and not for reduced
   motion). */
@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .has-bg { background-attachment: fixed; }
}
