/* ==========================================================================
   DITIO PLAY Â· base
   Tokens, reset, tipografÃ­a, botones, formularios y utilidades.
   ========================================================================== */

:root {
    --bg: #08090a;
    --bg-soft: #0b0c0e;
    --surface: #0d0e10;
    --surface-2: #111215;
    --surface-3: #17181c;
    --line: rgba(244, 241, 234, .13);
    --line-strong: rgba(244, 241, 234, .27);
    --text: #f4f1ea;
    --muted: #9b978e;
    --muted-2: #6c6962;
    --brand: #ff4d2e;
    --brand-ink: #150400;
    --cyan: #6ee7ff;
    --violet: #a78bfa;
    --orange: #ff8a4c;
    --pink: #ff6ea9;
    --danger: #ff5c7a;
    --success: #4ade80;
    --warning: #fbbf24;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
    --header-h: 74px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
video,
canvas {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

svg {
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.025em;
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

figure {
    margin: 0;
}

::selection {
    background: var(--brand);
    color: var(--brand-ink);
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Utilidades
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: 1260px;
    margin-inline: auto;
    padding-inline: 28px;
}

.container--narrow {
    max-width: 860px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

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

.section {
    padding-block: 64px;
}

.section--tight {
    padding-block: 40px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--brand);
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-head h2 {
    margin-top: 10px;
    font-size: clamp(26px, 3vw, 38px);
}

.section-head p {
    margin-top: 8px;
    color: var(--muted);
    max-width: 560px;
    font-size: 14px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: color .2s, border-color .2s, background .2s;
}

.section-link:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, .04);
}

.section-link svg {
    width: 15px;
    height: 15px;
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

.btn {
    --btn-bg: transparent;
    --btn-color: var(--text);
    --btn-border: var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-color);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform .18s ease, background .2s, border-color .2s, color .2s, box-shadow .2s;
}

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

.btn:active {
    transform: translateY(0);
}

.btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.btn-primary {
    --btn-bg: var(--brand);
    --btn-color: var(--brand-ink);
    --btn-border: var(--brand);
    box-shadow: 0 10px 32px -12px rgba(255, 77, 46, .55);
}

.btn-primary:hover {
    box-shadow: 0 16px 38px -14px rgba(255, 77, 46, .7);
    filter: brightness(1.03);
}

.btn-ghost {
    --btn-bg: rgba(255, 255, 255, .04);
    --btn-color: var(--text);
    --btn-border: var(--line);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    --btn-bg: rgba(255, 255, 255, .08);
    --btn-border: var(--line-strong);
}

.btn-dark {
    --btn-bg: #0b1220;
    --btn-color: var(--text);
    --btn-border: var(--line);
}

.btn-danger {
    --btn-bg: rgba(255, 92, 122, .12);
    --btn-color: #ff9db0;
    --btn-border: rgba(255, 92, 122, .35);
}

.btn-danger:hover {
    --btn-bg: rgba(255, 92, 122, .2);
}

.btn-sm {
    padding: 9px 15px;
    font-size: 12.5px;
}

.btn-lg {
    padding: 15px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn[disabled],
.btn.is-disabled {
    opacity: .55;
    pointer-events: none;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    transition: color .2s, background .2s, border-color .2s;
}

.icon-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .09);
    border-color: var(--line-strong);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */

.field {
    display: grid;
    gap: 8px;
}

.field > label,
.field-label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #c8d3e6;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(8, 13, 23, .75);
    color: var(--text);
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--muted-2);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: rgba(255, 77, 46, .55);
    box-shadow: 0 0 0 4px rgba(255, 77, 46, .1);
    background: rgba(8, 13, 23, .95);
}

.textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.65;
}

.select {
    appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3bd' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.help {
    font-size: 12px;
    color: var(--muted-2);
    line-height: 1.5;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.check input {
    appearance: none;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid var(--line);
    position: relative;
    transition: background .2s;
    cursor: pointer;
    flex-shrink: 0;
}

.check input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: transform .2s, background .2s;
}

.check input:checked {
    background: var(--brand);
    border-color: var(--brand);
}

.check input:checked::after {
    transform: translateX(16px);
    background: var(--brand-ink);
}

/* --------------------------------------------------------------------------
   Badges, estrellas, avisos
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .05);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--muted);
    line-height: 1.5;
    white-space: nowrap;
}

.badge--brand {
    background: rgba(255, 77, 46, .12);
    border-color: rgba(255, 77, 46, .3);
    color: var(--brand);
}

.badge--live {
    background: rgba(255, 92, 122, .14);
    border-color: rgba(255, 92, 122, .35);
    color: #ff9db0;
}

.badge--soon {
    background: rgba(110, 231, 255, .12);
    border-color: rgba(110, 231, 255, .3);
    color: var(--cyan);
}

.badge--past {
    background: rgba(148, 163, 184, .1);
    border-color: var(--line);
    color: var(--muted);
}

.badge--draft {
    background: rgba(251, 191, 36, .12);
    border-color: rgba(251, 191, 36, .3);
    color: var(--warning);
}

.stars {
    --rating: 0%;
    position: relative;
    display: inline-block;
    font-size: 13px;
    letter-spacing: 2px;
    line-height: 1;
    white-space: nowrap;
}

.stars__base {
    color: rgba(148, 163, 184, .35);
}

.stars__fill {
    position: absolute;
    inset: 0;
    width: var(--rating);
    overflow: hidden;
    color: var(--brand);
}

.alert {
    display: flex;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    font-size: 13.5px;
    line-height: 1.55;
}

.alert--error {
    border-color: rgba(255, 92, 122, .35);
    background: rgba(255, 92, 122, .1);
    color: #ffc2cd;
}

.alert--ok {
    border-color: rgba(74, 222, 128, .3);
    background: rgba(74, 222, 128, .1);
    color: #b6f5c9;
}

.alert--info {
    border-color: rgba(110, 231, 255, .28);
    background: rgba(110, 231, 255, .08);
    color: #c5f4ff;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: grid;
    gap: 10px;
    max-width: min(380px, calc(100vw - 40px));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(14, 21, 34, .96);
    box-shadow: var(--shadow);
    font-size: 13.5px;
    animation: toast-in .25s ease both;
    backdrop-filter: blur(12px);
}

.toast--ok { border-color: rgba(74, 222, 128, .35); }
.toast--error { border-color: rgba(255, 92, 122, .4); }
.toast--info { border-color: rgba(110, 231, 255, .35); }

.toast__dot {
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--brand);
    flex-shrink: 0;
}

.toast--error .toast__dot { background: var(--danger); }
.toast--info .toast__dot { background: var(--cyan); }

.toast.is-out {
    animation: toast-out .25s ease both;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(6px); }
}

/* --------------------------------------------------------------------------
   AnimaciÃ³n de entrada
   -------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive bÃ¡sico
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
    .container { padding-inline: 18px; }
    .section { padding-block: 46px; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .form-row { grid-template-columns: 1fr; }
    .toast-stack { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}

button:disabled,
.btn:disabled,
.row-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

