/* ==================================================
   DRIFT TEST — "Mauve's Office, After Dark"
   Deep purple ink + warm beige + living light
   ================================================== */

:root {
    --dt-ink: #07050f;
    --dt-ink-deep: #040208;
    --dt-beige: #f4f0e6;
    --dt-beige-soft: rgba(244, 240, 230, 0.62);
    --dt-beige-faint: rgba(244, 240, 230, 0.38);
    --dt-purple: #7c5cbf;
    --dt-purple-bright: #a67ee8;
    --dt-purple-deep: #432f8a;
}

/* ---------- Page-level dark override ---------- */

body.dt-dark {
    background-color: var(--dt-ink) !important;
}

body.dt-dark #navbar {
    background: linear-gradient(to bottom, rgba(4, 2, 8, 0.9), rgba(4, 2, 8, 0));
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    z-index: 100;
}

body.dt-dark #navbar.scrolled {
    background: rgba(4, 2, 8, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dt-dark #navbar a.text-headings {
    color: var(--dt-beige) !important;
    text-shadow: 0 1px 16px rgba(4, 2, 8, 0.95);
}

body.dt-dark .nav-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

body.dt-dark .nav-brand-full,
body.dt-dark .nav-brand-short {
    display: none !important;
}

body.dt-dark .nav-brand-drift {
    display: inline !important;
    color: var(--dt-beige);
}

body.dt-dark .nav-drift-test {
    border-color: rgba(166, 126, 232, 0.45) !important;
    color: var(--dt-purple-bright) !important;
    background: transparent !important;
}

body.dt-dark .nav-drift-test:hover {
    background: rgba(124, 92, 191, 0.18) !important;
    color: #cdb4f5 !important;
}

/* Sign-Up keeps its filled purple look from .action-button — untouched */

/* ---------- Page shell + ambient light ---------- */

.dt-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(85% 70% at 58% 10%, rgba(72, 42, 142, 0.34) 0%, transparent 62%),
        radial-gradient(100% 75% at 0% 100%, rgba(44, 26, 92, 0.34) 0%, transparent 65%),
        linear-gradient(180deg, var(--dt-ink-deep) 0%, var(--dt-ink) 48%, var(--dt-ink-deep) 100%);
    color: var(--dt-beige);
    overflow-x: hidden;
}

.dt-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.dt-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
}

.dt-orb-1 {
    width: 34rem;
    height: 34rem;
    top: -12rem;
    right: -8rem;
    background: radial-gradient(circle, rgba(124, 92, 191, 0.36), transparent 70%);
    animation: dtDrift1 16s ease-in-out infinite alternate;
}

.dt-orb-2 {
    width: 26rem;
    height: 26rem;
    bottom: -10rem;
    left: -10rem;
    background: radial-gradient(circle, rgba(67, 47, 138, 0.38), transparent 70%);
    animation: dtDrift2 20s ease-in-out infinite alternate;
}

.dt-orb-3 {
    width: 18rem;
    height: 18rem;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle, rgba(244, 240, 230, 0.07), transparent 70%);
    animation: dtDrift1 24s ease-in-out infinite alternate-reverse;
}

@keyframes dtDrift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-3rem, 2.5rem) scale(1.12); }
}

@keyframes dtDrift2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(2.5rem, -3rem) scale(1.08); }
}

/* Film grain */
.dt-grain {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.dt-intro,
.dt-quiz,
.dt-final {
    position: relative;
    z-index: 1;
}

/* ---------- Reveal animations ---------- */

.dt-reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: dtReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--d, 0) * 0.14s);
}

@keyframes dtReveal {
    to { opacity: 1; transform: none; }
}

/* ==================================================
   INTRO
   ================================================== */

.dt-intro {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: visible;
}

.dt-intro-grid {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 5.5rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
}

@media (max-width: 879px) {
    .dt-intro {
        align-items: stretch;
        min-height: 100vh;
        min-height: 100svh;
        overflow: hidden;
    }

    .dt-intro-grid {
        min-height: 100vh;
        min-height: 100svh;
        box-sizing: border-box;
        justify-content: flex-start;
        padding: 4.65rem 0 1.15rem;
    }
}

