/* ================================================================
 * TechLiberty — Beta Program page (TECH-2660)
 * FIFA-card selector + multi-project sign-up form.
 * Scope: .beta-program-page container prevents bleeding into other pages.
 * ================================================================ */

.beta-program-page {
    --beta-accent: #d4af37;
    --beta-accent-soft: rgba(212, 175, 55, 0.18);
    --beta-waitlist: #e07a3c;
    --beta-full: #7a7a82;
    --beta-ok: #4caf50;
    --beta-warn: #ffb300;
    --beta-danger: #e53935;
    --beta-card-bg: #ffffff;
    --beta-card-dark-bg: #111827;
    --beta-card-border: rgba(0, 0, 0, 0.06);
    --beta-text-muted: #6b7280;
    color: #1a1a2e;
}

.beta-program-page .beta-hero {
    padding: 96px 0 48px;
    text-align: center;
}

.beta-program-page .beta-hero h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.beta-program-page .beta-hero .beta-hero-subtitle {
    font-size: clamp(16px, 2.1vw, 20px);
    color: var(--beta-accent);
    font-weight: 600;
    margin-bottom: 16px;
}

.beta-program-page .beta-hero .beta-hero-description {
    max-width: 760px;
    margin: 0 auto;
    color: var(--beta-text-muted);
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.65;
}

/* =====================  Projects Grid  ===================== */
.beta-program-page .beta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 32px 0 160px;
}

@media (max-width: 575px) {
    .beta-program-page .beta-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-bottom: 220px;
    }
}

.beta-program-page .beta-loading,
.beta-program-page .beta-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: var(--beta-text-muted);
    font-size: 15px;
}

/* =====================  Card  ===================== */
.beta-program-page .beta-card {
    position: relative;
    background: var(--beta-card-bg);
    border: 2px solid var(--beta-card-border);
    border-radius: 18px;
    padding: 22px 20px 20px;
    cursor: pointer;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1),
                border-color .25s ease,
                box-shadow .35s ease;
    will-change: transform;
    outline: none;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    overflow: hidden;
}

.beta-program-page .beta-card:hover {
    transform: perspective(900px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
    border-color: rgba(0, 0, 0, 0.12);
}

.beta-program-page .beta-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.35);
    border-color: #0d6efd;
}

.beta-program-page .beta-card.selected {
    border-color: var(--beta-accent);
    transform: scale(1.02);
    box-shadow:
        0 0 0 4px var(--beta-accent-soft),
        0 18px 36px rgba(212, 175, 55, 0.22);
}

.beta-program-page .beta-card.selected:hover {
    transform: scale(1.02) perspective(900px) rotateX(2deg) rotateY(-2deg);
}

.beta-program-page .beta-card.full {
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
}

.beta-program-page .beta-card.full .beta-card-title {
    color: #374151;
}

.beta-program-page .beta-card.full.selected {
    border-color: var(--beta-waitlist);
    box-shadow:
        0 0 0 4px rgba(224, 122, 60, 0.22),
        0 18px 36px rgba(224, 122, 60, 0.22);
}

/* Radial progress (top-right) */
.beta-program-page .beta-card-radial {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 60px;
    height: 60px;
    z-index: 2;
}

.beta-program-page .beta-card-radial svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.beta-program-page .beta-card-radial .radial-track {
    stroke: rgba(0, 0, 0, 0.08);
    fill: none;
}

.beta-program-page .beta-card-radial .radial-fill {
    fill: none;
    stroke-linecap: round;
    transition: stroke-dashoffset .8s ease, stroke .3s ease;
}

.beta-program-page .beta-card-radial .radial-fill.low    { stroke: var(--beta-ok); }
.beta-program-page .beta-card-radial .radial-fill.medium { stroke: var(--beta-warn); }
.beta-program-page .beta-card-radial .radial-fill.high   { stroke: var(--beta-danger); }
.beta-program-page .beta-card-radial .radial-fill.full   { stroke: var(--beta-full); }

.beta-program-page .beta-card-radial-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #1f2937;
}

/* Logo */
.beta-program-page .beta-card-logo {
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 14px;
}

.beta-program-page .beta-card-logo img {
    max-width: 140px;
    max-height: 96px;
    object-fit: contain;
}

.beta-program-page .beta-card-logo .beta-card-logo-fallback {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1a1a2e, #3663d8);
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -1px;
}

/* Title / slogan / summary */
.beta-program-page .beta-card-title {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.25;
}

.beta-program-page .beta-card-underline {
    width: 42px;
    height: 2px;
    background: var(--beta-accent);
    margin: 0 auto 12px;
    border-radius: 2px;
}

.beta-program-page .beta-card-slogan {
    font-size: 13px;
    color: var(--beta-text-muted);
    text-align: center;
    margin: 0 0 8px;
    font-style: italic;
}

