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

:root {
    /* Theme Colors */
    --color-primary: #27b5e6;
    --color-primary-hover: #159ed0;
    --color-secondary: #ff806b;
    --color-secondary-hover: #e06d59;
    --color-yellow: #f7c35f;
    --color-green: #6fd0ec;
    
    /* Neutral Colors */
    --color-bg: #f2fbff;
    --color-text-dark: #082238;
    --color-text-body: #2c4a5e;
    --color-text-muted: #627d98;
    --color-border: #dcecf4;
    --color-border-hover: #b9d5e6;
    --color-card-bg: #ffffff;
    --color-input-bg: #f8fcff;
    
    /* Typography */
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    
    /* Shadows & Transitions */
    --shadow-sm: 0 2px 8px rgba(8, 34, 56, 0.04);
    --shadow-md: 0 10px 30px rgba(8, 34, 56, 0.06);
    --shadow-lg: 0 30px 70px rgba(8, 34, 56, 0.12);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Background Gradients */
.gr-assessment-page {
    min-height: 100vh;
    padding: 60px 20px;
    background:
        radial-gradient(circle at 90% 10%, rgba(39, 181, 230, 0.18), transparent 32%),
        radial-gradient(circle at 10% 85%, rgba(255, 128, 107, 0.14), transparent 28%),
        radial-gradient(circle at 50% 50%, rgba(111, 208, 236, 0.08), transparent 40%),
        var(--color-bg);
}

.gr-assessment-shell {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Brand Row - Logo Header */
.gr-brand-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 36px;
    padding-left: 8px;
}

.gr-brand-logo {
    display: block;
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.gr-brand-logo:hover {
    transform: scale(1.02);
}

/* Card Container */
.gr-assessment-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 580px;
    padding: 56px;
    background: var(--color-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.80);
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
}

/* Smooth Background Blobs Inside Card */
.gr-assessment-card::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -100px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(39, 181, 230, 0.10);
    pointer-events: none;
    z-index: 1;
}

.gr-assessment-card::after {
    content: "";
    position: absolute;
    bottom: -120px;
    left: -100px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 128, 107, 0.07);
    pointer-events: none;
    z-index: 1;
}

/* Progress Track */
.gr-progress-track {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 8px;
    margin-bottom: 48px;
    border-radius: 999px;
    background: #e6f4fa;
    overflow: hidden;
}

.gr-progress-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-green) 100%);
    transition: width var(--transition-normal);
}

/* Form Layout */
.gr-assessment-form {
    position: relative;
    z-index: 2;
}

.gr-form-step {
    position: relative;
    z-index: 2;
    display: none;
    animation: grFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gr-form-step-active {
    display: block;
}

@keyframes grFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Kickers / Badges */
.gr-step-kicker {
    display: inline-flex;
    margin-bottom: 20px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #eaf8fd;
    color: var(--color-primary-hover);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Typography Hierarchy */
.gr-hero-title {
    margin: 0 0 20px;
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 52px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.gr-hero-title span {
    color: var(--color-secondary);
}

.gr-lead-text {
    max-width: 650px;
    margin: 0 0 40px;
    color: var(--color-text-body);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
}

/* Form Fields */
.gr-field-group {
    margin-bottom: 24px;
}

.gr-field-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-dark);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.gr-field-group input,
.gr-field-group select {
    display: block;
    width: 100%;
    height: 56px;
    border: 2px solid var(--color-border);
    border-radius: 16px;
    outline: none;
    background: var(--color-input-bg);
    color: var(--color-text-dark);
    padding: 0 18px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.gr-field-group input:hover,
.gr-field-group select:hover {
    border-color: var(--color-border-hover);
}

.gr-field-group input:focus,
.gr-field-group select:focus {
    background: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(39, 181, 230, 0.15);
}

/* Buttons */
.gr-button-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
}

.gr-button-row-split {
    justify-content: space-between;
}

.gr-primary-button,
.gr-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border: none;
    border-radius: 999px;
    padding: 0 36px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gr-primary-button {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(39, 181, 230, 0.25);
}

.gr-primary-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(39, 181, 230, 0.35);
}

.gr-primary-button:active {
    transform: translateY(0);
}

.gr-secondary-button {
    background: #edf7fc;
    color: var(--color-text-dark);
}

.gr-secondary-button:hover {
    background: #ddeff7;
    transform: translateY(-2px);
}

.gr-secondary-button:active {
    transform: translateY(0);
}

/* Question Steps Styles */
.gr-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    color: var(--color-primary-hover);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gr-question-header strong {
    color: var(--color-secondary);
}

.gr-question-title {
    max-width: 820px;
    margin: 0 0 36px;
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    line-height: 1.22;
    letter-spacing: -0.03em;
}

/* Scale Grid Matrix */
.gr-scale-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.gr-scale-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 72px;
    border: 2px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-input-bg);
    padding: 14px 22px;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.gr-scale-card:hover {
    border-color: var(--color-primary);
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.gr-scale-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gr-scale-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e6f4fa;
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.gr-scale-label {
    color: var(--color-text-dark);
    font-size: 16px;
    font-weight: 700;
}

/* Checked State for Scale Cards */
.gr-scale-card:has(input:checked) {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #ecf9fd 0%, #f4fbff 100%);
    box-shadow: 0 10px 24px rgba(39, 181, 230, 0.15);
    transform: translateY(-2px);
}

.gr-scale-card:has(input:checked) .gr-scale-number {
    background: var(--color-primary);
    color: #ffffff;
}

.gr-turnstile-wrap {
    width: 100%;
    margin-bottom: 20px;
}

/* Success Step */
.gr-success-step,
.gr-completed-card {
    text-align: center;
    padding: 20px 0;
}

.gr-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-green) 100%);
    color: #ffffff;
    font-size: 40px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(39, 181, 230, 0.25);
}

