/* ================================================
   ADEL KADRI & JANIN GHANOUM — WEDDING INVITATION
   Colors sampled from their golden sunset portrait
   ================================================ */

/* ── LOCAL FONT ── */
@font-face {
    font-family: 'Brittany Signature';
    src: url('BrittanySignature.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ── TOKENS ── */
:root {
    --sunset:    #E8732B;   /* fiery orange sky                  */
    --gold:      #D4A030;   /* sun halo / warm amber             */
    --champagne: #F0C860;   /* bright sun shimmer                */
    --ivory:     #F5EDD8;   /* bride's dress / primary text      */
    --dark:      #160C04;   /* night shadow base                 */
    --haze:      #7A8FA0;   /* mountain bokeh midtone            */

    --glass-bg:     rgba(22,12,4,0.58);
    --glass-border: rgba(240,200,96,0.22);

    --font-names:   'Brittany Signature', 'Great Vibes', cursive;
    --font-display: 'Great Vibes', cursive;
    --font-body:    'Luxurious Roman', Georgia, serif;
    --font-arabic:  'Amiri', serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow: hidden; height: 100%; width: 100%; }

/* ── PHOTO BACKGROUND ── */
.photo-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.photo-bg img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: 62% 20%;
    filter: blur(1px) brightness(0.36) saturate(1.05);
    transform: scale(1.04);
}
.photo-vignette {
    position: fixed; inset: 0; z-index: 1;
    background: radial-gradient(ellipse at 50% 40%,
        transparent 10%,
        rgba(22,12,4,0.52) 60%,
        rgba(22,12,4,0.90) 100%);
}

/* ── PAGE LOADER ── */
.h-loader {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: var(--dark);
}
.h-loader-ring {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(240,200,96,0.15);
    border-top-color: var(--gold);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── NAV ARROWS ── */
.h-arrow {
    position: fixed; top: 50%; z-index: 500;
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(22,12,4,0.55); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--ivory); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-50%);
    transition: all 0.3s var(--ease-out);
}
.h-arrow:hover { border-color: var(--gold); color: var(--gold); }
.h-arrow svg { width: 17px; height: 17px; }
.h-arrow-prev { left: 14px; }
.h-arrow-next { right: 14px; }

/* ── PROGRESS DOTS ── */
.h-progress {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 7px; z-index: 500;
}
.h-dot {
    width: 6px; height: 6px; border-radius: 3px;
    background: rgba(245,237,216,0.22);
    border: none; cursor: pointer; padding: 0;
    transition: all 0.4s var(--ease-out);
}
.h-dot.is-active {
    background: var(--gold);
    width: 18px; transform: scale(1.1);
}

/* ── HORIZONTAL SCROLL CONTAINER ── */
.h-scroll {
    position: relative; z-index: 2;
    display: flex;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: 100vh; height: 100dvh;
    width: 100vw;
    scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* ── PANELS ── */
.h-panel {
    min-width: 100vw; max-width: 100vw;
    height: 100vh; height: 100dvh;
    scroll-snap-align: start;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 54px 24px 64px;
    overflow: hidden;
    box-sizing: border-box;
}
.panel-content {
    opacity: 1;
    transform: translateY(0);
}
.h-panel.is-active .panel-content {
    animation: panelEnter 0.7s var(--ease-out) both;
}
@keyframes panelEnter {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── GLASS CARD ── */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    padding: 44px 40px;
    width: 100%;
    max-width: min(500px, calc(100vw - 48px));
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    backdrop-filter: blur(6px);
}

/* ── PANEL 1: COVER ── */

/* Three-section layout using space-between:
   [families + ayah]  ···  [names — hero]  ···  [tagline + scroll]
   Each section fills from the top of its natural space. */
.cover-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: clamp(500px, calc(100dvh - 118px), 730px);
    width: 100%;
    max-width: 480px;
}

.cover-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.cover-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 36px;
}

