/* ===========================
   Construccions i Reformes Albert i Tomàs
   Disseny elegant · Terracota + sorra
   =========================== */

:root {
    /* Paleta */
    --terracota: #C25B3F;
    --terracota-dark: #9E4530;
    --terracota-light: #DC7C5C;
    --terracota-soft: #F3DCD0;

    --sand: #E8DCC8;
    --sand-light: #F2E8D5;
    --sand-lighter: #F8F1E3;
    --cream: #FAF6EF;
    --cream-warm: #FDFAF5;

    --ink: #2B1F18;
    --ink-soft: #4A3A2E;
    --muted: #8A7766;
    --border: #E5D9C4;
    --border-soft: #EFE5D2;

    --white: #FFFFFF;
    --whatsapp: #25D366;
    --whatsapp-dark: #1FAE56;

    /* Tipografia */
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --container-max: 1240px;
    --container-narrow: 980px;
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 14px;
    --radius-xl: 22px;

    --shadow-xs: 0 2px 8px rgba(43, 31, 24, 0.04);
    --shadow-sm: 0 4px 14px rgba(43, 31, 24, 0.06);
    --shadow-md: 0 12px 28px rgba(43, 31, 24, 0.08);
    --shadow-lg: 0 22px 52px rgba(43, 31, 24, 0.12);

    --transition: 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--cream-warm);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button { font-family: inherit; }

::selection { background: var(--terracota); color: var(--white); }

/* ===========================
   Tipografia
   =========================== */
h1, h2, h3, h4 {
    font-family: var(--font-sans);
    color: var(--ink);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-weight: 700; }

em { font-style: normal; color: var(--terracota); }

.display {
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.015em;
}

