/**
 * Francielle & Lucas - Wedding Site
 * Main Stylesheet
 */

:root {
  --gold-light: #d4a843;
  --gold: #b8861e;
  --gold-dark: #7a5a10;
  --cream: #fdf6e8;
  --cream-2: #f5e9c8;
  --parchment: #edd9a3;
  --brown-dark: #2c1a08;
  --brown-mid: #5c3a1e;
  --brown-light: #8b6040;
  --white: #ffffff;
  --shadow-gold: rgba(180, 130, 20, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 20px;
}

body {
  font-family: "Cormorant Garamond", Georgia, serif;
  background: var(--cream);
  color: var(--brown-dark);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* LOADER */
.fh5co-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.fh5co-loader::after {
  content: "";
  width: 48px;
  height: 48px;
  border: 3px solid var(--parchment);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* HERO */
#fh5co-header {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center top;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 10, 2, 0.45) 0%,
    rgba(20, 10, 2, 0.62) 50%,
    rgba(20, 10, 2, 0.8) 100%
  );
}

#fh5co-header::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(212, 168, 67, 0.45);
  pointer-events: none;
  z-index: 2;
}

#fh5co-header::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(212, 168, 67, 0.2);
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 60px 20px;
  animation: fadeInDown 1.2s ease both;
}

.hero-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--parchment);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.9;
}

.hero-names {
  font-family: "Great Vibes", cursive;
  font-size: clamp(5rem, 12vw, 9rem);
  color: var(--white);
  line-height: 1;
  margin: 0 0 8px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.gold-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
  max-width: 340px;
}

.gold-line span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light));
}

.gold-line span:last-child {
  background: linear-gradient(to left, transparent, var(--gold-light));
}

/* COUNTDOWN */
.simply-countdown {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.simply-countdown > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 82px;
}

.simply-countdown .simply-amount {
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--white);
  background: rgba(212, 168, 67, 0.15);
  border: 1px solid rgba(212, 168, 67, 0.5);
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.simply-countdown .simply-word {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-top: 8px;
  opacity: 0.85;
}

/* SECTIONS */
section {
  padding: 90px 20px;
}

.section-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}

.section-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  color: var(--brown-dark);
  margin: 0 0 20px;
  font-weight: 400;
}

.section-subtitle {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 300;
  color: var(--brown-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* RSVP */
#fh5co-couple {
  background: var(--cream);
  text-align: center;
}

.ornament {
  display: block;
  margin: 0 auto 36px;
}

.event-date {
  font-family: "Cinzel", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--brown-dark);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  line-height: 1.3;
}

.event-date em {
  font-family: "Great Vibes", cursive;
  font-size: 1.5em;
  font-style: normal;
  color: var(--gold);
}

.event-address {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--brown-light);
  letter-spacing: 0.04em;
  margin-bottom: 52px;
  line-height: 1.6;
}

/* FORM CARD */
.rsvp-card {
  background: var(--white);
  border: 1px solid var(--parchment);
  border-radius: 4px;
  padding: 48px 40px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 8px 40px var(--shadow-gold);
  position: relative;
}

.rsvp-card::before,
.rsvp-card::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--gold-light);
  border-style: solid;
}

.rsvp-card::before {
  top: 10px;
  left: 10px;
  border-width: 1px 0 0 1px;
}

.rsvp-card::after {
  bottom: 10px;
  right: 10px;
  border-width: 0 1px 1px 0;
}

.form-group {
  margin-bottom: 18px;
}

.form-control {
  width: 100%;
  padding: 16px 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  color: var(--brown-dark);
  border: 1px solid var(--parchment);
  border-bottom: 2px solid var(--parchment);
  border-radius: 2px;
  background: var(--cream);
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.form-control::placeholder {
  color: var(--brown-light);
  opacity: 0.7;
}

.form-control:focus,
.form-control:focus-visible {
  outline: none;
  border-color: var(--gold);
  border-bottom-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 30, 0.15);
  background: var(--white);
}

.name-input-wrap {
  position: relative;
}

.btn-remove {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--brown-light);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}

.btn-remove:hover {
  opacity: 1;
  color: #c0392b;
}

.form-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn-add-name {
  flex: 1;
  padding: 16px 24px;
  background: transparent;
  border: 1px solid var(--gold-light);
  color: var(--gold-dark);
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.3s, color 0.3s;
}

.btn-add-name:hover {
  background: var(--parchment);
  color: var(--brown-dark);
}

.btn-confirm {
  flex: 2;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: none;
  color: var(--brown-dark);
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  box-shadow: 0 4px 18px var(--shadow-gold);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-confirm:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 28px var(--shadow-gold);
}

.rsvp-success {
  display: none;
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.6s ease both;
}

.rsvp-success .check-icon {
  font-size: 2.8rem;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}

.rsvp-success p {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: var(--brown-mid);
  line-height: 1.8;
}

/* GALLERY */
#fh5co-gallery {
  background: linear-gradient(180deg, var(--cream-2) 0%, var(--cream) 100%);
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 48px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--parchment);
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(20, 10, 2, 0.7) 100%
  );
  z-index: 1;
  transition: opacity 0.4s;
}

.gallery-item:hover::before {
  opacity: 0.85;
}

.gallery-item-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .gallery-item-bg {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.04em;
}

/* FOOTER */
footer {
  background: var(--brown-dark);
  color: var(--parchment);
  text-align: center;
  padding: 52px 20px;
}

footer .footer-names {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  color: var(--gold-light);
  margin-bottom: 14px;
  display: block;
}

footer p {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  opacity: 0.55;
  margin: 0;
}

/* BACK TO TOP */
.gototop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.gototop.active {
  opacity: 1;
  pointer-events: auto;
}

.gototop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  box-shadow: 0 4px 16px var(--shadow-gold);
  text-decoration: none;
  font-size: 1.2rem;
  transition: background 0.2s, transform 0.2s;
}

.gototop a:hover {
  background: var(--gold-dark);
  transform: translateY(-3px);
}

/* ANIMATIONS */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease both;
}

.delay-1 {
  animation-delay: 0.15s;
}

.delay-2 {
  animation-delay: 0.3s;
}

.delay-3 {
  animation-delay: 0.45s;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  html {
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rsvp-card {
    padding: 32px 22px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-add-name,
  .btn-confirm {
    width: 100%;
    flex: unset;
  }
}

@media (max-width: 400px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
