/* ============================================================
   Power · Gym Access — Landing (powergym.dev)
   Paleta: High-Contrast Tech (misma identidad que la app)
   ============================================================ */

:root {
    --cloud-white: #F5F6FA;
    --night-black: #1E272E;
    --night-black-2: #263340;
    --electric-blue: #0984E3;
    --electric-blue-dark: #076bb8;
    --cyan-neon: #00CEC9;
    --warning: #FFB100;
    --danger: #E63946;

    --surface: #FFFFFF;
    --text-primary: #1E272E;
    --text-muted: #64748B;
    --border: #E2E6EF;

    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 8px 24px rgba(30, 39, 46, 0.08);
    --shadow-hero: 0 12px 32px rgba(30, 39, 46, 0.28);

    --font-display: 'Manrope', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    margin: 0;
    background: var(--cloud-white);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; }

p { margin: 0; }

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

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--night-black); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    border: none; border-radius: 100px; padding: 13px 22px;
    font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font-body);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    white-space: nowrap;
}
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn:active { transform: translateY(1px); }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--electric-blue); color: #fff; box-shadow: 0 8px 20px rgba(9,132,227,.28); }
.btn-primary:hover { background: var(--electric-blue-dark); }
.btn-accent { background: var(--cyan-neon); color: #06403e; box-shadow: 0 8px 20px rgba(0,206,201,.30); }
.btn-accent:hover { filter: brightness(.96); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(245, 246, 250, 0.86);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex; align-items: center; gap: 20px;
    height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 11px;
    background: linear-gradient(160deg, var(--night-black), var(--night-black-2));
    color: var(--cyan-neon); display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-card);
}
.brand-text { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--text-primary); }
.brand-dot { color: var(--electric-blue); }
.brand-accent { color: var(--electric-blue); }

.nav-desktop { display: flex; align-items: center; gap: 22px; }
.nav-desktop a {
    font-size: 14.5px; font-weight: 600; color: var(--text-muted);
    transition: color .12s ease;
}
.nav-desktop a:hover { color: var(--electric-blue); }

.btn-nav-cta { padding: 10px 18px; font-size: 14px; }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text-primary); border-radius: 2px; }

