/* 
   True iPhone Liquid Glass - v8.0 "Production Perfect"
   - Apple-Standard Glass (High Saturation & Blur)
   - Layout Recovery (No overlaps)
   - Bento-Style Interactive Switches
   - Centered System Alerts
*/

:root {
    --ios-blue: #007AFF;
    --ios-bg: #000000;
    --glass-blur: 35px;
    --glass-saturate: 200%;
    --glass-bg: rgba(25, 25, 27, 0.65);
    --glass-border: rgba(255, 255, 255, 0.15);
    --radius-ios: 22px;
    --radius-btn: 14px;

    /* Vibrant Accents */
    --accent-blue: #00C2FF;
    --accent-purple: #5856D6;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Inter", sans-serif;
}

body {
    background: var(--ios-bg);
    margin: 0;
    color: white;
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

/* --- LIQUID BACKGROUND (MESH) --- */
.liquid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 75vw;
    height: 75vw;
    background: radial-gradient(circle, var(--ios-blue) 0%, transparent 75%);
    filter: blur(80px);
    opacity: 0.3;
    animation: moveBlob 22s infinite alternate linear;
}

.blob-2 {
    bottom: -15%;
    right: -15%;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 75%);
    animation-delay: -6s;
}

.blob-3 {
    top: 20%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 75%);
    width: 50vw;
    height: 50vw;
    animation-delay: -11s;
}

@keyframes moveBlob {
    from {
        transform: translate(-8%, -8%) scale(1);
    }

    to {
        transform: translate(8%, 8%) scale(1.1);
    }
}

/* --- BACKGROUND VIDEO (Behind Glass) --- */
.slider-inner {
    position: fixed;
    inset: 0;
    z-index: -3;
}

.slider-inner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5) contrast(1.1);
}

/* --- MAIN CONTAINER & LAYOUT --- */
.ms-main {
    position: relative;
    z-index: 10;
    height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* THE PREMIUM GLASS CARD */
.card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
    border-radius: var(--radius-ios) !important;
    border: 0.5px solid var(--glass-border) !important;
    width: 100%;
    max-width: 420px;
    padding: 34px !important;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* --- TYPOGRAPHY --- */
h1 {
    font-size: clamp(26px, 8vw, 34px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 5px;
    text-align: center;
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tm {
    font-size: 0.5em;
    vertical-align: super;
    font-weight: 500;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.5) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.text-center {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 34px;
    font-weight: 400;
}

.tagline {
    font-size: 17px;
    font-weight: 600;
    color: white;
    margin-top: 10px;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
    text-align: center;
}

.support-line {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
}

.intro-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 34px;
}

.secondary-link {
    color: var(--ios-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: opacity 0.2s;
}

.secondary-link:hover {
    opacity: 0.8;
}

.trust-microcopy {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.intro-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 122, 255, 0.4));
}

.logo-gradient {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 0.5px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(0, 100, 255, 0.25),
        0 0 60px rgba(200, 50, 100, 0.15);
    filter: none;
}

.social-proof {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.trust-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

/* How It Works Modal */
.how-it-works-modal {
    max-width: 320px;
}

.how-it-works-title {
    font-weight: 700;
    font-size: 20px;
    padding: 24px 16px 16px;
    text-align: center;
}

.how-it-works-steps {
    padding: 0 20px 24px;
}

.hiw-step {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.hiw-step:last-child {
    margin-bottom: 0;
}

.hiw-number {
    width: 28px;
    height: 28px;
    background: var(--ios-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.hiw-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

h4 {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

/* --- FORM COMPONENTS --- */
label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: block;
    margin-left: 4px;
}

.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    height: 52px !important;
    color: white !important;
    font-size: 17px !important;
    padding: 0 16px !important;
    margin-bottom: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--ios-blue) !important;
    box-shadow: none !important;
}

.textarea-lg {
    height: auto !important;
    min-height: 80px;
    padding: 14px 16px !important;
    resize: vertical;
}

@media (min-width: 768px) {
    .textarea-lg {
        min-height: 100px;
    }
}

/* --- RECOVERED BUTTON SYSTEM (No Overlaps) --- */
.btn-custom,
.next-btn,
.btn-secondary,
.prev-btn,
.custom-modal-btn {
    height: 54px;
    border-radius: var(--radius-btn);
    border: none;
    font-weight: 700;
    font-size: 17px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    margin-top: 14px;
}

.btn-custom,
.next-btn {
    background: var(--ios-blue);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.btn-secondary,
.prev-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.btn-custom:active,
.btn-secondary:active,
.prev-btn:active {
    transform: scale(0.96);
    filter: brightness(0.85);
}

/* --- BENTO SWITCH (Refined) --- */
.switch-field {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 0.5px solid rgba(255, 255, 255, 0.05);
    gap: 4px;
}

.switch-field label {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.25s;
    background: transparent;
}

.switch-field input {
    display: none;
}

.switch-field input:checked+label {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hidden Glider logic as we use background on label for stability */
.glider {
    display: none;
}

/* --- STEP TRANSITIONS (Fixed Flow) --- */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.form-step.active {
    display: flex;
    flex-direction: column;
    animation: stepIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes stepIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- PROGRESS BAR (Thread) --- */
.progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: -10px 0 24px;
    /* Move slightly up */
}

.progress-bar {
    background: white;
    height: 100%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- CENTERED SYSTEM ALERT --- */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: rgba(35, 35, 35, 0.8);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 18px;
    width: 100%;
    max-width: 270px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    transform: scale(1.1);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1);
}

.custom-modal-title {
    font-weight: 700;
    font-size: 18px;
    padding: 24px 16px 8px;
    text-align: center;
}

.custom-modal-message {
    font-size: 14px;
    padding: 0 16px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.custom-modal-btn {
    background: transparent;
    border-top: 0.5px solid rgba(255, 255, 255, 0.15);
    height: 48px;
    border-radius: 0;
    color: var(--ios-blue);
    font-size: 17px;
    font-weight: 700;
    margin-top: 0;
}

/* Success Card */
.success-message {
    text-align: center;
    animation: successPop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes successPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}