/* ==========================================================
   COLORS AND FONTS: change the look of the whole site here
   ========================================================== */
:root {
  --color-bg: #FBFAF7;        /* warm white background */
  --color-text: #1F2F4A;      /* deep navy text */
  --color-accent: #7A98BF;    /* dusty blue accent */
  --color-soft: #EAF0F7;      /* pale sky-blue for alternate sections */

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", Arial, sans-serif;
}

/* ---------- Basic reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 2rem 1.25rem;
  overflow: hidden;

  /* EDIT: your hero photo. A soft blue gradient is used until you upload it. */
  background:
    linear-gradient(rgba(31, 47, 74, 0.35), rgba(31, 47, 74, 0.55)),
    url("images/hero.jpg") center / cover no-repeat;
}

/* When you add your photo, replace the background above with this:

  background:
    linear-gradient(rgba(31, 47, 74, 0.35), rgba(31, 47, 74, 0.55)),
    url("images/hero.jpg") center / cover no-repeat;
*/

.hero__bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.hero__bubbles.is-done { opacity: 0; }

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 34rem;
  animation: fadeUp 1.4s ease both;
}

.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}

.hero__names {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(2.6rem, 11vw, 5rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

.hero__amp {
  display: block;
  font-style: italic;
  font-size: 0.6em;
  margin: 0.15em 0;
  opacity: 0.85;
}

.hero__date {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  letter-spacing: 0.15em;
  margin: 0;
}

.hero__place {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0.5rem 0 0;
  opacity: 0.9;
}

.hero__scroll {
  position: absolute;
  z-index: 2;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__scroll span {
  width: 0.9rem;
  height: 0.9rem;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

.hero__scroll:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ==========================================================
   GENERAL SECTION STYLES (reused by every section)
   ========================================================== */
.section {
  padding: 5rem 1.25rem;
  text-align: center;
}

.section--soft { background: var(--color-soft); }

.container {
  max-width: 40rem;
  margin: 0 auto;
}

.container--wide { max-width: 64rem; }   /* used by the gallery */

.section__label {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 1rem;
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.9rem, 7vw, 2.8rem);
  line-height: 1.2;
  margin: 0 0 2.5rem;
}

.divider {
  width: 3.5rem;
  height: 1px;
  background: var(--color-accent);
  margin: 2.5rem auto 0;
}

.button {
  display: inline-block;
  padding: 0.95rem 2.25rem;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--color-text);
  color: #fff;
}

.button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ==========================================================
   INVITATION
   ========================================================== */
.invitation__text {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================
   COUNTDOWN
   ========================================================== */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 30rem;
  margin: 0 auto;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown__number {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(2.2rem, 10vw, 3.8rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  margin-top: 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.countdown__done {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin: 1.5rem 0 0;
}

/* ==========================================================
   WEDDING DETAILS
   ========================================================== */
.details { margin-bottom: 2.75rem; }

.details__item {
  padding: 1.75rem 0;
  border-top: 1px solid rgba(122, 152, 191, 0.4);
}

.details__item:last-child { border-bottom: 1px solid rgba(122, 152, 191, 0.4); }

.details__heading {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.6rem;
}

.details__main {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 5.5vw, 1.9rem);
  line-height: 1.3;
  margin: 0;
}

.details__sub {
  font-style: normal;
  font-size: 0.95rem;
  margin: 0.4rem 0 0;
}

/* ==========================================================
   SCHEDULE
   ========================================================== */
.schedule {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 24rem;
}

.schedule__item {
  display: grid;
  grid-template-columns: 6rem 1fr;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(122, 152, 191, 0.4);
  text-align: left;
}

.schedule__item:first-child { border-top: 1px solid rgba(122, 152, 191, 0.4); }

.schedule__time {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.schedule__event {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1.3;
}

/* ==========================================================
   GALLERY
   ========================================================== */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* 2 columns on phones */
  gap: 0.5rem;
}

@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
}

@media (min-width: 1000px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

.gallery__item {
  aspect-ratio: 2 / 3;              /* tall portrait shape, matches your photos */
  background: var(--color-soft);    /* soft colour shown while a photo loads */
  overflow: hidden;
}

.gallery__button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gallery__button:focus-visible { outline: 3px solid var(--color-accent); outline-offset: -3px; }

.gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;                /* fills the tile, cropping neatly */
  object-position: center 30%;      /* keeps faces in frame when cropping */
  transition: transform 0.6s ease;
}

.gallery__button:hover .gallery__img { transform: scale(1.04); }

/* ==========================================================
   LIGHTBOX
   ========================================================== */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(15, 24, 40, 0.95);
  color: #fff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop { background: rgba(15, 24, 40, 0.95); }

.lightbox__img {
  max-width: calc(100% - 1rem);
  max-height: calc(100vh - 6rem);
  max-height: calc(100svh - 6rem);
  object-fit: contain;
  user-select: none;
}

.lightbox__btn {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.lightbox__btn:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev  { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 0.5rem; top: 50%; transform: translateY(-50%); }

.lightbox__count {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
}
/* ==========================================================
   RSVP FORM
   ========================================================== */

/* Makes sure anything marked "hidden" really disappears, even if other styles say otherwise */
[hidden] { display: none !important; }

.rsvp__intro {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.6;
  margin: -1rem 0 2.5rem;
}

.form {
  max-width: 28rem;
  margin: 0 auto;
  text-align: left;
}

.field {
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
}

.field__label {
  display: block;
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.field__input {
  display: block;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(122, 152, 191, 0.6);
  border-radius: 0;
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;      /* 16px or larger stops iPhones zooming in when a field is tapped */
  line-height: 1.5;
}

textarea.field__input { resize: vertical; min-height: 6rem; }

.field__input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.field__input[aria-invalid="true"] { border-color: #B0483F; }

.field__error,
.form__error {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #B0483F;
}

/* ---------- Yes / No choice buttons ---------- */
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.choice { position: relative; display: block; cursor: pointer; }

.choice input {           /* hide the round radio dot, but keep it usable by keyboard */
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.6rem 0.5rem;
  border: 1px solid rgba(122, 152, 191, 0.6);
  background: #fff;
  text-align: center;
  font-size: 0.95rem;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.choice input:checked + span {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Submit button ---------- */
.button--solid {
  width: 100%;
  margin-top: 0.5rem;
  background: var(--color-text);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-body);
}

.button--solid:hover,
.button--solid:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.button--solid:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Thank-you message ---------- */
.rsvp__thanks {
  max-width: 28rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  background: #fff;
  border: 1px solid rgba(122, 152, 191, 0.4);
}

.rsvp__thanks:focus { outline: none; }

.rsvp__thanks-title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 2.2rem;
  margin: 0 0 0.75rem;
}

.rsvp__thanks p { margin: 0; }

/* ==========================================================
   GIFT NOTE
   ========================================================== */
.gift__text {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  line-height: 1.7;
  max-width: 30rem;
  margin: 0 auto;
}

/* ==========================================================
   CLOSING
   ========================================================== */
.closing {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 3rem 1.25rem;

  /* EDIT: your closing photo. A navy gradient is used until you upload images/closing.jpg */
  background:
    linear-gradient(rgba(31, 47, 74, 0.45), rgba(31, 47, 74, 0.65)),
    url("images/closing.jpg") center / cover no-repeat;
}

/* Once images/closing.jpg exists, replace the background above with:

  background:
    linear-gradient(rgba(31, 47, 74, 0.45), rgba(31, 47, 74, 0.65)),
    url("images/closing.jpg") center / cover no-repeat;
*/

.closing__content { max-width: 32rem; }

.closing__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  opacity: 0.9;
}

.closing__title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  line-height: 1.35;
  margin: 0 0 1.5rem;
}

.closing__names {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  margin: 0;
  opacity: 0.95;
}
/* ==========================================================
   MUSIC
   ========================================================== */
.music-embeds {
  display: grid;
  gap: 1rem;
  max-width: 28rem;
  margin: 0 auto;
}

.music-embed {
  border-radius: 12px;
  display: block;
  border: 0;
}

/* ---------- Floating toggle button ---------- */
.music-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(6px);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(31, 47, 74, 0.15);
}

.music-toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.music-toggle__icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Gently spins the note icon while music is playing */
.music-toggle[aria-pressed="true"] .music-toggle__icon {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle[aria-pressed="true"] .music-toggle__icon { animation: none; }
}
/* ==========================================================
   ANIMATIONS
   ========================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%      { transform: translateY(8px) rotate(45deg); }
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__content, .hero__scroll span { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .gallery__img { transition: none; }
  .gallery__button:hover .gallery__img { transform: none; }
}

