/* 
 * Alan Falomir "El Cabrito" - Sistema de Estilos Glassmorfismo Premium
 */

/* -------------------------------------------------------------
 * 1. VARIABLES & RESET
 * ------------------------------------------------------------- */
:root {
    --bg-dark: #040814;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --accent-blue: #0d6efd;
    --accent-indigo: #4f46e5;
    --accent-whatsapp: #25d366;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-inner-bg: rgba(3, 7, 18, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-highlight: rgba(255, 255, 255, 0.12);
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --ease-physical: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-diffused: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    color-scheme: dark;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* -------------------------------------------------------------
 * 2. BACKGROUNDS & TEXTURE
 * ------------------------------------------------------------- */
.mesh-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.35;
    mix-blend-mode: screen;
    will-change: transform;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, var(--accent-blue) 0%, rgba(13, 110, 253, 0) 70%);
    animation: orbFloat 35s infinite alternate ease-in-out;
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, var(--accent-indigo) 0%, rgba(79, 70, 229, 0) 70%);
    animation: orbFloat 40s infinite alternate-reverse ease-in-out;
}

.orb-3 {
    top: 35%;
    left: 25%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
    animation: orbFloat 25s infinite alternate ease-in-out;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -60px) scale(1.08); }
    100% { transform: translate(-40px, 40px) scale(0.92); }
}

.noise-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: -1;
}

/* -------------------------------------------------------------
 * 3. LAYOUT & GRID (Bento System)
 * ------------------------------------------------------------- */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Bento Spans */
.col-span-2 { grid-column: span 2 / span 2; }
.row-span-2 { grid-row: span 2 / span 2; }

/* -------------------------------------------------------------
 * 4. GLASSMORPHISM & DOUBLE BEZEL (Doppelrand)
 * ------------------------------------------------------------- */
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 6px; /* double bezel padding */
    border-radius: 28px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-diffused);
    transition: transform 0.6s var(--ease-physical), border-color 0.6s var(--ease-physical), box-shadow 0.6s var(--ease-physical);
    overflow: hidden;
}

.bento-card-inner {
    background: var(--card-inner-bg);
    border-radius: calc(28px - 6px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow-inner);
    width: 100%;
    height: 100%;
}

/* Hover Physics */
.bento-card:hover {
    border-color: rgba(13, 110, 253, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(13, 110, 253, 0.15);
}

.bento-card.highlight-card {
    border-color: rgba(37, 211, 102, 0.2);
}
.bento-card.highlight-card:hover {
    border-color: rgba(37, 211, 102, 0.4);
    box-shadow: 0 25px 50px -12px rgba(37, 211, 102, 0.15);
}

/* -------------------------------------------------------------
 * 5. PROFILE & HEADER
 * ------------------------------------------------------------- */
.profile-image-wrapper {
    width: 140px;
    height: 140px;
    padding: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.profile-image-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
}

.badge-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

.candidate-name {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-light);
}

.candidate-nickname {
    font-family: var(--font-display);
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa 30%, #3b82f6 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* -------------------------------------------------------------
 * 6. CARD COMPONENTS & TYPOGRAPHY
 * ------------------------------------------------------------- */
.card-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--accent-blue);
}

.card-eyebrow.text-accent {
    color: var(--accent-whatsapp);
}

.text-display {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

.text-muted {
    color: var(--text-muted);
}

.text-sm { font-size: 0.875rem; }
.leading-relaxed { line-height: 1.625; }

/* -------------------------------------------------------------
 * 7. BUTTONS & ACTIONS
 * ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 10px 24px;
    border-radius: 9999px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease-physical);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: transform 0.4s var(--ease-physical);
}

.btn-primary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.btn-primary .btn-icon-circle {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--text-light);
    color: var(--bg-dark);
    border-color: var(--text-light);
}

.btn-primary:hover .btn-icon-circle {
    background: var(--bg-dark);
    color: var(--text-light);
}

.btn-whatsapp {
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.2);
    color: var(--text-light);
}

.btn-whatsapp .btn-icon-circle {
    background: var(--accent-whatsapp);
    color: var(--bg-dark);
}

.btn-whatsapp:hover {
    background: var(--accent-whatsapp);
    color: var(--bg-dark);
    border-color: var(--accent-whatsapp);
    box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover .btn-icon-circle {
    background: var(--bg-dark);
    color: var(--accent-whatsapp);
}

.btn-submit {
    background: var(--accent-blue);
    color: var(--text-light);
    border: 1px solid var(--accent-blue);
}

.btn-submit .btn-icon-circle {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

.btn-submit:hover {
    background: var(--text-light);
    color: var(--bg-dark);
    border-color: var(--text-light);
    box-shadow: 0 10px 25px -5px rgba(13, 110, 253, 0.35);
}

.btn-submit:hover .btn-icon-circle {
    background: var(--bg-dark);
    color: var(--accent-blue);
}

/* -------------------------------------------------------------
 * 8. SOCIAL LIST ITEMS
 * ------------------------------------------------------------- */
.social-list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.4s var(--ease-physical);
}

