/*
    Luxury Gold - Royal Edition
    A premium design system for high-end digital invitations.
*/

:root {
    --gold: #cda434;
    --midnight: #121212;
    --midnight-light: #1e1e1e;
    --white: #ffffff;
    --text-muted: #888888;
    --font-royal: 'Cinzel Decorative', cursive;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--midnight);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* --- Opening Screen --- */
.opening-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: var(--midnight);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.5s cubic-bezier(0.8, 0, 0.2, 1);
}

.opening-screen.opened {
    transform: translateY(-100%);
}

.opening-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at center, rgba(205, 164, 52, 0.1) 0%, transparent 70%);
}

.opening-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 600px;
}

.gold-ornament {
    width: 150px;
    height: 60px;
    margin: 0 auto;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 40"><path d="M0 20 Q25 0 50 20 T100 20" fill="none" stroke="%23cda434" stroke-width="1"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.gold-ornament.top { margin-bottom: 3rem; }
.gold-ornament.bottom { margin-top: 3rem; transform: rotate(180deg); }

.opening-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    color: var(--gold);
    display: block;
    margin-bottom: 2rem;
}

.opening-title {
    font-family: var(--font-royal);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 3rem;
}

.opening-title .name { display: block; }
.opening-title .and { font-size: 0.6em; opacity: 0.5; margin: 0.5rem 0; display: block; }