@media (min-width: 880px) {
    .dt-intro {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .dt-intro-grid {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        align-items: end;
        gap: 2rem;
        height: 100%;
        min-height: 0;
        box-sizing: border-box;
        padding: 4.75rem 3rem 0;
    }
}

.dt-intro-copy {
    order: 1;
    padding-bottom: 0;
    position: relative;
    z-index: 3;
}

@media (max-width: 879px) {
    .dt-intro-copy {
        width: 100%;
        padding: 0 1.5rem;
        margin-top: -2.15rem;
    }
}

@media (min-width: 880px) {
    .dt-intro-copy {
        align-self: center;
        padding-bottom: 2.25rem;
    }
}

/* Eyebrow */
.dt-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dt-purple-bright);
    margin-bottom: 1.5rem;
}

.dt-eyebrow-line {
    display: inline-block;
    width: 2.25rem;
    height: 1px;
    background: linear-gradient(90deg, var(--dt-purple-bright), transparent);
}

.dt-eyebrow-center {
    justify-content: center;
}

/* Headline */
.dt-title {
    font-family: 'Satoshi', 'General Sans', sans-serif;
    font-weight: 900;
    font-size: clamp(2.2rem, 5.5vw, 3.9rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--dt-beige);
    margin-bottom: 1.5rem;
}

.dt-title-accent {
    background: linear-gradient(100deg, #b691f2 0%, #8a63d2 50%, #6d4fc4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dt-lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.55;
    color: var(--dt-beige-soft);
    margin-bottom: 1.75rem;
}

.dt-lead-strong {
    color: var(--dt-beige);
    font-weight: 600;
}

/* Chips */
.dt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
}

.dt-chip {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.42rem 1rem;
    border-radius: 9999px;
    color: var(--dt-beige-soft);
    background: rgba(244, 240, 230, 0.06);
    border: 1px solid rgba(244, 240, 230, 0.14);
    backdrop-filter: blur(6px);
}

/* CTA with shine sweep */
.dt-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #5536ae 0%, #7c5cbf 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    padding: 1rem 2.4rem;
    border: 1px solid rgba(182, 145, 242, 0.5);
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    z-index: 4;
    box-shadow:
        0 10px 36px -8px rgba(124, 92, 191, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dt-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    animation: dtShine 4.5s ease-in-out infinite;
}

@keyframes dtShine {
    0%, 60%  { left: -80%; }
    100%     { left: 130%; }
}

.dt-cta:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 44px -8px rgba(124, 92, 191, 1),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dt-quote {
    margin-top: 1.5rem;
    font-size: 0.88rem;
    font-style: italic;
    color: var(--dt-beige-faint);
}

.dt-quote-author {
    color: var(--dt-purple-bright);
    font-style: normal;
    font-weight: 600;
}

/* Mauve visual */
.dt-intro-visual {
    order: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 45vh;
    height: 45svh;
    min-height: 19rem;
    max-height: 24rem;
    margin: 0 0 -0.25rem;
    overflow: hidden;
}

@media (max-width: 879px) {
    .dt-intro-visual::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        height: 48%;
        background: linear-gradient(to bottom, rgba(22, 14, 43, 0) 0%, rgba(22, 14, 43, 0.78) 58%, var(--dt-ink) 100%);
        pointer-events: none;
        z-index: 2;
    }
}

@media (min-width: 880px) {
    .dt-intro-visual {
        order: 1;
        width: auto;
        height: 86vh;
        max-height: 820px;
        margin: 0;
        overflow: visible;
        align-items: flex-end;
        align-self: end;
    }
}

.dt-halo {
    position: absolute;
    bottom: -6%;
    left: 50%;
    transform: translateX(-50%);
    width: 130%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 191, 0.42) 0%, rgba(124, 92, 191, 0.1) 42%, transparent 68%);
    filter: blur(20px);
    animation: dtHalo 5s ease-in-out infinite alternate;
}

@keyframes dtHalo {
    from { opacity: 0.75; transform: translateX(-50%) scale(1); }
    to   { opacity: 1;    transform: translateX(-50%) scale(1.06); }
}

