/* ─── VARIABLES ─────────────────────────────────────────────────────────── */
:root {
    --primary:       #3d7a73;
    --primary-dark:  #2e5f59;
    --primary-light: #5a9b93;
    --secondary:     #9ebdb8;
    --accent:        #6fa89f;
    --accent-warm:   #c8a96e;

    --background:    #edf2f0;
    --surface:       #fcfdfc;
    --surface-soft:  #f3f7f5;
    --surface-mid:   #e8eeec;

    --text:          #1e2f2e;
    --text-soft:     #607370;
    --text-muted:    #8a9e9c;

    --border:        #cddad7;
    --border-soft:   #dde8e5;

    --success:       #3a8c5c;
    --danger:        #b91c1c;

    --radius:        20px;
    --radius-sm:     12px;
    --shadow:        0 2px 12px rgba(30, 47, 46, 0.07);
    --shadow-md:     0 6px 24px rgba(30, 47, 46, 0.10);
    --shadow-lg:     0 16px 48px rgba(30, 47, 46, 0.13);
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
}
.section { padding: 96px 0; }
.bg-white { background: var(--surface); }
.bg-soft  { background: var(--surface-soft); }

/* ─── SECTION HEAD ───────────────────────────────────────────────────────── */
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(61, 122, 115, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(61, 122, 115, 0.18);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.section-head h2 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.6px;
    margin-bottom: 16px;
    font-weight: 800;
}
.section-head p {
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.65;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(237, 242, 240, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-soft);
    transition: background 0.2s;
}
.nav {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.brand-name  { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.brand-sub   { font-size: 10px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.02em; }

.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.btn-lg { padding: 13px 28px; font-size: 15px; }

.btn-urgencia {
    background: #991b1b;
    color: white;
    border-color: #991b1b;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 11px;
    text-transform: uppercase;
}
.btn-urgencia:hover {
    background: #7f1d1d;
    border-color: #7f1d1d;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(153, 27, 27, 0.32);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(46, 95, 89, 0.30);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-white {
    background: white;
    color: var(--primary-dark);
    border-color: white;
}
.btn-white:hover {
    background: rgba(255,255,255,0.88);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(255,255,255,0.25);
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
    padding: 96px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61,122,115,0.07) 0%, transparent 70%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

/* ─── HERO COPY ──────────────────────────────────────────────────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(61, 122, 115, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(61, 122, 115, 0.20);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}
.eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.hero-copy h1 {
    font-size: clamp(36px, 5.2vw, 60px);
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 22px;
    font-weight: 800;
}
.hero-copy h1 em {
    font-style: normal;
    color: var(--primary);
}
.hero-text {
    font-size: 18px;
    color: var(--text-soft);
    max-width: 480px;
    margin-bottom: 32px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12.5px;
    color: var(--text-soft);
    font-weight: 500;
}
.trust-row span::before {
    content: '✓';
    font-size: 11px;
    color: var(--success);
    font-weight: 800;
}

/* ─── PHONE / SCAN CARD ──────────────────────────────────────────────────── */
.hero-visual { position: relative; }

.phone-card {
    background: linear-gradient(160deg, #ffffff 0%, #f0f5f3 100%);
    border-radius: 28px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md), 0 1px 3px rgba(30,47,46,0.05);
    position: relative;
}
.phone-card::before {
    content: '';
    position: absolute;
    top: -1px; left: 50%; transform: translateX(-50%);
    width: 80px; height: 3px;
    background: var(--border);
    border-radius: 999px;
}

.scan-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-soft);
}
.scan-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 13.5px;
    font-weight: 700;
}
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--success);
    font-weight: 600;
    font-size: 12px;
}
.status::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}

.profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
}
.avatar {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    flex-shrink: 0;
}
.profile h5 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.profile p  { color: var(--text-soft); font-size: 11.5px; }

.medical-list { display: grid; gap: 8px; margin-bottom: 12px; }