.beta-program-page .beta-card-summary {
    font-size: 13px;
    color: #374151;
    line-height: 1.55;
    margin: 0 0 14px;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tech stack badges */
.beta-program-page .beta-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 14px;
}

.beta-program-page .beta-card-badges .badge-tech {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.beta-program-page .beta-card.selected .beta-card-badges .badge-tech {
    background: var(--beta-accent-soft);
    color: #6b4f10;
}

/* Footer label */
.beta-program-page .beta-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f9fafb;
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.beta-program-page .beta-card.selected .beta-card-footer {
    background: var(--beta-accent);
    color: #1a1a2e;
    border-color: var(--beta-accent);
}

.beta-program-page .beta-card.full .beta-card-footer {
    background: rgba(224, 122, 60, 0.12);
    color: var(--beta-waitlist);
    border-color: rgba(224, 122, 60, 0.3);
}

.beta-program-page .beta-card.full.selected .beta-card-footer {
    background: var(--beta-waitlist);
    color: #fff;
    border-color: var(--beta-waitlist);
}

.beta-program-page .beta-card-footer .icon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* =====================  Floating chip bar  ===================== */
.beta-program-page .beta-chips-floating {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    background: rgba(26, 26, 46, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 14px 20px;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: calc(100vw - 40px);
    min-width: 320px;
}

.beta-program-page .beta-chips-floating .chips-summary {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
}

.beta-program-page .beta-chips-floating .chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 420px;
    overflow: hidden;
}

.beta-program-page .beta-chips-floating .chip {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.beta-program-page .beta-chips-floating .chip.waitlist {
    background: rgba(224, 122, 60, 0.35);
}

.beta-program-page .beta-chips-floating .chip-remove {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    opacity: 0.85;
}

.beta-program-page .beta-chips-floating .chip-remove:hover { opacity: 1; }

.beta-program-page .beta-chips-floating .chips-clear {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.beta-program-page .beta-chips-floating .chips-clear:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 767px) {
    .beta-program-page .beta-chips-floating {
        left: 0;
        right: 0;
        transform: none;
        bottom: 0;
        border-radius: 20px 20px 0 0;
        max-width: 100vw;
        min-width: 0;
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .beta-program-page .beta-chips-floating .chips-list {
        max-width: 100%;
        max-height: 80px;
        overflow-y: auto;
    }
}

/* =====================  Form section  ===================== */
.beta-program-page .beta-form-section {
    background: #0f0f1a;
    color: #fff;
    padding: 72px 0;
}

.beta-program-page .beta-form-section h2 {
    color: #fff;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 800;
}

.beta-program-page .beta-form-section .form-section-description {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 1.6;
}

.beta-program-page .beta-form {
    max-width: 720px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 32px 28px;
}

.beta-program-page .beta-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

@media (max-width: 575px) {
    .beta-program-page .beta-form .form-row {
        grid-template-columns: 1fr;
    }
}

.beta-program-page .beta-form label.beta-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 6px;
}

.beta-program-page .beta-form .beta-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 14px;
    color: #fff;
    font-size: 14px;
    transition: border-color .2s ease, background .2s ease;
}

.beta-program-page .beta-form .beta-input:focus {
    outline: none;
    border-color: var(--beta-accent);
    background: rgba(255, 255, 255, 0.12);
}

.beta-program-page .beta-form .beta-input[aria-invalid="true"] {
    border-color: var(--beta-danger);
    background: rgba(229, 57, 53, 0.1);
}

.beta-program-page .beta-form .field-error {
    display: block;
    font-size: 12px;
    color: #f87171;
    margin-top: 6px;
    min-height: 16px;
}

.beta-program-page .beta-form .kvkk-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 18px 0 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.5;
}

.beta-program-page .beta-form .kvkk-group input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--beta-accent);
}

.beta-program-page .beta-form .kvkk-group a {
    color: var(--beta-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.beta-program-page .beta-form .beta-submit {
    display: block;
    width: 100%;
    margin-top: 18px;
    background: linear-gradient(135deg, var(--beta-accent) 0%, #e6c34a 100%);
    color: #1a1a2e;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: transform .18s ease, opacity .2s ease, box-shadow .3s ease;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.28);
}

.beta-program-page .beta-form .beta-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(212, 175, 55, 0.36);
}

.beta-program-page .beta-form .beta-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.beta-program-page .beta-form .form-global-error {
    background: rgba(229, 57, 53, 0.15);
    border: 1px solid rgba(229, 57, 53, 0.4);
    border-radius: 10px;
    padding: 12px 14px;
    color: #fecaca;
    font-size: 13px;
    margin-bottom: 14px;
}

/* =====================  Success Modal  ===================== */
.beta-modal-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: beta-fade-in .25s ease;
}

.beta-modal {
    background: #fff;
    color: #1a1a2e;
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: beta-scale-in .3s cubic-bezier(.22, 1, .36, 1);
}

.beta-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.beta-modal .modal-header .modal-check {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--beta-ok);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.beta-modal h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.beta-modal .modal-intro {
    color: var(--beta-text-muted);
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.55;
}

.beta-modal .outcome-group {
    margin-bottom: 18px;
}

.beta-modal .outcome-group h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--beta-text-muted);
    margin: 0 0 8px;
}