.dt-intro-visual img {
    position: relative;
    width: 100%;
    height: 116%;
    max-width: none;
    object-fit: cover;
    object-position: top center;
    -webkit-mask-image: linear-gradient(to bottom, black 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 72%, transparent 100%);
    filter: drop-shadow(0 0 40px rgba(124, 92, 191, 0.35));
}

@media (min-width: 880px) {
    .dt-intro-visual img {
        width: auto;
        height: 100%;
        max-width: 112%;
        object-fit: contain;
        object-position: bottom center;
        -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
    }
}

@media (max-width: 879px) {
    .dt-title {
        font-size: clamp(1.95rem, 9vw, 2.45rem);
        margin-bottom: 0.85rem;
    }

    .dt-lead {
        font-size: 0.95rem;
        line-height: 1.45;
        margin-bottom: 1rem;
    }

    .dt-chips {
        margin-bottom: 1.15rem;
    }

    .dt-cta {
        padding: 0.85rem 1.45rem;
        font-size: 0.92rem;
    }

    .dt-quote {
        margin-top: 0.85rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 879px) and (max-height: 720px) {
    .dt-intro-grid {
        padding-top: 4.2rem;
        padding-bottom: 0.75rem;
    }

    .dt-intro-visual {
        height: 39vh;
        height: 39svh;
        min-height: 16rem;
        max-height: 18.5rem;
    }

    .dt-eyebrow {
        margin-bottom: 0.75rem;
    }

    .dt-title {
        font-size: clamp(1.75rem, 8.5vw, 2.2rem);
    }
}

/* ==================================================
   QUIZ
   ================================================== */

.dt-quiz {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: 6rem 1.5rem 3.5rem;
}

.dt-quiz-inner {
    width: 100%;
    max-width: 41rem;
    margin: 0 auto;
}

.dt-quiz-top {
    margin-bottom: 2.75rem;
}

.dt-counter {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dt-purple-bright);
    margin-bottom: 0.9rem;
}

.dt-counter em {
    font-style: normal;
    color: var(--dt-beige-faint);
}

.dt-track {
    height: 3px;
    border-radius: 9999px;
    background: rgba(244, 240, 230, 0.1);
    overflow: hidden;
}

.dt-track-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--dt-purple-deep), var(--dt-purple-bright));
    box-shadow: 0 0 12px rgba(166, 126, 232, 0.7);
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.dt-q-title {
    font-family: 'Satoshi', 'General Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3.2vw, 2.15rem);
    line-height: 1.22;
    letter-spacing: -0.01em;
    color: var(--dt-beige);
    margin-bottom: 2.25rem;
}

.dt-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Option rows with letter badges */
.dt-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(244, 240, 230, 0.045);
    border: 1px solid rgba(244, 240, 230, 0.1);
    color: var(--dt-beige-soft);
    font-size: 0.97rem;
    font-weight: 500;
    line-height: 1.45;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
    opacity: 0;
    transform: translateY(14px);
    animation: dtOptIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dt-option:nth-child(1) { animation-delay: 0.06s; }
.dt-option:nth-child(2) { animation-delay: 0.15s; }
.dt-option:nth-child(3) { animation-delay: 0.24s; }
.dt-option:nth-child(4) { animation-delay: 0.33s; }

@keyframes dtOptIn {
    to { opacity: 1; transform: none; }
}

.dt-option-key {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--dt-purple-bright);
    background: rgba(124, 92, 191, 0.16);
    border: 1px solid rgba(166, 126, 232, 0.3);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.dt-option:hover {
    background: rgba(124, 92, 191, 0.14);
    border-color: rgba(166, 126, 232, 0.5);
    color: var(--dt-beige);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -10px rgba(124, 92, 191, 0.5);
}

.dt-option:hover .dt-option-key {
    background: var(--dt-purple);
    border-color: var(--dt-purple-bright);
    color: #fff;
}

