/* ==========================================================================
   ENSŌ · Sistema de diseño compartido
   Fuente canónica: identidad visual del landing (index.php)
   Usado por: index.php · welcome.php · login.php · app.php
   ========================================================================== */

:root {
    --bg-color: #0b0d12;
    --bg-secondary: #121620;
    --surface-color: #171c26;
    --surface-card: #1c2230;
    --surface-hover: #242c3d;

    --primary-color: #00e676;          /* Verde neón */
    --primary-glow: rgba(0, 230, 118, 0.35);
    --primary-dim: rgba(0, 230, 118, 0.1);

    --accent-blue: #00b0ff;
    --accent-purple: #7c4dff;
    --accent-amber: #ffb300;
    --danger-color: #ff4d4d;

    --text-main: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 230, 118, 0.3);

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --shadow-glow: 0 10px 40px rgba(0, 230, 118, 0.2);
    --wa-green: #25d366;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 12%, rgba(0, 230, 118, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 55%, rgba(0, 176, 255, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(124, 77, 255, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, .brand-font {
    font-family: 'Outfit', 'Inter', sans-serif;
}

a { color: inherit; }
img { max-width: 100%; }

/* --- Logo ENSŌ (marca animada) --- */
.enso-svg-container {
    width: 38px;
    height: 38px;
    position: relative;
    flex-shrink: 0;
}

/* Marca de dos anillos concéntricos segmentados, girando en sentidos opuestos.
   Reconstrucción del isotipo oficial de ENSŌ. */
.enso-mark { display: block; width: 100%; height: 100%; overflow: visible; }

.enso-mark circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-linecap: round;
    transform-origin: 50% 50%;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

.enso-mark .ring-outer {
    stroke-width: 7;
    stroke-dasharray: 19.5 5.5;                   /* 4 arcos + 4 cortes (pathLength=100) */
    animation: ensoSpinCW 14s linear infinite, ensoGlow 3.2s ease-in-out infinite alternate;
}

.enso-mark .ring-inner {
    stroke-width: 7;
    stroke-dasharray: 44 6;                       /* 2 arcos + 2 cortes (pathLength=100) */
    opacity: 0.9;
    animation: ensoSpinCCW 9s linear infinite;
}

@keyframes ensoSpinCW  { to { transform: rotate(360deg); } }
@keyframes ensoSpinCCW { to { transform: rotate(-360deg); } }
@keyframes ensoGlow {
    from { filter: drop-shadow(0 0 4px var(--primary-glow)); }
    to   { filter: drop-shadow(0 0 12px var(--primary-color)); }
}

/* Compat: SVGs antiguos que aún usen .enso-circle / .enso-circle-inner */
.enso-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 40;
    filter: drop-shadow(0 0 10px var(--primary-color));
    animation: ensoSpinCW 18s linear infinite;
    transform-origin: center;
}
.enso-circle-inner {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0.35;
    transform-origin: center;
    animation: ensoSpinCCW 10s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .enso-mark .ring-outer, .enso-mark .ring-inner,
    .enso-circle, .enso-circle-inner { animation: none; }
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1;
}

.brand-name span { color: var(--primary-color); }

/* --- Botones --- */
.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00b848 100%);
    color: #04150b;
    box-shadow: 0 10px 25px rgba(0, 230, 118, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 230, 118, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.btn-ghost {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}
.btn-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-dim);
}

.btn-block { width: 100%; }

/* --- Píldoras / badges --- */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.25);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Superficies --- */
.surface-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
}

/* --- Campos de formulario --- */
.field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.field-input,
.field-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input:focus,
.field-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-dim);
}

.field-select option {
    background-color: var(--surface-color);
    color: var(--text-main);
}

/* --- Utilidades --- */
[hidden] { display: none !important; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.spin { animation: ensoSpin 1s linear infinite; }
@keyframes ensoSpin { to { transform: rotate(360deg); } }
