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

/* ─── Variables ──────────────────────────────────────────────── */
:root {
    --gold:      #c9a96e;
    --white:     #ffffff;
    --black:     #0a0a0a;
    --white-60:  rgba(255, 255, 255, 0.60);
    --white-30:  rgba(255, 255, 255, 0.30);
    --white-10:  rgba(255, 255, 255, 0.10);
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    font-family: 'Montserrat', sans-serif;
    color: var(--white);
    background: var(--black);
    overflow-x: hidden;
    overflow-y: auto;
}

@supports (height: 100dvh) {
    body {
        min-height: 100dvh;
    }
}

/* ─── Video Background ───────────────────────────────────────── */
.video-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1009 50%, #0d0d0d 100%);
}

#bg-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

@supports (height: 100dvh) {
    .video-bg,
    #bg-video {
        height: 100dvh;
    }
}

#bg-video.loaded {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.30) 45%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

/* ─── Page Layout ────────────────────────────────────────────── */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 2rem;
}

@supports (height: 100dvh) {
    .page {
        min-height: 100dvh;
    }
}

/* ─── Header / Logo ──────────────────────────────────────────── */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeDown 1s ease both;
}

.logo {
    height: 58px;
    max-width: 260px;
    object-fit: contain;
    /* Inverts the black logo to white for dark backgrounds */
    filter: brightness(0) invert(1);
}

.logo-fallback {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--white);
}

/* ─── Gold Divider ───────────────────────────────────────────── */
.divider {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 1.4rem auto;
    opacity: 0.75;
    animation: expandWidth 1.2s ease 0.4s both;
}

@keyframes expandWidth {
    from { width: 0; opacity: 0; }
    to   { width: 50px; opacity: 0.75; }
}

/* ─── Main ───────────────────────────────────────────────────── */
.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 720px;
}

/* ─── Coming Soon Text ───────────────────────────────────────── */
.text-wrap {
    min-height: clamp(70px, 11vw, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.4rem 1rem;
    animation: fadeUp 1s ease 0.2s both;
}

#coming-soon {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 5.5vw, 6rem);
    font-weight: 200;
    letter-spacing: clamp(0.18em, 1.5vw, 0.42em);
    color: var(--white);
    text-transform: uppercase;
    display: inline;
    line-height: 1;
}

#coming-soon.arabic {
    font-family: 'Amiri', serif;
    font-size: clamp(2.6rem, 6.5vw, 6.8rem);
    letter-spacing: 0.08em;
    font-weight: 400;
}

/* Blinking gold cursor */
.cursor {
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 5.5rem);
    font-weight: 100;
    color: var(--gold);
    margin-left: 3px;
    line-height: 1;
    animation: blink 0.75s step-end infinite;
    vertical-align: baseline;
    position: relative;
    top: 0.04em;
}

.cursor.hidden {
    opacity: 0;
}

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

/* ─── Subscribe Section ──────────────────────────────────────── */
.subscribe-section {
    width: 100%;
    max-width: 520px;
    text-align: center;
    animation: fadeUp 1s ease 0.6s both;
    padding: 0.5rem 0;
}

.subscribe-label {
    font-size: 0.70rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0,0,0,1), 0 2px 20px rgba(0,0,0,0.9);
    margin-bottom: 1.4rem;
}

.input-row {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: border-color 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
}

.input-row:focus-within {
    border-color: var(--gold);
}

.email-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 1rem 1.2rem;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.80rem;
    font-weight: 300;
    letter-spacing: 0.06em;
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.submit-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1rem 1.6rem;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    background: var(--gold);
    border-left-color: var(--gold);
    color: var(--black);
}

.submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.form-feedback {
    margin-top: 0.9rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    min-height: 1.1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.form-feedback.success { color: #b8f0b8; }
.form-feedback.error   { color: #ffaaaa; }

/* ─── Footer / Socials ───────────────────────────────────────── */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeUp 1s ease 0.8s both;
}

.socials {
    display: flex;
    gap: 1.4rem;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.social-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 4px 10px rgba(201, 169, 110, 0.5));
}

.copyright {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.22);
    text-transform: uppercase;
}

