/* ==========================================================
   CERRAJERÍA 24H — Landing page
   HTML5 + CSS3 (sin JavaScript)
   ========================================================== */

/* ---------- Variables ---------- */
:root {
    --navy: #0f2747;
    --navy-dark: #0a1b33;
    --navy-soft: #1b3a63;
    --accent: #f6a623;
    --accent-dark: #e08e0b;
    --whatsapp: #1fa855;
    --whatsapp-dark: #188a45;

    --text: #1c2533;
    --muted: #5d6878;
    --line: #e4e8ee;
    --bg: #ffffff;
    --bg-soft: #f4f6f9;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 3px rgba(15, 39, 71, 0.06);
    --shadow: 0 8px 24px rgba(15, 39, 71, 0.07);
    --shadow-lg: 0 18px 40px rgba(15, 39, 71, 0.12);

    --header-h: 76px;
    --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
    list-style: none;
}

h1,
h2,
h3 {
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Utilidades ---------- */
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy-soft);
    background: #e8eef7;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.section {
    padding: 96px 0;
}

.section__head {
    max-width: 640px;
    margin: 0 auto 56px;
    text-align: center;
}

.section__title {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    margin-bottom: 16px;
}

.section__text {
    color: var(--muted);
    font-size: 1.08rem;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    padding: 15px 26px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition),
                box-shadow var(--transition), color var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn--sm {
    padding: 11px 18px;
    font-size: 0.92rem;
}

.btn--lg {
    padding: 17px 30px;
    font-size: 1.05rem;
}

.btn--xl {
    padding: 20px 36px;
    font-size: 1.15rem;
}

.btn--accent {
    background: var(--accent);
    color: var(--navy-dark);
    box-shadow: 0 6px 18px rgba(246, 166, 35, 0.32);
}

.btn--accent:hover {
    background: var(--accent-dark);
    box-shadow: 0 10px 24px rgba(246, 166, 35, 0.4);
}

.btn--whatsapp {
    background: var(--whatsapp);
    color: #fff;
}

.btn--whatsapp:hover {
    background: var(--whatsapp-dark);
}

.btn--primary {
    background: var(--navy);
    color: #fff;
}

.btn--primary:hover {
    background: var(--navy-soft);
}

/* ==========================================================
   HEADER
   ========================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--navy);
    color: var(--accent);
}

.logo__text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    color: var(--navy);
}

.logo__text strong {
    color: var(--accent-dark);
}

.logo__text--light {
    color: #fff;
}

.logo__text--light strong {
    color: var(--accent);
}

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

.nav__list {
    display: flex;
    gap: 32px;
}

.nav__list a {
    position: relative;
    font-weight: 600;
    font-size: 0.97rem;
    color: var(--text);
    transition: color var(--transition);
}

.nav__list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav__list a:hover {
    color: var(--navy);
}

.nav__list a:hover::after {
    width: 100%;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header__phone {
    font-weight: 800;
    color: var(--navy);
    transition: color var(--transition);
}

.header__phone:hover {
    color: var(--accent-dark);
}

/* Menú móvil (checkbox) */
.menu-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}

.menu-btn:hover {
    background: var(--bg-soft);
}

.menu-btn span {
    display: block;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle:focus-visible + .menu-btn {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
    padding: 72px 0 96px;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 64px;
}

.hero__title {
    font-size: clamp(2.3rem, 5vw, 3.7rem);
    margin-bottom: 22px;
}

.hero__text {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 34px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 34px;
}

.trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.trust-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--navy);
}

.trust-list__check {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--navy-dark);
    font-size: 0.75rem;
    font-weight: 800;
}

.hero__media {
    position: relative;
    padding: 0 0 40px 40px;
}

.hero__img {
    width: 100%;
    aspect-ratio: 4 / 4.4;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero__img-small {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    border: 6px solid #fff;
    box-shadow: var(--shadow-lg);
}

/* ==========================================================
   SERVICIOS
   ========================================================== */
.services {
    background: var(--bg);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition),
                border-color var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: #d3dbe6;
}

.service-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-soft);
}

.service-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card__media img {
    transform: scale(1.04);
}

.service-card__body {
    position: relative;
    padding: 36px 26px 28px;
}

.service-card__icon {
    position: absolute;
    top: -26px;
    left: 26px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--navy);
    font-size: 1.4rem;
    box-shadow: var(--shadow);
}

.service-card__title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--muted);
}

/* ==========================================================
   SECCIÓN DESTACADA
   ========================================================== */
.highlight {
    background: var(--navy);
    background-image: radial-gradient(circle at 85% 20%, rgba(246, 166, 35, 0.16), transparent 45%),
                      radial-gradient(circle at 5% 100%, rgba(255, 255, 255, 0.06), transparent 40%);
    color: #fff;
    padding: 72px 0;
}

.highlight__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
}

.highlight__icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background: var(--accent);
    color: var(--navy-dark);
}

.highlight__title {
    color: #fff;
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    margin-bottom: 8px;
}

.highlight__text {
    color: #c9d4e3;
    font-size: 1.1rem;
}

/* ==========================================================
   NOSOTROS
   ========================================================== */
.about {
    background: var(--bg-soft);
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 72px;
}