.lead {
    font-size: 1.08rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

/* ===========================
   Layout helpers
   =========================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 28px;
}

.section {
    padding: 120px 0;
    position: relative;
}

.section-alt { background: var(--sand-lighter); }

.section-header {
    max-width: 720px;
    margin: 0 auto 72px;
    text-align: center;
}

.section-header-row {
    max-width: var(--container-max);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    text-align: left;
    gap: 24px;
    flex-wrap: wrap;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--terracota);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 18px;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--terracota);
}

.eyebrow-light {
    color: var(--sand);
}

.eyebrow-light::before {
    background: var(--sand);
}

.section-header h2 {
    margin-bottom: 18px;
}

.section-intro {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-header-row .section-intro { margin: 0; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--terracota);
    font-weight: 600;
    font-size: 0.92rem;
    border-bottom: 1px solid transparent;
    padding-bottom: 4px;
    transition: gap var(--transition), border-color var(--transition);
}

.link-arrow:hover {
    gap: 14px;
    border-color: var(--terracota);
}

/* ===========================
   Botons
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 32px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background var(--transition), color var(--transition),
                transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border: 1px solid transparent;
    line-height: 1;
    text-align: center;
}

.btn-primary {
    background: var(--terracota);
    color: var(--white);
    box-shadow: 0 10px 28px rgba(194, 91, 63, 0.32);
}

.btn-primary:hover {
    background: var(--terracota-dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(194, 91, 63, 0.42);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

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

.btn-light {
    background: var(--cream-warm);
    color: var(--ink);
}

.btn-light:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.btn-full { width: 100%; }

.btn-outline {
    background: transparent;
    color: var(--terracota);
    border-color: var(--terracota);
}

.btn-outline:hover {
    background: var(--terracota);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(194, 91, 63, 0.28);
}

.gallery-cta {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}



/* ===========================
   Navbar
   =========================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(253, 250, 245, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), background var(--transition), padding var(--transition);
}

.navbar.scrolled {
    border-color: var(--border-soft);
    background: rgba(253, 250, 245, 0.96);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 86px;
    transition: height var(--transition);
}

.navbar.scrolled .navbar-inner { height: 72px; }

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 58px;
    width: auto;
    transition: height var(--transition);
}

.navbar.scrolled .logo { height: 48px; }

.nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav a {
    display: inline-block;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--ink);
    border-radius: 999px;
    transition: color var(--transition), background var(--transition);
}

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

.nav a.nav-cta {
    background: var(--terracota);
    color: var(--white);
    padding: 12px 22px;
    margin-left: 12px;
    letter-spacing: 0.02em;
}

.nav a.nav-cta:hover {
    background: var(--terracota-dark);
    color: var(--white);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 1.5px;
    background: var(--ink);
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   Hero
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 160px 0 60px;
    color: var(--white);
    overflow: hidden;
    text-align: left;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1617720356637-6264c1c0b4bb?auto=format&fit=crop&w=2400&q=80');
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    animation: heroZoom 14s ease-out forwards;
}

@keyframes heroZoom {
    to { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(43, 31, 24, 0.82) 0%, rgba(43, 31, 24, 0.55) 50%, rgba(43, 31, 24, 0.25) 100%),
        linear-gradient(180deg, transparent 60%, rgba(43, 31, 24, 0.45) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
}

.hero-content > * {
    max-width: 640px;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.hero-eyebrow {
    display: inline-block;
    color: var(--terracota-soft);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(243, 220, 208, 0.4);
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.4rem, 5.6vw, 4.4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

.hero-subtitle {
    font-size: clamp(1.02rem, 1.4vw, 1.15rem);
    max-width: 560px;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 42px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.hero-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: auto;
    padding-top: 80px;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 28px;
    padding-right: 28px;
}

.stat {
    padding: 28px 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-num {
    display: block;
    font-weight: 700;
    font-size: clamp(2.2rem, 4vw, 3rem);
    line-height: 1;
    color: var(--white);
    letter-spacing: -0.02em;
}

.stat-num i {
    font-style: normal;
    color: var(--terracota-light);
    font-size: 0.7em;
    margin-left: 2px;
    font-weight: 600;
}

.stat-label {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ===========================
   Trust strip
   =========================== */
.trust-strip {
    background: var(--cream);
    padding: 32px 0;
    border-bottom: 1px solid var(--border-soft);
}

.trust-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-label {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.trust-logos {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.trust-logos span {
    font-size: 0.95rem;
    color: var(--ink-soft);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ===========================
   Serveis
   =========================== */
.section-services {
    background: var(--cream-warm);
}

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

.services-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition),
                border-color var(--transition);
    color: inherit;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.service-num {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 2;
    font-size: 0.72rem;
    color: var(--white);
    letter-spacing: 0.18em;
    font-weight: 600;
    background: rgba(43, 31, 24, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 6px 10px;
    border-radius: 999px;
}

.service-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: var(--sand);
    transition: transform 0.6s ease;
}

.service-card:hover .service-image { transform: scale(1.05); }

.service-body {
    padding: 28px 26px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.005em;
}

.service-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 22px;
    flex: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--terracota);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    transition: gap var(--transition);
}

.service-card:hover .service-link { gap: 12px; }

/* ===========================
   CTA Banner
   =========================== */
.cta-banner {
    background:
        linear-gradient(135deg, rgba(43, 31, 24, 0.85) 0%, rgba(158, 69, 48, 0.75) 100%),
        url('https://images.unsplash.com/photo-1542621334-a254cf47733d?auto=format&fit=crop&w=1800&q=70') center/cover;
    color: var(--white);
    padding: 90px 0;
    position: relative;
}

.cta-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-banner h2 {
    color: var(--white);
    margin-bottom: 0;
    max-width: 640px;
}

/* ===========================
   Nosaltres
   =========================== */
.section-about {
    background: var(--sand-lighter);
    overflow: hidden;
}

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

.about-images {
    position: relative;
    aspect-ratio: 1 / 1.1;
}

.about-image {
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
}

.about-image-main {
    position: absolute;
    top: 0; left: 0;
    width: 75%;
    height: 78%;
    background-image: url('https://images.unsplash.com/photo-1516216628859-9bccecab13ca?auto=format&fit=crop&w=1000&q=80');
}

.about-image-secondary {
    position: absolute;
    bottom: 0; right: 0;
    width: 55%;
    height: 55%;
    background-image: url('https://images.unsplash.com/photo-1558227691-41ea78d1f631?auto=format&fit=crop&w=800&q=80');
    border: 8px solid var(--sand-lighter);
}

.about-badge {
    position: absolute;
    bottom: 20%;
    left: -10px;
    background: var(--terracota);
    color: var(--white);
    padding: 22px 26px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 180px;
}

.about-badge .badge-num {
    display: block;
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
}

.about-badge small {
    display: block;
    margin-top: 8px;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracota-soft);
    font-weight: 500;
    line-height: 1.45;
}

