* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.52);
    --border: rgba(122, 139, 190, 0.22);
    --text: #ffffff;
    --muted: #c7ccdc;
    --muted-soft: #8f96aa;
    --purple: #7c3aed;
    --purple-light: #a855f7;
    --green: #22c55e;
    --blue: #38bdf8;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background:
        radial-gradient(circle at 72% 32%, rgba(124, 58, 237, 0.16), transparent 35%),
        radial-gradient(circle at 34% 60%, rgba(56, 189, 248, 0.05), transparent 32%),
        linear-gradient(135deg, #020617, #030712 52%, #020617);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* =========================
HOME PAGE ONLY
========================= */

.home {
    min-height: 100vh;
    padding: 34px 50px 24px;
    overflow: hidden;
}

/* Header */

.home-header {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 32px;
    line-height: 1;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.3), transparent 16%),
        linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(37, 99, 235, 0.76));
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.38);
}

.brand span {
    font-size: 31px;
    font-weight: 850;
    letter-spacing: -0.045em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

/* Remove this block from HTML if you no longer want plan bar */
.plan-pill {
    display: none;
}

.user-badge {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(168, 85, 247, 0.5);
    background: radial-gradient(circle at 40% 25%, rgba(168, 85, 247, 0.65), rgba(59, 7, 100, 0.86));
    font-size: 22px;
    font-weight: 780;
}

/* Hero */

.hero {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    align-items: center;
    min-height: 610px;
    margin-top: 22px;
}

.hero-copy {
    padding-left: 42px;
    position: relative;
    z-index: 2;
}

.hero-copy h1 {
    margin: 0;
    font-size: 74px;
    line-height: 1.14;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero-copy h1 span {
    color: var(--purple);
    text-shadow: 0 0 32px rgba(124, 58, 237, 0.42);
}

.hero-copy p {
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 25px;
    line-height: 1.62;
}

.hero-actions {
    display: flex;
    gap: 36px;
    margin-top: 54px;
}

.primary-btn,
.secondary-btn {
    height: 74px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    font-size: 25px;
    font-weight: 850;
}

.primary-btn {
    min-width: 314px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 0 35px rgba(124, 58, 237, 0.34);
}

.secondary-btn {
    min-width: 232px;
    background: rgba(2, 6, 23, 0.56);
    border: 1px solid rgba(122, 139, 190, 0.34);
}

/* If button icons are still text, keep them controlled */
.primary-btn span,
.secondary-btn span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 24px;
    line-height: 1;
}

/* Feature row */

.feature-row {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 50px;
    color: var(--muted);
    font-size: 18px;
}

.feature-row div {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-right: 26px;
    border-right: 1px solid rgba(122, 139, 190, 0.17);
}

.feature-row div:last-child {
    border-right: 0;
}

.feature-row img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.65));
}

/* Fallback if icon is text */
.feature-row b {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--purple-light);
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

/* Hero crown */

.hero-art {
    height: 610px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-art img {
    width: min(480px, 80%);
    max-width: 80%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 34px rgba(168, 85, 247, 0.48));
}

/* Welcome card */

.welcome-card {
    min-height: 214px;
    margin: 0;
    border-radius: 15px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.5);
    display: grid;
    grid-template-columns: 1.75fr repeat(4, 1fr);
    align-items: center;
    padding: 32px 44px;
    overflow: hidden;
}

.welcome-left {
    display: grid;
    grid-template-columns: 122px 1fr;
    gap: 28px;
    align-items: center;
}

.rocket-icon,
.setup-item div {
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 20%),
        radial-gradient(circle, rgba(124, 58, 237, 0.55), rgba(59, 7, 100, 0.5));
    border: 1px solid rgba(168, 85, 247, 0.38);
    box-shadow: 0 0 32px rgba(124, 58, 237, 0.28);
}

.rocket-icon {
    width: 96px;
    height: 96px;
}

.setup-item div {
    width: 78px;
    height: 78px;
}

.rocket-icon img,
.setup-item div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback if icon is text */
.rocket-icon,
.setup-item div {
    color: var(--purple-light);
    font-size: 34px;
    line-height: 1;
}

