/* =========================================================
   CONTAMAKE — Gates (login / signup / pagar / thanks / success)
   Estilo alineado con contamake-web (dark theme, Syne+DM Sans,
   verde Contamake como acento). Mismo :root.
   ========================================================= */

:root {
    --black: #0a0e0c;
    --white: #f5f3ef;
    --accent: #66C98E;
    --accent-bright: #7ED9A4;
    --accent-soft: rgba(102, 201, 142, 0.10);
    --accent-glow: rgba(102, 201, 142, 0.25);
    --accent2: #2563eb;
    --gray: #14181a;
    --gray2: #1c2123;
    --gray3: #252b2e;
    --bg: var(--black);
    --bg-card: var(--gray);
    --text: var(--white);
    --muted: #8a8f8d;
    --muted2: #b6b9b7;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --warn: #f39c12;
    --danger: #ff5555;
    --ok: #66C98E;
    --nav-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--black);
    color: var(--white);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: 'Syne', sans-serif; letter-spacing: -0.5px; }
a { color: inherit; text-decoration: none; }

/* Fondo: negro puro como contamake-web. Sin gradientes decorativos. */

/* =========================================================
   TOP BAR (logo only — gates no necesitan nav completo)
   ========================================================= */
.gate-topbar {
    position: relative;
    z-index: 10;
    padding: 18px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 14, 12, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    min-height: var(--nav-h);
}
.gate-topbar .gate-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.gate-topbar .gate-logo img { height: 26px; vertical-align: middle; }
.gate-topbar .gate-topbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.88rem;
    color: var(--muted);
}
.gate-topbar .gate-topbar-actions a { color: var(--muted2); transition: color 0.15s; }
.gate-topbar .gate-topbar-actions a:hover { color: var(--white); }

/* =========================================================
   LAYOUT
   ========================================================= */
.gate-main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}
.gate-main > * { width: 100%; }
/* Para layouts split (signup) y wide (pagar) que no deben centrarse vertical */
.gate-main.gate-main-top { align-items: flex-start; padding-top: 3rem; padding-bottom: 3rem; }
.gate-container-centered {
    max-width: 480px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease-out;
}
.gate-container-split {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 3.5rem;
    align-items: start;
    animation: fadeInUp 0.5s ease-out;
}
.gate-container-wide {
    max-width: 1180px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease-out;
}
@media (max-width: 880px) {
    .gate-container-split { grid-template-columns: 1fr; gap: 2rem; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   CARDS
   ========================================================= */
.gate-card {
    background: var(--gray);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.gate-card-lg { padding: 2.5rem; }
.gate-card-narrow { max-width: 460px; margin: 0 auto; }
.gate-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}
.gate-card .gate-sub {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 1.75rem;
}
.gate-card .gate-brand-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}
.gate-card .gate-brand-logo img { height: 36px; display: inline-block; }

/* =========================================================
   FORM FIELDS
   ========================================================= */
.gate-field {
    margin-bottom: 1.1rem;
}
.gate-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.4rem;
    font-family: 'Syne', sans-serif;
}
.gate-field label .req { color: var(--accent); }
.gate-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
@media (max-width: 480px) { .gate-field-row { grid-template-columns: 1fr; } }
.gate-field input,
.gate-field select,
.gate-field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--gray2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
}
.gate-field input:focus,
.gate-field select:focus,
.gate-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--gray3);
}
.gate-field input::placeholder,
.gate-field textarea::placeholder { color: var(--muted); }
.gate-field textarea { resize: vertical; min-height: 90px; }
.gate-field-hint {
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 0.4rem;
}
.gate-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.4rem 0 1.4rem;
    font-size: 0.85rem;
    color: var(--muted2);
    line-height: 1.5;
}
.gate-check input[type="checkbox"] {
    width: auto;
    margin-top: 0.15rem;
    accent-color: var(--accent);
}
.gate-check a { color: var(--accent); text-decoration: underline; }

/* =========================================================
   BUTTONS
   ========================================================= */
.gate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.4rem;
    border: none;
    border-radius: 10px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s, background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.gate-btn-primary {
    background: var(--accent);
    color: var(--black);
    box-shadow: 0 0 30px var(--accent-glow);
}
.gate-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 40px var(--accent-glow);
    color: var(--black);
}
.gate-btn-ghost {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border-strong);
}
.gate-btn-ghost:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--white);
}
.gate-btn-block { width: 100%; }
.gate-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* =========================================================
   ALERTS / BANNERS
   ========================================================= */
