/* ================================================================
   Growth Compass Internal System Diagnostic — Stylesheet
   Brand: Deep Navy / Muted Gold / Soft White
   Tone: Executive, minimal, professional
   ================================================================ */

/* --- Custom Properties --- */
:root {
    --navy: #0B1D3A;
    --navy-light: #122a4f;
    --navy-mid: #17325e;
    --gold: #C9A84C;
    --gold-light: #d4ba6e;
    --gold-dim: rgba(201, 168, 76, 0.15);
    --white-soft: #F8F7F4;
    --white: #FFFFFF;
    --gray-100: #f0efe9;
    --gray-200: #e0dfd9;
    --gray-400: #9a9890;
    --gray-600: #6b6a64;
    --text-primary: #0B1D3A;
    --text-secondary: #4a5568;
    --text-light: rgba(248, 247, 244, 0.7);
    --text-on-navy: #F8F7F4;
    --danger: #c0392b;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 200ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 4px 24px rgba(11, 29, 58, 0.08), 0 1px 4px rgba(11, 29, 58, 0.04);
    --shadow-card-hover: 0 8px 40px rgba(11, 29, 58, 0.12), 0 2px 8px rgba(11, 29, 58, 0.06);
    --max-width: 640px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--navy);
    color: var(--text-on-navy);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body.scroll-locked {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

/* --- Screen Container --- */
.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.screen--active {
    display: flex;
}

/* --- Buttons --- */
.btn {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1;
}

.btn--primary {
    background: var(--gold);
    color: var(--navy);
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn--primary:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn--outline {
    background: transparent;
    color: var(--gold);
    padding: 1rem 2.5rem;
    font-size: 1rem;
    border: 1.5px solid var(--gold);
}

.btn--outline:hover {
    background: var(--gold-dim);
}

.btn--ghost {
    background: transparent;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.btn--ghost:hover {
    color: var(--gold);
}

.btn--small {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.btn--nav {
    background: transparent;
    color: var(--text-light);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.btn--nav:hover:not(:disabled) {
    color: var(--gold);
    background: var(--gold-dim);
}

.btn--nav:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn--nav-forward {
    color: var(--gold);
}

.btn--nav-forward:disabled {
    color: var(--text-light);
    opacity: 0.25;
}

.btn--danger {
    background: var(--danger);
    color: var(--white);
}

.btn--danger:hover {
    background: #e74c3c;
    box-shadow: 0 4px 16px rgba(192, 57, 43, 0.3);
}

/* ================================================================
   INTRO SCREEN
   ================================================================ */
.intro {
    text-align: center;
    max-width: var(--max-width);
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

.intro__logo {
    margin-bottom: 1.5rem;
}

.intro__compass {
    width: 64px;
    height: 64px;
}

.intro__label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.intro__title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: var(--white-soft);
}

.intro__subtitle {
    font-size: 1.0625rem;
    color: var(--text-light);
    max-width: 480px;
    margin: 0 auto 1.5rem;
    line-height: 1.65;
}

.intro__time {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* ================================================================
   QUESTION SCREEN
   ================================================================ */
.question-container {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.question-header__progress {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.04em;
}

/* --- Question Card --- */
.question-card {
    background: var(--white-soft);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-card);
    animation: fadeIn 0.3s ease;
}

.question-card__prompt {
    font-size: 1.1875rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.question-card__options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* --- Radio Options --- */
.option {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--white);
    position: relative;
}

.option:hover {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold-dim);
}

.option--selected {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.03));
    box-shadow: 0 0 0 2px var(--gold-dim);
}

.option__radio {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    margin-top: 1px;
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option--selected .option__radio {
    border-color: var(--gold);
}

.option--selected .option__radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    display: block;
}

.option__text {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text-primary);
    font-weight: 400;
}

.option--selected .option__text {
    font-weight: 500;
    color: var(--navy);
}

/* hidden native input */
.option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* --- Navigation --- */
.question-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.question-nav__dots {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 200px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(248, 247, 244, 0.2);
    transition: all var(--transition-fast);
}

.dot--answered {
    background: var(--gold);
}

.dot--current {
    background: var(--gold);
    width: 18px;
    border-radius: 3px;
}

/* ================================================================
   PROCESSING SCREEN
   ================================================================ */
.processing {
    text-align: center;
    max-width: var(--max-width);
    width: 100%;
    animation: fadeIn 0.4s ease;
}

.processing__text {
    font-size: 1.0625rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.6;
    font-weight: 400;
}

.processing__bar {
    width: 100%;
    max-width: 320px;
    height: 2px;
    background: rgba(201, 168, 76, 0.15);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.processing__bar-fill {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: processingSwipe 1.4s ease-in-out infinite;
}

@keyframes processingSwipe {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

/* ================================================================
   RESULT SCREEN (PRE-GATE)
   ================================================================ */
.result {
    text-align: center;
    max-width: var(--max-width);
    width: 100%;
}

.result__label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-fast) ease;
}

.result--reveal .result__label {
    opacity: 1;
}

.result__type {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white-soft);
    margin-bottom: 2.5rem;
    letter-spacing: -0.01em;
    opacity: 0;
    transition: opacity var(--transition-fast) ease 0.1s;
}

.result--reveal .result__type {
    opacity: 1;
}

/* --- Confidence Bars --- */
.result__bars {
    margin-bottom: 2.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast) ease 0.3s;
}