.welcome-left h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.welcome-left p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.5;
}

.setup-item {
    min-height: 130px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    border-left: 1px solid rgba(122, 139, 190, 0.16);
}

.setup-item strong {
    display: block;
    margin-top: 8px;
    font-size: 20px;
}

.setup-item span {
    color: var(--muted);
    font-size: 16px;
}

/* Footer */

.home-footer {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    color: var(--muted);
    font-size: 18px;
}

.home-footer b {
    color: var(--purple-light);
    font-weight: 500;
}

/* =========================
LAPTOP HEIGHT FIX
keeps welcome card visible better
========================= */

@media (max-height: 800px) and (min-width: 1000px) {
    .home {
        padding: 24px 48px 16px;
    }

    .home-header {
        height: 58px;
    }

    .brand-mark {
        width: 50px;
        height: 50px;
        font-size: 27px;
    }

    .brand span {
        font-size: 28px;
    }

    .user-badge {
        width: 54px;
        height: 54px;
        font-size: 19px;
    }

    .hero {
        min-height: 500px;
        margin-top: 12px;
    }

    .hero-copy h1 {
        font-size: 60px;
    }

    .hero-copy p {
        font-size: 20px;
        margin-top: 20px;
    }

    .hero-actions {
        margin-top: 34px;
    }

    .primary-btn,
    .secondary-btn {
        height: 60px;
        font-size: 20px;
    }

    .primary-btn {
        min-width: 260px;
    }

    .secondary-btn {
        min-width: 205px;
    }

    .feature-row {
        margin-top: 34px;
        font-size: 16px;
    }

    .hero-art {
        height: 500px;
    }

    .hero-art img {
        width: 850px;
    }

    .welcome-card {
        min-height: 160px;
        padding: 22px 36px;
    }

    .rocket-icon {
        width: 76px;
        height: 76px;
    }

    .welcome-left {
        grid-template-columns: 94px 1fr;
    }

    .welcome-left h2 {
        font-size: 25px;
    }

    .welcome-left p {
        font-size: 16px;
    }

    .setup-item {
        min-height: 105px;
    }

    .setup-item div {
        width: 62px;
        height: 62px;
    }

    .setup-item strong {
        font-size: 17px;
    }

    .setup-item span {
        font-size: 14px;
    }

    .home-footer {
        height: 40px;
        font-size: 15px;
    }
}

/* Responsive */

