/* ==========================================================================
   Minivangrup BCN — hoja de estilos única
   1. Variables        5. Cabecera
   2. Reinicio         6. Secciones y componentes
   3. Tipografía       7. Formulario
   4. Utilidades       8. Pie y responsive
   ========================================================================== */

/* 1. Variables ----------------------------------------------------------- */
:root {
    --brand:        #0f7a43;
    --brand-dark:   #0a5531;
    --brand-deep:   #07331e;
    --brand-light:  #8dc63f;
    --brand-soft:   #e8f4ec;

    --ink:          #11211a;
    --body:         #46564e;
    --muted:        #6d7f77;
    --line:         #e1e9e5;
    --bg:           #ffffff;
    --bg-alt:       #f5f9f7;

    --radius:       14px;
    --radius-lg:    22px;
    --shadow-sm:    0 1px 2px rgba(7, 51, 30, .06), 0 2px 8px rgba(7, 51, 30, .05);
    --shadow-md:    0 8px 28px rgba(7, 51, 30, .10);

    --container:    1140px;
    --gutter:       clamp(1.1rem, 4vw, 2rem);
    --section-y:    clamp(3.5rem, 7vw, 6rem);

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 2. Reinicio ------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--body);
    font-family: var(--font);
    font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

address { font-style: normal; }

button { font: inherit; cursor: pointer; }

:focus-visible {
    outline: 3px solid var(--brand-light);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 3. Tipografía ---------------------------------------------------------- */
h1, h2, h3 {
    margin: 0 0 .5em;
    color: var(--ink);
    line-height: 1.18;
    letter-spacing: -.02em;
    font-weight: 700;
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
h3 { font-size: 1.1875rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
    color: var(--body);
    max-width: 62ch;
}

.eyebrow {
    margin-bottom: .9rem;
    color: var(--brand);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }

/* 4. Utilidades ---------------------------------------------------------- */
.container {
    width: min(100% - (var(--gutter) * 2), var(--container));
    margin-inline: auto;
}

.narrow { max-width: 760px; }

.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-centered { text-align: center; }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); margin-bottom: 0; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: .75rem 1.1rem;
    background: var(--brand-deep);
    color: #fff;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9375rem;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease,
                border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: .9rem 1.6rem; font-size: 1rem; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

.btn-ghost { background: #fff; color: var(--brand-dark); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-soft); }

.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { background: var(--brand-soft); color: var(--brand-dark); }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow .icon { transition: transform .18s ease; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* 5. Cabecera ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    color: var(--ink);
}
.brand-logo { width: 44px; height: 44px; border-radius: 10px; }
.brand-text strong { display: block; font-size: 1.125rem; letter-spacing: -.01em; }
.brand-text strong span { color: var(--brand); }
.brand-text small { display: block; color: var(--muted); font-size: .75rem; }

.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(.4rem, 1.4vw, 1.4rem);
}

.nav-link {
    display: inline-block;
    padding: .45rem .2rem;
    color: var(--ink);
    font-weight: 600;
    font-size: .9375rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--brand); }
.nav-link.is-active { color: var(--brand); border-bottom-color: var(--brand-light); }

.nav-cta { margin-left: .6rem; }

.nav-toggle {
    display: none;
    padding: .5rem;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
}
.nav-toggle .icon { width: 1.4rem; height: 1.4rem; }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

/* 6. Secciones y componentes --------------------------------------------- */
.hero {
    position: relative;
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background:
        radial-gradient(900px 420px at 88% -10%, rgba(141, 198, 63, .22), transparent 60%),
        linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-dark) 55%, #0c6a3b 100%);
    color: #e8f3ec;
    overflow: hidden;
}
.hero h1 { color: #fff; }
.hero .lead { color: rgba(232, 243, 236, .88); }
.hero .eyebrow { color: var(--brand-light); }

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.8rem 0 1.6rem;
}

.hero-points { display: grid; gap: .5rem; }
.hero-points li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9375rem;
    color: rgba(232, 243, 236, .9);
}
.hero-points .icon { color: var(--brand-light); }

.hero-card {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .07);
    text-align: center;
}
.hero-card-icon { width: 2.5rem; height: 2.5rem; margin: 0 auto .75rem; color: var(--brand-light); }
.hero-card-title { margin: 0; font-size: 1.5rem; font-weight: 700; color: #fff; }
.hero-card-sub { margin: .35rem 0 0; font-size: .875rem; color: rgba(232, 243, 236, .8); }

.page-head {
    padding-block: clamp(2.5rem, 5vw, 3.75rem);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: .4em; }

.breadcrumb {
    margin-bottom: 1rem;
    font-size: .8125rem;
    color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb span { margin-inline: .35rem; }

.card {
    padding: clamp(1.4rem, 2.5vw, 1.9rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cfe3d7;
}
.card-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand-dark);
}
.card-icon .icon { width: 1.5rem; height: 1.5rem; }
.card-title { margin-bottom: .4rem; }
.card-text { color: var(--muted); margin-bottom: 1rem; }

.feature h3 { margin-bottom: .35rem; font-size: 1.0625rem; }
.feature p { color: var(--muted); font-size: .9375rem; margin: 0; }
.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: .9rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--brand);
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    padding: .45rem .9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--body);
    font-size: .875rem;
}