.gr-success-step h2,
.gr-completed-card h1 {
    max-width: 700px;
    margin: 0 auto 20px;
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.gr-success-step p,
.gr-completed-card p {
    max-width: 680px;
    margin: 0 auto 36px;
    color: var(--color-text-body);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.65;
}

/* Score Display Box */
.gr-score-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 260px;
    padding: 24px 36px;
    border: 2px solid var(--color-border);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, var(--color-input-bg) 100%);
    box-shadow: var(--shadow-md);
}

.gr-score-box span {
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gr-score-box strong {
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: 64px;
    font-weight: 900;
    line-height: 1.1;
    margin: 8px 0;
}

.gr-score-box small {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.gr-success-actions {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.gr-success-actions .gr-primary-button {
    text-decoration: none;
}

/* Responsive Styling */
@media (max-width: 768px) {
    .gr-assessment-page {
        padding: 24px 12px;
    }

    .gr-brand-row {
        margin-bottom: 24px;
        justify-content: center;
        padding-left: 0;
    }

    .gr-brand-logo {
        height: 38px;
    }

    .gr-assessment-card {
        padding: 32px 20px;
        border-radius: 24px;
        min-height: auto;
    }

    .gr-progress-track {
        margin-bottom: 32px;
    }

    .gr-hero-title {
        font-size: 36px;
        line-height: 1.12;
    }

    .gr-lead-text {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .gr-question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 13px;
    }

    .gr-question-title {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 24px;
    }

    .gr-scale-card {
        min-height: 64px;
        padding: 12px 16px;
        border-radius: 16px;
        gap: 12px;
    }

    .gr-scale-number {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .gr-scale-label {
        font-size: 15px;
    }

    .gr-button-row {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
        margin-top: 28px;
    }

    .gr-primary-button,
    .gr-secondary-button {
        width: 100%;
        min-height: 52px;
        font-size: 15px;
    }

    .gr-success-step h2,
    .gr-completed-card h1 {
        font-size: 28px;
    }

    .gr-success-step p,
    .gr-completed-card p {
        font-size: 15px;
    }
}

/* ============================================================
   LOADING OVERLAY — Submit Processing Animation
   ============================================================ */

.gr-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(242, 251, 255, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gr-loading-overlay.gr-loading-active {
    opacity: 1;
    pointer-events: all;
}

/* Floating card inside overlay */
.gr-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 52px 56px;
    background: #ffffff;
    border: 1px solid rgba(39, 181, 230, 0.18);
    border-radius: 32px;
    box-shadow: 0 32px 80px rgba(8, 34, 56, 0.14);
    animation: grCardPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes grCardPop {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Circular ring spinner */
.gr-loading-spinner {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: 8px;
}

.gr-loading-spinner span {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: grSpin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.gr-loading-spinner span:nth-child(1) {
    border-top-color: var(--color-primary);
    animation-delay: 0s;
}

.gr-loading-spinner span:nth-child(2) {
    inset: 8px;
    border-top-color: var(--color-secondary);
    animation-delay: -0.3s;
}

.gr-loading-spinner span:nth-child(3) {
    inset: 16px;
    border-top-color: var(--color-green);
    animation-delay: -0.6s;
}

.gr-loading-spinner span:nth-child(4) {
    inset: 24px;
    border-top-color: var(--color-yellow);
    animation-delay: -0.9s;
}

@keyframes grSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Text inside the loading card */
.gr-loading-title {
    margin: 0;
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
}

.gr-loading-sub {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Bouncing dots */
.gr-loading-dots {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
}

.gr-loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: grDotBounce 1.1s ease-in-out infinite;
}

.gr-loading-dots span:nth-child(2) {
    background: var(--color-secondary);
    animation-delay: 0.18s;
}

.gr-loading-dots span:nth-child(3) {
    background: var(--color-green);
    animation-delay: 0.36s;
}

@keyframes grDotBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40%            { transform: scale(1.2); opacity: 1; }
}

@media (max-width: 768px) {
    .gr-loading-card {
        padding: 40px 28px;
        margin: 0 16px;
    }

    .gr-loading-title {
        font-size: 18px;
    }
}

