/* =====================================================
   ROSA ETERNA — Stylesheet
   Wedding Invitations PH (inviteph.com)
   
   PALETTE: Dusty Rose + Sage + Cream + Antique Gold
   FONTS:   Playfair Display (display), Lora (body), Great Vibes (script)
   ===================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Colors */
  --color-cream: #faf3ec;
  --color-cream-deep: #f1e8dd;
  --color-rose: #b9747a; /* dusty rose — primary accent */
  --color-rose-deep: #8e5358;
  --color-rose-soft: #e8c7c9;
  --color-sage: #8a9a82; /* sage green — secondary */
  --color-sage-deep: #5f7058;
  --color-sage-soft: #c5d1bc;
  --color-gold: #b59663; /* antique gold — accent */
  --color-gold-soft: #d9c4a0;
  --color-ink: #3a2e2a; /* warm dark — body text */
  --color-ink-soft: #5c4a44;

  /* Typography */
  --font-display: "Playfair Display", serif;
  --font-body: "Lora", serif;
  --font-script: "Great Vibes", cursive;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;

  /* Misc */
  --max-width: 1100px;
  --transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-cream);
  overflow-x: hidden;
  position: relative;

  /* Subtle paper texture via gradient */
  background-image:
    radial-gradient(at 20% 30%, rgba(185, 116, 122, 0.04) 0px, transparent 50%),
    radial-gradient(at 80% 70%, rgba(138, 154, 130, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
}

/* --- BACKGROUND IMAGE --- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("assets/images/rosa-eterna-background-desktop.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 768px) {
  body::before {
    background-image: url("assets/images/rosa-eterna-background-mobile.webp");
    background-attachment: scroll;
  }
}

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

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

a:hover {
  color: var(--color-rose);
}

/* ---------- SHARED SECTION STYLES ---------- */
section {
  padding: var(--space-xl) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.section__eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-sage-deep);
  margin-bottom: var(--space-sm);
  opacity: 0.85;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  color: var(--color-rose-deep);
  margin-bottom: var(--space-md);
  letter-spacing: 0.02em;
}

/* ---------- PETALS (falling animation) ---------- */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 14px;
  background: var(--color-rose-soft);
  border-radius: 100% 0 100% 0;
  opacity: 0.6;
  animation: petalFall linear infinite;
  will-change: transform;
}

.petal:nth-child(odd) {
  background: var(--color-gold-soft);
  width: 10px;
  height: 10px;
}

.petal:nth-child(3n) {
  background: var(--color-rose);
  opacity: 0.4;
}

@keyframes petalFall {
  0% {
    transform: translate(0, -40px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  100% {
    transform: translate(40px, 100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .petal {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.hero__ornament {
  width: 200px;
  color: var(--color-gold);
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
}

.hero__ornament--top {
  animation-delay: 0.2s;
}
.hero__ornament--bottom {
  animation-delay: 1.6s;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-sage-deep);
  margin: var(--space-md) 0;
  opacity: 0;
  animation: fadeIn 1s ease 0.5s forwards;
}

.hero__names {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 400;
  color: var(--color-rose-deep);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin: var(--space-sm) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero__name {
  opacity: 0;
  animation: revealUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero__name:nth-child(1) {
  animation-delay: 0.8s;
}
.hero__name:nth-child(3) {
  animation-delay: 1.2s;
}

.hero__amp {
  font-family: var(--font-script);
  font-size: 1.4em;
  font-weight: 400;
  color: var(--color-gold);
  line-height: 0.8;
  margin: -0.2em 0;
  opacity: 0;
  animation: fadeIn 1s ease 1s forwards;
}

.hero__invite {
  font-style: italic;
  font-size: 1.15rem;
  max-width: 500px;
  margin: var(--space-md) auto;
  color: var(--color-ink-soft);
  opacity: 0;
  animation: fadeIn 1s ease 1.8s forwards;
}

.hero__date {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin: var(--space-md) 0;
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}

.hero__divider {
  color: var(--color-gold);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 50px;
  background: var(--color-sage-deep);
  opacity: 0;
  animation:
    fadeIn 1s ease 2.4s forwards,
    scrollPulse 2s ease-in-out 2.4s infinite;
}

.hero__scroll span {
  position: absolute;
  bottom: -2px;
  left: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--color-sage-deep);
  border-bottom: 1px solid var(--color-sage-deep);
  transform: rotate(45deg);
}

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

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

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- COUNTDOWN ---------- */
.countdown {
  background: var(--color-cream-deep);
  max-width: 100%;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  border-top: 1px solid var(--color-gold-soft);
  border-bottom: 1px solid var(--color-gold-soft);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  max-width: 800px;
  margin: var(--space-md) auto 0;
}

.countdown__unit {
  background: var(--color-cream);
  padding: var(--space-md) var(--space-sm);
  border: 1px solid var(--color-gold-soft);
  border-radius: 2px;
  position: relative;
  transition: transform var(--transition);
}

.countdown__unit::before,
.countdown__unit::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--color-gold);
}

.countdown__unit::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.countdown__unit::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

.countdown__unit:hover {
  transform: translateY(-4px);
}

.countdown__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-rose-deep);
  line-height: 1;
  margin-bottom: var(--space-xs);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease;
}

.countdown__number.tick {
  animation: tick 0.5s ease;
}

@keyframes tick {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.countdown__label {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sage-deep);
}

/* ---------- STORY ---------- */
.story__divider {
  width: 50px;
  margin: var(--space-md) auto;
  color: var(--color-gold);
}

.story__content {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--color-ink-soft);
}

.story__content p {
  /*text-indent: 2em;*/
  margin-bottom: var(--space-sm);
  white-space: pre-line;
  text-align: justify;
}

.story__content p::first-letter {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  float: left;
  margin: 0.1em 0.1em 0 0;
  color: var(--color-rose);
}

/* ---------- DETAILS ---------- */
.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.detail-card {
  background: var(--color-cream-deep);
  padding: var(--space-lg) var(--space-md);
  border: 1px solid var(--color-gold-soft);
  border-radius: 2px;
  position: relative;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.detail-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--color-gold);
  pointer-events: none;
  opacity: 0.3;
}