.check-list { display: grid; gap: .7rem; margin-bottom: 1.4rem; }
.check-list li { display: flex; align-items: flex-start; gap: .65rem; }
.check-list .icon { margin-top: .28em; color: var(--brand); }

.service-block {
    padding-block: clamp(1.8rem, 4vw, 2.6rem);
    border-top: 1px solid var(--line);
}
.service-block:first-child { border-top: 0; padding-top: 0; }
.service-block-head {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-bottom: 1.4rem;
}
.service-block-head h2 { margin-bottom: .3em; }
.service-block-head p { color: var(--muted); margin: 0; max-width: 62ch; }

.content-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: start;
}

.side-box {
    padding: clamp(1.4rem, 2.5vw, 1.9rem);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.side-box h2 { font-size: 1.25rem; }

.steps { display: grid; gap: .6rem; margin: 0 0 1.3rem; counter-reset: step; }
.steps li {
    display: flex;
    gap: .7rem;
    font-size: .9375rem;
    counter-increment: step;
}
.steps li::before {
    content: counter(step);
    flex: none;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
}

.data-list { display: grid; gap: .8rem; margin-bottom: 1.3rem; }
.data-list li { display: grid; gap: .1rem; font-size: .9375rem; }
.data-list span { color: var(--muted); font-size: .8125rem; }
.data-list strong { color: var(--ink); font-weight: 600; }

.cta {
    padding-block: clamp(2.75rem, 6vw, 4rem);
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-deep));
    color: #e8f3ec;
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { color: rgba(232, 243, 236, .85); margin: 0; }
.cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
}
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }

/* 7. Formulario ---------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.form > .btn { justify-self: start; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.field label { font-weight: 600; font-size: .9375rem; color: var(--ink); }
.field label span[aria-hidden] { color: var(--brand); }

.field input,
.field textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .9375rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 122, 67, .14);
}
.field textarea { resize: vertical; min-height: 140px; }
.field [aria-invalid="true"] { border-color: #c0392b; }

.field-check label {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-weight: 400;
    font-size: .9375rem;
    color: var(--body);
}
.field-check input { width: 18px; height: 18px; margin-top: .22em; accent-color: var(--brand); }

.field-error { margin: 0; color: #c0392b; font-size: .8125rem; }
.form-note { margin: 0; color: var(--muted); font-size: .8125rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}
.alert h2 { font-size: 1.25rem; }
.alert-success { background: var(--brand-soft); border-color: #bfe0cb; }
.alert-error { background: #fdf0ee; border-color: #f2c9c2; color: #8f2a1c; }

/* 8. Pie ----------------------------------------------------------------- */
.site-footer {
    padding-top: clamp(2.75rem, 6vw, 4rem);
    background: var(--brand-deep);
    color: rgba(232, 243, 236, .78);
    font-size: .9375rem;
}
.site-footer a { color: rgba(232, 243, 236, .9); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: clamp(1.75rem, 4vw, 3rem);
    padding-bottom: 2.5rem;
}
.footer-logo { width: 52px; height: 52px; border-radius: 12px; margin-bottom: 1rem; }
.footer-about { max-width: 38ch; }
.footer-title {
    margin-bottom: .9rem;
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.footer-list { display: grid; gap: .6rem; }
.footer-contact li { display: flex; align-items: flex-start; gap: .6rem; }
.footer-contact .icon { margin-top: .25em; color: var(--brand-light); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
    padding-block: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .8125rem;
}
.footer-bottom p { margin: 0; }

.whatsapp-float {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    color: #06361b;
    box-shadow: var(--shadow-md);
}
.whatsapp-float .icon { width: 1.75rem; height: 1.75rem; }
.whatsapp-float:hover { background: #1fbe5a; color: #06361b; }

/* 9. Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
    .hero-inner,
    .content-split { grid-template-columns: 1fr; }
    .hero-card { display: none; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }

    .nav {
        position: absolute;
        inset: 74px 0 auto;
        display: none;
        padding: 1rem var(--gutter) 1.4rem;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
    }
    .nav.is-open { display: block; }

    .nav-list { flex-direction: column; align-items: stretch; gap: .2rem; }
    .nav-link {
        padding: .75rem .25rem;
        border-bottom: 1px solid var(--line);
    }
    .nav-link.is-active { border-bottom-color: var(--brand-light); }
    .nav-cta { margin: .9rem 0 0; }
    .nav-cta .btn { width: 100%; justify-content: center; }

    .field-row { grid-template-columns: 1fr; }
    .service-block-head { flex-direction: column; gap: .9rem; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .brand-text small { display: none; }
    .btn { width: auto; }
}

/* 10. Impresión ----------------------------------------------------------- */
@media print {
    .site-header, .cta, .whatsapp-float, .nav-toggle { display: none !important; }
    body { color: #000; font-size: 11pt; }
    .hero, .site-footer { background: none !important; color: #000 !important; }
}