.about-text h2 { margin-bottom: 22px; }

.about-text > p.lead {
    margin-bottom: 36px;
}

.features {
    list-style: none;
    display: grid;
    gap: 22px;
}

.features li {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.feature-bullet {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--terracota-soft);
    color: var(--terracota);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.features h4 {
    font-size: 1.02rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.features p {
    color: var(--muted);
    font-size: 0.93rem;
}

/* ===========================
   Projectes
   =========================== */
.section-projects { background: var(--cream-warm); }

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

.project-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    transition: transform var(--transition), box-shadow var(--transition);
    aspect-ratio: 4 / 5;
    cursor: pointer;
}

.project-card.project-large {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

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

.project-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
}

.project-card:hover .project-image { transform: scale(1.06); }

.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(43, 31, 24, 0.88) 0%, rgba(43, 31, 24, 0.15) 45%, transparent 65%);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 30px 28px;
    color: var(--white);
    z-index: 2;
}

.project-tag {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--terracota-soft);
    background: rgba(194, 91, 63, 0.25);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
    font-weight: 600;
    border: 1px solid rgba(243, 220, 208, 0.3);
}

.project-info h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.project-info p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ===========================
   Reels
   =========================== */
.section-reels {
    background: var(--ink);
    color: var(--white);
}

.section-reels .eyebrow {
    color: var(--terracota-light);
}

.section-reels .eyebrow::before {
    background: var(--terracota-light);
}

.section-reels h2 { color: var(--white); }

.section-reels .link-arrow { color: var(--terracota-light); }
.section-reels .link-arrow:hover { border-color: var(--terracota-light); }

.reels-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--terracota) transparent;
}

.reels-track::-webkit-scrollbar { height: 6px; }
.reels-track::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.reels-track::-webkit-scrollbar-thumb { background: var(--terracota); border-radius: 3px; }

.reel-card {
    flex: 0 0 240px;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform var(--transition);
}

.reel-card:hover { transform: translateY(-6px); }

.reel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(43, 31, 24, 0.85) 0%, transparent 55%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    transition: background var(--transition);
}

.reel-card:hover .reel-overlay {
    background: linear-gradient(to top, rgba(194, 91, 63, 0.6) 0%, rgba(43, 31, 24, 0.4) 100%);
}

.reel-play {
    align-self: center;
    margin: auto 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--terracota);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition), background var(--transition);
}

.reel-play:hover {
    transform: scale(1.1);
    background: var(--white);
}

.reel-play svg { width: 24px; height: 24px; margin-left: 3px; }

.reel-meta { color: var(--white); }

.reel-tag {
    display: inline-block;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--terracota-soft);
    margin-bottom: 6px;
    font-weight: 600;
}

.reel-meta h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
}

/* ===========================
   Testimonis
   =========================== */
.section-testimonials {
    background: var(--cream);
}

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

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 34px;
    border: 1px solid var(--border-soft);
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 40px;
    width: 40px;
    height: 3px;
    background: var(--terracota);
    border-radius: 0 0 3px 3px;
}

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

.stars {
    color: var(--terracota);
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
}

.testimonial-card blockquote {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 24px;
    font-weight: 400;
}

.testimonial-card figcaption {
    border-top: 1px solid var(--border-soft);
    padding-top: 18px;
}

.testimonial-card figcaption strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