.nav-mobile {
    display: none; flex-direction: column; gap: 2px;
    padding: 10px 24px 18px; background: var(--cloud-white); border-top: 1px solid var(--border);
}
.nav-mobile a { padding: 12px 4px; font-weight: 600; color: var(--text-primary); border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile.open { display: flex; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1100px 520px at 88% -10%, rgba(9,132,227,.16), transparent 60%),
        radial-gradient(800px 400px at -10% 30%, rgba(0,206,201,.14), transparent 55%),
        var(--cloud-white);
    padding: 64px 0 40px;
}
.hero-inner {
    display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--electric-blue); margin-bottom: 18px;
}
.led { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.led-online { background: var(--cyan-neon); box-shadow: 0 0 8px rgba(0,206,201,.7); }

.hero h1 {
    font-size: clamp(36px, 5.4vw, 60px); font-weight: 800; line-height: 1.06;
    margin-bottom: 20px;
}
.grad-text {
    background: linear-gradient(90deg, var(--electric-blue), var(--cyan-neon));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 18px; color: var(--text-muted); max-width: 560px; margin-bottom: 28px; }
.hero-sub strong { color: var(--text-primary); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; }
.hero-badges li {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13.5px; font-weight: 600; color: var(--text-muted);
}
.hero-badges svg { color: var(--cyan-neon); }

/* --- Terminal visual --- */
.hero-visual { position: relative; }
.terminal-card {
    background: linear-gradient(165deg, var(--night-black), var(--night-black-2));
    border-radius: var(--radius-lg); box-shadow: var(--shadow-hero);
    overflow: hidden; color: #fff;
    border: 1px solid rgba(255,255,255,.06);
}
.terminal-head {
    display: flex; align-items: center; gap: 7px; padding: 14px 18px;
    background: rgba(0,0,0,.22); border-bottom: 1px solid rgba(255,255,255,.07);
}
.terminal-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: var(--danger); }
.dot-yellow { background: var(--warning); }
.dot-green { background: var(--cyan-neon); }
.terminal-title { margin-left: 8px; font-size: 12.5px; font-weight: 600; opacity: .7; font-family: var(--font-display); }
.terminal-body { padding: 18px; font-family: 'SF Mono', Consolas, monospace; font-size: 13px; }
.term-line { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 8px; }
.term-line:last-child { margin-bottom: 0; }
.term-ok { color: var(--cyan-neon); font-weight: 700; }
.term-mono { color: var(--warning); }
.term-dim { opacity: .55; }
.terminal-foot { display: flex; gap: 8px; padding: 13px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.pill {
    font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 100px;
    background: rgba(255,255,255,.1); color: #fff;
}
.pill-success { background: rgba(0,206,201,.18); color: var(--cyan-neon); }

.float-chip {
    position: absolute; background: var(--surface); box-shadow: var(--shadow-card);
    border-radius: 100px; padding: 9px 15px; font-size: 13px; font-weight: 700;
    border: 1px solid var(--border);
}
.float-chip-1 { top: -16px; right: -8px; }
.float-chip-2 { bottom: 30px; left: -26px; }
.float-chip-3 { bottom: -16px; right: 24px; }

/* ---------- Stats ---------- */
.stats { background: var(--night-black); color: #fff; padding: 30px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 6px 10px; }
.stat-num { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 800; color: var(--cyan-neon); }
.stat-label { font-size: 13px; opacity: .8; }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section-dark { background: linear-gradient(170deg, var(--night-black), #1a242c); color: #fff; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; line-height: 1.14; margin-bottom: 14px; }
.section-sub { font-size: 17px; color: var(--text-muted); }
.section-head-light .section-sub { color: rgba(255,255,255,.68); }
.section-head-light h2 { color: #fff; }
.section-head-light .eyebrow { color: var(--cyan-neon); }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
    background: var(--surface); border-radius: var(--radius-md);
    padding: 26px 22px; box-shadow: var(--shadow-card); border: 1px solid var(--border);
    transition: transform .16s ease, box-shadow .16s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(30,39,46,.12); }
.feature-icon {
    width: 48px; height: 48px; border-radius: 14px; margin-bottom: 18px;
    background: linear-gradient(160deg, var(--electric-blue), var(--cyan-neon));
    color: #fff; display: flex; align-items: center; justify-content: center;
}
.feature-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); }
.feature-card code { background: #eef1f6; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: var(--electric-blue-dark); }

/* ---------- Arquitectura ---------- */
.arch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.arch-node {
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-md); padding: 22px 20px; text-align: center; min-width: 150px;
}
.arch-node strong { display: block; font-size: 15px; margin: 10px 0 4px; }
.arch-node span { display: block; font-size: 12.5px; opacity: .72; }
.arch-ico { font-size: 26px; display: block; }
.arch-arrow { font-size: 26px; color: var(--cyan-neon); opacity: .8; }
.arch-pc { border-color: rgba(0,206,201,.4); box-shadow: 0 0 0 1px rgba(0,206,201,.2); }
.arch-hik { border-color: rgba(9,132,227,.45); }

.arch-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.arch-note { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: rgba(255,255,255,.04); border-radius: var(--radius-md); }
.arch-note strong { color: var(--cyan-neon); font-size: 15px; }
.arch-note span { font-size: 14px; opacity: .78; }

/* ---------- Roles ---------- */
.roles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.role-card {
    background: var(--surface); border-radius: var(--radius-lg); padding: 28px;
    box-shadow: var(--shadow-card); border: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.role-card-accent { border-color: rgba(9,132,227,.35); box-shadow: 0 12px 32px rgba(9,132,227,.12); }
.role-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.role-avatar {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    background: var(--night-black); color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; font-family: var(--font-display);
}
.role-head h3 { font-size: 18px; font-weight: 800; }
.role-head p { font-size: 13px; color: var(--text-muted); }
.role-card > p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 16px; }
.role-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; margin-top: auto; }
.role-card ul li { font-size: 14px; padding-left: 24px; position: relative; }
.role-card ul li::before {
    content: "✓"; position: absolute; left: 0; color: var(--cyan-neon); font-weight: 800;
}

/* ---------- Guías (acordeón) ---------- */
.guides { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.guide {
    background: var(--surface); border-radius: var(--radius-md);
    border: 1px solid var(--border); box-shadow: var(--shadow-card); overflow: hidden;
}
.guide summary {
    list-style: none; display: flex; align-items: center; gap: 14px;
    padding: 20px 22px; cursor: pointer; user-select: none;
}
.guide summary::-webkit-details-marker { display: none; }
.guide-num {
    font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--electric-blue);
    background: #eaf4fd; border-radius: 8px; padding: 6px 10px; flex-shrink: 0;
}
.guide-title { font-size: 16px; font-weight: 700; flex: 1; }
.guide-chevron { color: var(--text-muted); transition: transform .2s ease; flex-shrink: 0; }
.guide[open] .guide-chevron { transform: rotate(180deg); }
.guide-body { padding: 0 22px 24px 22px; color: var(--text-muted); font-size: 14.5px; }
.guide-body h4 { font-size: 14.5px; font-weight: 800; color: var(--text-primary); margin: 18px 0 6px; }
.guide-body h4:first-child { margin-top: 0; }
.guide-body ol, .guide-body ul { padding-left: 20px; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.guide-body li { margin: 0; }
.guide-body code { background: #eef1f6; padding: 1px 7px; border-radius: 5px; font-size: 13px; color: var(--electric-blue-dark); }
.guide-body a { color: var(--electric-blue); font-weight: 600; }
.guide-tip {
    background: #eef9f8; border-left: 3px solid var(--cyan-neon); border-radius: 8px;
    padding: 12px 16px; margin-top: 14px; color: #0c5a57; font-size: 14px;
}
.code-block {
    background: var(--night-black); color: #d6e2ec; border-radius: var(--radius-sm);
    padding: 16px 18px; font-family: 'SF Mono', Consolas, monospace; font-size: 13px;
    overflow-x: auto; margin: 10px 0;
}

/* ---------- Descarga ---------- */
.download-card {
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius-lg); padding: 34px;
    display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
}
.download-icon {
    width: 64px; height: 64px; border-radius: 18px;
    background: linear-gradient(160deg, var(--electric-blue), var(--cyan-neon));
    color: #fff; display: flex; align-items: center; justify-content: center;
}
.download-info h3 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.download-meta { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 28px; justify-content: start; }
.download-meta li { font-size: 14px; opacity: .85; }
.download-meta strong { color: var(--cyan-neon); margin-right: 8px; }
.download-note { font-size: 13.5px; opacity: .72; max-width: 560px; }
.download-note code { background: rgba(255,255,255,.1); padding: 1px 6px; border-radius: 5px; }
.download-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.sha { margin-top: 14px; }
.sha summary { cursor: pointer; font-size: 13.5px; color: var(--cyan-neon); font-weight: 600; }
.sha code { display: block; margin-top: 8px; font-size: 12px; word-break: break-all; opacity: .85; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 720px; }
.contact-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface); border-radius: var(--radius-md); padding: 24px;
    box-shadow: var(--shadow-card); border: 1px solid var(--border);
    transition: transform .16s ease, border-color .16s ease;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--electric-blue); }