@media (max-width: 1200px) {
    .home {
        padding: 28px;
    }

    .home-header,
    .header-right {
        align-items: center;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-left: 0;
    }

    .hero-art {
        height: auto;
    }

    .welcome-card {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .welcome-left {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {

    .home-header,
    .header-right,
    .hero-actions,
    .feature-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy h1 {
        font-size: 46px;
    }

    .hero-copy p {
        font-size: 18px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        min-width: 0;
    }

    .welcome-card {
        grid-template-columns: 1fr;
    }

    .setup-item {
        border-left: 0;
        border-top: 1px solid rgba(122, 139, 190, 0.16);
        padding-top: 20px;
    }
}


/* =========================
HOME FINAL REPAIR
Fix broken buttons + restore hero
========================= */

.hero {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    align-items: center;
    min-height: 610px;
    margin-top: 22px;
}

.hero-copy {
    padding-left: 42px;
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 36px;
    margin-top: 54px;
}

.primary-btn,
.secondary-btn {
    height: 74px;
    border-radius: 9px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 25px;
    font-weight: 850;
    line-height: 1;
}

.primary-btn {
    min-width: 314px;
    padding: 0 34px;
    gap: 22px;
}

.secondary-btn {
    min-width: 232px;
    padding: 0 30px;
    gap: 16px;
}

/* IMPORTANT: undo old span rule that broke the button text */
.primary-btn span,
.secondary-btn span,
.btn-label,
.btn-arrow {
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    place-items: unset !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.btn-label {
    font-size: 25px;
    font-weight: 850;
}

.btn-arrow {
    font-size: 34px;
    transform: translateY(-1px);
}

.btn-bot-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    flex: 0 0 28px;
    border-radius: 0;
}

/* Crown artwork */
.hero-art {
    height: 610px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-art img {
    position: relative;
    z-index: 3;
    width: min(480px, 80%);
    max-width: 80%;
    height: auto;
    object-fit: contain;
    animation: qfHeroCrownFloat 4.6s ease-in-out infinite;
}

.hero-crown-art::before {
    content: "";
    position: absolute;
    width: min(500px, 72vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25), rgba(124, 58, 237, 0.08) 45%, transparent 70%);
    filter: blur(10px);
    animation: qfGlowBreath 3.2s ease-in-out infinite;
}

.hero-crown-grid {
    position: absolute;
    z-index: 1;
    width: min(580px, 84vw);
    height: 300px;
    border-radius: 50%;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
    background-size: 34px 34px;
    transform: perspective(420px) rotateX(66deg) translateY(96px);
    mask-image: radial-gradient(ellipse, black 20%, transparent 72%);
    opacity: 0.7;
}

.hero-crown-orbit {
    position: absolute;
    z-index: 2;
    width: min(510px, 76vw);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(168, 85, 247, 0.36);
    animation: qfHeroCrownOrbit 12s linear infinite;
}

.hero-crown-orbit::before {
    content: "";
    position: absolute;
    top: 9%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #67e8f9;
    box-shadow: 0 0 20px rgba(103, 232, 249, 0.95);
}

.hero-crown-orbit-two {
    width: min(410px, 64vw);
    border-color: rgba(217, 70, 239, 0.3);
    animation-direction: reverse;
    animation-duration: 8s;
}

/* Keep feature row fixed without affecting hero */
.feature-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    margin-top: 50px;
    color: #c7ccdc;
}

.feature-item,
.feature-row div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 11px;
    padding-right: 26px;
    margin-right: 26px;
    border-right: 1px solid rgba(122, 139, 190, 0.18);
    min-height: 30px;
}

.feature-item:last-child,
.feature-row div:last-child {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
}

.feature-item img,
.feature-row img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    display: block;
    flex: 0 0 20px;
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: 0.9;
    filter:
        brightness(1.5)
        saturate(1.35)
        contrast(1.2)
        drop-shadow(0 0 7px rgba(124,58,237,0.55))
}

.feature-item span,
.feature-row span {
    font-size: 18px;
    line-height: 1;
    font-weight: 500;
    white-space: nowrap;
}

/* Laptop height version */
@media (max-height: 800px) and (min-width: 1000px) {
    .hero {
        min-height: 500px;
        margin-top: 12px;
    }

    .hero-actions {
        margin-top: 34px;
    }

    .primary-btn,
    .secondary-btn {
        height: 60px;
        font-size: 20px;
    }

    .primary-btn {
        min-width: 260px;
    }

    .secondary-btn {
        min-width: 205px;
    }

    .btn-label {
        font-size: 20px;
    }

    .btn-arrow {
        font-size: 28px;
    }

    .btn-bot-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .hero-art {
        height: 500px;
    }

    .hero-art img {
        width: 850px;
    }

    .feature-row {
        margin-top: 34px;
    }

    .feature-item,
    .feature-row div {
        padding-right: 24px;
        margin-right: 24px;
        gap: 10px;
    }

    .feature-item img,
    .feature-row img {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
        object-fit: cover;
        border-radius: 50%;
        mix-blend-mode: screen;
    }

    .feature-item span,
    .feature-row span {
        font-size: 16px;
    }
}


/* =========================
QUBITFLOW LAUNCH ANIMATION
========================= */

