/* ==========================================
   Luxury Wedding Invitation
========================================== */

:root {
    --accent: #a56b3d;
    --accent-light: #f2d8b2;
    --bg: #2a180f;
    --card: rgba(255, 248, 240, 0.16);
    --border: rgba(255, 255, 255, 0.22);
    --text: #fffaf4;
    --muted: #e8cfae;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #170c07 0%, #4b2b16 100%);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.music-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1400;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    background: rgba(20, 12, 7, 0.8);
    color: var(--accent-light);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, background 0.25s ease;
}

.music-toggle:hover {
    transform: translateY(-2px);
    background: rgba(31, 19, 12, 0.95);
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-image {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(30, 15, 8, 0.72), rgba(25, 12, 8, 0.9)),
        url("images/background.jpg") center center/cover no-repeat;
    z-index: -4;
}

.background-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(165, 107, 61, 0.22), transparent 45%),
        radial-gradient(circle at bottom, rgba(240, 206, 160, 0.16), transparent 50%);
    z-index: -3;
}

.background-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    opacity: 0.3;
    z-index: -2;
}

.orb-one {
    width: 350px;
    height: 350px;
    top: -120px;
    left: -120px;
    background: #c58c57;
}

.orb-two {
    width: 400px;
    height: 400px;
    bottom: -180px;
    right: -180px;
    background: #e9c89d;
}

.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent), 0 0 22px rgba(165, 107, 61, 0.65);
    animation: float 15s linear infinite;
}

.particles span:nth-child(1) { left: 5%; animation-delay: 0s; }
.particles span:nth-child(2) { left: 12%; animation-delay: 1s; }
.particles span:nth-child(3) { left: 20%; animation-delay: 3s; }
.particles span:nth-child(4) { left: 28%; animation-delay: 5s; }
.particles span:nth-child(5) { left: 35%; animation-delay: 2s; }
.particles span:nth-child(6) { left: 45%; animation-delay: 7s; }
.particles span:nth-child(7) { left: 55%; animation-delay: 6s; }
.particles span:nth-child(8) { left: 66%; animation-delay: 1s; }
.particles span:nth-child(9) { left: 74%; animation-delay: 4s; }
.particles span:nth-child(10) { left: 82%; animation-delay: 5s; }
.particles span:nth-child(11) { left: 90%; animation-delay: 2s; }
.particles span:nth-child(12) { left: 15%; animation-delay: 8s; }
.particles span:nth-child(13) { left: 38%; animation-delay: 4s; }
.particles span:nth-child(14) { left: 60%; animation-delay: 7s; }
.particles span:nth-child(15) { left: 94%; animation-delay: 3s; }

@keyframes float {
    0% {
        transform: translateY(110vh);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120px);
        opacity: 0;
    }
}

.app-shell {
    width: min(1180px, calc(100% - 30px));
    margin: auto;
    padding: 35px 0 80px;
    position: relative;
}

.entry-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 8, 4, 0.74);
    backdrop-filter: blur(10px);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.entry-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.entry-card {
    width: min(100%, 420px);
    padding: 32px 24px;
    border-radius: 24px;
    text-align: center;
    background: rgba(255, 248, 240, 0.95);
    color: #4a2d1b;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(165, 107, 61, 0.28);
    animation: riseIn 0.45s ease both;
}

.entry-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #7a4522;
    margin: 8px 0 10px;
}

.entry-card p {
    color: #6a4a2f;
    line-height: 1.7;
    margin-bottom: 16px;
}

.entry-card button {
    border: none;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #8b4f24 0%, #c48c4e 100%);
    box-shadow: 0 12px 26px rgba(139, 79, 36, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.entry-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(139, 79, 36, 0.3);
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 420px);
    justify-items: center;
    align-items: center;
    gap: 48px;
    min-height: 92vh;
    padding: 40px 0 50px;
}

.hero-copy {
    z-index: 5;
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 0 18px;
}

