/* ========================================
   Silver Star Mercedes-Benz — Referral Page
   Theme: Black & Classic Luxury
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
    --black: #0a0a0a;
    --black-light: #141414;
    --black-card: #1a1a1a;
    --silver: #c0c0c0;
    --silver-light: #d4d4d4;
    --metallic-grey: #8a8a8a;
    --accent-gold: #b8a06a;
    --white: #f5f5f5;
    --white-muted: #a0a0a0;
    --error: #e74c3c;
    --success: #2ecc71;
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(192, 192, 192, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--metallic-grey);
    border-radius: 3px;
}

/* --- Selection --- */
::selection {
    background: rgba(192, 192, 192, 0.3);
    color: var(--white);
}

/* ========================================
   HEADER / NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(192, 192, 192, 0.08);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.7rem 2rem;
    background: rgba(10, 10, 10, 0.95);
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.navbar__logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.navbar__title {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.navbar__title span {
    color: var(--silver);
    font-weight: 300;
}

.navbar__tagline {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    color: var(--metallic-grey);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(10, 10, 10, 0.7) 0%,
            rgba(10, 10, 10, 0.4) 40%,
            rgba(10, 10, 10, 0.85) 100%);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero__badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--silver);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    background: rgba(192, 192, 192, 0.05);
}

.hero__heading {
    font-family: var(--font-primary);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.hero__heading .highlight {
    background: linear-gradient(135deg, var(--silver), var(--metallic-grey));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__sub {
    font-size: 1.05rem;
    color: var(--white-muted);
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    font-weight: 300;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.4rem;
    background: linear-gradient(135deg, var(--silver), var(--metallic-grey));
    color: var(--black);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(192, 192, 192, 0.25);
}

.hero__cta svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.hero__cta:hover svg {
    transform: translateY(3px);
}

/* ========================================
   FORM SECTION
   ======================================== */
.form-section {
    position: relative;
    padding: 5rem 1.5rem 6rem;
    background: var(--black);
}

.form-section__inner {
    max-width: 680px;
    margin: 0 auto;
}

.form-section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-section__label {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--metallic-grey);
    margin-bottom: 0.75rem;
}

.form-section__title {
    font-family: var(--font-primary);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 600;
    color: var(--white);
}

.form-section__divider {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--silver), transparent);
    margin: 1rem auto 0;
}

/* --- Form Card --- */
.form-card {
    background: var(--black-card);
    border: 1px solid rgba(192, 192, 192, 0.08);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--silver), transparent);
    opacity: 0.5;
}

/* --- Form Group Label --- */
.form-group-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(192, 192, 192, 0.08);
}

.form-group-label__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(192, 192, 192, 0.08);
    border-radius: var(--radius-sm);
    color: var(--silver);
}

.form-group-label__icon svg {
    width: 16px;
    height: 16px;
}

.form-group-label__text {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--silver);
}

/* --- Form Separator --- */
.form-separator {
    height: 1px;
    background: rgba(192, 192, 192, 0.06);
    margin: 2rem 0;
}

/* --- Input Group --- */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--white-muted);
    margin-bottom: 0.4rem;
    letter-spacing: 0.5px;
}

.input-group label .required {
    color: var(--error);
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--metallic-grey);
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper__icon svg {
    width: 16px;
    height: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(192, 192, 192, 0.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: rgba(160, 160, 160, 0.5);
}

.input-wrapper input:focus {
    border-color: var(--silver);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(192, 192, 192, 0.08);
}

.input-wrapper input:focus~.input-wrapper__icon {
    color: var(--silver);
}

/* Validation States */
.input-wrapper input.error,
.input-wrapper select.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.input-wrapper input.success,
.input-wrapper select.success {
    border-color: rgba(46, 204, 113, 0.4);
}

/* --- Select / Dropdown --- */
.input-wrapper select {
    width: 100%;
    padding: 0.85rem 2.5rem 0.85rem 2.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(192, 192, 192, 0.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.input-wrapper select:focus {
    border-color: var(--silver);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(192, 192, 192, 0.08);
}

.input-wrapper select:focus~.input-wrapper__icon {
    color: var(--silver);
}

.input-wrapper select option,
.input-wrapper select optgroup {
    background: #1a1a1a;
    color: var(--white);
}

.input-wrapper select option:disabled {
    color: var(--metallic-grey);
}

.input-error {
    font-size: 0.72rem;
    color: var(--error);
    margin-top: 0.35rem;
    display: none;
    align-items: center;
    gap: 0.3rem;
}

.input-error.visible {
    display: flex;
}

.input-error svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* --- Submit Button --- */
.submit-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #c0c0c0, #8a8a8a);
    color: var(--black);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(192, 192, 192, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn:disabled:hover::before {
    left: -100%;
}

.submit-btn__text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
}

.submit-btn__spinner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.submit-btn.loading .submit-btn__text {
    display: none;
}

.submit-btn.loading .submit-btn__spinner {
    display: inline-flex;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(10, 10, 10, 0.3);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
    position: fixed;
    top: 5rem;
    right: 2rem;
    z-index: 9999;
    min-width: 320px;
    max-width: 420px;
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transform: translateX(130%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.toast.show {
    transform: translateX(0);
}

.toast--success {
    background: linear-gradient(135deg, #1a2e1a, #1a3a1a);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.toast--error {
    background: linear-gradient(135deg, #2e1a1a, #3a1a1a);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.toast__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast--success .toast__icon {
    color: var(--success);
}

.toast--error .toast__icon {
    color: var(--error);
}

.toast__content {
    flex: 1;
}

.toast__title {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.toast__message {
    font-size: 0.8rem;
    color: var(--white-muted);
    line-height: 1.5;
}

.toast__close {
    background: none;
    border: none;
    color: var(--metallic-grey);
    cursor: pointer;
    padding: 2px;
    transition: color 0.2s ease;
}

.toast__close:hover {
    color: var(--white);
}

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

/* ========================================
   FOOTER
   ======================================== */
.footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-top: 1px solid rgba(192, 192, 192, 0.06);
    background: var(--black);
}

.footer__text {
    font-size: 0.75rem;
    color: var(--metallic-grey);
    letter-spacing: 1px;
}

.footer__text .brand {
    color: var(--silver);
    font-weight: 500;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(192, 192, 192, 0.15);
    border-top-color: var(--silver);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay__text {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--silver);
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1.25rem;
    }

    .navbar__title {
        font-size: 1rem;
    }

    .navbar__tagline {
        display: none;
    }

    .hero__content {
        padding: 1.5rem;
    }

    .hero__badge {
        font-size: 0.6rem;
    }

    .hero__cta {
        padding: 0.8rem 2rem;
        font-size: 0.8rem;
    }

    .form-card {
        padding: 2rem 1.5rem;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        min-width: unset;
        max-width: unset;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .navbar {
        padding: 0.7rem 1rem;
    }

    .navbar__logo {
        width: 32px;
        height: 32px;
    }

    .navbar__title {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .hero {
        min-height: 90vh;
    }

    .hero__heading {
        font-size: 1.8rem;
    }

    .hero__sub {
        font-size: 0.9rem;
    }

    .form-section {
        padding: 3rem 1rem 4rem;
    }

    .form-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-sm);
    }

    .form-group-label__text {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .submit-btn {
        padding: 0.9rem;
        font-size: 0.8rem;
    }

    .toast {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
    }
}