.contact-icon { font-size: 30px; }
.contact-card h3 { font-size: 16px; font-weight: 800; }
.contact-card p { font-size: 14.5px; color: var(--text-muted); }
.contact-note { margin-top: 20px; font-size: 13.5px; color: var(--text-muted); }
.contact-note code { background: #eef1f6; padding: 1px 6px; border-radius: 5px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night-black); color: #fff; padding: 48px 0 32px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; justify-content: space-between; }
.footer-brand .brand-text { color: #fff; }
.footer-brand p { font-size: 14px; opacity: .65; margin-top: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { font-size: 14px; opacity: .75; }
.footer-nav a:hover { opacity: 1; color: var(--cyan-neon); }
.footer-meta { width: 100%; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; }
.footer-meta p { font-size: 13px; opacity: .55; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .roles-grid { grid-template-columns: 1fr; }
    .arch-notes { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { max-width: 520px; }
    .float-chip-2 { left: -8px; }
}

@media (max-width: 820px) {
    .nav-desktop { display: none; }
    .btn-nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .download-card { grid-template-columns: 1fr; }
    .download-actions { grid-column: auto; }
    .contact-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .hero { padding: 44px 0 28px; }
    .download-meta { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .features-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .float-chip { display: none; }
    .hero-actions .btn { width: 100%; }
}
