/* -------------------------------------------------------------------------- */
/* /assets/styles.css */
/* -------------------------------------------------------------------------- */

:root {
    --brown: #4b2c21; /* header / deep brown */
    --brown-2: #36241e; /* darker brown */
    --orange: #d98552; /* CTA / accent */
    --beige: #f6efe9; /* page background */
    --muted: #a88b7a; /* muted text */
    --dark: #2b241f; /* body text */
    --overlay: rgba(36, 22, 18, 0.45);
    --white: #ffffff;

    --container: 1120px;
    --radius: 8px;
}

/* Base */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    color: var(--dark);
    background: var(--beige);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

main {
    flex: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header: three column layout (nav | logo | contact) */
.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.site-header {
    background: var(--brown);
    color: var(--white);
    position: relative;
}

/* Left nav */
.main-nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    opacity: 0.95;
}

/* Hamburger menu */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    width: 30px;
    height: 24px;
    cursor: pointer;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--white);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger span:last-child {
    margin-bottom: 0;
}

/* Center brand */
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
}

.brand a {
    text-decoration: none;
}

.logo-img {
    width: 78px;
    height: auto;
}

/* Right utilities */
.header-utility {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
}

.header-utility .sm {
    color: inherit;
    text-decoration: none;
    opacity: 0.9;
    font-size: 12px;
}

/* Mobile title */
.mobile-title {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    z-index: 1;
}

/* Hero */
.hero {
    position: relative;
    min-height: 420px;
    background-image: url('hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 64px 20px;
    color: var(--white);
}

.hero-title {
    font-size: 48px;
    margin: 0;
    line-height: 1.02;
    letter-spacing: -1px;
}

.hero-sub {
    margin: 14px 0 24px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
}

.cta-row {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
}

.btn-primary {
    background: var(--orange);
    color: var(--brown-2);
}

.btn-ghost {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.18);
    color: var(--white);
}

/* About card */
.about {
    padding: 54px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.6) 100%);
}

.about-card {
    display: flex;
    gap: 26px;
    background: var(--white);
    padding: 18px;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(38, 28, 24, 0.06);
}

.about-photo {
    flex: 1 0 300px;
    max-width: 480px;
    border: 6px solid rgba(216, 133, 82, 0.06);
    padding: 8px;
}

.about-body {
    flex: 2 1 0;
    min-width: 0;
}

.about h2 {
    color: var(--brown-2);
    font-size: 32px;
    margin: 0 0 14px;
    margin-top: 20px;
}

.lead {
    color: var(--muted);
    margin-bottom: 18px;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.features li {
    margin: 8px 0;
    padding-left: 22px;
    position: relative;
}

.features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 2px;
}

.link-servizi {
    display: inline-block;
    margin-top: 6px;
    color: var(--orange);
    font-weight: 700;
    text-decoration: none;
}

/* Services */
.servizi {
    padding: 54px 0;
    background: rgba(0,0,0,0.02);
}

.servizi h2 {
    text-align: center;
    color: var(--brown-2);
    font-size: 32px;
    margin: 0 0 40px;
}

.services-container {
    position: relative;
}

.services-carousel {
    display: flex;
    gap: 16px;
    overflow: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0 20px;
}

.service-card {
    flex: 0 0 300px;
    min-width: 300px;
    scroll-snap-align: start;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    color: var(--brown-2);
    font-size: 24px;
    margin: 0 0 12px;
}

.service-card p {
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.service-card a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    align-self: flex-start;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--orange);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.carousel-nav:focus {
    outline: none;
}

.prev {
    left: -60px;
}

.next {
    right: -60px;
}

/* Stats */
.stats {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    padding: 26px 0;
    color: var(--brown-2);
}

.stat {
    flex: 1;
    text-align: center;
}

.num {
    font-size: 30px;
    font-weight: 800;
    color: var(--orange);
}

.label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, var(--brown-2), var(--brown));
    color: var(--white);
    padding: 26px 0;
}

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