.detail-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(142, 83, 88, 0.3);
}

.detail-card__icon {
  width: 50px;
  height: 50px;
  margin: 0 auto var(--space-sm);
  color: var(--color-rose);
}

.detail-card__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--color-rose-deep);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.05em;
}

.detail-card__time {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.detail-card__venue {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: var(--space-xs);
}

.detail-card__address {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  margin-bottom: var(--space-md);
}

.detail-card__link {
  display: inline-block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-sage-deep);
  border-bottom: 1px solid var(--color-sage-deep);
  padding-bottom: 2px;
}

.detail-card__link:hover {
  color: var(--color-rose);
  border-bottom-color: var(--color-rose);
}

.details__attire {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gold-soft);
}

.details__dresscode {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-rose-deep);
  margin-bottom: var(--space-xs);
}

.details__motif {
  font-style: italic;
  color: var(--color-sage-deep);
}

.details__attire-image {
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
}

.details__attire-image img {
  width: 100%;
  max-width: 320px;
  border-radius: 4px;
}

/* ---------- GALLERY ---------- */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.gallery__item {
  overflow: hidden;
  border-radius: 2px;
  position: relative;
  background: var(--color-cream-deep);
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
  filter: sepia(0.05) saturate(0.95);
}

.gallery__item:hover img {
  transform: scale(1.08);
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 6px solid var(--color-cream);
  pointer-events: none;
}

/* ---------- ENTOURAGE ---------- */
.entourage__content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg) var(--space-md);
  margin-top: var(--space-md);
  text-align: center;
}

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

.entourage__group-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-rose-deep);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: var(--space-xs);
}

.entourage__group-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: var(--color-gold);
}

.entourage__list {
  list-style: none;
  font-size: 1.05rem;
  color: var(--color-ink);
  line-height: 2;
}

.entourage__list--two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 var(--space-md);
  text-align: center;
}

.entourage__list--inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.entourage__list--inline li::after {
  content: "•";
  color: var(--color-gold);
  margin-left: var(--space-sm);
}

.entourage__list--inline li:last-child::after {
  display: none;
}

.entourage__sub {
  text-align: center;
}

.entourage__sub-title {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sage-deep);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-xs);
}

/* ---------- RSVP ---------- */
.rsvp {
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--color-cream-deep) 50%,
    transparent 100%
  );
  max-width: 100%;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.rsvp__divider {
  width: 100px;
  margin: var(--space-md) auto;
  color: var(--color-gold);
}

.rsvp__message {
  max-width: 600px;
  margin: 0 auto var(--space-md);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-ink-soft);
  font-style: italic;
}

.rsvp__special-message {
  max-width: 500px;
  margin: 0 auto var(--space-md);
  color: var(--color-rose-deep);
  font-style: italic;
}

.rsvp__special-message:empty {
  display: none;
}

.rsvp__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0 var(--space-lg);
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid;
}

.btn--primary {
  background: var(--color-rose-deep);
  color: var(--color-cream);
  border-color: var(--color-rose-deep);
}

.btn--primary:hover {
  background: var(--color-rose);
  color: var(--color-cream);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(142, 83, 88, 0.5);
}

.btn--secondary {
  background: transparent;
  color: var(--color-sage-deep);
  border-color: var(--color-sage-deep);
}

.btn--secondary:hover {
  background: var(--color-sage-deep);
  color: var(--color-cream);
  transform: translateY(-2px);
}

.rsvp__hashtag {
  font-style: italic;
  color: var(--color-ink-soft);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.rsvp__hashtag-tag {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--color-rose);
}

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-rose-deep);
  color: var(--color-cream);
}

.footer__monogram {
  font-family: var(--font-display);
  font-size: 3rem;
  margin-bottom: var(--space-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
}

.footer__amp {
  font-family: var(--font-script);
  font-size: 1.2em;
  color: var(--color-gold-soft);
}

.footer__date {
  font-family: var(--font-display);
  letter-spacing: 0.3em;
  font-size: 1rem;
  margin-bottom: var(--space-md);
  color: var(--color-gold-soft);
}

.footer__credit {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-rose-soft);
}

.footer__credit a {
  color: var(--color-cream);
  border-bottom: 1px solid var(--color-rose-soft);
}

.footer__credit a:hover {
  color: var(--color-gold-soft);
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s ease,
    transform 1s ease;
}

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

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

  section {
    padding: var(--space-lg) var(--space-md);
  }

  .hero {
    min-height: 90vh;
  }

  .hero__date {
    font-size: 0.95rem;
    gap: var(--space-xs);
  }

  .countdown__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .countdown__unit {
    padding: var(--space-sm);
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .entourage__content {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .entourage__list--two-col {
    grid-template-columns: 1fr;
  }

  .rsvp__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__names {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .section__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }

  .gallery__item--tall {
    grid-row: span 1;
  }
}

/* ---------- PRINT STYLES (in case guests print the invite) ---------- */
@media print {
  .petals,
  .hero__scroll,
  .countdown,
  .btn {
    display: none;
  }

  body {
    background: white;
  }

  section {
    page-break-inside: avoid;
  }
}