.about__media img {
    width: 100%;
    aspect-ratio: 4 / 4.6;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about__text {
    color: var(--muted);
    font-size: 1.08rem;
    margin-bottom: 28px;
}

.check-list {
    display: grid;
    gap: 14px;
    margin-bottom: 36px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}

.check-list__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
}

/* ==========================================================
   GALERÍA
   ========================================================== */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 280px 280px;
    gap: 20px;
}

.gallery__item {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-soft);
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery__item:hover img {
    transform: scale(1.05);
}

.gallery__item--tall {
    grid-row: span 2;
}

.gallery__item--wide {
    grid-column: span 2;
}

/* ==========================================================
   CÓMO TRABAJAMOS
   ========================================================== */
.steps {
    background: var(--bg-soft);
}

.steps__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    counter-reset: none;
}

.step {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 30px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.step__num {
    display: inline-block;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 18px;
}

.step__title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.step p {
    color: var(--muted);
}

/* ==========================================================
   TESTIMONIOS
   ========================================================== */
.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.testimonial {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.testimonial__stars {
    color: var(--accent);
    font-size: 1.15rem;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.testimonial__quote {
    flex-grow: 1;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 24px;
}

.testimonial__author {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--navy);
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.testimonial__avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8eef7;
    color: var(--navy);
    font-weight: 800;
}

/* ==========================================================
   CONTACTO
   ========================================================== */
.contact {
    padding: 104px 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    text-align: center;
}

.contact__title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
}

.contact__text {
    color: #c9d4e3;
    font-size: 1.15rem;
    margin-bottom: 20px;
}

.contact__phone {
    display: inline-block;
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--accent);
    margin-bottom: 34px;
    transition: color var(--transition);
}

.contact__phone:hover {
    color: #ffc062;
}

.contact__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

.contact__trust {
    color: #aab8cc;
    font-weight: 600;
    font-size: 0.98rem;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
    background: #071426;
    color: #aab8cc;
    padding-top: 56px;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 28px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__brand p {
    margin-top: 4px;
    font-size: 0.95rem;
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.footer__nav a {
    font-weight: 600;
    transition: color var(--transition);
}

.footer__nav a:hover {
    color: #fff;
}

.footer__phone {
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    transition: color var(--transition);
}

.footer__phone:hover {
    color: var(--accent);
}

.footer__bottom {
    padding: 24px;
    text-align: center;
    font-size: 0.88rem;
}

/* Botón flotante móvil */
.mobile-call {
    display: none;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* ---- Tablet ---- */
@media (max-width: 1024px) {
    .nav {
        gap: 24px;
    }

    .nav__list {
        gap: 22px;
    }

    .hero__grid,
    .about__grid {
        gap: 44px;
    }

    .services__grid,
    .testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlight__inner {
        grid-template-columns: auto 1fr;
    }

    .highlight__inner .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* ---- Menú hamburguesa ---- */
@media (max-width: 900px) {
    .menu-btn {
        display: flex;
    }

    .nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .nav__list {
        flex-direction: column;
        gap: 0;
        padding: 8px 24px;
    }

    .nav__list a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
    }

    .nav__list a::after {
        display: none;
    }

    .nav__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 24px 24px;
    }

    .header__phone {
        text-align: center;
        font-size: 1.15rem;
    }

    .nav__actions .btn {
        padding: 15px;
    }

    .menu-toggle:checked ~ .nav {
        max-height: 420px;
    }

    .menu-toggle:checked + .menu-btn span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle:checked + .menu-btn span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked + .menu-btn span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero__grid,
    .about__grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 48px 0 72px;
    }

    .hero__media {
        max-width: 560px;
    }

    .about__media {
        order: -1;
    }

    .steps__list {
        grid-template-columns: 1fr;
    }

    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 300px 220px 220px;
    }

    .gallery__item--tall {
        grid-row: span 1;
        grid-column: span 2;
    }
}

/* ---- Móvil ---- */
@media (max-width: 640px) {
    :root {
        --header-h: 66px;
    }

    .container {
        padding: 0 18px;
    }

    .section {
        padding: 72px 0;
    }

    .section__head {
        margin-bottom: 40px;
    }

    .logo__text {
        font-size: 1rem;
    }

    .hero__actions .btn,
    .contact__actions .btn {
        flex: 1 1 100%;
    }

    .hero__media {
        padding: 0 0 28px 24px;
    }

    .hero__img {
        aspect-ratio: 4 / 3.6;
    }

    .services__grid,
    .testimonials__grid {
        grid-template-columns: 1fr;
    }

    .highlight {
        padding: 56px 0;
        text-align: center;
    }

    .highlight__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 22px;
    }

    .highlight__inner .btn {
        justify-self: stretch;
        white-space: normal;
    }

    .gallery__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 160px 160px;
        gap: 12px;
    }

    .contact {
        padding: 80px 0 96px;
    }

    .footer {
        padding-bottom: 76px;
    }

    .footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .footer__nav {
        justify-content: center;
        gap: 20px;
    }

    .mobile-call {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 14px;
        z-index: 90;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px;
        border-radius: 12px;
        background: var(--accent);
        color: var(--navy-dark);
        font-weight: 800;
        box-shadow: 0 10px 28px rgba(7, 20, 38, 0.28);
    }
}

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