.dt-option.picked {
    background: rgba(124, 92, 191, 0.22);
    border-color: var(--dt-purple-bright);
    color: var(--dt-beige);
    box-shadow: 0 0 0 1px rgba(166, 126, 232, 0.35), 0 10px 30px -10px rgba(124, 92, 191, 0.6);
}

.dt-option.picked .dt-option-key {
    background: var(--dt-purple-bright);
    border-color: var(--dt-purple-bright);
    color: var(--dt-ink-deep);
}

.dt-option.dimmed {
    opacity: 0.35;
    pointer-events: none;
}

/* Mauve's quip */
.dt-quip {
    margin-top: 1.75rem;
    min-height: 1.6rem;
    font-size: 0.92rem;
    font-style: italic;
    color: var(--dt-purple-bright);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.dt-quip.visible {
    opacity: 1;
    transform: none;
}

/* Question transitions */
.dt-q-leave {
    animation: dtQLeave 0.3s ease forwards;
}

@keyframes dtQLeave {
    to { opacity: 0; transform: translateY(-14px); }
}

.dt-q-enter {
    animation: dtQEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dtQEnter {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* ==================================================
   RESULT
   ================================================== */

.dt-final {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 6.5rem 1.5rem 4rem;
}

.dt-final-inner {
    width: 100%;
    max-width: 43rem;
    margin: 0 auto;
}

.dt-score-stage {
    text-align: center;
    margin-bottom: 3rem;
}

/* Circular score ring */
.dt-ring-wrap {
    position: relative;
    width: 13rem;
    height: 13rem;
    margin: 0.75rem auto 1.25rem;
}

@media (min-width: 768px) {
    .dt-ring-wrap {
        width: 15rem;
        height: 15rem;
    }
}

.dt-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dt-ring-bg,
.dt-ring-fill {
    fill: none;
    stroke-width: 7;
}

.dt-ring-bg {
    stroke: rgba(244, 240, 230, 0.08);
}

.dt-ring-fill {
    stroke: var(--dt-purple-bright);
    stroke-linecap: round;
    stroke-dasharray: 552.9; /* 2 * PI * 88 */
    stroke-dashoffset: 552.9;
    filter: drop-shadow(0 0 8px rgba(166, 126, 232, 0.7));
    transition: stroke-dashoffset 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.dt-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dt-score {
    font-family: 'Satoshi', 'General Sans', sans-serif;
    font-weight: 900;
    font-size: 4.2rem;
    line-height: 1;
    background: linear-gradient(135deg, #cdb4f5, #8a63d2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dt-score-max {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--dt-beige-faint);
    margin-top: 0.3rem;
}

.dt-segment {
    font-family: 'Satoshi', 'General Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    color: var(--dt-beige);
}

/* Verdict blocks */
.dt-verdicts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.dt-verdict {
    border-radius: 1.1rem;
    padding: 1.5rem 1.6rem;
    background: rgba(244, 240, 230, 0.045);
    border: 1px solid rgba(244, 240, 230, 0.1);
    backdrop-filter: blur(8px);
}

.dt-verdict-key {
    background: linear-gradient(135deg, rgba(124, 92, 191, 0.24), rgba(67, 47, 138, 0.18));
    border-color: rgba(166, 126, 232, 0.4);
    box-shadow: 0 12px 36px -12px rgba(124, 92, 191, 0.55);
}

.dt-verdict-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dt-purple-bright);
    margin-bottom: 0.6rem;
}

.dt-verdict-text {
    font-size: 0.95rem;
    line-height: 1.72;
    color: var(--dt-beige-soft);
    margin: 0;
}

.dt-verdict-key .dt-verdict-text {
    color: var(--dt-beige);
}

/* Final CTAs */
.dt-final-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
    .dt-final-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.dt-soft-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dt-beige-faint);
    text-decoration: none;
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dt-soft-link:hover {
    color: var(--dt-beige);
    border-bottom-color: var(--dt-purple-bright);
}

.dt-final-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--dt-beige-faint);
    opacity: 0.7;
    margin: 0;
}

/* ---------- Utility ---------- */

.hidden {
    display: none !important;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .dt-reveal,
    .dt-option,
    .dt-orb,
    .dt-halo,
    .dt-cta::after {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}