.testimonial-card figcaption span {
    font-size: 0.82rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

/* ===========================
   FAQs
   =========================== */
.section-faqs { background: var(--cream-warm); }

.faqs { max-width: var(--container-narrow); }

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item[open] {
    border-color: var(--terracota-soft);
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    transition: color var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { color: var(--terracota); }

.faq-toggle {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.faq-toggle::before,
.faq-toggle::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    background: var(--terracota);
    transition: transform var(--transition);
}

.faq-toggle::before {
    width: 14px;
    height: 1.5px;
    transform: translate(-50%, -50%);
}

.faq-toggle::after {
    width: 1.5px;
    height: 14px;
    transform: translate(-50%, -50%);
}

.faq-item[open] .faq-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    padding: 0 28px 26px;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

/* ===========================
   Contacte
   =========================== */
.section-contact {
    background: var(--sand-lighter);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 56px;
    align-items: start;
}

.contact-info {
    display: grid;
    gap: 14px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

a.contact-item:hover {
    border-color: var(--terracota);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--terracota-soft);
    color: var(--terracota);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg { width: 22px; height: 22px; }

.contact-label {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 4px;
    font-weight: 600;
}

.contact-value {
    display: block;
    font-weight: 600;
    color: var(--ink);
    font-size: 1rem;
    word-break: break-word;
}

/* Form */
.contact-form {
    background: var(--white);
    padding: 42px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-xs);
    display: grid;
    gap: 20px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-double > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--ink-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-row input,
.form-row textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--cream-warm);
    color: var(--ink);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    background: var(--white);
    border-color: var(--terracota);
    box-shadow: 0 0 0 4px rgba(194, 91, 63, 0.12);
}

.form-row textarea {
    resize: vertical;
    min-height: 130px;
}

.form-feedback {
    text-align: center;
    font-size: 0.95rem;
    min-height: 1.2em;
    margin-top: 4px;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.78);
    padding-top: 90px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
    gap: 56px;
    padding-bottom: 64px;
}

.footer-brand p {
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.93rem;
    max-width: 340px;
    line-height: 1.7;
}

.footer-logo {
    height: 72px;
    width: auto;
    background: var(--cream-warm);
    padding: 10px 14px;
    border-radius: var(--radius);
}

.footer h4 {
    color: var(--white);
    margin-bottom: 18px;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.footer-col li, .footer-col a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.93rem;
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--terracota-light); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 26px 0;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.45);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom a:hover { color: var(--terracota-light); }

/* ===========================
   WhatsApp sticky
   =========================== */
.whatsapp-sticky {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--whatsapp);
    color: var(--white);
    border-radius: 999px;
    padding: 14px 22px 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.42);
    z-index: 999;
    font-weight: 600;
    font-size: 0.94rem;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    animation: whatsappPulse 2.6s ease-in-out infinite;
}

.whatsapp-sticky:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 36px rgba(37, 211, 102, 0.55);
    animation: none;
}

.whatsapp-icon { display: flex; align-items: center; }
.whatsapp-icon svg { width: 26px; height: 26px; }

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(37, 211, 102, 0.42), 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 10px 30px rgba(37, 211, 102, 0.42), 0 0 0 16px rgba(37, 211, 102, 0);
    }
}

/* ===========================
   Pàgines de servei (landings)
   =========================== */
.service-hero {
    position: relative;
    min-height: 68vh;
    display: flex;
    align-items: flex-end;
    padding: 180px 0 80px;
    color: var(--white);
    overflow: hidden;
}

.service-hero .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: heroZoom 14s ease-out forwards;
}

.service-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(43, 31, 24, 0.35) 0%, rgba(43, 31, 24, 0.85) 100%),
        linear-gradient(90deg, rgba(43, 31, 24, 0.55) 0%, transparent 60%);
}

.service-hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.06em;
    font-weight: 500;
}

.breadcrumb a {
    color: var(--terracota-soft);
    transition: color var(--transition);
}

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

.breadcrumb-sep { opacity: 0.5; }

.service-hero h1 {
    color: var(--white);
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
}

.service-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    max-width: 620px;
    margin-bottom: 34px;
}

/* Intro: 2 col text + image */
.service-intro {
    background: var(--cream-warm);
}

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

.intro-text .eyebrow { margin-bottom: 16px; }

.intro-text h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin-bottom: 22px;
    line-height: 1.2;
}

.intro-text p {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
    margin-bottom: 18px;
}

.intro-text p:last-of-type { margin-bottom: 0; }

.intro-image {
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Features / inclou */
.service-features-section {
    background: var(--sand-lighter);
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
    max-width: 960px;
    margin: 0 auto;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    font-size: 0.98rem;
    color: var(--ink);
    line-height: 1.55;
}

.feature-check {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: var(--terracota);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 1px;
}

/* Procés */
.section-process {
    background: var(--cream-warm);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
}

.process-step {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 34px 28px 32px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
}

.process-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.process-num {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--terracota);
    line-height: 1;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.process-step h4 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.process-step p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Galeria de servei (masonry simple) */
.service-gallery {
    background: var(--ink);
    color: var(--white);
}

.service-gallery .eyebrow { color: var(--terracota-light); }
.service-gallery .eyebrow::before { background: var(--terracota-light); }
.service-gallery h2 { color: var(--white); }
.service-gallery .section-intro { color: rgba(255, 255, 255, 0.7); }

.service-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 160px;
    gap: 16px;
}