.eyebrow {
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.hero-title {
    font-family: 'Amiri', serif;
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    text-align: center;
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    text-shadow: 0 0 24px rgba(212, 175, 55, .35);
    color: var(--accent);
}

.hero-title span {
    display: inline-block;
}

.hero-title .name-arabic {
    color: var(--accent);
}

.hero-title .ampersand {
    display: inline-block;
    margin: 0 12px;
    color: rgba(255, 255, 255, 0.9);
}

.name-arabic {
    display: block;
}

.ampersand {
    margin: 0 18px;
}

.hero-portrait-grid {
    display:flex;
    justify-content:center;
    align-items: center;
    gap:28px;
    margin:40px auto 30px;
    flex-wrap: wrap;
}

.portrait-card {
    text-align: center;
    max-width: 180px;
}

.portrait-photo {
    width:150px;
    height:150px;
    border-radius:50%;
    border:3px solid rgba(212, 175, 55, 0.95);
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    background: rgba(255,245,220,0.14);
    margin:0 auto 14px;
}

.portrait-photo img {
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.portrait-name {
    font-family:'Amiri', serif;
    font-size:1.25rem;
    font-weight:700;
    margin-top:8px;
}
.hero-name-stack {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px auto 30px;
    width: 100%;
}

.hero-name-block {
    min-width: 180px;
    text-align: center;
    padding: 8px 10px;
}

.hero-name-label {
    color: var(--accent-light);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero-name-big {
    font-family: 'Amiri', serif;
    font-size: clamp(2.2rem, 3.2vw, 2.8rem);
    color: #ffffff;
    line-height: 1.1;
}

.hero-portrait-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 45px 0;
}

.portrait-card {
    text-align: center;
}

/* ===== FIX PHOTO PLACEHOLDERS ===== */

.photo-frame,
.portrait-photo{
    width:170px;
    height:170px;
    border-radius:50%;
    border:3px solid rgba(212, 175, 55, 0.75);
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    background: rgba(255,245,220,0.08);
}

.photo-frame img,
.portrait-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.photo-placeholder{
    display:none;
    position:absolute;
    inset:0;
    align-items:center;
    justify-content:center;
    text-align:center;
    color: var(--accent);
    font-size:22px;
    font-family:'Amiri', serif;
    background: rgba(4, 30, 45, 0.85);
}

.photo-fallback .photo-placeholder{
    display:flex !important;
}

.portrait-photo {
    margin: 0 auto 12px;
}

.portrait-photo::before {
    content: attr(data-label);
    color: var(--accent);
    font-size: 20px;
    font-family: 'Cairo';
}

.portrait-photo.photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.portrait-info {
    display: grid;
    gap: 4px;
    align-items: center;
}

.portrait-role {
    color: var(--accent-light);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0;
}

.portrait-name {
    color: var(--text);
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.photo-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 24px auto 18px;
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.photo-frame {
    position: relative;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.65);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    z-index: 2;
}

.photo-frame::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(4, 30, 45, 0.78);
    color: var(--accent-light);
    font-size: 0.75rem;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.8px;
    white-space: nowrap;
    z-index: 3;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.baby-photo.photo-fallback,
.photo-frame.photo-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(255, 255, 255, 0.12));
    color: var(--accent-light);
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1rem;
    font-weight: 700;
}

.baby-photo.photo-fallback::before,
.photo-frame.photo-fallback::before {
    content: attr(data-label);
}

.couple-role {
    color: var(--accent-light);
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.couple-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 26px;
}

.couple-block {
    min-width: 140px;
}

.couple-role-title {
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.couple-name-big {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: clamp(1.8rem, 3.4vw, 2.7rem);
    color: var(--text);
    line-height: 1.1;
}

.lead {
    color: var(--muted);
    line-height: 1.9;
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.hero-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 28px auto 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #c48c4e, #f2d6ab);
    color: #3d2110;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b37a3e, #f1d7aa);
    color: #3d2110;
}

.btn-secondary {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(212, 175, 55, 0.12);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.18);
    color: var(--accent-light);
}

.chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 24px auto 0;
  width: fit-content;
  direction: rtl;
}

.chip {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    color: var(--accent-light);
    background: rgba(212, 175, 55, 0.12);
    font-size: 0.95rem;
    text-align: center;
}

