/* ================================================
   Wedding Website — Guiliene & Blessed
   Color Palette: Black / Gold / Silver / White
   ================================================ */

/* ----- CSS Custom Properties ----- */
:root {
  --color-black: #1A1A1A;
  --color-rich-black: #0D0D0D;
  --color-gold: #C9A84C;
  --color-gold-light: #D4B85A;
  --color-silver: #C0C0C0;
  --color-white: #FFFFFF;
  --color-off-white: #FAFAFA;
  --color-error: #D32F2F;
  --color-success: #388E3C;

  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Great Vibes", cursive;

  --max-width: 1100px;
  --nav-height: 60px;
  --transition: 0.3s ease;
}

/* ----- Reset ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-black);
  background-color: var(--color-off-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover,
a:focus-visible {
  color: var(--color-gold-light);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

fieldset {
  border: none;
}

/* ----- Focus Visible ----- */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* ----- Utility: Section Title ----- */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  color: var(--color-rich-black);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

/* ----- Utility: Divider ----- */
.divider {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

/* ----- Utility: required star ----- */
.required {
  color: var(--color-gold);
}

/* ================================================
   NAV
   ================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  transition: background var(--transition);
}

.nav__logo {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--color-gold);
}

.nav__logo span {
  color: var(--color-silver);
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav__links a {
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  position: relative;
  padding-bottom: 4px;
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav__toggle {
  display: none;
  width: 28px;
  height: 24px;
  position: relative;
  z-index: 10;
}

.nav__hamburger,
.nav__hamburger::before,
.nav__hamburger::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__hamburger {
  position: relative;
}

.nav__hamburger::before,
.nav__hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav__hamburger::before {
  top: -8px;
}

.nav__hamburger::after {
  top: 8px;
}

/* Hamburger open state */
.nav__toggle[aria-expanded="true"] .nav__hamburger {
  background: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    url("../media/50f82d6d-5360-47e7-9374-3b30cbe98e52.JPG")
    center / cover no-repeat;
  text-align: center;
  color: var(--color-white);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 13, 13, 0.65) 0%,
    rgba(13, 13, 13, 0.45) 50%,
    rgba(13, 13, 13, 0.70) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 700px;
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 1rem;
  color: var(--color-silver);
}

.hero__names {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero__names span {
  color: var(--color-gold);
}

.hero__divider {
  margin: 1rem auto;
  display: flex;
  justify-content: center;
}

.hero__date {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-style: italic;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.hero__venue {
  font-size: 0.9rem;
  color: var(--color-silver);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero__cta {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border: 1.5px solid var(--color-gold);
  color: var(--color-gold);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all var(--transition);
}

.hero__cta:hover,
.hero__cta:focus-visible {
  background: var(--color-gold);
  color: var(--color-rich-black);
}

/* ================================================
   COUNTDOWN
   ================================================ */
.countdown {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--color-rich-black);
  color: var(--color-white);
}

.countdown .section-title {
  color: var(--color-white);
}

.countdown__timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown__number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}

.countdown__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-silver);
  margin-top: 0.5rem;
}

.countdown__separator {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-silver);
  opacity: 0.5;
  align-self: flex-start;
  padding-top: 0.2em;
}

.countdown__message {
  margin-top: 2rem;
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-gold);
}

/* ================================================
   OUR STORY
   ================================================ */
.story {
  padding: 5rem 2rem;
  background: var(--color-off-white);
}

.story__content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.story__icon {
  margin-bottom: 1.5rem;
}

.story__text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #444;
  font-style: italic;
}

/* ================================================
   EVENT DETAILS
   ================================================ */
.details {
  padding: 5rem 2rem;
  background: var(--color-white);
}

.details__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.details__card {
  background: var(--color-off-white);
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: box-shadow var(--transition);
}

.details__card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.details__card--wide {
  grid-column: 1 / -1;
}

.details__icon {
  margin-bottom: 1rem;
}

.details__card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-rich-black);
  margin-bottom: 1rem;
}

.details__info {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 0.75rem;
}