.gate-alert {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    border-radius: 12px;
    border: 1px solid;
    background: var(--gray2);
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    line-height: 1.45;
}
.gate-alert .gate-alert-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.gate-alert-info {
    border-color: rgba(102, 201, 142, 0.30);
    background: rgba(102, 201, 142, 0.07);
}
.gate-alert-info .gate-alert-icon { background: rgba(102, 201, 142, 0.18); color: var(--accent-bright); }
.gate-alert-warning {
    border-color: rgba(243, 156, 18, 0.35);
    background: rgba(243, 156, 18, 0.08);
}
.gate-alert-warning .gate-alert-icon { background: rgba(243, 156, 18, 0.20); color: #FFB84D; }
.gate-alert-danger {
    border-color: rgba(255, 85, 85, 0.35);
    background: rgba(255, 85, 85, 0.08);
}
.gate-alert-danger .gate-alert-icon { background: rgba(255, 85, 85, 0.20); color: #FF8888; }

/* =========================================================
   FOOTER (bottom bar estilo contamake-web)
   ========================================================= */
.gate-footer {
    position: relative;
    z-index: 1;
    padding: 1.1rem 5%;
    border-top: 1px solid var(--border);
    background: rgba(10, 14, 12, 0.6);
    color: var(--muted);
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}
.gate-footer a {
    color: var(--muted2);
    text-decoration: none;
    transition: color 0.15s;
}
.gate-footer a:hover { color: var(--white); }
.gate-footer-credit a { color: var(--white); text-decoration: none; font-weight: 600; }
.gate-footer-credit a:hover { color: var(--accent); }
.gate-footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.gate-footer-links a { font-size: 0.8rem; }
@media (max-width: 580px) {
    .gate-footer { flex-direction: column; text-align: center; padding: 1.1rem 1rem; }
    .gate-footer-links { justify-content: center; gap: 1rem; }
}

/* =========================================================
   SPINNER / LOADING
   ========================================================= */
.gate-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(102, 201, 142, 0.20);
    border-top-color: var(--accent);
    animation: gate-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}
.gate-spinner-sm { width: 18px; height: 18px; border-width: 2px; margin: 0; display: inline-block; }
@keyframes gate-spin { to { transform: rotate(360deg); } }
.gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 12, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.gate-overlay.show { display: flex; }
.gate-overlay .gate-overlay-card {
    background: var(--gray);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.gate-overlay p {
    color: var(--muted2);
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
}

/* =========================================================
   STATE CARDS (loading / error fullscreen)
   ========================================================= */
.gate-state-card {
    background: var(--gray);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.gate-state-card .gate-state-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 2.2rem;
}
.gate-state-card.success .gate-state-icon { background: rgba(102, 201, 142, 0.18); color: var(--accent-bright); }
.gate-state-card.warning .gate-state-icon { background: rgba(243, 156, 18, 0.20); color: #FFB84D; }
.gate-state-card.danger  .gate-state-icon { background: rgba(255, 85, 85, 0.20);  color: #FF8888; }
.gate-state-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}
.gate-state-card p {
    color: var(--muted2);
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

/* =========================================================
   PLAN CARDS (pagar.html)
   ========================================================= */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}
@media (max-width: 991px) {
    .plans-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
}
.plan-card {
    position: relative;
    background: var(--gray);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}
.plan-card.featured {
    border-color: var(--accent);
    box-shadow: 0 24px 60px rgba(102, 201, 142, 0.18);
}
.plan-card .plan-ribbon {
    position: absolute;
    top: 14px;
    right: -38px;
    background: linear-gradient(135deg, var(--accent), var(--accent-bright));
    color: var(--black);
    padding: 5px 42px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-family: 'Syne', sans-serif;
    transform: rotate(38deg);
    box-shadow: 0 4px 14px rgba(102, 201, 142, 0.4);
}
.plan-card .plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.1rem;
    font-family: 'Syne', sans-serif;
}
.plan-card .plan-users {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}
.plan-card .plan-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}
.plan-card .plan-currency { color: var(--accent-bright); font-weight: 600; font-size: 1rem; }
.plan-card .plan-price {
    color: var(--white);
    font-weight: 800;
    font-size: 2.3rem;
    line-height: 1;
    font-family: 'Syne', sans-serif;
}
.plan-card .plan-period { color: var(--muted); font-size: 0.9rem; }
.plan-card .plan-iva { color: var(--muted); font-size: 0.74rem; margin-bottom: 1.5rem; }
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}
.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.3rem 0;
    color: var(--muted2);
    font-size: 0.9rem;
    line-height: 1.4;
}
.plan-features li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 3px;
}
.providers {
    border-top: 1px solid var(--border);
    padding-top: 1.1rem;
}
.providers-label {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}
.btn-provider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.55rem;
    border: 1px solid var(--border);
    background: var(--gray2);
    border-radius: 10px;
    color: var(--white);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
}
.btn-provider:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--gray3);
    transform: translateY(-1px);
}
.btn-provider:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--gray2);
}
.btn-provider .provider-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex: 1;
}
.btn-provider .provider-text small {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.72rem;
    margin-top: 2px;
}
.btn-provider .soon-badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted2);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

/* ---- Brand logos en botones de proveedor ---- */
.btn-provider .provider-brand-img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}
.btn-stripe .provider-brand-img {
    background: #635BFF;
    padding: 0;
    object-fit: cover;
}