.service-gallery-item {
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition);
    background-color: #1a1310;
}

.service-gallery-item:hover { transform: scale(1.02); }

.gi-1 { grid-column: span 3; grid-row: span 2; }
.gi-2 { grid-column: span 3; grid-row: span 1; }
.gi-3 { grid-column: span 2; grid-row: span 1; }
.gi-4 { grid-column: span 1; grid-row: span 1; }
.gi-5 { grid-column: span 2; grid-row: span 2; }
.gi-6 { grid-column: span 4; grid-row: span 1; }

/* Related services */
.section-related {
    background: var(--sand-lighter);
}

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


/* ===========================
   Page hero (pàgines internes)
   =========================== */
.page-hero {
    background: var(--sand-lighter);
    padding: 190px 0 80px;
    border-bottom: 1px solid var(--border-soft);
}

.page-hero-content {
    max-width: 760px;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.page-hero-subtitle {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--muted);
    max-width: 620px;
}

/* ===========================
   Filtre de projectes
   =========================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-btn:hover {
    border-color: var(--terracota);
    color: var(--terracota);
}

.filter-btn.is-active {
    background: var(--terracota);
    border-color: var(--terracota);
    color: var(--white);
}

.filter-empty {
    text-align: center;
    color: var(--muted);
    padding: 60px 0;
    font-size: 1rem;
}

/* ===========================
   Graella de projectes (llistat)
   =========================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.project-item {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-item.is-hidden { display: none; }

.project-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.project-item-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: var(--sand);
    transition: transform 0.6s ease;
}

.project-item:hover .project-item-image { transform: scale(1.05); }

.project-item-body {
    padding: 26px 26px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-tag-light {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--terracota);
    background: var(--terracota-soft);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.project-item h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.005em;
}

.project-item p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ===========================
   Banda d'estadístiques
   =========================== */
.section-stats-band {
    background: var(--cream-warm);
    padding: 90px 0;
}

.stats-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-block {
    text-align: center;
    padding: 36px 20px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}

.stat-block-num {
    display: block;
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 12px;
}

.stat-block-num i {
    font-style: normal;
    color: var(--terracota);
    font-size: 0.7em;
    font-weight: 600;
}

.stat-block-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

/* Select del formulari */
.form-row select {
    font-family: inherit;
    font-size: 1rem;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--cream-warm);
    color: var(--ink);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A7766' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 42px;
}

.form-row select:focus {
    outline: none;
    background-color: var(--white);
    border-color: var(--terracota);
    box-shadow: 0 0 0 4px rgba(194, 91, 63, 0.12);
}

@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .page-hero { padding: 140px 0 60px; }
    .projects-grid { grid-template-columns: 1fr; }
    .stats-band { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .stat-block { padding: 28px 16px; }
    .filter-bar { gap: 8px; margin-bottom: 36px; }
    .filter-btn { padding: 10px 18px; font-size: 0.82rem; }
    .section-stats-band { padding: 70px 0; }
}


/* ===========================
   Nosaltres: història, equip i valors
   =========================== */
.section-story { background: var(--cream-warm); }

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

.story-image {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    background-color: var(--sand);
    box-shadow: var(--shadow-md);
}

.story-text h2 { margin-bottom: 24px; }

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

.story-sign {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border-soft);
}

.story-sign-num {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--terracota);
}

.story-sign-label {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    max-width: 160px;
    line-height: 1.5;
}

.section-team { background: var(--sand-lighter); }

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

.team-card {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.team-photo {
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center top;
    background-color: var(--sand);
    filter: saturate(0.92);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.team-card:hover .team-photo {
    transform: scale(1.04);
    filter: saturate(1);
}

.team-body {
    padding: 26px 28px 30px;
    position: relative;
    background: var(--white);
}

.team-role {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--terracota);
    margin-bottom: 10px;
}

.team-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.team-body p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.section-values { background: var(--cream-warm); padding-bottom: 28px; }

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.value-card {
    padding: 34px 28px 32px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.value-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--terracota);
    margin-bottom: 18px;
}

