/* ── Syne Variable Font (local, weight range 400-800) ── */
@font-face {
    font-family: 'Syne';
    src: url('fonts/Syne/Syne.ttf') format('truetype');
    font-weight: 400 800;
    font-display: swap;
    font-style: normal;
}

/* ── DM Sans Variable Font (local, weight range 100-1000) ── */
@font-face {
    font-family: 'DM Sans';
    src: url('fonts/DM-sans/DMSans.ttf') format('truetype');
    font-weight: 100 1000;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'DM Sans';
    src: url('fonts/DM-sans/DMSans-Italic.ttf') format('truetype');
    font-weight: 100 1000;
    font-display: swap;
    font-style: italic;
}

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

:root {
    --color-bg: #0a0a0a;
    --color-white: #ffffff;
    --color-white-soft: rgba(255, 255, 255, 0.65);
    --color-accent: #FB9FC4;
    --color-accent-warm: #FDBED7;
    --color-accent-glow: rgba(251, 159, 196, 0.25);
    --color-glass: rgba(255, 255, 255, 0.06);
    --color-glass-border: rgba(255, 255, 255, 0.1);
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    font-family: var(--font-body);
    color: var(--color-white);
    background: var(--color-bg);
}

/* ── Background Image ── */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/landing_profile_rubi_desktop.webp') center center / cover no-repeat;
    animation: bgReveal 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(10, 10, 10, 0.6) 0%,
            rgba(10, 10, 10, 0.1) 40%,
            rgba(10, 10, 10, 0.15) 60%,
            rgba(10, 10, 10, 0.8) 100%
        ),
        linear-gradient(180deg,
            rgba(10, 10, 10, 0.2) 0%,
            transparent 30%,
            transparent 50%,
            rgba(10, 10, 10, 0.85) 100%
        );
    z-index: 1;
    pointer-events: none;
}

@keyframes bgReveal {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Ambient glow effect ── */
.glow {
    position: fixed;
    z-index: 1;
    pointer-events: none;
}

.glow--top {
    top: -30%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
    opacity: 0;
    animation: glowFade 3s 1.5s ease-out forwards;
}

.glow--bottom {
    bottom: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.12) 0%, transparent 70%);
    opacity: 0;
    animation: glowFade 3s 2s ease-out forwards;
}

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

/* ── Layout ── */
.page {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 2.5rem 3rem;
}

/* ── Content Block ── */
.content {
    max-width: 580px;
}

/* ── Branding ── */
.brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.8rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Decorative accent bar ── */
.accent-bar {
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-warm));
    margin-bottom: 2rem;
    animation: barExpand 0.8s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes barExpand {
    to { width: 48px; }
}

/* ── Headline ── */
.headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.headline span {
    display: block;
    opacity: 0;
    animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.headline span:nth-child(1) { animation-delay: 0.9s; }

.headline span:nth-child(2) { animation-delay: 1.05s; }

.headline span:nth-last-child(1) {
    animation-delay: 1.2s;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Subtext ── */
.subtext {
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-white-soft);
    max-width: 420px;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.highlight {
    color: var(--color-accent);
    font-weight: 600;
}

/* ── Confirmation/Error Messages ── */
.signup-msg {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-size: 0.9rem;
    font-weight: 400;
}

.signup-msg--success {
    border: 1px solid rgba(105, 219, 124, 0.3);
    background: rgba(105, 219, 124, 0.1);
    color: #69db7c;
}

.signup-msg--error {
    border: 1px solid rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.signup-msg__icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* ── Confirmation Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    animation: modalFadeIn 0.5s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem 2rem;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--color-glass-border);
    border-radius: 24px;
    text-align: center;
    transform: translateY(20px) scale(0.96);
    animation: modalSlideIn 0.6s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes modalSlideIn {
    to { transform: translateY(0) scale(1); }
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--color-glass-border);
    border-radius: 50%;
    color: var(--color-white-soft);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, color 0.3s;
}

.modal__close:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.modal__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-warm));
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPop 0.5s 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes iconPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal__icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-white);
    stroke-width: 2;
    fill: none;
}

.modal__icon--check svg {
    stroke-width: 3;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: iconDraw 0.4s 0.9s ease-out forwards;
}

.modal__icon--mail svg {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: iconDraw 0.6s 0.9s ease-out forwards;
}

@keyframes iconDraw {
    to { stroke-dashoffset: 0; }
}

.modal__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    color: var(--color-white);
}

.modal__text {
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-white-soft);
    margin-bottom: 1.5rem;
}

.modal__divider {
    width: 40px;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-warm));
    margin: 0 auto 1.25rem;
}

.modal__social-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.85rem;
}

.modal__social {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.modal__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-glass-border);
    border-radius: 50%;
    background: var(--color-glass);
    color: var(--color-white-soft);
    text-decoration: none;
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.modal__social a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 16px var(--color-accent-glow);
    transform: translateY(-2px);
}

.modal__social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ── Social Links ── */
.social {
    position: fixed;
    right: 2.5rem;
    bottom: 3rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s 1.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-glass-border);
    border-radius: 50%;
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-white-soft);
    text-decoration: none;
    font-size: 0.7rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.social a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
    transform: translateY(-2px);
}

.social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ── Shared Animation ── */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .bg::before {
        background-image: url('images/landing_profile_rubi_mobile.webp');
    }

    .bg::after {
        background:
            linear-gradient(180deg,
                rgba(10, 10, 10, 0.15) 0%,
                transparent 25%,
                rgba(10, 10, 10, 0.3) 50%,
                rgba(10, 10, 10, 0.9) 100%
            );
    }

    .page {
        padding: 1.5rem 1.5rem 2rem;
    }

    .content {
        max-width: 100%;
    }

    .headline {
        font-size: clamp(2.2rem, 9vw, 3rem);
    }

    .subtext {
        font-size: 0.92rem;
    }

    .glow--top {
        width: 80vw;
        height: 80vw;
        top: -20%;
        right: -20%;
    }

    .glow--bottom {
        display: none;
    }

    .social {
        top: 1.25rem;
        right: 1.25rem;
        bottom: auto;
        gap: 0.6rem;
        animation-delay: 1.9s;
    }

    .social a {
        width: 36px;
        height: 36px;
    }

    .social svg {
        width: 16px;
        height: 16px;
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 1rem;
    }

    .modal {
        max-width: 100%;
        padding: 2rem 1.5rem 1.5rem;
        border-radius: 20px;
        margin-bottom: 0.5rem;
    }

    .modal__icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
    }

    .modal__icon svg {
        width: 24px;
        height: 24px;
    }

    .modal__title {
        font-size: 1.15rem;
    }

    .modal__text {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .modal__social a {
        width: 34px;
        height: 34px;
    }

    .modal__social svg {
        width: 16px;
        height: 16px;
    }
}

/* ── Small phones ── */
@media (max-width: 380px) {
    .page {
        padding: 1.2rem 1.2rem 1.5rem;
    }

    .headline {
        font-size: 2rem;
    }

    .brand {
        font-size: 0.75rem;
    }
}