.preview-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    min-width: 320px;
    max-width: 420px;
    width: 100%;
    justify-self: center;
}

.preview-top {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.preview-top .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.8;
}

.preview-label {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.preview-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 12px;
}

.preview-body p {
    color: var(--muted);
    line-height: 1.7;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.count-unit {
    text-align: center;
    padding: 12px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.count-unit strong {
    display: block;
    font-size: 1.4rem;
    color: var(--accent-light);
    margin-bottom: 4px;
}

.count-unit span {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section {
    padding: 60px 0;
}

.section-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 32px;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.23);
    backdrop-filter: blur(14px);
}

.section-kicker {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.section p {
    color: var(--muted);
    line-height: 1.8;
}

.story-grid,
.gallery-grid,
.venue-grid {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card,
.gallery-item,
.venue-info,
.map-card,
.music-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
}

.story-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.16);
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.story-card h4 {
    margin-bottom: 8px;
}

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

.gallery-item {
    overflow: hidden;
    min-height: 220px;
    padding: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: saturate(1.1);
}

.venue-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
}

.map-card iframe {
    width: 100%;
    min-height: 280px;
    border: 0;
    border-radius: 14px;
}

.rsvp-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.rsvp-form input,
.rsvp-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.attendance-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.attendance-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.attendance-card input {
    width: auto;
    accent-color: var(--accent);
}

.form-status {
    min-height: 24px;
    color: var(--accent-light);
}

.loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--bg);
    z-index: 999;
    transition: opacity 0.6s ease;
}

.gold-ring {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

footer {
    text-align: center;
    padding: 30px 0 10px;
    font-size: 0.95rem;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .hero,
    .story-grid,
    .gallery-grid,
    .venue-grid {
        grid-template-columns: 1fr;
    }

    .preview-card {
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: 24px;
        gap: 24px;
    }

    .section-card {
        padding: 24px;
    }

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

    .hero-portrait-grid,
    .photo-row {
        justify-content: center;
    }

    .couple-hero {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .app-shell {
        width: min(100%, calc(100% - 20px));
    }

    .hero-title {
        font-size: clamp(2.2rem, 9vw, 2.8rem);
    }

    .hero-name-stack {
        gap: 16px;
        margin: 20px auto 24px;
    }

    .hero-name-block {
        min-width: 140px;
    }

    .portrait-photo,
    .photo-frame {
        width: 108px;
        height: 108px;
    }

    .portrait-card {
        max-width: 100%;
    }

    .portrait-name {
        font-size: 1.15rem;
    }

    .couple-name-big {
        font-size: 1.6rem;
    }

    .hero-actions,
    .attendance-options {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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


/* ===== Updated Baby Portrait Circles ===== */
.hero-portrait-grid{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:40px;
    margin:45px auto;
    flex-wrap:wrap;
}

.portrait-card{
    text-align:center;
}

.portrait-photo{
    width:170px;
    height:170px;
    border-radius:50%;
    overflow:hidden;
    border:4px solid #d4af37;
    background:#111;
    box-shadow:0 0 15px rgba(212,175,55,.45),0 0 40px rgba(212,175,55,.2);
}

.portrait-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    filter:grayscale(100%) sepia(.2);
}

.portrait-name{
    margin-top:16px;
    font-family:'Amiri',serif;
    font-size:1.8rem;
    color:#f2d8b2;
}

@media (max-width:768px){
.hero-portrait-grid{gap:24px;}
.portrait-photo{width:140px;height:140px;}
.portrait-name{font-size:1.5rem;}
}
.curtain {
    position: fixed;
    top: 0;
    width: 50%;
    height: 100%;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(1px);
    transition: transform 1.35s cubic-bezier(.22,1,.36,1);
}

.left {
    left: 0;
    transform-origin: left;
}

.right {
    right: 0;
    transform-origin: right;
}

.open .left {
    transform: translateX(-102%);
}

.open .right {
    transform: translateX(102%);
}
@keyframes fabricWave {
    0%,100% { filter: brightness(1); }
    30% { transform: translateX(-20%) skewY(1deg); }
    60% { transform: translateX(-70%) skewY(-1deg); }
}