/* ============================================================
   Immediate experience chooser
   ============================================================ */
html.skip-entry-experience .portal-choice {
    display: none !important;
}

body.portal-choice-open {
    overflow: hidden;
}

.portal-choice {
    position: fixed;
    inset: 0;
    z-index: 99998;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(1.25rem, 4vw, 3.5rem);
    overflow: auto;
    color: #f8fafc;
    background:
        radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.2), transparent 34%),
        radial-gradient(circle at 85% 84%, rgba(99, 102, 241, 0.24), transparent 38%),
        linear-gradient(145deg, #020617 0%, #071426 52%, #020617 100%);
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.portal-choice:focus { outline: none; }

.portal-choice.active {
    pointer-events: auto;
}

.portal-choice.leaving {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.portal-choice-grid {
    position: fixed;
    inset: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.portal-choice-glow {
    position: fixed;
    width: min(42vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.2;
    pointer-events: none;
}

.portal-choice-glow-one { top: -15%; left: -10%; background: #0ea5e9; }
.portal-choice-glow-two { right: -10%; bottom: -22%; background: #6366f1; }

.portal-choice-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1050px);
    display: grid;
    justify-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
}

.portal-choice.active .portal-choice-shell {
    opacity: 1;
    transform: none;
}

.portal-choice-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: clamp(2.3rem, 6vh, 4rem);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.26em;
}

.portal-choice-mark {
    width: 2.5rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(125, 211, 252, 0.45);
    border-radius: 0.8rem;
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.1);
    box-shadow: inset 0 0 18px rgba(14, 165, 233, 0.12), 0 0 30px rgba(14, 165, 233, 0.08);
    letter-spacing: 0;
}

.portal-choice-copy { max-width: 760px; }

.portal-choice-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    color: #7dd3fc;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.portal-choice h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5.4vw, 4.25rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.portal-choice-copy p {
    max-width: 620px;
    margin: 1.25rem auto 0;
    color: #94a3b8;
    font-family: 'Inter', 'Outfit', sans-serif;
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    line-height: 1.7;
}

.portal-choice-options {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: clamp(2rem, 5vh, 3.5rem);
}

.portal-option {
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.5rem;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    text-align: left;
    font-family: 'Inter', 'Outfit', sans-serif;
    cursor: pointer;
    appearance: none;
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.portal-option:hover,
.portal-option:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(125, 211, 252, 0.52);
    background: rgba(15, 35, 60, 0.9);
    box-shadow: 0 22px 60px rgba(2, 8, 23, 0.38), 0 0 0 1px rgba(56, 189, 248, 0.08);
    outline: none;
}

.portal-option-learning:hover,
.portal-option-learning:focus-visible { border-color: rgba(34, 211, 238, 0.58); }
.portal-option-development:hover,
.portal-option-development:focus-visible { border-color: rgba(129, 140, 248, 0.62); }

.portal-option-number {
    align-self: start;
    color: #64748b;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.portal-option-icon {
    width: 3.25rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.22), rgba(99, 102, 241, 0.12));
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}

.portal-option-development .portal-option-icon {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.24), rgba(139, 92, 246, 0.12));
}

.portal-option-icon svg {
    width: 1.55rem;
    height: 1.55rem;
    fill: none;
    stroke: #7dd3fc;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-option-development .portal-option-icon svg { stroke: #a5b4fc; }

.portal-option-content {
    min-width: 0;
    display: grid;
    gap: 0.4rem;
}

.portal-option-content strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.2rem, 2.3vw, 1.55rem);
}

.portal-option-content > span {
    color: #94a3b8;
    font-size: 0.86rem;
    line-height: 1.45;
}

.portal-option-arrow {
    display: grid;
    place-items: center;
    width: 2.2rem;
    aspect-ratio: 1;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 1rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.portal-option:hover .portal-option-arrow,
.portal-option:focus-visible .portal-option-arrow {
    transform: rotate(45deg);
    background: rgba(56, 189, 248, 0.12);
}

.portal-choice-note {
    margin-top: clamp(1.8rem, 4vh, 2.8rem);
    color: #64748b;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .portal-choice { align-items: start; }
    .portal-choice-shell { margin-block: auto; }
    .portal-choice-brand { margin-bottom: 2rem; }
    .portal-choice-options { grid-template-columns: 1fr; }
    .portal-option { grid-template-columns: auto auto 1fr auto; }
}

@media (max-width: 430px) {
    .portal-choice { padding: 1.1rem; }
    .portal-choice-copy p { line-height: 1.55; }
    .portal-option { gap: 0.75rem; padding: 1rem; border-radius: 1.2rem; }
    .portal-option-number { display: none; }
    .portal-option-icon { width: 2.75rem; }
    .portal-option-content > span { font-size: 0.78rem; }
    .portal-choice-note { margin-top: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-choice,
    .portal-choice-shell,
    .portal-option,
    .portal-option-arrow { animation: none !important; transition-duration: 0.01ms !important; }
    .portal-choice.active .portal-choice-shell { opacity: 1; transform: none; }
}

/* ============================================================
   Mobile viewport hardening
   ============================================================ */
@media (max-width: 720px) {
    .portal-choice {
        min-height: 100dvh;
        padding:
            max(1rem, env(safe-area-inset-top))
            max(1rem, env(safe-area-inset-right))
            max(1rem, env(safe-area-inset-bottom))
            max(1rem, env(safe-area-inset-left));
        overscroll-behavior: contain;
    }

    .portal-choice-shell { width: 100%; min-width: 0; padding-block: 0.5rem; }
    .portal-choice-copy { width: 100%; min-width: 0; }
    .portal-choice h2 { font-size: clamp(1.85rem, 9vw, 2.8rem); overflow-wrap: break-word; }
    .portal-choice-copy p { max-width: 34rem; font-size: 0.95rem; }
    .portal-choice-options { min-width: 0; }
    .portal-option { min-height: 5.5rem; grid-template-columns: auto auto minmax(0, 1fr) auto; }
    .portal-option-content,
    .portal-option-content strong,
    .portal-option-content > span { min-width: 0; overflow-wrap: anywhere; }
    .portal-option-content > span { font-size: 0.86rem; }
}

@media (max-width: 430px) {
    .portal-choice-brand { margin-bottom: 1.5rem; }
    .portal-choice-kicker { margin-bottom: 0.75rem; font-size: 0.72rem; line-height: 1.45; }
    .portal-choice-copy p { margin-top: 0.9rem; }
    .portal-choice-options { margin-top: 1.4rem; }
    .portal-option { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 0; }
    .portal-option-icon { flex-shrink: 0; }
    .portal-option-content strong { font-size: 1.08rem; }
    .portal-choice-note { font-size: 0.7rem; line-height: 1.5; }
}

@media (max-height: 660px) and (max-width: 720px) {
    .portal-choice { place-items: start center; }
    .portal-choice-shell { margin-block: auto; }
    .portal-choice-brand { margin-bottom: 1.2rem; }
    .portal-choice-options { margin-top: 1.15rem; }
    .portal-choice-note { margin-top: 1rem; }
}