/* ─── Entry Animations ───────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive — Tablet ────────────────────────────────────── */
@media (max-width: 768px) {
    .page {
        padding: 2.5rem 1.8rem;
    }

    .main {
        max-width: min(100%, 620px);
    }

    .subscribe-section {
        max-width: min(100%, 520px);
        padding: 0.5rem 0;
    }
}

/* ─── Responsive — Phone ─────────────────────────────────────── */
@media (max-width: 480px) {
    html,
    body {
        min-height: 100svh;
    }

    body {
        overflow-y: auto;
    }

    .video-bg,
    #bg-video {
        height: 100svh;
    }

    @supports (height: 100dvh) {
        html,
        body,
        .video-bg,
        #bg-video {
            min-height: 100dvh;
            height: 100dvh;
        }
    }

    #bg-video {
        object-fit: cover;
        object-position: center center;
    }

    .page {
        min-height: 100svh;
        padding: max(1rem, env(safe-area-inset-top)) 1rem max(0.9rem, env(safe-area-inset-bottom));
        justify-content: space-between;
        gap: 1rem;
    }

    @supports (height: 100dvh) {
        .page {
            min-height: 100dvh;
        }
    }

    /* Logo smaller */
    .logo {
        height: clamp(30px, 9vw, 38px);
        max-width: min(190px, 70vw);
    }

    /* Dividers tighter */
    .divider {
        margin: 0.65rem auto;
        width: 36px;
    }

    /* Coming soon text */
    .main {
        max-width: 100%;
    }

    .text-wrap {
        width: 100%;
        min-height: clamp(52px, 16vw, 66px);
        padding: 0.15rem 0;
        white-space: nowrap;
        overflow: hidden;
    }

    #coming-soon {
        font-size: clamp(1.65rem, 8.8vw, 2.6rem);
        letter-spacing: clamp(0.06em, 1.6vw, 0.16em);
    }

    #coming-soon.arabic {
        font-size: clamp(2rem, 10vw, 3rem);
        letter-spacing: 0.05em;
    }

    .cursor {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }

    /* Subscribe */
    .subscribe-section {
        max-width: 100%;
        padding: 0;
    }

    .subscribe-label {
        font-size: 0.58rem;
        letter-spacing: 0.12em;
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }

    .input-row {
        flex-direction: column;
    }

    .email-input {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.78rem;
        text-align: center;
    }

    .email-input::placeholder {
        text-align: center;
    }

    .submit-btn {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.5);
        min-height: 44px;
        padding: 0.75rem 1rem;
        width: 100%;
        font-size: 0.62rem;
        letter-spacing: 0.16em;
    }

    .submit-btn:hover:not(:disabled) {
        border-left: none;
        border-top-color: var(--gold);
    }

    .form-feedback {
        font-size: 0.68rem;
        margin-top: 0.7rem;
    }

    /* Socials */
    .footer {
        gap: 0.7rem;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .socials {
        gap: 1.2rem;
    }

    .social-icon {
        width: 34px;
        height: 34px;
    }

    .social-icon svg {
        width: 25px;
        height: 25px;
    }

    .copyright {
        font-size: 0.55rem;
        letter-spacing: 0.08em;
        line-height: 1.5;
        text-align: center;
    }
}

/* ─── Very small phones (SE, 320px) ─────────────────────────── */
@media (max-width: 360px) {
    .logo {
        height: 30px;
    }

    #coming-soon {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
        letter-spacing: 0.08em;
    }

    .subscribe-label {
        font-size: 0.55rem;
        letter-spacing: 0.12em;
    }

    .socials {
        gap: 1rem;
    }

    .social-icon svg {
        width: 23px;
        height: 23px;
    }
}

/* ─── Short screens (landscape phone) ───────────────────────── */
@media (max-height: 600px) {
    .page {
        padding: 1rem 2rem;
        overflow-y: auto;
    }

    html, body {
        overflow: auto;
    }

    .divider {
        margin: 0.5rem auto;
    }

    .subscribe-label {
        margin-bottom: 0.8rem;
    }
}