.cover-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.cover-pretext {
    font-family: var(--font-body); font-size: 8px;
    letter-spacing: 5px; text-transform: uppercase;
    color: var(--ivory); opacity: 0.42;
}
.cover-rule {
    width: 52px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.cover-families {
    display: flex; align-items: center; justify-content: center; gap: 14px;
}
.family-name {
    font-family: var(--font-body);
    font-size: clamp(13px, 3vw, 16px);
    color: var(--ivory); letter-spacing: 1.5px; opacity: 0.78;
}

/* CSS diamond separator — font-independent, always renders correctly */
.sep-ornament {
    display: inline-block;
    width: 5px; height: 5px;
    background: var(--gold);
    transform: rotate(45deg);
    opacity: 0.50;
    flex-shrink: 0;
}

/* Arabic Quran ayah */
.arabic-aya {
    font-family: var(--font-arabic);
    direction: rtl; text-align: center;
    font-size: clamp(20px, 4vw, 26px);
    line-height: 2.0;
    color: var(--champagne);
    opacity: 0.90;
    max-width: 420px;
    padding: 0 8px;
}
.arabic-aya-ref {
    font-family: var(--font-arabic);
    font-size: clamp(11px, 2vw, 14px);
    color: var(--gold); opacity: 0.62;
    direction: rtl; text-align: center;
    margin-top: -2px;
}

/* Couple names — the focal point, deliberately large */
.cover-name {
    font-family: var(--font-names); font-weight: 400;
    font-size: clamp(80px, 21vw, 150px);
    line-height: 1.25; margin: 0;
}
.name-shimmer {
    background: linear-gradient(90deg,
        var(--gold), var(--champagne), var(--ivory), var(--champagne), var(--gold));
    background-size: 300% 100%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s linear infinite;
}
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

.cover-family-surname-under {
    font-family: var(--font-body);
    font-size: clamp(9px, 1.8vw, 12px);
    letter-spacing: 7px; text-transform: uppercase;
    color: var(--gold); opacity: 0.90;
    margin-top: 3px;
    margin-bottom: 4px;
    text-shadow: 0 1px 10px rgba(22,12,4,0.95), 0 0 20px rgba(22,12,4,0.8);
}
.cover-amp {
    display: flex; align-items: center; gap: 14px;
    width: 130px; margin: 8px 0;
}
.amp-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.amp-char { font-family: var(--font-display); font-size: 36px; color: var(--gold); }

.cover-tagline {
    font-family: var(--font-display);
    font-size: clamp(18px, 4vw, 28px);
    color: var(--ivory); opacity: 0.78;
    margin-top: 28px;
}
.cover-scroll-hint {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    animation: hintBounce 2.4s ease-in-out infinite;
}
.scroll-hint-text {
    font-family: var(--font-body); font-size: 7px;
    letter-spacing: 4px; text-transform: uppercase; color: var(--ivory); opacity: 0.32;
}
.scroll-hint-arrow { color: var(--gold); opacity: 0.55; }
.scroll-hint-arrow svg { width: 40px; height: 13px; }
@keyframes hintBounce {
    0%,100% { opacity: 0.5; transform: translateX(0); }
    50%      { opacity: 1;   transform: translateX(7px); }
}

/* ── PANEL 2: OUR LOVE STORY ── */
.story-card {
    max-width: min(480px, calc(100vw - 48px));
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.story-label {
    font-family: var(--font-display);
    font-size: clamp(28px, 6vw, 42px);
    color: var(--champagne);
    text-align: center;
    line-height: 1.1;
}
.story-rule {
    width: 48px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.story-body {
    font-family: var(--font-arabic);
    font-size: clamp(14px, 2.8vw, 17px);
    color: rgba(245,237,216,0.78);
    line-height: 1.9;
    text-align: center;
    font-style: italic;
}
.story-close {
    color: rgba(245,237,216,0.62);
    font-size: clamp(13px, 2.4vw, 15px);
}
.story-sig {
    font-family: var(--font-names);
    font-size: clamp(22px, 5vw, 32px);
    color: var(--gold);
    letter-spacing: 1px;
}

/* ── PANEL 3: DATE & COUNTDOWN ── */
.card-chandelier { color: var(--gold); opacity: 0.48; margin-bottom: 16px; text-align: center; }
.mini-chandelier { width: 120px; }

.card-tag {
    font-family: var(--font-body); font-size: 8px;
    letter-spacing: 4px; text-transform: uppercase;
    color: var(--haze); text-align: center; margin-bottom: 20px;
}
.h-countdown {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
}
.h-unit { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.h-unit-box {
    width: 64px; height: 64px;
    border: 1px solid rgba(240,200,96,0.18);
    background: rgba(240,200,96,0.04);
    display: flex; align-items: center; justify-content: center;
}
.h-unit-box span {
    font-family: var(--font-body); font-size: 26px; color: var(--gold);
}
.h-unit-label {
    font-family: var(--font-body); font-size: 7px;
    letter-spacing: 2px; text-transform: uppercase; color: var(--haze);
}
.h-sep { color: var(--gold); opacity: 0.35; font-size: 18px; padding-bottom: 18px; }

.card-date-display {
    text-align: center;
    border-top: 1px solid rgba(240,200,96,0.12);
    padding-top: 16px;
}
.card-weekday {
    font-family: var(--font-body); font-size: 11px;
    letter-spacing: 3px; text-transform: uppercase; color: var(--haze); margin-bottom: 5px;
}
.card-full-date {
    font-family: var(--font-body); font-size: 20px;
    color: var(--ivory); letter-spacing: 2px; margin-bottom: 4px;
}
.card-time { font-family: var(--font-body); font-size: 20px; color: var(--ivory); letter-spacing: 2px; margin-top: 4px; }

/* ── PANEL 3: VENUE ── */
.detail-glass { text-align: center; padding: 36px 28px; }
.panel-details { padding: 54px 24px 64px; }
.panel-details .detail-glass {
    max-width: min(420px, calc(100vw - 48px));
    padding: 48px 40px;
}
.dg-icon {
    width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%;
    background: rgba(212,160,48,0.08); border: 1px solid rgba(212,160,48,0.20);
    display: flex; align-items: center; justify-content: center; color: var(--champagne);
}
.dg-icon svg { width: 18px; height: 18px; }
.dg-title {
    font-family: var(--font-body); font-size: 13px;
    letter-spacing: 2px; color: var(--ivory); margin-bottom: 10px; text-transform: uppercase;
}
.dg-rule {
    width: 36px; height: 1px; margin: 0 auto 14px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.dg-time { font-family: var(--font-body); font-size: 28px; color: var(--gold); margin-bottom: 8px; }
.dg-venue {
    font-family: var(--font-body); font-size: 22px;
    color: var(--ivory); font-style: normal; margin-bottom: 6px; letter-spacing: 1px;
}
.dg-address { font-family: var(--font-body); font-size: 12px; color: var(--haze); margin-bottom: 10px; letter-spacing: 1px; }
.dg-note { font-family: var(--font-body); font-size: 10px; letter-spacing: 1px; color: var(--haze); margin-bottom: 0; }

.h-map-btn {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 16px; padding: 9px 20px;
    background: transparent;
    border: 1px solid rgba(212,160,48,0.30); border-radius: 2px;
    color: var(--gold); font-family: var(--font-body); font-size: 9px;
    letter-spacing: 2px; text-transform: uppercase;
    cursor: pointer; transition: all 0.3s;
}
.h-map-btn:hover { background: rgba(212,160,48,0.10); border-color: var(--gold); }
.h-map-btn svg { width: 12px; height: 12px; }

/* ── PANEL 4: RSVP ── */
.rsvp-glass {
    max-width: 520px;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,160,48,0.18) transparent;
    background: rgba(12,6,1,0.80);
    border-color: rgba(240,200,96,0.22);
}
.rsvp-glass::-webkit-scrollbar { width: 3px; }
.rsvp-glass::-webkit-scrollbar-thumb { background: rgba(212,160,48,0.20); border-radius: 2px; }

.rsvp-header { text-align: center; margin-bottom: 24px; }
.rsvp-title {
    font-family: var(--font-body); font-size: 22px;
    color: var(--ivory); letter-spacing: 3px; margin-bottom: 5px; text-transform: uppercase;
}
.rsvp-deadline { font-family: var(--font-body); font-style: italic; font-size: 12px; color: var(--haze); }

.h-input-group { margin-bottom: 20px; position: relative; }
.h-label {
    font-family: var(--font-body); font-size: 8px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--haze); display: block; margin-bottom: 7px;
}
.h-ornament { color: var(--gold); margin-right: 4px; }
.h-opt { color: rgba(122,143,160,0.55); font-size: 7px; }

.h-input {
    width: 100%; padding: 9px 0; background: transparent;
    border: none; border-bottom: 1px solid rgba(245,237,216,0.12);
    color: var(--ivory); font-family: var(--font-body); font-size: 15px;
    outline: none; transition: border-color 0.3s;
}
.h-input::placeholder { color: rgba(122,143,160,0.42); font-style: italic; }
.h-input:focus { border-bottom-color: var(--gold); }
.h-textarea { resize: vertical; min-height: 66px; }
.h-input-line {
    display: block; height: 1px; background: var(--gold);
    width: 0; transition: width 0.4s var(--ease-out); margin-top: -1px;
}
.h-input:focus ~ .h-input-line { width: 100%; }

.h-attend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.h-attend-opt input { position: absolute; opacity: 0; pointer-events: none; }
.h-attend-display {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 11px; border-radius: 2px;
    border: 1px solid rgba(245,237,216,0.12); cursor: pointer;
    font-family: var(--font-body); font-size: 9px; letter-spacing: 1px;
    color: var(--haze); transition: all 0.3s;
}
.h-attend-display:hover { border-color: rgba(245,237,216,0.28); }
.h-attend-display svg { width: 13px; height: 13px; flex-shrink: 0; }
.h-accept { color: var(--gold); }
.h-attend-opt input:checked ~ .h-accept { border-color: var(--gold); background: rgba(212,160,48,0.08); }
.h-attend-opt input:checked ~ .h-decline { border-color: rgba(224,92,92,0.35); background: rgba(224,92,92,0.05); color: rgba(224,130,130,0.85); }

.h-count-group { display: none; }
.h-counter { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.h-counter-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(212,160,48,0.07); border: 1px solid rgba(212,160,48,0.20);
    color: var(--gold); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.h-counter-btn svg { width: 13px; height: 13px; }
.h-counter-num {
    font-family: var(--font-body); font-size: 26px;
    color: var(--gold); min-width: 36px; text-align: center;
}

.h-submit {
    width: 100%; padding: 15px; margin-top: 8px;
    background: linear-gradient(135deg, rgba(212,160,48,0.22), rgba(212,160,48,0.40));
    border: 1px solid rgba(212,160,48,0.52); border-radius: 2px;
    color: var(--ivory); font-family: var(--font-body); font-size: 10px;
    letter-spacing: 4px; text-transform: uppercase; cursor: pointer; transition: all 0.3s;
}
.h-submit:hover { background: rgba(212,160,48,0.38); border-color: var(--gold); }
.h-submit-loading { display: none; }
.h-submit.is-loading .h-submit-text { display: none; }
.h-submit.is-loading .h-submit-loading { display: block; }

.h-success {
    display: none;
    flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 16px 0;
}
.h-success-ring {
    width: 68px; height: 68px; border-radius: 50%;
    background: rgba(212,160,48,0.08);
    display: flex; align-items: center; justify-content: center;
}
.h-checkmark { width: 44px; height: 44px; }
.h-check-circle {
    stroke: var(--gold); stroke-width: 1.5;
    stroke-dasharray: 166; stroke-dashoffset: 166;
    animation: strokeDash 0.6s ease forwards;
}
.h-check-path {
    stroke: var(--gold); stroke-width: 2;
    stroke-dasharray: 48; stroke-dashoffset: 48;
    animation: strokeDash 0.5s 0.6s ease forwards;
}
@keyframes strokeDash { to { stroke-dashoffset: 0; } }
.h-success-title { font-family: var(--font-body); font-size: 22px; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; }
.h-success-msg { font-family: var(--font-body); font-size: 16px; color: rgba(245,237,216,0.70); line-height: 1.7; }
.h-success-quote { color: var(--gold); opacity: 0.35; letter-spacing: 8px; }

/* ── PANEL 5: CLOSING ── */
.closing-content {
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.closing-monogram { display: flex; align-items: center; gap: 4px; line-height: 1; }
.mono-l { font-family: var(--font-names); font-size: 58px; color: var(--gold); line-height: 1; }
.mono-amp { font-family: var(--font-display); font-size: 34px; color: rgba(212,160,48,0.45); line-height: 1; }
.closing-rule {
    width: 72px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.closing-msg {
    font-family: var(--font-body); font-size: clamp(16px, 3vw, 20px);
    font-style: italic; color: rgba(245,237,216,0.65); line-height: 1.85;
    max-width: 380px;
}
.closing-hash { font-family: var(--font-body); font-size: 10px; letter-spacing: 3px; color: rgba(212,160,48,0.42); }

/* ── MAP MODAL ── */
.h-modal {
    position: fixed; inset: 0; z-index: 800;
    display: none; align-items: center; justify-content: center;
}
.h-modal.is-open { display: flex; }
.h-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(22,12,4,0.90); backdrop-filter: blur(8px);
}
.h-modal-box {
    position: relative; z-index: 1; width: 90%; max-width: 540px; max-height: 90vh;
    background: rgba(18,8,2,0.95); border: 1px solid var(--glass-border);
    border-radius: 4px; overflow: hidden; overflow-y: auto; padding: 28px;
}
.h-modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(212,160,48,0.08); border: 1px solid rgba(212,160,48,0.20);
    color: var(--gold); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.h-modal-close svg { width: 13px; height: 13px; }
.h-modal-title {
    font-family: var(--font-body); font-size: 16px;
    color: var(--ivory); letter-spacing: 2px; margin-bottom: 18px; text-transform: uppercase;
}
.h-map-wrap { border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.h-venue-btns { display: grid; grid-template-columns: 1fr; gap: 10px; }
.h-venue-btn {
    display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 3px;
    background: rgba(212,160,48,0.07); border: 1px solid rgba(212,160,48,0.20);
    color: var(--ivory); text-decoration: none; font-family: var(--font-body); font-size: 10px;
    letter-spacing: 1px; transition: background 0.2s;
}
.h-venue-btn:hover { background: rgba(212,160,48,0.14); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .h-arrow { display: none; }
    .glass-card { padding: 28px 20px; }
    .rsvp-glass { max-height: calc(100dvh - 80px); padding: 26px 18px; }
    .h-attend { grid-template-columns: 1fr; }
    .h-unit-box { width: 54px; height: 54px; }
    .h-unit-box span { font-size: 22px; }
    .cover-content { height: clamp(480px, calc(100dvh - 118px), 680px); }
    .cover-name { font-size: clamp(72px, 19vw, 130px); letter-spacing: 0; }
    .arabic-aya { font-size: 18px; line-height: 1.9; }
    .panel-details .detail-glass { padding: 34px 22px; }
}
@media (max-width: 375px) {
    .glass-card { padding: 22px 14px; }
    .h-unit-box { width: 46px; height: 46px; }
    .h-unit-box span { font-size: 18px; }
    .h-countdown { gap: 5px; }
    .h-sep { display: none; }
    .cover-content { height: clamp(460px, calc(100dvh - 118px), 660px); }
    .cover-name { font-size: 68px; }
    .arabic-aya { font-size: 17px; line-height: 1.85; }
    .cover-top { gap: 8px; }
}
