/* ============================================
   TSB — Static / Standalone Pages
   Family: 404, thank-you, demo
   Base layer for small standalone pages
   ============================================ */

@import url('tokens.css');

/* ============================================
   Shared: base resets for standalone pages
   ============================================ */
.page-404,
.page-thank-you,
.page-demo {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Shared: glass shell (lz-shell style) */
.page-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.01) 16%, rgba(255, 255, 255, 0) 34%),
        linear-gradient(180deg, rgba(23, 24, 24, 0.56) 0%, rgba(16, 18, 18, 0) 100%);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04),
        0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.page-shell::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 34%, transparent 72%);
    pointer-events: none;
}

/* Shared: kicker label */
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(214, 223, 232, 0.52);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-kicker::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(77, 171, 154, 0.9);
    box-shadow: 0 0 0 4px rgba(77, 171, 154, 0.12);
}

/* Shared: action buttons */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
    border: none;
}

.page-btn svg {
    width: 15px;
    height: 15px;
}

.page-btn-primary {
    background: linear-gradient(135deg, #4DAB9A, #5BC4B0);
    color: #0a0a0a;
    box-shadow: 0 14px 32px rgba(7, 17, 14, 0.16);
}

.page-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(7, 17, 14, 0.18);
}

.page-btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(240, 240, 242, 0.88);
}

.page-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.042);
    border-color: rgba(255, 255, 255, 0.11);
    transform: translateY(-2px);
}

/* ============================================
   Page: 404
   ============================================ */
.page-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px 36px;
}

.page-404 .page-shell {
    width: min(100%, 760px);
    padding: 34px 28px 30px;
}

.page-404 .error-code {
    font-size: clamp(5.4rem, 14vw, 8.5rem);
    font-weight: 620;
    line-height: 0.9;
    letter-spacing: -0.08em;
    margin-bottom: 16px;
    color: rgba(240, 240, 242, 0.96);
}

.page-404 .error-title {
    font-size: 28px;
    font-weight: 620;
    letter-spacing: -0.045em;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.page-404 .error-desc {
    max-width: 420px;
    margin: 0 auto 28px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
    color: var(--text-secondary);
}

.page-404 .action-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .page-404 {
        padding: 20px 14px 28px;
    }

    .page-404 .page-shell {
        padding: 28px 20px 24px;
    }

    .page-404 .error-title {
        font-size: 24px;
    }

    .page-404 .action-row {
        flex-direction: column;
    }
}

/* ============================================
   Page: Thank You
   ============================================ */
.page-thank-you {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px 28px;
}

.page-thank-you .page-shell {
    max-width: 560px;
    width: min(100%, 560px);
    padding: 44px 30px 34px;
    animation: ty-fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes ty-fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animated check icon */
.ty-check {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(77, 171, 154, 0.09);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    position: relative;
}
.ty-check svg {
    width: 40px;
    height: 40px;
    color: #4DAB9A;
}
.ty-check::after {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 1px solid rgba(77, 171, 154, 0.12);
    animation: ty-checkRing 2.4s ease-in-out infinite;
}
@keyframes ty-checkRing {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.12); opacity: 0; }
}

/* Upgrade (expert) variant */
.ty-check--upgrade {
    background: rgba(99, 102, 241, 0.08);
}
.ty-check--upgrade svg { color: #818cf8; }
.ty-check--upgrade::after { border-color: rgba(99, 102, 241, 0.12); }

.ty-title {
    font-size: 42px;
    font-weight: 740;
    color: var(--text-primary);
    margin: 0 0 14px;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.ty-sub {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 32px;
}

/* Steps card */
.ty-steps {
    text-align: left;
    border-radius: 20px;
    box-sizing: border-box;
    padding: 24px;
    margin-bottom: 28px;
}

.ty-steps-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 18px;
}

.ty-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
}
.ty-step + .ty-step {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ty-step-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(77, 171, 154, 0.1);
    color: #4DAB9A;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ty-step-num--purple {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

.ty-step-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-top: 3px;
}

/* CTA button */
.ty-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: min(100%, 360px);
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px 28px;
    background: linear-gradient(135deg, #4DAB9A, #5BC4B0);
    color: #050507;
    font-weight: 700;
    font-size: 16px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px rgba(77, 171, 154, 0.25);
}
.ty-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 44px rgba(77, 171, 154, 0.4);
}
.ty-cta--purple {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
}
.ty-cta--purple:hover {
    box-shadow: 0 14px 44px rgba(99, 102, 241, 0.4);
}

.ty-note {
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.ty-note a {
    color: var(--accent);
    text-decoration: none;
}

.ty-bundle-card {
    text-align: left;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: 20px;
    box-sizing: border-box;
    padding: 20px;
    margin: 24px 0 0;
}

.ty-bundle-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 6px;
}

.ty-bundle-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

.ty-bundle-card a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 700;
}

/* Confetti */
.ty-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.ty-confetti span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    top: -10px;
    animation: ty-confettiFall linear forwards;
    opacity: 0;
}
@keyframes ty-confettiFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

@media (max-width: 640px) {
    .page-thank-you {
        padding: 24px 14px;
    }

    .page-thank-you .page-shell {
        padding: 34px 20px 24px;
    }

    .ty-title {
        font-size: 34px;
    }

    .ty-sub {
        font-size: 15px;
    }

    .ty-steps {
        padding: 20px 18px;
    }

    .ty-step-text {
        font-size: 14px;
    }
}

/* ============================================
   Page: Demo Hub
   ============================================ */
.page-demo {
    padding: 24px 24px 44px;
    margin: 0;
}

.page-demo *, .page-demo *::before, .page-demo *::after {
    box-sizing: border-box;
}