.guest-info {
    margin: 2rem 0;
    padding: 2rem;
    border: 1px solid rgba(205, 164, 52, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.guest-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    color: var(--text-muted);
}

.guest-name {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    margin-top: 0.5rem;
    color: var(--gold);
}

.open-button {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 1.2rem 3.5rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.open-button:hover {
    background: var(--gold);
    color: var(--midnight);
    box-shadow: 0 0 30px rgba(205, 164, 52, 0.4);
}

/* --- Smart Nav --- */
nav {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    transition: var(--transition);
}

nav.visible {
    transform: translateX(-50%) translateY(0);
}

.nav-container {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(15px);
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    border: 1px solid rgba(205, 164, 52, 0.3);
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

nav a.active {
    color: var(--gold);
    transform: scale(1.2);
}

/* --- Music Player --- */
.music-toggle-btn {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  background: var(--gold);
  color: var(--midnight);
}
.music-toggle-btn:hover { transform: scale(1.1); }
.music-toggle-btn svg { width: 20px; height: 20px; }

/* --- Sections --- */
section {
    padding: 6rem 1.5rem;
}

@media (min-width: 992px) {
    section { padding: 10rem 2rem; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-header { margin-bottom: 6rem; }
.section-title {
    font-family: var(--font-royal);
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.2rem;
}

.title-divider {
    width: 80px;
    height: 1px;
    background: var(--gold);
    margin: 1.5rem auto;
    position: relative;
}

.title-divider::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--midnight);
    padding: 0 10px;
    color: var(--gold);
    font-size: 0.8rem;
}

/* --- Hero --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--midnight-light);
    padding: 0;
    position: relative;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at center, rgba(205, 164, 52, 0.05) 0%, transparent 70%);
}

.gold-frame {
    border: 1px solid var(--gold);
    padding: 3rem 1.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
}

@media (min-width: 768px) {
    .gold-frame { padding: 6rem 4rem; }
}

.gold-frame::before, .gold-frame::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold);
}

.gold-frame::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
.gold-frame::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; }

.hero-crown { font-size: 2.5rem; color: var(--gold); margin-bottom: 2rem; }
.hero-subtitle { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5rem; color: var(--gold); margin-bottom: 2rem; }
.hero-title { font-family: var(--font-royal); font-size: 3rem; margin-bottom: 2rem; line-height: 1.4; }
.hero-divider { width: 40px; height: 1px; background: var(--gold); margin: 2rem auto; }
.hero-date { font-family: var(--font-serif); font-size: 1.2rem; letter-spacing: 0.1rem; }

/* --- Couple --- */
.couple-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.couple-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.card-inner {
    padding: 4rem 2rem;
    border: 1px solid rgba(205, 164, 52, 0.2);
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.couple-card:hover .card-inner {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.couple-portrait {
    width: 120px;
    height: 120px;
    margin: 0 auto 3rem;
    background: var(--midnight-light);
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--gold);
}

.couple-card h3 { font-family: var(--font-royal); font-size: 2rem; margin-bottom: 1.5rem; color: var(--gold); }
.line { width: 30px; height: 1px; background: var(--gold); margin: 1.5rem auto; opacity: 0.5; }
.parents { color: var(--text-muted); font-size: 0.9rem; font-weight: 300; }

.couple-center { font-size: 4rem; color: var(--gold); opacity: 0.3; }
.seal {
    width: 100px;
    height: 100px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.initials { font-family: var(--font-royal); font-size: 1.5rem; }

/* --- Event --- */
.event-section { background-color: var(--midnight-light); }
.event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (min-width: 992px) {
    .event-grid { grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 6rem; }
}

.event-card {
    padding: 5rem 3rem;
    background: var(--midnight);
    border: 1px solid rgba(205, 164, 52, 0.1);
    position: relative;
    overflow: hidden;
}

.event-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(205, 164, 52, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.event-icon { font-size: 2.5rem; color: var(--gold); margin-bottom: 2rem; }
.event-card h3 { font-family: var(--font-royal); font-size: 1.8rem; margin-bottom: 2.5rem; }
.event-time { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--gold); margin-bottom: 2rem; }
.event-location i { color: var(--gold); margin-bottom: 1rem; }
.event-location .small { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }

.countdown {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .countdown { gap: 3rem; }
}

.countdown-item span { display: block; font-family: var(--font-serif); font-size: 2rem; color: var(--gold); }
@media (min-width: 768px) {
    .countdown-item span { font-size: 3.5rem; }
}
.countdown-item p { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1rem; opacity: 0.5; }

/* --- Location --- */
.map-frame { border: 1px solid var(--gold); padding: 10px; background: var(--midnight-light); margin-bottom: 3rem; }
.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 3rem;
    background: var(--gold);
    color: var(--midnight);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.2rem;
    font-weight: 700;
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item { aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(205, 164, 52, 0.2); }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.1); }

/* --- RSVP --- */
.rsvp-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: left;
}

@media (min-width: 992px) {
    .rsvp-card { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.royal-form { background: var(--midnight-light); padding: 2rem; border: 1px solid rgba(205, 164, 52, 0.2); }
@media (min-width: 768px) {
    .royal-form { padding: 4rem; }
}
.royal-form label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1rem; color: var(--gold); margin-bottom: 1rem; }
.royal-form input, .royal-form textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(205, 164, 52, 0.3);
    color: white;
    font-family: var(--font-sans);
    margin-bottom: 2rem;
}

.royal-form input:focus, .royal-form textarea:focus { outline: none; border-bottom-color: var(--gold); }
.btn-royal {
    width: 100%;
    padding: 1.5rem;
    background: var(--gold);
    color: var(--midnight);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    font-weight: 700;
    cursor: pointer;
}

.wishes-list { max-height: 500px; overflow-y: auto; padding-right: 2rem; }
.wish-item { margin-bottom: 3rem; }
.wish-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.wish-name { font-family: var(--font-serif); font-size: 1.4rem; color: var(--gold); }
.wish-time { font-size: 0.7rem; opacity: 0.4; }
.wish-divider { width: 20px; height: 1px; background: var(--gold); margin-top: 1rem; opacity: 0.3; }

/* --- Footer --- */
.royal-footer { padding: 12rem 2rem; text-align: center; position: relative; }
.footer-quote { font-family: var(--font-serif); font-style: italic; font-size: 1.8rem; margin-bottom: 3rem; opacity: 0.6; }
.footer-names { font-family: var(--font-royal); font-size: 3rem; color: var(--gold); margin-bottom: 3rem; }
.footer-copy { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.3rem; opacity: 0.4; }

/* --- Animations --- */
.animate-reveal { opacity: 0; transform: translateY(50px); }

/* --- Responsive --- */
@media (max-width: 992px) {
    .event-grid, .rsvp-card { grid-template-columns: 1fr; }
    .couple-center { transform: rotate(90deg); }
}

/* ── Responsive Fix ── */
@media (max-width: 600px) {
  /* Countdown */
  .countdown {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .countdown-item {
    flex: 1 1 calc(50% - 0.8rem);
    min-width: 60px;
  }
  .countdown-item span {
    font-size: clamp(1.8rem, 8vw, 2rem) !important;
  }

  /* Event grid */
  .event-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .event-card {
    padding: 3rem 1.5rem;
  }

  /* RSVP */
  .rsvp-card {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .royal-footer {
    padding: 6rem 1.5rem 8rem !important; /* Add extra bottom padding for fixed navigation safety */
  }
  .footer-quote {
    font-size: clamp(1rem, 4vw, 1.8rem);
    word-break: break-word;
    overflow-wrap: break-word;
    padding: 0 1rem;
  }
  .footer-names {
    font-size: clamp(1.8rem, 7vw, 3rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Couple */
  .couple-card {
    min-width: unset;
    width: 100%;
  }

  /* Section padding */
  section {
    padding: 4rem 1.5rem;
  }
}

/* Height-based scaling for short viewports (eg. small phones or mock frames) */
@media (max-height: 720px) {
  .cover-content {
    padding: 1rem;
  }
  .cover-subtitle {
    margin-bottom: 1rem;
  }
  .cover-names {
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  .guest-reveal {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
  .guest-name {
    font-size: 1.4rem;
  }
  .cover-footer {
    margin-top: 2rem;
  }
  .cover-date {
    margin-bottom: 1rem;
  }
  .hero-box {
    padding: 2.5rem 1.25rem;
  }
  .hero-names {
    font-size: clamp(2.5rem, 8vw, 3.8rem);
    margin: 1rem 0;
  }
  .hero-date {
    font-size: 1rem;
  }
}