.result--reveal .result__bars {
    opacity: 1;
}

.result__bar-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result__bar-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.02em;
}

.result__bar-track {
    width: 100%;
    height: 8px;
    background: var(--navy-light);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 76, 0.1);
}

.result__bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 4px;
    transition: width var(--transition-slow);
}

/* --- Insight --- */
.result__insight {
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.12);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    opacity: 0;
    transition: opacity var(--transition-fast) ease 1.1s;
}

.result--reveal .result__insight {
    opacity: 1;
}

.result__insight p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.result__insight p:last-child {
    margin-bottom: 0;
}

.result__consistency {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0;
    transition: opacity var(--transition-fast) ease 1.3s;
}

.result--reveal .result__consistency {
    opacity: 1;
}

.result .btn--primary {
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity var(--transition-fast) ease 1.5s;
}

.result--reveal .btn--primary {
    opacity: 1;
}

.result__subtext {
    font-size: 0.8125rem;
    color: var(--gray-400);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0;
    transition: opacity var(--transition-fast) ease 1.6s;
}

.result--reveal .result__subtext {
    opacity: 1;
}

/* ================================================================
   EMAIL GATE SCREEN
   ================================================================ */
.email-gate {
    text-align: center;
    max-width: 440px;
    width: 100%;
    animation: fadeIn 0.4s ease;
}

.email-gate__headline {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white-soft);
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.email-gate__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.email-gate__field {
    text-align: left;
}

.email-gate__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.email-gate__input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    background: var(--navy-light);
    border: 1.5px solid rgba(248, 247, 244, 0.12);
    border-radius: var(--radius-sm);
    color: var(--white-soft);
    transition: border-color var(--transition-fast);
    outline: none;
}

.email-gate__input::placeholder {
    color: var(--gray-400);
}

.email-gate__input:focus {
    border-color: var(--gold);
}

.email-gate__input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.email-gate__error {
    font-size: 0.8125rem;
    color: var(--danger);
    text-align: left;
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.email-gate__form .btn--primary {
    margin-top: 0.5rem;
    width: 100%;
}

/* ================================================================
   CONFIRMATION SCREEN
   ================================================================ */
.confirmation {
    text-align: center;
    max-width: var(--max-width);
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

.confirmation__icon {
    margin-bottom: 1.5rem;
}

.confirmation__headline {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white-soft);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.confirmation__subtext {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.confirmation__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================================================================
   MODAL
   ================================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.modal[hidden] {
    display: none;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    background: var(--navy-mid);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
    animation: modalIn 0.2s ease;
}

.modal__message {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-on-navy);
    margin-bottom: 1.75rem;
}

.modal__buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================================================
   LEGAL MODALS (TERMS / PRIVACY)
   ================================================================ */
.modal__content--legal {
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.12);
    flex-shrink: 0;
}

.modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white-soft);
    letter-spacing: -0.01em;
}

.modal__close {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color var(--transition-fast);
    font-family: var(--font-family);
}

.modal__close:hover {
    color: var(--gold);
}

.modal__body {
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal__body h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gold);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.modal__body p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.modal__body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal__body li {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.modal__body strong {
    color: var(--white-soft);
    font-weight: 600;
}

.modal__body em {
    color: var(--gray-400);
    font-style: italic;
}

@media (max-width: 600px) {
    .modal__content--legal {
        max-height: 90vh;
    }

    .modal__header {
        padding: 1.25rem 1.25rem;
    }

    .modal__body {
        padding: 1.25rem 1.25rem 1.5rem;
    }
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    text-align: center;
    padding: 2rem 1.25rem;
    border-top: 1px solid rgba(248, 247, 244, 0.06);
}

.footer__disclaimer {
    font-size: 0.75rem;
    color: var(--gray-400);
    max-width: 520px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.footer__links {
    margin-bottom: 0.75rem;
}

.footer__link {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--gold);
}

.footer__divider {
    margin: 0 0.5rem;
    color: var(--gray-400);
    font-size: 0.75rem;
}

.footer__copyright {
    font-size: 0.6875rem;
    color: rgba(248, 247, 244, 0.3);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 600px) {
    .intro__title {
        font-size: 1.75rem;
    }

    .intro__subtitle {
        font-size: 0.9375rem;
    }

    .question-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-md);
    }

    .question-card__prompt {
        font-size: 1.0625rem;
    }

    .option {
        padding: 0.875rem 1rem;
    }

    .option__text {
        font-size: 0.875rem;
    }

    .result__type {
        font-size: 1.5rem;
    }

    .email-gate__headline {
        font-size: 1.375rem;
    }

    .confirmation__headline {
        font-size: 1.375rem;
    }

    .confirmation__buttons {
        flex-direction: column;
    }

    .confirmation__buttons .btn {
        width: 100%;
    }

    .question-nav__dots {
        max-width: 140px;
    }

    .btn--primary {
        padding: 0.875rem 2rem;
        font-size: 0.9375rem;
    }

    .btn--outline {
        padding: 0.875rem 2rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 380px) {
    .screen {
        padding: 1.5rem 1rem;
    }

    .question-card {
        padding: 1.5rem 1.25rem;
    }

    .intro__title {
        font-size: 1.5rem;
    }

    .question-nav__dots {
        display: none;
    }
}