/* =========================================================
   MA MOTOR - Responsive one-page website
   ========================================================= */

:root {
    --black: #101010;
    --black-soft: #171717;
    --dark: #222222;
    --grey: #707070;
    --light: #f4f4f2;
    --white: #ffffff;
    --red: #c92727;
    --red-dark: #a91f1f;
    --border: #deded9;

    --container: 1180px;
    --radius: 4px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .10);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: "Inter", Arial, sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

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

button,
a {
    font: inherit;
}

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

.container {
    width: min(calc(100% - 48px), var(--container));
    margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(16, 16, 16, .94);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 36px;
}

.brand {
    width: 122px;
    flex: 0 0 auto;
}

.brand img {
    width: 100%;
    height: 45px;
    object-fit: cover;
    object-position: center;
    border-radius: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.main-nav a {
    color: rgba(255, 255, 255, .84);
    font-size: .84rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    transition: color .2s ease;
}

.main-nav a:hover {
    color: var(--white);
}

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--white);
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
}

.phone-icon {
    color: var(--red);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    width: 42px;
    height: 42px;
    cursor: pointer;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

/* ---------- Shared ---------- */

.eyebrow {
    color: rgba(255, 255, 255, .70);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .20em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--red);
}

.section {
    padding: 110px 0;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 55px;
}

.section-heading h2,
.workshop-copy h2,
.contact-copy h2 {
    margin-top: 10px;
    color: var(--black);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.section-heading > p:last-child {
    margin-top: 18px;
    color: var(--grey);
    max-width: 610px;
}

/* ---------- Buttons ---------- */

.btn {
    min-height: 50px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0 25px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--red);
}

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

.btn-outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, .45);
    background: rgba(0, 0, 0, .12);
}

.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, .08);
}

.btn-light-outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, .35);
}

.btn-light-outline:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, .08);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    isolation: isolate;
    background: var(--black);
    overflow: hidden;
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-image {
    z-index: -3;
    background-image: url("../img/interior.jpg");
    background-size: cover;
    background-position: center 55%;
    transform: scale(1.015);
}

.hero-overlay {
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .63) 42%, rgba(0, 0, 0, .18) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .55), transparent 45%);
}

.hero-content {
    padding-top: 100px;
    padding-bottom: 100px;
}

.hero h1 {
    margin-top: 15px;
    color: var(--white);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: .96;
    letter-spacing: -.06em;
    max-width: 800px;
}

.hero h1 span {
    color: #eeeeea;
}

.hero-text {
    max-width: 570px;
    margin-top: 27px;
    color: rgba(255, 255, 255, .82);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.hero-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 0;
    background: rgba(0, 0, 0, .40);
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.hero-bottom-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, .65);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.hero-line {
    width: 70px;
    height: 1px;
    background: var(--red);
}

/* ---------- Services ---------- */

.services-section {
    background: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.service-card {
    position: relative;
    min-height: 310px;
    padding: 35px 30px;
    background: var(--white);
    overflow: hidden;
}

.service-number {
    position: absolute;
    top: 18px;
    right: 22px;
    color: #ddddda;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: .75rem;
    font-weight: 800;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 55px;
    color: var(--red);
    border: 1px solid #dedede;
    border-radius: 50%;
    font-size: 1.3rem;
}

.service-card h3 {
    color: var(--black);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 1.1rem;
}

.service-card p {
    margin-top: 11px;
    color: var(--grey);
    font-size: .9rem;
}

/* ---------- Workshop ---------- */

.workshop-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: clamp(45px, 8vw, 100px);
    align-items: center;
}

.workshop-image {
    position: relative;
}

.workshop-image img {
    width: 100%;
    /*aspect-ratio: 4 / 3;*/
    object-fit: cover;
}

.image-label {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 13px 20px;
    color: var(--white);
    background: var(--red);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .15em;
}

.workshop-copy h2 {
    margin-bottom: 25px;
}

.workshop-copy p {
    color: var(--grey);
    font-size: .95rem;
}

.workshop-copy p + p {
    margin-top: 15px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    color: var(--black);
    font-weight: 800;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    border-bottom: 1px solid var(--red);
    padding-bottom: 6px;
}

.text-link span {
    color: var(--red);
    font-size: 1.1rem;
}

/* ---------- Feature ---------- */

.feature {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    isolation: isolate;
    overflow: hidden;
    background: var(--black);
}

.feature-image,
.feature-overlay {
    position: absolute;
    inset: 0;
}

.feature-image {
    z-index: -2;
    background: url("../img/recepcion.jpg") center 45% / cover no-repeat;
}

.feature-overlay {
    z-index: -1;
    background: linear-gradient(90deg, rgba(0, 0, 0, .84), rgba(0, 0, 0, .34));
}

.feature-content {
    padding-block: 80px;
}

.feature h2 {
    margin-top: 14px;
    color: var(--white);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 1;
    letter-spacing: -.055em;
}

/* ---------- Gallery ---------- */

.gallery-section {
    background: var(--white);
}

.gallery-heading {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 50px;
}