.social-list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.25rem;
    color: var(--text-light);
    transition: all 0.4s var(--ease-physical);
}

.social-list-info {
    display: flex;
    flex-direction: column;
    margin-left: 14px;
    flex-grow: 1;
}

.social-list-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.social-list-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.social-list-arrow {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.4s var(--ease-physical), color 0.4s var(--ease-physical);
}

/* Hover States for Social Items */
.social-list-item:hover {
    background: rgba(13, 110, 253, 0.05);
    border-color: rgba(13, 110, 253, 0.2);
    transform: translateX(4px);
}

.social-list-item:hover .social-list-icon {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-light);
    transform: scale(1.05);
}

.social-list-item:hover .social-list-arrow {
    transform: translate(2px, -2px);
    color: var(--text-light);
}

/* -------------------------------------------------------------
 * 9. INTERACTIVE PROPOSALS ACCORDION
 * ------------------------------------------------------------- */
.proposals-accordion {
    display: flex;
    flex-direction: column;
}

.proposal-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.proposal-header {
    background: none;
    border: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    cursor: pointer;
    padding: 20px 0;
    transition: color 0.3s;
}

.proposal-header:hover {
    color: var(--accent-blue);
}

.proposal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(13, 110, 253, 0.08);
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.proposal-arrow-wrapper {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.proposal-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-physical);
}

.proposal-item.active .proposal-content {
    max-height: 200px; /* arbitrary height enough for text */
}

.proposal-item.active .proposal-arrow-wrapper i {
    transform: rotate(180deg);
}

.proposal-item.active .proposal-title {
    color: var(--accent-blue);
}

/* -------------------------------------------------------------
 * 10. FORMS & INPUTS
 * ------------------------------------------------------------- */
.form-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-light);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.4s var(--ease-physical);
}

.form-input:focus {
    outline: none;
    background: rgba(13, 110, 253, 0.03);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-input::placeholder {
    color: #4b5563;
}

.form-message-success {
    color: var(--accent-whatsapp);
}
.form-message-error {
    color: #ef4444;
}

/* -------------------------------------------------------------
 * 11. REVEAL ANIMATIONS & ACCESSIBILITY
 * ------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(10px);
    transition: opacity 0.8s var(--ease-physical), transform 0.8s var(--ease-physical), filter 0.8s var(--ease-physical);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Media Query: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .mesh-orb {
        animation: none !important;
        opacity: 0.25;
    }
    .bento-card {
        transition: none !important;
    }
    .bento-card:hover {
        transform: none !important;
    }
    .btn, .social-list-item, .proposal-arrow-wrapper i {
        transition: none !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* -------------------------------------------------------------
 * 12. RESPONSIVENESS
 * ------------------------------------------------------------- */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .col-span-2 {
        grid-column: span 1 / span 1;
    }
    .row-span-2 {
        grid-row: span 1 / span 1;
    }
    .candidate-name {
        font-size: 2.5rem;
    }
    .candidate-nickname {
        font-size: 1.5rem;
    }
    .btn {
        width: 100%;
        justify-content: center;
        padding-left: 20px;
        padding-right: 20px;
    }
    .btn-icon-circle {
        margin-left: 12px;
    }
    .app-container {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* -------------------------------------------------------------
 * Utility class helpers (matching design specs)
 * ------------------------------------------------------------- */
.w-full { width: 100%; }
.h-full { height: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-8 { gap: 32px; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-12 { margin-bottom: 48px; }
.mt-1 { margin-top: 4px; }
.mt-8 { margin-top: 32px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-center { text-align: center; }
.leading-none { line-height: 1; }
.overflow-hidden { overflow: hidden; }
.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (min-width: 768px) {
    .md:px-8 { padding-left: 32px; padding-right: 32px; }
    .md:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* -------------------------------------------------------------
 * 13. ADDITIONAL UTILITIES & STAGES
 * ------------------------------------------------------------- */
.min-h-\[100dvh\] { min-height: 100dvh; }
.max-w-\[50ch\] { max-width: 50ch; }
.max-w-5xl { max-width: 1024px; }
.grid { display: grid; }
.text-left { text-align: left; }
.text-xs { font-size: 0.75rem; }
.border-b { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.border-white-10 { border-color: rgba(255, 255, 255, 0.1); }
.focus\:outline-none:focus { outline: none; }
.transition-transform { transition-property: transform; }
.transition-all { transition-property: all; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

/* Custom button hover nested transitions */
.btn.group:hover .btn-icon-circle i {
    transform: translateX(4px);
}
.btn.btn-whatsapp.group:hover .btn-icon-circle i {
    transform: scale(1.1);
}
.btn.btn-submit.group:hover .btn-icon-circle i {
    transform: translate(2px, -2px) scale(1.05);
}