.medical-item {
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 10px 13px;
    transition: opacity 0.2s;
}
.medical-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.medical-item-header small {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.field-content { display: flex; flex-wrap: wrap; gap: 4px; }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.pill-red    { background: rgba(239,68,68,0.08);   color: #b91c1c; border: 1px solid rgba(239,68,68,0.18); }
.pill-blue   { background: rgba(59,130,246,0.08);  color: #1d4ed8; border: 1px solid rgba(59,130,246,0.18); }
.pill-purple { background: rgba(139,92,246,0.08);  color: #6d28d9; border: 1px solid rgba(139,92,246,0.18); }

.vis-select {
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 7px;
    cursor: pointer;
    outline: none;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--success);
    transition: color 0.15s, border-color 0.15s;
}
.vis-select.oculto { color: #b91c1c; border-color: rgba(239,68,68,0.35); }
.hidden-note { display: none; font-size: 10.5px; color: #b91c1c; font-style: italic; margin-top: 4px; }
.medical-item.is-hidden { opacity: 0.4; }
.medical-item.is-hidden .field-content { display: none; }
.medical-item.is-hidden .hidden-note { display: block; }

.acceso-publico {
    padding: 11px 14px;
    border-radius: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease;
}
.acceso-publico.permitido    { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.acceso-publico.no-permitido { background: linear-gradient(135deg, #7a4f4f, #a57878); }
.acceso-label {
    color: white; font-weight: 800; font-size: 11px;
    letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
}
.acceso-select {
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-family: inherit; font-size: 12px; font-weight: 700;
    padding: 5px 28px 5px 10px;
    border-radius: 8px; cursor: pointer; outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 120px;
}
.acceso-select option { background: #1e2f2e; color: white; }

/* ─── STATS STRIP ────────────────────────────────────────────────────────── */
.stats-strip {
    background: var(--surface);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    padding: 36px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.stat-item {
    text-align: center;
    padding: 12px 24px;
    border-right: 1px solid var(--border-soft);
}
.stat-item:last-child { border-right: none; }
.stat-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: var(--text-soft); font-weight: 500; }

/* ─── FEATURE CARDS ──────────────────────────────────────────────────────── */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.cards:has(> .card:nth-child(4):last-child) {
    grid-template-columns: repeat(2, 1fr);
}
.card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 28px 26px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.icon {
    width: 44px; height: 44px;
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 20px;
    border: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.icon svg { width: 20px; height: 20px; }
.icon-teal { background: rgba(61, 122, 115, 0.10); color: var(--primary); border-color: rgba(61, 122, 115, 0.18); }
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.2px; }
.card p  { color: var(--text-soft); font-size: 14px; line-height: 1.65; }

/* ─── STEPS ──────────────────────────────────────────────────────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
}
.steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: calc(16.66% + 17px);
    right: calc(16.66% + 17px);
    height: 1px;
    background: var(--border);
    z-index: 0;
}
.step {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
    margin: 0 8px;
}
.step:first-child { margin-left: 0; }
.step:last-child  { margin-right: 0; }

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 11px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 18px;
}
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.step p  { color: var(--text-soft); font-size: 14px; line-height: 1.65; }

/* ─── DEMO ROW ───────────────────────────────────────────────────────────── */
.demo-row {
    margin-top: 36px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 28px;
    border-top: 1px solid var(--border-soft);
}
.demo-label { color: var(--text-soft); font-size: 13px; font-weight: 500; white-space: nowrap; }
.demo-btns  { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-demo-personal {
    background: var(--surface);
    color: var(--primary-dark);
    border: 1.5px dashed var(--primary);
    font-weight: 700; font-size: 13px;
    padding: 10px 20px; border-radius: 999px; opacity: 0.85;
    text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.btn-demo-personal:hover { background: rgba(61,122,115,0.06); opacity: 1; }

.btn-demo-urgencia {
    background: var(--surface);
    color: #b91c1c;
    border: 1.5px dashed #b91c1c;
    font-weight: 700; font-size: 13px;
    padding: 10px 20px; border-radius: 999px; opacity: 0.85;
    text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.btn-demo-urgencia:hover { background: rgba(185,28,28,0.04); opacity: 1; }

/* ─── FAQ ────────────────────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 8px; max-width: 780px; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.18s;
}
.faq-item.active { border-color: var(--primary); }
.faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: none; border: none;
    cursor: pointer;
    font-family: inherit; font-size: 15px; font-weight: 600;
    color: var(--text); text-align: left;
    transition: color 0.15s;
}
.faq-q:hover { color: var(--primary); }
.faq-icon {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 400; color: var(--primary); line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.faq-item.active .faq-icon { background: var(--primary); color: white; border-color: var(--primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 22px; }
.faq-a.open { max-height: 300px; padding: 0 22px 18px; }
.faq-a p {
    color: var(--text-soft); font-size: 14px; line-height: 1.7;
    border-top: 1px solid var(--border-soft); padding-top: 14px;
}

/* ─── CTA ────────────────────────────────────────────────────────────────── */
.cta {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--accent) 100%);
    border-radius: 28px;
    padding: 60px 64px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}
.cta h2 {
    font-size: clamp(26px, 3.5vw, 40px);
    line-height: 1.1; margin-bottom: 12px;
    letter-spacing: -0.5px; font-weight: 800;
}
.cta p { color: rgba(255,255,255,0.80); font-size: 17px; line-height: 1.55; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
    padding: 36px 0;
    border-top: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 13.5px;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px; flex-wrap: wrap; align-items: center;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--text-soft); text-decoration: none; transition: color 0.15s; }
.footer a:hover { color: var(--primary); }

/* ─── HERO DEMO BUTTON ───────────────────────────────────────────────────── */
.btn-hero-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 0;
    width: 100%;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1.5px dashed var(--border);
    color: var(--text-soft);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.btn-hero-demo:hover {
    background: rgba(61, 122, 115, 0.07);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp 0.55s ease both; }
.delay-1    { animation-delay: 0.08s; }
.delay-2    { animation-delay: 0.16s; }
.delay-3    { animation-delay: 0.24s; }
.delay-4    { animation-delay: 0.32s; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1020px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .cards:has(> .card:nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-item:nth-child(3) { border-right: 1px solid var(--border-soft); border-top: 1px solid var(--border-soft); }
    .stat-item:nth-child(4) { border-right: none; border-top: 1px solid var(--border-soft); }
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero { padding: 64px 0 52px; }
    .steps { grid-template-columns: 1fr; }
    .steps::before { display: none; }
    .step { margin: 0; }
    .cta { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 44px 36px; }
}
@media (max-width: 640px) {
    .nav { height: auto; flex-direction: column; gap: 14px; padding: 14px 0; }
    .nav-actions { flex-wrap: wrap; justify-content: center; }
    .cards { grid-template-columns: 1fr; }
    .cards:has(> .card:nth-child(4):last-child) { grid-template-columns: 1fr; }
    .hero-copy h1 { font-size: 34px; letter-spacing: -1px; }
    .hero-text { font-size: 16px; }
    .section { padding: 60px 0; }
    .cta { padding: 36px 24px; }
    .footer-grid { flex-direction: column; gap: 14px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .demo-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}