.value-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.value-card p {
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

.section-values + .section-stats-band { padding-top: 0; }

@media (max-width: 1024px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .story-grid { gap: 48px; }
}

@media (max-width: 768px) {
    .story-grid { grid-template-columns: 1fr; gap: 40px; }
    .story-image { aspect-ratio: 4 / 3; }
    .team-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .values-grid { grid-template-columns: 1fr; }
}


/* ===========================
   Projectes dinàmics (Supabase)
   =========================== */
a.project-card { display: block; color: inherit; }
a.project-item { color: inherit; }

.project-item-meta {
    display: block;
    margin-top: 14px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

.projects-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 60px 0;
}

.skeleton {
    background: linear-gradient(90deg, var(--sand-light) 25%, var(--sand-lighter) 50%, var(--sand-light) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s ease-in-out infinite;
    border: 0;
}

.project-item.skeleton { aspect-ratio: 4 / 5; }

.skeleton-line,
.skeleton-title {
    display: block;
    border-radius: 999px;
}

.skeleton-line { height: 14px; margin-bottom: 22px; }
.skeleton-title { height: 54px; width: min(520px, 80%); border-radius: var(--radius); }

@keyframes skeleton {
    to { background-position: -200% 0; }
}

/* Fitxa de projecte */
.project-hero {
    position: relative;
    min-height: 62vh;
    display: flex;
    align-items: flex-end;
    padding: 180px 0 70px;
    color: var(--white);
    overflow: hidden;
    background: var(--ink);
}

.project-hero-loading { background: var(--sand-lighter); }

.project-hero .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: heroZoom 14s ease-out forwards;
}

.project-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(43, 31, 24, 0.25) 0%, rgba(43, 31, 24, 0.82) 100%);
}

.project-hero-content { position: relative; z-index: 2; width: 100%; }

.project-hero-tag {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--terracota-soft);
    background: rgba(194, 91, 63, 0.3);
    border: 1px solid rgba(243, 220, 208, 0.3);
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
    transition: background var(--transition);
}

.project-hero-tag:hover { background: rgba(194, 91, 63, 0.55); }

.project-hero h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
    max-width: 900px;
}

.project-body { background: var(--cream-warm); }

.project-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
    gap: 56px;
    align-items: start;
}

.project-aside {
    position: sticky;
    top: 110px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 34px 32px;
}

.project-aside-lead {
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 16px;
}

.project-aside-text {
    color: var(--muted);
    font-size: 0.97rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.project-facts {
    margin: 24px 0 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    display: grid;
    gap: 12px;
}

.project-facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.project-facts dt {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

.project-facts dd {
    font-weight: 600;
    color: var(--ink);
    text-align: right;
}

.project-media { display: grid; gap: 16px; }

.project-video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--ink);
}

.project-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 150px;
    gap: 16px;
}

.pg-item {
    border: 0;
    padding: 0;
    cursor: zoom-in;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--sand);
    grid-column: span 3;
    grid-row: span 2;
}