.details__time {
  font-size: 0.9rem;
  color: var(--color-gold);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.details__map-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.details__dress-code {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.details__dress-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.95rem;
  color: #555;
}

.details__dress-label {
  font-weight: 700;
  color: var(--color-rich-black);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

/* ================================================
   PHOTO CAROUSEL
   ================================================ */
.gallery {
  padding: 5rem 2rem;
  background: var(--color-rich-black);
  color: var(--color-white);
}

.gallery .section-title {
  color: var(--color-white);
}

.carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
}

.carousel__track {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.carousel__slide.active {
  opacity: 1;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 13, 0.6);
  color: var(--color-white);
  font-size: 1.2rem;
  border-radius: 50%;
  z-index: 2;
  transition: background var(--transition);
}

.carousel__btn:hover,
.carousel__btn:focus-visible {
  background: rgba(201, 168, 76, 0.8);
}

.carousel__btn--prev {
  left: 1rem;
}

.carousel__btn--next {
  right: 1rem;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 0;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-silver);
  opacity: 0.4;
  transition: all var(--transition);
}

.carousel__dot.active {
  opacity: 1;
  background: var(--color-gold);
}

/* ================================================
   RSVP
   ================================================ */
.rsvp {
  padding: 5rem 2rem;
  background: var(--color-off-white);
}

.rsvp__subtitle {
  text-align: center;
  color: #666;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
  font-size: 1rem;
}

.rsvp__form {
  max-width: 550px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rsvp__field label,
.rsvp__field legend {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-rich-black);
  margin-bottom: 0.5rem;
}

.rsvp__field select,
.rsvp__field input[type="text"],
.rsvp__field input[type="email"],
.rsvp__field input[type="number"],
.rsvp__field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-white);
  transition: border-color var(--transition);
}

.rsvp__field select:focus,
.rsvp__field input:focus,
.rsvp__field textarea:focus {
  border-color: var(--color-gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.rsvp__field select.error,
.rsvp__field input.error,
.rsvp__field textarea.error {
  border-color: var(--color-error);
}

.rsvp__error {
  display: block;
  font-size: 0.8rem;
  color: var(--color-error);
  min-height: 1.2em;
  margin-top: 0.3rem;
}

/* Radio group */
.rsvp__radio-group {
  padding: 0;
  margin: 0;
}

.rsvp__radio-group legend {
  width: 100%;
  margin-bottom: 0.75rem;
}

.rsvp__radio-options {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 0.25rem;
}

.rsvp__field label.rsvp__radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-rich-black);
  margin-bottom: 0;
  line-height: 1;
}

.rsvp__radio-label input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border: 2px solid var(--color-rich-black);
  border-radius: 50%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}

.rsvp__radio-label input[type="radio"]:checked {
  border-color: var(--color-gold);
}

.rsvp__radio-label input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gold);
}

/* Submit */
.rsvp__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--color-rich-black);
  color: var(--color-gold);
  border: 1.5px solid var(--color-gold);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all var(--transition);
  width: 100%;
}

.rsvp__submit:hover,
.rsvp__submit:focus-visible {
  background: var(--color-gold);
  color: var(--color-rich-black);
}

.rsvp__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner */
.rsvp__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 1rem;
  z-index: 2000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.toast:not([hidden]) {
  display: flex;
}

.toast--success {
  background: var(--color-rich-black);
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
}

.toast--error {
  background: #fff5f5;
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.toast__close {
  color: inherit;
  font-size: 1.3rem;
  padding: 0;
  line-height: 1;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  padding: 4rem 2rem;
  background: var(--color-rich-black);
  color: var(--color-white);
  text-align: center;
}

.footer__names {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-gold);
  margin-bottom: 0.3rem;
}

.footer__date {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-silver);
  margin-bottom: 1rem;
}

.footer__love {
  font-size: 0.8rem;
  color: #888;
}

/* ================================================
   MUSIC PLAYER (floating)
   ================================================ */
.music-player {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(13, 13, 13, 0.92);
  padding: 0.5rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  z-index: 1500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.music-player__btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  transition: color var(--transition);
}

.music-player__btn:hover {
  color: var(--color-gold-light);
}

.music-player__track {
  font-size: 0.7rem;
  color: var(--color-silver);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================
   SECTION REVEAL ANIMATION
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   RESPONSIVE — Tablet (768px)
   ================================================ */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    background: rgba(13, 13, 13, 0.96);
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__links a {
    font-size: 1.1rem;
  }

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

  .details__card--wide {
    grid-column: 1;
  }
}

/* ================================================
   RESPONSIVE — Mobile (480px)
   ================================================ */
@media (max-width: 480px) {
  .hero__names {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .countdown__unit {
    min-width: 60px;
  }

  .countdown__number {
    font-size: 2rem;
  }

  .rsvp__radio-options {
    flex-direction: column;
    gap: 0.8rem;
  }

  .music-player__track {
    display: none;
  }
}

/* ================================================
   REDUCED MOTION
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