.qf-launch {
position: fixed;
inset: 0;
z-index: 9999;
overflow: hidden;
background:
radial-gradient(circle at 50% 45%, rgba(124, 58, 237, 0.22), transparent 38%),
radial-gradient(circle at 58% 50%, rgba(56, 189, 248, 0.1), transparent 30%),
linear-gradient(135deg, #020617, #030712 55%, #020617);
display: grid;
place-items: center;
opacity: 1;
pointer-events: none;
transition:
opacity 900ms ease,
transform 900ms ease,
filter 900ms ease;
}

.qf-launch.is-hidden {
opacity: 0;
transform: scale(1.035);
filter: blur(10px);
}

.qf-launch-glow {
position: absolute;
width: 560px;
height: 560px;
border-radius: 50%;
background:
radial-gradient(circle, rgba(168, 85, 247, 0.34), transparent 66%);
animation: qfGlowBreath 2.4s ease-in-out infinite;
}

.qf-launch-crown-wrap {
position: relative;
width: 310px;
height: 310px;
z-index: 5;
display: grid;
place-items: center;
}

.qf-launch-crown-aura {
position: absolute;
inset: 26px;
border-radius: 50%;
background: radial-gradient(circle, rgba(217, 70, 239, 0.4), rgba(124, 58, 237, 0.14) 45%, transparent 70%);
filter: blur(8px);
animation: qfGlowBreath 2.4s ease-in-out infinite;
}

.qf-launch-crown {
position: relative;
z-index: 2;
width: 240px;
height: auto;
opacity: 0;
filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.62));
animation:
qfCrownEnter 1.35s cubic-bezier(.16, 1, .3, 1) forwards,
qfCrownFloat 2.4s ease-in-out 1.35s infinite;
}

.qf-ring {
position: absolute;
border-radius: 50%;
border: 1px solid rgba(168, 85, 247, 0.36);
animation: qfRingExpand 2.4s linear infinite;
}

.qf-ring::before {
content: "";
position: absolute;
top: 8%;
left: 50%;
width: 7px;
height: 7px;
border-radius: 50%;
background: #38bdf8;
box-shadow: 0 0 18px rgba(56, 189, 248, 0.95);
}

.qf-ring-1 {
width: 230px;
height: 230px;
animation-delay: 0s;
}

.qf-ring-2 {
width: 330px;
height: 330px;
animation-delay: 0.35s;
}

.qf-ring-3 {
width: 430px;
height: 430px;
animation-delay: 0.7s;
}

.qf-arc {
position: absolute;
width: 540px;
height: 540px;
border-radius: 50%;
border: 1px solid transparent;
transform: rotateX(72deg);
animation: qfArcRotate 4.8s linear infinite;
}

.qf-arc-1 {
border-top-color: rgba(168, 85, 247, 0.58);
}

.qf-arc-2 {
border-top-color: rgba(56, 189, 248, 0.34);
animation-direction: reverse;
}

.qf-launch-bars {
position: absolute;
bottom: 18%;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: flex-end;
gap: 22px;
opacity: 0.42;
}

.qf-launch-bars span {
width: 18px;
border-radius: 5px 5px 0 0;
background: linear-gradient(to top, #7c3aed, #38bdf8);
box-shadow: 0 0 14px rgba(124, 58, 237, 0.35);
animation: qfBarMove 700ms ease-in-out infinite;
}

.qf-launch-bars span:nth-child(2n) {
animation-delay: 120ms;
}

.qf-launch-bars span:nth-child(3n) {
animation-delay: 240ms;
}

.qf-scan-line {
position: absolute;
left: 0;
top: -4px;
width: 100%;
height: 2px;
background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.85), rgba(56, 189, 248, 0.65), transparent);
animation: qfScan 2.4s linear infinite;
opacity: 0.75;
}

.qf-particle {
position: absolute;
width: 5px;
height: 5px;
border-radius: 50%;
background: #38bdf8;
box-shadow: 0 0 16px rgba(56, 189, 248, 0.9);
animation: qfParticleFloat 2.8s ease-in-out infinite;
}

.p1 { top: 22%; left: 28%; animation-delay: 0s; }
.p2 { top: 34%; left: 74%; animation-delay: .3s; }
.p3 { top: 64%; left: 22%; animation-delay: .7s; }
.p4 { top: 72%; left: 82%; animation-delay: .5s; }
.p5 { top: 44%; left: 14%; animation-delay: 1s; }
.p6 { top: 78%; left: 42%; animation-delay: 1.2s; }

.qf-launch-brand {
position: absolute;
bottom: 9%;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 16px;
color: white;
opacity: 0;
animation: qfBrandEnter 900ms ease forwards 350ms;
}

