:root {
    --bg: #f3f4f6;
    --fg: #1f2937;
    --muted: #6b7280;
    --accent: #1d4ed8;
    --accent-hover: #1e40af;
    --error: #b91c1c;
    --border: #d1d5db;
    --card: #ffffff;
    --landing-yellow: #f5c518;
    --landing-overlay: rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--fg);
    background: linear-gradient(160deg, #e8eef7 0%, var(--bg) 45%, #ece7df 100%);
    min-height: 100vh;
}

.wrap {
    max-width: 28rem;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

h1 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.lead {
    color: var(--muted);
    margin: 0 0 1.5rem;
    font-size: 1rem;
}

.form {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
}

.form label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.95rem;
}

.form input {
    font: inherit;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    background: #fff;
}

.form button {
    font: inherit;
    padding: 0.65rem 1rem;
    border: 0;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.form button:hover {
    background: var(--accent-hover);
}

.error {
    color: var(--error);
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.65rem 0.75rem;
    margin: 0 0 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* —— Landing hero —— */
body.landing {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    background: #111;
    min-height: 100dvh;
    overflow-x: hidden;
}

.landing-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: #1a1a1a;
    background-image: linear-gradient(var(--landing-overlay), var(--landing-overlay)),
        url("hero.webp");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.landing-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vh, 1.75rem);
    min-height: 100dvh;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vh, 2.5rem) clamp(1rem, 4vw, 2rem);
    text-align: center;
}

.landing .logo {
    display: block;
    width: clamp(7.5rem, 28vw, 13.75rem);
    height: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 2em 0;
}

.landing-title {
    margin: 0;
    font-size: clamp(1.25rem, 3.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: #fff;
    text-align: left;
    text-wrap: balance;
}

.landing-error {
    width: 100%;
    max-width: 36rem;
    text-align: left;
}

.landing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.75rem);
    width: 100%;
    align-items: start;
    text-align: left;
}

.landing-copy {
    display: grid;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    line-height: 1.55;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid var(--landing-yellow);
    box-shadow: 0 0 0 1px rgba(245, 197, 24, 0.45), 0 0 12px rgba(245, 197, 24, 0.55);
}

.landing-copy p {
    margin: 0;
}

.landing-copy strong {
    font-weight: 700;
}

.landing-legal {
    font-size: clamp(0.65rem, 1.6vw, 0.72rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.landing-form-col {
    width: 100%;
}

.landing-form-title {
    margin: 1.5rem 0 0.8rem;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #fff;
    text-align: left;
    line-height: 1.6;
}

.landing-form-hint {
    margin: 0;
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    color: rgba(255, 255, 255, 0.75);
    text-align: left;
}

.landing-form {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    max-width: none;
}

.landing-form label {
    display: block;
    width: 100%;
}

.landing-form label.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
}

.landing-form input[type="text"],
.landing-form input[type="email"],
.landing-form input[type="tel"] {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255);
    border-radius: 0.5rem;
    color: #111;
    outline: none;
}

.landing-form input[type="text"]::placeholder,
.landing-form input[type="email"]::placeholder,
.landing-form input[type="tel"]::placeholder {
    color: rgba(17, 17, 17, 0.55);
}

.landing-form input[type="text"]:focus,
.landing-form input[type="email"]:focus,
.landing-form input[type="tel"]:focus {
    border-color: var(--landing-yellow);
    box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.45);
    background: #fff;
}

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    text-align: left;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    line-height: 1.4;
    cursor: pointer;
}

.privacy-check input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    margin-left: 0;
    flex-shrink: 0;
    accent-color: var(--landing-yellow);
}

.privacy-check a {
    color: var(--landing-yellow);
    text-decoration: underline;
}

.privacy-check a:hover {
    color: #ffe066;
}

.privacy-check-text {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.privacy-check-block {
    display: block;
}

.turnstile-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-adelante {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.35rem;
    padding: 0.7rem 1.25rem;
    font: inherit;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
    text-decoration: none;
    color: #111;
    background: #fff;
    border: 2px solid var(--landing-yellow);
    border-radius: 0.4rem;
    box-shadow: 0 0 0 1px rgba(245, 197, 24, 0.45), 0 0 12px rgba(245, 197, 24, 0.55);
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-adelante:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-adelante:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-adelante.btn-inicio {
    background: #111;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: none;
}

.btn-adelante.btn-inicio:hover {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.65);
}

.btn-adelante-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #111;
    color: #fff;
    flex-shrink: 0;
}

.btn-adelante-icon::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin-left: 0.1rem;
    border-style: solid;
    border-width: 0.28rem 0 0.28rem 0.4rem;
    border-color: transparent transparent transparent #fff;
}

@media (max-height: 560px) {
    .landing-content {
        justify-content: flex-start;
        padding-top: clamp(2.5rem, 6vh, 3.5rem);
        padding-bottom: 1.5rem;
    }
}

@media (min-width: 768px) {
    .landing-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 2rem;
        align-items: start;
    }

    .landing-form {
        gap: 0.85rem;
    }
}

@media (min-width: 1024px) {
    .landing-grid {
        gap: 2.75rem;
    }
}

.result-page .result-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(1.25rem, 4vh, 2.5rem) clamp(1rem, 4vw, 1.75rem);
    box-sizing: border-box;
}

.result-card {
    width: 100%;
    max-width: 36rem;
    display: grid;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid var(--landing-yellow);
    box-shadow: 0 0 0 1px rgba(245, 197, 24, 0.45), 0 0 12px rgba(245, 197, 24, 0.55);
    color: #fff;
    text-align: left;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.result-page .result-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
}

.result-page .result-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    line-height: 1.5;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.5rem 0 0;
}

.result-page .result-actions .btn-adelante {
    margin-top: 0;
    font-family: inherit;
}

.btn {
    display: inline-block;
    font: inherit;
    padding: 0.65rem 1rem;
    border: 0;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: #fff;
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f9fafb;
}

.player-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #111827;
}

.player-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: #1f2937;
    color: #f9fafb;
    font-family: system-ui, sans-serif;
    font-size: 0.9rem;
}

.player-bar a.player-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #fff;
    text-decoration: none;
    border-radius: 0.25rem;
}

.player-bar a.player-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.player-close-icon {
    position: relative;
    display: block;
    width: 1rem;
    height: 1rem;
}

.player-close-icon::before,
.player-close-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.player-close-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.player-close-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.scorm-frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: #fff;
}
