/* ==========================================================================
   atroz.network — Hoja de estilos principal
   Diseño: oscuro elegante / profesional
   ========================================================================== */

:root {
    /* Paleta */
    --bg-base: #0a0e1a;
    --bg-surface: #0f1525;
    --bg-elevated: #151c2e;
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(56, 189, 248, 0.25);
}

/* ---- Reset & base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---- Tipografía utilitaria ---- */
.gradient-text {
    background: linear-gradient(120deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-balance {
    text-wrap: balance;
}

/* ---- Layout helpers ---- */
.container-pro {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-pad {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* ---- Header / Nav ---- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background-color: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border-subtle);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(120deg, #38bdf8, #6366f1);
    color: #0a0e1a;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}

/* ---- Nav right cluster (lang + toggle) ---- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ---- Language switch ---- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.lang-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.2rem 0.1rem;
    transition: color 0.2s ease;
}

.lang-link:hover {
    color: var(--accent-primary);
}

.lang-link.active {
    color: var(--text-primary);
}

.lang-sep {
    color: var(--text-muted);
    opacity: 0.4;
    user-select: none;
}

.mobile-lang {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    gap: 1.25rem;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background-color: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--border-accent);
    color: var(--accent-primary);
    font-size: 0.825rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.75rem;
}

.hero-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero p.lead {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(120deg, #38bdf8, #6366f1);
    color: #0a0e1a;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--border-accent);
    background-color: rgba(56, 189, 248, 0.05);
}

/* ---- Stats ---- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 3rem 0;
}

.stat-cell {
    padding: 1.5rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
}

.stat-value {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
}

.stat-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.55;
    margin-top: 0.6rem;
}

/* ---- Section headers ---- */
.section-eyebrow {
    display: inline-block;
    color: var(--accent-primary);
    font-size: 0.825rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 640px;
}

.text-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* ---- Cards ---- */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.875rem;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    background-color: var(--bg-elevated);
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--border-accent);
    margin-bottom: 1.25rem;
}

.card-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---- Grids ---- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* ---- Feature split ---- */
.feature-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-list li {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    color: var(--text-secondary);
}

.feature-list .check {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- Locations ---- */
.location-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.875rem;
    padding: 2rem;
}

.location-card .tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.tag-prod {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--border-accent);
}

.tag-admin {
    background: rgba(129, 140, 248, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(129, 140, 248, 0.25);
}

.location-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.location-card .address {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---- Location highlight (ventaja estratégica) ---- */
.location-highlight {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: linear-gradient(120deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid var(--border-accent);
    border-radius: 0.875rem;
    padding: 2rem;
}

.location-highlight-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-primary);
}

.location-highlight-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.location-highlight h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.location-highlight p {
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.65;
}

@media (max-width: 640px) {
    .location-highlight {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ---- CTA band ---- */
.cta-band {
    background: linear-gradient(120deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid var(--border-accent);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
}

/* ---- Footer ---- */
.site-footer {
    background-color: #060a14;
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    display: inline-block;
    text-decoration: none;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin-bottom: 1rem;
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Legal pages ---- */
.legal-hero {
    padding-top: 9rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-subtle);
}

.legal-hero .container-pro {
    max-width: 820px;
}

.legal-body {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.legal-body .container-pro {
    max-width: 820px;
}

.legal-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.legal-body p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-body ul,
.legal-body ol {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-body li {
    margin-bottom: 0.5rem;
}

.legal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-body a {
    color: var(--accent-primary);
    text-decoration: none;
}

.legal-body a:hover {
    text-decoration: underline;
}

.legal-meta {
    display: inline-block;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

/* ---- Cookie table ---- */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.cookie-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-table td {
    color: var(--text-secondary);
}

.cookie-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.cookie-badge.technique {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

/* ---- Email reveal button (anti-spam) ---- */
.email-reveal {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--accent-primary);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.email-reveal:hover {
    color: var(--accent-secondary);
}

/* ---- Cookie banner ---- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-accent);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-banner-text {
    color: var(--text-secondary);
    font-size: 0.925rem;
}

.cookie-banner-text a {
    color: var(--accent-primary);
    text-decoration: none;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
    text-decoration: none;
}

.cookie-btn-primary {
    background: linear-gradient(120deg, #38bdf8, #6366f1);
    color: #0a0e1a;
    border: none;
}

.cookie-btn-primary:hover {
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--text-primary);
}

.cookie-btn-secondary:hover {
    border-color: var(--border-accent);
}

.cookie-btn-link {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    text-decoration: underline;
}

/* Cookie preferences panel */
.cookie-prefs {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.cookie-prefs.open {
    display: flex;
}

.cookie-pref-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
}

.cookie-pref-item .info {
    flex: 1;
}

.cookie-pref-item .info strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cookie-pref-item .info span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #334155;
    border-radius: 999px;
    transition: 0.3s;
}

.toggle .slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .slider {
    background-color: #38bdf8;
}

.toggle input:checked + .slider::before {
    transform: translateX(20px);
}

.toggle input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
    .nav-toggle {
        display: none;
    }
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .feature-split {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
    .cookie-banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 640px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .stats-bar {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