.qf-launch-mark {
width: 54px;
height: 54px;
border-radius: 16px;
display: grid;
place-items: center;
background: linear-gradient(135deg, #8b5cf6, #2563eb);
box-shadow: 0 0 28px rgba(124, 58, 237, 0.5);
font-size: 28px;
}

.qf-brand-crown {
width: 84%;
height: 84%;
display: block;
object-fit: contain;
}

.qf-launch-brand strong {
display: block;
font-size: 28px;
line-height: 1;
letter-spacing: -0.04em;
}

.qf-launch-brand span {
display: block;
margin-top: 8px;
color: #c7ccdc;
font-size: 14px;
letter-spacing: 0.08em;
text-transform: uppercase;
}

.home {
opacity: 0;
transform: translateY(14px);
transition:
opacity 900ms ease 260ms,
transform 900ms ease 260ms;
}

body.qf-ready .home {
opacity: 1;
transform: translateY(0);
}

@keyframes qfCrownEnter {
0% {
transform: translateY(28px) rotate(-8deg) scale(0.68);
opacity: 0;
}

65% {
opacity: 1;
transform: translateY(-8px) rotate(3deg) scale(1.06);
}

100% {
transform: translateY(0) rotate(0) scale(1);
opacity: 1;
}
}

@keyframes qfCrownFloat {
0%, 100% {
transform: translateY(0) rotate(0);
}

50% {
transform: translateY(-13px) rotate(1.5deg);
}
}

@keyframes qfHeroCrownFloat {
0%, 100% {
transform: translateY(0) rotate(-1deg);
}

50% {
transform: translateY(-15px) rotate(1deg);
}
}

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

@keyframes qfGlowBreath {
0%, 100% {
opacity: 0.55;
transform: scale(0.96);
}

50% {
opacity: 0.92;
transform: scale(1.08);
}
}

@keyframes qfRingExpand {
0% {
opacity: 0.9;
transform: scale(0.55);
}

100% {
opacity: 0;
transform: scale(1.75);
}
}

@keyframes qfArcRotate {
from {
transform: rotateX(72deg) rotateZ(0deg);
}

to {
transform: rotateX(72deg) rotateZ(360deg);
}
}

@keyframes qfBarMove {
0%, 100% {
transform: translateY(0);
opacity: 0.85;
}

50% {
transform: translateY(-5px);
opacity: 1;
}
}

@keyframes qfScan {
from {
top: -4px;
opacity: 0.95;
}

to {
top: 100%;
opacity: 0;
}
}

@keyframes qfParticleFloat {
0%, 100% {
transform: translate(0, 0) scale(1);
opacity: 0.9;
}

50% {
transform: translate(10px, -18px) scale(1.2);
opacity: 0.55;
}
}

@keyframes qfBrandEnter {
from {
opacity: 0;
transform: translateX(-50%) translateY(18px);
}

to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}

@media (prefers-reduced-motion: reduce) {
.qf-launch {
display: none;
}

.home {
opacity: 1;
transform: none;
}
}
.home-auth-link {
    padding: 10px 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 9px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}

.home-auth-link.primary {
    border-color: rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
}

/* =========================
LANDING MOBILE FINAL PASS
These rules intentionally live at the end so they override the desktop repair
blocks above and keep the public homepage usable on phones.
========================= */

@media (max-width: 900px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .home {
        min-height: 100vh;
        padding: 18px 16px 26px;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .home-header {
        height: auto;
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .brand {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .brand span {
        font-size: clamp(26px, 8vw, 34px);
    }

    .header-right {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .home-auth-link {
        min-height: 42px;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 12px;
    }

    .home-auth-link.primary {
        grid-column: 1 / -1;
    }

    .hero {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
        margin-top: 34px !important;
        gap: 28px;
    }

    .hero-copy {
        padding-left: 0 !important;
        text-align: center;
    }

    .hero-copy h1 {
        font-size: clamp(42px, 13vw, 66px);
        line-height: 1.02;
        letter-spacing: -0.07em;
    }

    .hero-copy p {
        max-width: 35rem;
        margin: 18px auto 0;
        font-size: clamp(16px, 4.4vw, 20px);
        line-height: 1.55;
    }

    .hero-copy p br {
        display: none;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: 28px !important;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        min-width: 0 !important;
        height: 58px !important;
        padding: 0 18px !important;
        border-radius: 12px;
        font-size: 18px !important;
    }

    .btn-label,
    .primary-btn,
    .secondary-btn {
        font-size: 18px !important;
    }

    .btn-arrow {
        font-size: 24px;
    }

    .feature-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 24px !important;
    }

    .feature-item,
    .feature-row div {
        min-height: 52px;
        margin: 0 !important;
        padding: 10px 12px !important;
        border: 1px solid rgba(122, 139, 190, 0.16) !important;
        border-radius: 13px;
        background: rgba(15, 23, 42, 0.34);
        justify-content: flex-start;
    }

    .feature-item span,
    .feature-row span {
        white-space: normal;
        text-align: left;
        font-size: 13px;
        line-height: 1.2;
    }

    .hero-art {
        order: -1;
        height: min(58vw, 320px) !important;
        margin-top: 4px;
    }

    .hero-art img {
        width: min(270px, 64vw) !important;
        max-width: 70vw !important;
    }

    .hero-crown-art::before {
        width: min(330px, 74vw);
    }

    .hero-crown-grid {
        width: min(390px, 90vw);
        height: 190px;
        transform: perspective(360px) rotateX(66deg) translateY(70px);
    }

    .hero-crown-orbit {
        width: min(330px, 76vw);
    }

    .hero-crown-orbit-two {
        width: min(260px, 62vw);
    }

    .welcome-card {
        grid-template-columns: 1fr !important;
        gap: 12px;
        min-height: 0;
        margin-top: 22px;
        padding: 18px;
        border-radius: 18px;
    }

    .welcome-left {
        grid-column: auto;
        grid-template-columns: 1fr !important;
        justify-items: center;
        text-align: center;
        gap: 14px;
        padding-bottom: 12px;
    }

    .rocket-icon {
        width: 72px;
        height: 72px;
    }

    .welcome-left h2 {
        font-size: 24px;
    }

    .welcome-left p {
        margin-top: 8px;
        font-size: 15px;
    }

    .welcome-left p br {
        display: none;
    }

    .setup-item {
        min-height: 92px;
        grid-template-columns: 56px 1fr;
        place-items: center start;
        gap: 4px 14px;
        padding: 12px 0 12px;
        border-left: 0;
        border-top: 1px solid rgba(122, 139, 190, 0.16);
        text-align: left;
    }

    .setup-item div {
        grid-row: 1 / span 2;
        width: 50px;
        height: 50px;
    }

    .setup-item strong {
        margin: 0;
        font-size: 16px;
    }

    .setup-item span {
        font-size: 13px;
    }

    .home-footer {
        height: auto;
        min-height: 56px;
        padding: 18px 4px 4px;
        flex-wrap: wrap;
        text-align: center;
        font-size: 13px;
        line-height: 1.4;
    }
}

@media (max-width: 460px) {
    .home {
        padding: 14px 12px 22px;
    }

    .header-right {
        grid-template-columns: 1fr;
    }

    .home-auth-link.primary {
        grid-column: auto;
    }

    .hero {
        margin-top: 24px !important;
    }

    .hero-copy h1 {
        font-size: clamp(38px, 15vw, 54px);
    }

    .feature-row {
        grid-template-columns: 1fr;
    }

    .hero-art {
        height: 250px !important;
    }

    .qf-launch-crown-wrap {
        width: 230px;
        height: 230px;
    }

    .qf-launch-crown {
        width: 175px;
    }

    .qf-ring-1 {
        width: 180px;
        height: 180px;
    }

    .qf-ring-2 {
        width: 250px;
        height: 250px;
    }

    .qf-ring-3,
    .qf-arc {
        width: 320px;
        height: 320px;
    }

    .qf-launch-bars {
        gap: 12px;
        bottom: 16%;
    }

    .qf-launch-bars span {
        width: 11px;
    }

    .qf-launch-brand {
        width: calc(100% - 32px);
        justify-content: center;
        bottom: 8%;
    }

    .qf-launch-brand strong {
        font-size: 22px;
    }

    .qf-launch-brand span {
        font-size: 10px;
        letter-spacing: 0.06em;
    }
}