.gallery-heading > p {
    justify-self: end;
    max-width: 480px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    grid-template-rows: repeat(2, 260px);
    gap: 12px;
}

.gallery-item {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--black);
}

.gallery-large {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease, opacity .5s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
    opacity: .82;
}

.gallery-caption {
    position: absolute;
    left: 18px;
    bottom: 16px;
    padding: 7px 11px;
    color: var(--white);
    background: rgba(0, 0, 0, .70);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ---------- Contact ---------- */

.contact-section {
    padding: 105px 0;
    color: var(--white);
    background: var(--black);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 80px;
    align-items: center;
}

.contact-copy h2 {
    color: var(--white);
    max-width: 650px;
}

.contact-copy > p {
    max-width: 580px;
    margin-top: 20px;
    color: rgba(255, 255, 255, .66);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.contact-details {
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.contact-detail {
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 15px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.detail-icon {
    color: var(--red);
    font-size: 1.2rem;
}

.contact-detail small {
    display: block;
    color: rgba(255, 255, 255, .43);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.contact-detail strong,
.contact-detail span,
.contact-detail a {
    display: block;
}

.contact-detail strong {
    margin-top: 4px;
    color: var(--white);
    font-size: .95rem;
}

.contact-detail span {
    color: rgba(255, 255, 255, .65);
    font-size: .84rem;
}

.contact-detail a:last-child {
    margin-top: 4px;
    color: #e8e8e5;
    font-size: .78rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
    background: #090909;
    color: rgba(255, 255, 255, .48);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.footer-brand {
    width: 105px;
}

.footer-brand img {
    width: 100%;
    height: 36px;
    object-fit: cover;
}

.site-footer p,
.site-footer a {
    font-size: .72rem;
}

.site-footer a:hover {
    color: var(--white);
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 30px;
    background: rgba(0, 0, 0, .94);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: min(1200px, 94vw);
    max-height: 88vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

/* =========================================================
   TABLET LANDSCAPE
   ========================================================= */

@media (max-width: 1100px) {
    .container {
        width: min(calc(100% - 40px), var(--container));
    }

    .main-nav {
        gap: 20px;
    }

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

    .service-card {
        min-height: 270px;
    }

    .workshop-grid {
        gap: 50px;
    }
}

/* =========================================================
   TABLET PORTRAIT
   ========================================================= */

@media (max-width: 820px) {
    html {
        scroll-padding-top: 70px;
    }

    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .header-inner {
        min-height: 70px;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 16px 18px;
        background: rgba(16, 16, 16, .98);
        border-top: 1px solid rgba(255, 255, 255, .10);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 15px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .header-phone {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 720px;
    }

    .hero-image {
        background-position: 61% center;
    }

    .hero-overlay {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .45)),
            linear-gradient(0deg, rgba(0, 0, 0, .62), transparent 55%);
    }

    .hero-content {
        padding-top: 90px;
    }

    .section {
        padding: 85px 0;
    }

    .workshop-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .workshop-copy {
        max-width: 720px;
    }

    .contact-grid {
        gap: 55px;
    }

    .gallery-heading {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-heading > p {
        justify-self: start;
    }

    .feature {
        min-height: 470px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
    .container {
        width: min(calc(100% - 24px), var(--container));
    }

    .brand {
        width: 105px;
    }

    .brand img {
        height: 38px;
    }

    .header-phone {
        font-size: .78rem;
    }

    .phone-icon {
        display: none;
    }

    .hero {
        min-height: 680px;
    }

    .hero-image {
        background-position: 57% center;
    }

    .hero-content {
        padding-top: 90px;
        padding-bottom: 120px;
    }

    .hero h1 {
        font-size: clamp(2.65rem, 14vw, 4.2rem);
    }

    .hero-text {
        font-size: .95rem;
        max-width: 430px;
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .hero-bottom-inner {
        justify-content: space-between;
        font-size: .58rem;
    }

    .hero-line {
        flex: 1;
        max-width: 45px;
    }

    .section {
        padding: 70px 0;
    }

    .section-heading {
        margin-bottom: 35px;
    }

    .section-heading h2,
    .workshop-copy h2,
    .contact-copy h2 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

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

    .service-card {
        min-height: auto;
        padding: 28px 24px;
    }

    .service-icon {
        margin-bottom: 40px;
    }

    .workshop-grid {
        gap: 35px;
    }

    .workshop-image img {
        aspect-ratio: 1 / 1;
    }

    .feature {
        min-height: 430px;
    }

    .feature-image {
        background-position: 58% center;
    }

    .feature h2 {
        font-size: clamp(2.35rem, 12vw, 3.6rem);
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 300px 230px 230px;
    }

    .gallery-large {
        grid-row: auto;
    }

    .contact-section {
        padding: 75px 0;
    }

    .footer-inner {
        min-height: 125px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }

    .lightbox {
        padding: 15px;
    }

    .lightbox img {
        max-width: 96vw;
        max-height: 80vh;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .header-phone {
        display: none;
    }

    .hero {
        min-height: 650px;
    }

    .hero h1 {
        font-size: 2.55rem;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