.footer-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.footer-meta {
    font-size: 13px;
    text-align: right;
}

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

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

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero-title {
        font-size: 36px;
    }

    .hero {
        min-height: 360px;
    }

    .about-card {
        flex-direction: column;
    }

    .about-photo {
        width: 80%;
        flex: unset;
    }

    .stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat {
        flex: 1 1 50%;
    }

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

    .footer-meta {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .header-grid {
        grid-template-columns: auto 1fr auto;
        position: relative;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle:checked ~ .wrap .header-grid .main-nav {
        display: flex;
        flex-direction: column;
        background: var(--brown);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 12px 0;
        z-index: 10;
    }

    .menu-toggle:checked ~ .wrap .header-grid .main-nav a {
        margin: 8px 0;
        padding: 8px 20px;
    }

    .site-title {
        display: none;
    }

    .header-utility .phone,
    .header-utility .sm {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .header-utility {
        align-items: flex-end;
        display: flex;
    }

    .hero-title {
        font-size: 28px;
    }

    .stat {
        flex: 1 1 100%;
    }

    .carousel-nav {
        display: none;
    }

    .services-carousel {
        overflow-x: auto;
    }

    .mobile-title {
        display: block;
    }
}

/* Desktop scaling at 120% */
@media (min-width: 992px) {
    .header-grid {
        gap: 14.4px;
        padding: 14.4px 0;
    }

    .main-nav {
        gap: 21.6px;
    }

    .site-title {
        font-size: 28.8px;
    }

    .logo-img {
        width: 93.6px;
    }

    .header-utility {
        font-size: 15.6px;
    }

    .header-utility .sm {
        font-size: 14.4px;
    }

    .mobile-title {
        font-size: 31.2px;
    }

    .hero {
        min-height: 504px;
    }

    .hero-content {
        padding: 76.8px 20px;
    }

    .hero-title {
        font-size: 57.6px;
    }

    .hero-sub {
        margin: 16.8px 0 28.8px;
        font-size: 21.6px;
    }

    .cta-row {
        gap: 14.4px;
    }

    .btn {
        padding: 14.4px 21.6px;
        border-radius: 7.2px;
    }

    .about {
        padding: 64.8px 0;
    }

    .about-card {
        gap: 31.2px;
        padding: 21.6px;
        border-radius: 7.2px;
        box-shadow: 0 7.2px 21.6px rgba(38, 28, 24, 0.06);
    }

    .about-photo {
        max-width: 576px;
        border: 7.2px solid rgba(216, 133, 82, 0.06);
        padding: 9.6px;
    }

    .about h2 {
        font-size: 38.4px;
        margin: 0 0 16.8px;
        margin-top: 24px;
    }

    .lead {
        margin-bottom: 21.6px;
    }

    .features li {
        margin: 9.6px 0;
        padding-left: 26.4px;
    }

    .features li::before {
        top: 12px;
        width: 9.6px;
        height: 9.6px;
    }

    .link-servizi {
        margin-top: 7.2px;
    }

    .servizi {
        padding: 64.8px 0;
    }

    .servizi h2 {
        font-size: 38.4px;
        margin: 0 0 48px;
    }

    .services-carousel {
        gap: 19.2px;
        padding: 0 24px;
    }

    .service-card {
        flex: 0 0 345px;
        min-width: 345px;
        padding: 24px;
        border-radius: 9.6px;
        box-shadow: 0 4.8px 14.4px rgba(0,0,0,0.1);
    }

    .service-card h3 {
        font-size: 28.8px;
        margin: 0 0 14.4px;
    }

    .carousel-nav {
        width: 60px;
        height: 60px;
        font-size: 28.8px;
    }

    .prev {
        left: -72px;
    }

    .next {
        right: -72px;
    }

    .stats {
        gap: 36px;
        padding: 31.2px 0;
    }

    .num {
        font-size: 36px;
        margin-top: 7.2px;
    }

    .label {
        font-size: 15.6px;
        margin-top: 7.2px;
    }

    .site-footer {
        padding: 31.2px 0;
    }

    .footer-grid {
        gap: 14.4px;
    }

    .footer-links {
        gap: 14.4px;
    }

    .footer-meta {
        font-size: 15.6px;
    }
}