.page-demo h1, .page-demo h2, .page-demo h3, .page-demo p {
    margin: 0;
}

.page-demo .demo-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-demo .demo-header {
    position: relative;
    margin-bottom: 26px;
}

.page-demo .demo-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 34px;
}

.page-demo .demo-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-demo .demo-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.page-demo .demo-logo-mark {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4DAB9A, #5BC4B0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
    font-weight: 800;
    font-family: 'DM Mono', monospace;
    font-size: 14px;
}

.page-demo .demo-logo span {
    font-size: 18px;
    font-weight: 650;
    color: rgba(240, 240, 242, 0.94);
}

.page-demo .demo-header-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-demo .demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    background: rgba(77, 171, 154, 0.05);
    border: 1px solid rgba(77, 171, 154, 0.12);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(126, 207, 191, 0.88);
    margin-bottom: 16px;
}

.page-demo .demo-header h1 {
    max-width: 700px;
    font-size: clamp(2rem, 2.8vw, 2.8rem);
    font-weight: 620;
    line-height: 0.98;
    letter-spacing: -0.055em;
    margin-bottom: 14px;
    color: #f0f0f2;
}

.page-demo .demo-header p {
    font-size: 14px;
    font-weight: 500;
    color: rgba(214, 223, 232, 0.54);
    max-width: 580px;
    line-height: 1.68;
    margin: 0 auto;
}

.page-demo .demo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

/* Demo card — lz-price-card style */
.page-demo .demo-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 268px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.028),
        inset 0 -1px 0 rgba(255, 255, 255, 0.016),
        0 18px 40px rgba(0, 0, 0, 0.16);
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.page-demo .demo-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.014) 36%, transparent 78%);
    pointer-events: none;
}

.page-demo .demo-card::after {
    content: none;
}

.page-demo .demo-card--featured {
    grid-column: span 2;
    min-height: 268px;
    background: var(--bg-primary);
    border-color: rgba(255, 255, 255, 0.06);
}

.page-demo .demo-card:hover {
    border-color: rgba(255, 255, 255, 0.11);
    background: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.034),
        inset 0 -1px 0 rgba(255, 255, 255, 0.02),
        0 20px 44px rgba(0, 0, 0, 0.18);
}

.page-demo .demo-card--featured:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: var(--bg-primary);
}

.page-demo .demo-card-kicker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.page-demo .demo-card-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.032);
    color: rgba(240, 240, 242, 0.76);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-demo .demo-card-kicker--soft {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.032);
    color: rgba(214, 223, 232, 0.66);
}

.page-demo .demo-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(214, 223, 232, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-demo .demo-card-title {
    font-size: 18px;
    font-weight: 620;
    color: #f0f0f2;
    margin-bottom: 8px;
}

.page-demo .demo-card-desc {
    font-size: 14px;
    color: rgba(214, 223, 232, 0.6);
    line-height: 1.7;
    min-height: 72px;
    margin-bottom: 16px;
}

.page-demo .demo-card-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 18px;
}

.page-demo .demo-card-preview-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(240, 240, 242, 0.7);
    font-size: 12px;
    font-weight: 600;
}

.page-demo .demo-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 18px;
}

.page-demo .demo-card-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(214, 223, 232, 0.64);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.page-demo .demo-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(214, 223, 232, 0.78);
    padding-top: 14px;
    margin-top: auto;
}

.page-demo .demo-card--featured .demo-card-desc {
    min-height: 0;
    max-width: 54ch;
}

.page-demo .demo-footer {
    padding: 10px 0 0;
    text-align: center;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.page-demo .demo-footer p {
    font-size: 15px;
    color: rgba(214, 223, 232, 0.62);
    margin-bottom: 20px;
}

.page-demo .demo-footer-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-demo .demo-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-demo .demo-nav-link.primary {
    background: rgba(77, 171, 154, 0.08);
    border: 1px solid rgba(77, 171, 154, 0.14);
    color: #7ecfbf;
}

.page-demo .demo-nav-link.primary:hover {
    background: rgba(77, 171, 154, 0.11);
    border-color: rgba(77, 171, 154, 0.18);
}

.page-demo .demo-nav-link.secondary {
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(240, 240, 242, 0.84);
}

.page-demo .demo-nav-link.secondary:hover {
    background: rgba(255, 255, 255, 0.032);
    border-color: rgba(255, 255, 255, 0.09);
}

.page-demo .data-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(255, 193, 7, 0.032);
    border: 1px solid rgba(255, 193, 7, 0.1);
    border-radius: 18px;
    font-size: 13px;
    color: rgba(233, 196, 112, 0.88);
    margin-bottom: 28px;
}

@media (max-width: 1120px) {
    .page-demo .demo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-demo .demo-card--featured {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .page-demo {
        padding: 18px 16px 36px;
    }

    .page-demo .demo-nav {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .page-demo .demo-logo {
        gap: 10px;
    }

    .page-demo .demo-logo img {
        width: 28px;
        height: 28px;
    }

    .page-demo .demo-logo span {
        font-size: 16px;
    }

    .page-demo .demo-badge {
        min-height: 42px;
    }

    .page-demo .demo-nav-actions {
        width: 100%;
        justify-content: center;
    }

    .page-demo .demo-header h1 {
        font-size: 30px;
        line-height: 1.05;
    }

    .page-demo .demo-header p {
        font-size: 15px;
    }

    .page-demo .demo-grid {
        grid-template-columns: 1fr;
    }

    .page-demo .demo-card--featured {
        grid-column: span 1;
    }

    .page-demo .demo-card-meta,
    .page-demo .demo-card-preview {
        gap: 6px;
    }

    .page-demo .demo-footer {
        padding-top: 6px;
    }
}