.beta-modal .outcome-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.beta-modal .outcome-item {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.beta-modal .outcome-item.tester     { background: rgba(76, 175, 80, 0.12); color: #1b5e20; }
.beta-modal .outcome-item.waitlist   { background: rgba(224, 122, 60, 0.12); color: #8d3b10; }
.beta-modal .outcome-item.skipped    { background: rgba(120, 120, 130, 0.12); color: #4b5563; }

.beta-modal .outcome-item .queue-pos {
    font-size: 12px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.12);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.beta-modal .modal-close-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.beta-modal .modal-close-btn:hover { background: #2b2b45; }

@keyframes beta-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes beta-scale-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================  Error Toast  ===================== */
.beta-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--beta-danger);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(229, 57, 53, 0.4);
    z-index: 1000;
    max-width: 360px;
    font-size: 14px;
    animation: beta-toast-in .25s ease;
}

.beta-toast button {
    background: transparent;
    border: none;
    color: #fff;
    margin-left: 10px;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.8;
}

@keyframes beta-toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@media (max-width: 575px) {
    .beta-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

/* =====================  Reduced motion  ===================== */
@media (prefers-reduced-motion: reduce) {
    .beta-program-page .beta-card,
    .beta-program-page .beta-card:hover,
    .beta-program-page .beta-card.selected,
    .beta-modal,
    .beta-program-page .beta-card-radial .radial-fill {
        transition: none !important;
        animation: none !important;
    }
    .beta-program-page .beta-card:hover { transform: none; }
}

/* ================================================================
 * TECH-2663 — Home page Beta Program CTA teaser.
 * Scoped under .beta-cta-home so it never leaks into other sections.
 * Mini preview cards re-use the radial progress palette from the full
 * beta-program page for visual consistency without pulling the whole
 * card component in.
 * ================================================================ */
.beta-cta-home {
    --beta-accent: #d4af37;
    --beta-ok: #4caf50;
    --beta-warn: #ffb300;
    --beta-danger: #e53935;
    --beta-text-muted: #6b7280;
}

.beta-cta-home .beta-cta-mini-row {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.beta-cta-home .beta-mini-card {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 18px 14px 16px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.beta-cta-home .beta-mini-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
}

.beta-cta-home .beta-mini-radial {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
}

.beta-cta-home .beta-mini-radial svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.beta-cta-home .beta-mini-radial .radial-track {
    stroke: rgba(0, 0, 0, 0.08);
    fill: none;
}

.beta-cta-home .beta-mini-radial .radial-fill {
    fill: none;
    stroke-linecap: round;
    transition: stroke-dashoffset .8s ease, stroke .3s ease;
}

.beta-cta-home .beta-mini-radial .radial-fill.low    { stroke: var(--beta-ok); }
.beta-cta-home .beta-mini-radial .radial-fill.medium { stroke: var(--beta-warn); }
.beta-cta-home .beta-mini-radial .radial-fill.high   { stroke: var(--beta-danger); }

.beta-cta-home .beta-mini-radial-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #1f2937;
}

.beta-cta-home .beta-mini-logo-fallback {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a1a2e, #3663d8);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0 12px;
}

/* Real project logo rendered instead of the letter fallback. Keep the same
   56×56 footprint so swapping between logo/fallback never shifts the card. */
.beta-cta-home .beta-mini-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
    padding: 6px;
    margin: 6px 0 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.beta-cta-home .beta-mini-title {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 6px;
}

.beta-cta-home .beta-mini-quota {
    font-size: 12px;
    font-weight: 600;
    color: var(--beta-text-muted);
    background: #f3f4f6;
    border-radius: 999px;
    padding: 3px 10px;
}

@media (max-width: 575px) {
    .beta-cta-home .beta-mini-card {
        min-height: 160px;
        padding: 16px 10px 14px;
    }
    .beta-cta-home .beta-mini-logo-fallback {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    .beta-cta-home .beta-mini-title {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .beta-cta-home .beta-mini-card,
    .beta-cta-home .beta-mini-radial .radial-fill {
        transition: none !important;
    }
    .beta-cta-home .beta-mini-card:hover { transform: none; }
}