.pg-item span {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.pg-item:hover span { transform: scale(1.05); }
.pg-item:focus-visible { outline: 3px solid var(--terracota); outline-offset: 3px; }

.pg-item-1 { grid-column: span 6; grid-row: span 3; }
.pg-item-2, .pg-item-3 { grid-column: span 3; grid-row: span 2; }
.pg-item-4, .pg-item-5, .pg-item-6 { grid-column: span 2; grid-row: span 2; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 14, 10, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-nav:hover { background: var(--terracota); border-color: var(--terracota); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-count {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

@media (max-width: 960px) {
    .project-layout { grid-template-columns: 1fr; gap: 32px; }
    .project-aside { position: static; order: 2; }
    .project-media { order: 1; }
}

@media (max-width: 768px) {
    .project-hero { min-height: auto; padding: 130px 0 50px; }
    .project-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: 10px; }
    .pg-item, .pg-item-2, .pg-item-3, .pg-item-4, .pg-item-5, .pg-item-6 { grid-column: span 1; grid-row: span 1; }
    .pg-item-1 { grid-column: span 2; grid-row: span 2; }
    .project-aside { padding: 28px 24px; }
    .lightbox { padding: 60px 12px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-close, .lightbox-nav { width: 44px; height: 44px; }
}

/* ===========================
   Animacions reveal
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .project-card.project-large { grid-column: span 2; aspect-ratio: 16 / 10; }
    .testimonials-grid { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(3, 1fr); }
    .service-gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .gi-1 { grid-column: span 2; grid-row: span 2; }
    .gi-2 { grid-column: span 2; grid-row: span 1; }
    .gi-3 { grid-column: span 2; grid-row: span 1; }
    .gi-4 { grid-column: span 2; grid-row: span 1; }
    .gi-5 { grid-column: span 2; grid-row: span 1; }
    .gi-6 { grid-column: span 4; grid-row: span 1; }
}

@media (max-width: 860px) {
    .about {
        grid-template-columns: 1fr;
        gap: 56px;
    }
    .about-images { max-width: 460px; margin: 0 auto; width: 100%; }
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .intro-grid { grid-template-columns: 1fr; gap: 48px; }
    .intro-image { max-width: 500px; margin: 0 auto; width: 100%; }
    .feature-list { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .section-header { margin-bottom: 48px; }

    .nav-toggle { display: flex; }

    .nav {
        position: fixed;
        top: 86px;
        left: 0; right: 0;
        background: var(--cream-warm);
        border-bottom: 1px solid var(--border-soft);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .nav.open { max-height: 600px; }

    .nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 24px;
        gap: 2px;
    }

    .nav a {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius);
    }

    .nav a.nav-cta {
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
    }

    .hero { min-height: auto; padding: 140px 0 80px; }
    .hero-stats { grid-template-columns: 1fr; gap: 0; padding-top: 60px; }
    .stat { padding: 24px 0 0; }

    .services-grid,
    .services-grid-4 { grid-template-columns: 1fr; }
    .service-body { padding: 26px 24px 28px; }

    .gallery { grid-template-columns: 1fr; }
    .project-card,
    .project-card.project-large {
        aspect-ratio: 5 / 6;
        grid-column: span 1;
    }
    .project-card.project-large { aspect-ratio: 16 / 11; }

    .service-hero { min-height: auto; padding: 130px 0 60px; }
    .service-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
    }
    .gi-1, .gi-2, .gi-3, .gi-4, .gi-5, .gi-6 {
        grid-column: span 2;
        grid-row: span 1;
    }
    .gi-1 { grid-row: span 2; }

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

    .cta-banner-inner {
        text-align: left;
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }
    .cta-banner { padding: 70px 0; }
    .cta-banner h2 { font-size: clamp(1.6rem, 6vw, 2rem); }
    .cta-banner-inner .btn { width: 100%; }

    /* Galeria de projectes: només mostrem 4 a mòbil */
    .gallery .project-card:nth-child(n+5) { display: none; }

    /* About: layout mòbil simplificat */
    .section-about { padding: 70px 0 90px; }
    .about { gap: 40px; }
    .about-images {
        max-width: 100%;
        aspect-ratio: 4 / 3.2;
    }
    .about-image-main {
        width: 80%;
        height: 80%;
    }
    .about-image-secondary {
        width: 50%;
        height: 50%;
        border-width: 6px;
    }
    .about-badge {
        left: 0;
        bottom: 8%;
        padding: 18px 20px;
        max-width: 160px;
    }
    .about-badge .badge-num { font-size: 1.9rem; }
    .about-badge small { font-size: 0.68rem; }

    .reel-card { flex: 0 0 200px; }

    .testimonial-card { padding: 32px 28px; }
    .testimonial-card blockquote { font-size: 1.12rem; }

    .contact-form { padding: 28px; }
    .form-row-double { grid-template-columns: 1fr; }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: left;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .whatsapp-sticky {
        padding: 16px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        justify-content: center;
        bottom: 18px;
        right: 18px;
    }
    .whatsapp-cta { display: none; }

    .section-header-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .navbar-inner { height: 70px; }
    .navbar.scrolled .navbar-inner { height: 64px; }
    .nav { top: 70px; }
    .logo { height: 46px; }
    .navbar.scrolled .logo { height: 42px; }

    .hero { padding: 120px 0 60px; }
    .btn { padding: 15px 26px; font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-bg { animation: none; transform: scale(1); }
}
