/* ==========================================================================
   Impools · Piscines Ricard — full d'estils
   ========================================================================== */

:root {
  --ink: #0b2c42;
  --ink-soft: #3c5567;
  --ink-mute: #6d8090;
  --deep: #071d2c;
  --aqua: #bad2e5;
  --aqua-soft: #e3eef6;
  --accent: #2c7da0;
  --sand: #f3eee6;
  --paper: #faf8f4;
  --white: #ffffff;
  --line: rgba(11, 44, 66, 0.12);
  --line-light: rgba(255, 255, 255, 0.18);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
::selection { background: var(--aqua); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--white); padding: 8px 14px; }

/* ---------- Tipografia ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.eyebrow.light { color: var(--aqua); }

h1, h2, h3, .display, .step .n, .metric strong, .big-metrics strong, .intro-stats strong, .hero-stats strong {
  font-variant-numeric: lining-nums;
}
h1, h2, h3, .display {
  font-family: var(--serif); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; margin: 0;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); }
.dark h2 em, .hero h1 em, .page-hero h1 em { color: var(--aqua); }
h2 { font-size: clamp(38px, 5.2vw, 72px); }
h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.7; color: var(--ink-soft); }
p { margin: 0 0 1.1em; }
.muted { color: var(--ink-mute); }

/* ---------- Botons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 30px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--accent); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--aqua); }
.btn-ghost { border-color: currentColor; }
.btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-ghost.ink:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 6px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* ---------- Capçalera ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background .5s var(--ease), box-shadow .5s var(--ease), height .5s var(--ease);
  color: var(--white);
}
.topbar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand img { height: 46px; width: auto; transition: filter .5s var(--ease), height .5s var(--ease); filter: brightness(0) invert(1); }
.topbar.solid, .topbar.on-light {
  background: rgba(250, 248, 244, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  color: var(--ink); box-shadow: 0 1px 0 var(--line);
}
.topbar.solid { height: 72px; }
.topbar.solid .brand img, .topbar.on-light .brand img { filter: none; }
.topbar.solid .brand img { height: 40px; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav > a, .nav .has-sub > a {
  white-space: nowrap;
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  position: relative; padding: 8px 0;
}
.nav > a:not(.btn)::after, .nav .has-sub > a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: currentColor;
  transition: right .45s var(--ease);
}
.nav > a:hover::after, .nav > a[aria-current="page"]::after,
.nav .has-sub:hover > a::after, .nav .has-sub > a[aria-current="page"]::after { right: 0; }
.has-sub { position: relative; }
.submenu {
  position: absolute; top: 100%; left: -24px; min-width: 290px;
  background: var(--white); color: var(--ink); padding: 14px 0; border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(7, 29, 44, 0.28);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: 9px 24px; font-size: 14px; transition: background .25s, padding .35s var(--ease); }
.submenu a:hover { background: var(--aqua-soft); padding-left: 30px; }
.nav .btn { padding: 13px 22px; }
.topbar:not(.solid):not(.on-light) .nav .btn { background: var(--white); color: var(--ink); }
/* Botó "Contacte" quan ets a la pàgina de contacte: canvia de color en lloc de subratllar-se */
.nav .btn[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--white); }
.topbar:not(.solid):not(.on-light) .nav .btn[aria-current="page"] { background: var(--aqua); color: var(--ink); }

.menu-toggle { display: none; width: 44px; height: 44px; position: relative; z-index: 120; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), opacity .3s; }
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 110; background: var(--deep); color: var(--white);
  padding: 110px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); overflow-y: auto;
}
.menu-open .mobile-nav { clip-path: inset(0 0 0 0); }
.mobile-nav nav a { display: block; font-family: var(--serif); font-size: clamp(34px, 9vw, 48px); line-height: 1.25; }
.mobile-nav nav a small { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; color: var(--aqua); margin-right: 14px; vertical-align: middle; }
.mobile-nav .meta { font-size: 14px; color: rgba(255,255,255,.7); display: grid; gap: 6px; margin-top: 40px; }
.menu-open .topbar { color: var(--white); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu-open .topbar .brand img { filter: brightness(0) invert(1); }
.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 1100px); color: var(--white);
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: var(--deep);
  /* Espai per a la capçalera fixa: si el contingut no cap a la pantalla (mòbils), no hi queda a sota */
  padding-top: calc(var(--header-h) + 28px);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 22s var(--ease) both; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,29,44,.55) 0%, rgba(7,29,44,0) 28%),
    linear-gradient(0deg, rgba(7,29,44,.88) 0%, rgba(7,29,44,.35) 45%, rgba(7,29,44,0) 70%);
}
@keyframes kenburns { from { transform: scale(1.14); } to { transform: scale(1); } }
.hero-content { position: relative; padding-bottom: clamp(40px, 7vh, 80px); }
.hero h1 { font-size: clamp(50px, 8.4vw, 132px); line-height: .95; max-width: 13ch; margin: 22px 0 28px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero-row p { max-width: 460px; font-size: 18px; color: rgba(255,255,255,.82); margin: 0; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  position: relative; border-top: 1px solid var(--line-light);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.hero-stats div { padding: 26px 0 30px; border-left: 1px solid var(--line-light); padding-left: 28px; }
.hero-stats div:first-child { border-left: 0; padding-left: 0; }
.hero-stats strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 46px); line-height: 1; }
.hero-stats div > span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.scroll-cue {
  position: absolute; right: var(--gutter); top: 50%; writing-mode: vertical-rl;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.7);
  display: flex; align-items: center; gap: 16px;
}
.scroll-cue::after { content: ""; width: 1px; height: 70px; background: linear-gradient(var(--white), transparent); animation: drip 2.4s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Seccions ---------- */
section { position: relative; }
.section { padding: clamp(90px, 12vw, 170px) 0; }
.section-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px 80px; align-items: end; margin-bottom: clamp(50px, 6vw, 90px); }
.section-head h2 { margin-top: 22px; }
.section-head p { margin: 0; }
.dark { background: var(--deep); color: var(--white); }
.dark .lead, .dark .muted { color: rgba(255,255,255,.72); }
.sand { background: var(--sand); }

/* Intro */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 8vw, 120px); align-items: center; }
.intro h2 { margin: 22px 0 32px; }
.intro .signature { display: flex; align-items: center; gap: 18px; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.intro .signature img { width: 64px; height: 64px; }
.intro .signature p { margin: 0; font-size: 14px; color: var(--ink-mute); }
.intro .signature strong { display: block; font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--ink); }
.intro-media { position: relative; aspect-ratio: 4 / 5; }
.intro-media .a { position: absolute; inset: 0 18% 14% 0; object-fit: cover; width: 82%; height: 86%; }
.intro-media .b { position: absolute; right: 0; bottom: 0; width: 52%; aspect-ratio: 4/5; object-fit: cover; border: 10px solid var(--paper); }
.intro-media .badge {
  position: absolute; left: -26px; bottom: 9%; width: 132px; height: 132px; border-radius: 50%;
  background: var(--ink); color: var(--white); display: grid; place-items: center; text-align: center;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.4;
}
.intro-media .badge strong { display: block; font-family: var(--serif); font-size: 44px; font-weight: 400; letter-spacing: 0; line-height: 1; }

/* Tipus de piscina */
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.type {
  position: relative; aspect-ratio: 3 / 4.4; overflow: hidden; color: var(--white);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 30px;
}
.type img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.type::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(7,29,44,.92) 0%, rgba(7,29,44,.25) 55%, rgba(7,29,44,.05) 100%); transition: opacity .6s; }
.type > *:not(img) { position: relative; z-index: 2; }
.type .num { font-size: 12px; letter-spacing: .2em; color: var(--aqua); margin-bottom: auto; }
.type h3 { margin-bottom: 12px; }
.type p { font-size: 15px; color: rgba(255,255,255,.78); margin: 0; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .8s var(--ease), opacity .6s var(--ease); }
.type:hover img { transform: scale(1.07); }
.type:hover p, .type:focus-within p { max-height: 200px; opacity: 1; }
.type .tag { display: inline-block; align-self: flex-start; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; border: 1px solid var(--aqua); color: var(--aqua); padding: 4px 10px; border-radius: 99px; margin-bottom: 14px; }

/* Serveis */
.services { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service {
  position: relative; overflow: hidden; padding: 34px 30px 36px; min-height: 340px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; transition: color .6s var(--ease);
}
.service img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .7s var(--ease), transform 1.2s var(--ease); }
.service::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(7,29,44,.9), rgba(7,29,44,.35)); opacity: 0; transition: opacity .7s var(--ease); }
.service > *:not(img) { position: relative; z-index: 2; }
.service .num { font-size: 12px; letter-spacing: .2em; color: var(--accent); transition: color .6s; }
.service .icon { width: 44px; height: 44px; margin: 40px 0 auto; stroke: currentColor; fill: none; stroke-width: 1.2; }
.service h3 { font-size: 28px; margin: 36px 0 10px; }
.service p { font-size: 14.5px; color: var(--ink-mute); margin: 0; transition: color .6s; }
.service .go { position: absolute; top: 30px; right: 28px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: background .5s, border-color .5s, transform .6s var(--ease); }
.service .go svg { width: 16px; height: 16px; transform: rotate(-45deg); }
.service:hover { color: var(--white); }
.service:hover img { opacity: 1; transform: scale(1); }
.service:hover::before { opacity: 1; }
.service:hover p { color: rgba(255,255,255,.8); }
.service:hover .num { color: var(--aqua); }
.service:hover .go { background: var(--white); border-color: var(--white); color: var(--ink); transform: rotate(45deg); }

/* Projectes */
.projects { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(120px, 13vw, 190px); gap: 14px; }
.projects figure { margin: 0; overflow: hidden; position: relative; }
.projects img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.projects figure:hover img { transform: scale(1.06); }
.projects figcaption { position: absolute; left: 18px; bottom: 16px; color: var(--white); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.projects .p1 { grid-column: 1 / 8; grid-row: span 3; }
.projects .p2 { grid-column: 8 / 13; grid-row: span 2; }
.projects .p3 { grid-column: 8 / 13; grid-row: span 2; }
.projects .p4 { grid-column: 1 / 5; grid-row: span 2; }
.projects .p5 { grid-column: 5 / 8; grid-row: span 2; }
.projects .p6 { grid-column: 8 / 13; grid-row: span 1; }
.center-cta { display: flex; justify-content: center; margin-top: 60px; }

/* Procés */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.step { padding: 0 30px 0 0; position: relative; }
.step .line { height: 1px; background: var(--line-light); margin-bottom: 34px; position: relative; }
.step .line::before { content: ""; position: absolute; left: 0; top: -5px; width: 11px; height: 11px; border-radius: 50%; background: var(--aqua); }
.step .n { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--aqua); opacity: .55; }
.step h3 { font-size: 30px; margin: 18px 0 14px; }
.step p { color: rgba(255,255,255,.7); font-size: 15px; }

/* Eficiència */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 7vw, 110px); align-items: center; }
.split-media { position: relative; aspect-ratio: 5/6; overflow: hidden; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.metrics { margin-top: 44px; display: grid; gap: 0; }
.metric { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: baseline; padding: 24px 0; border-top: 1px solid var(--line); }
.metric:last-child { border-bottom: 1px solid var(--line); }
.metric strong { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1; color: var(--accent); }
.metric p { margin: 0; color: var(--ink-soft); }
.metric p b { color: var(--ink); font-weight: 600; }

/* Ressenyes */
.reviews-wrap { position: relative; }
.reviews-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 50px; flex-wrap: wrap; }
.rating { display: flex; align-items: center; gap: 18px; }
.rating .score { font-family: var(--serif); font-size: 64px; line-height: 1; }
.stars { color: #e3b04b; letter-spacing: 3px; font-size: 18px; }
.rating small { display: block; font-size: 13px; color: var(--ink-mute); }
.slider-nav { display: flex; gap: 10px; }
.slider-nav button { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .4s, color .4s, border-color .4s; }
.slider-nav button:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.slider-nav svg { width: 18px; height: 18px; }
.reviews {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.reviews::-webkit-scrollbar { display: none; }
.review {
  scroll-snap-align: start; background: var(--white); padding: 40px 36px; border-radius: var(--radius);
  display: flex; flex-direction: column; border: 1px solid var(--line);
}
.review .quote { font-family: var(--serif); font-size: 80px; line-height: .6; color: var(--aqua); height: 36px; }
.review blockquote { margin: 18px 0 32px; font-family: var(--serif); font-size: 23px; line-height: 1.4; flex: 1; }
.review footer { display: flex; align-items: center; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.review .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--aqua-soft); color: var(--ink); display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.review cite { font-style: normal; font-weight: 600; font-size: 15px; display: block; }
.review footer small { color: var(--ink-mute); font-size: 13px; }

/* Partners */
.partners { padding: 70px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.partners .label { text-align: center; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 40px; }
.marquee { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee img { height: 64px; width: auto; max-width: 170px; object-fit: contain; margin: 0 clamp(30px, 4vw, 56px); filter: grayscale(1); opacity: .6; transition: filter .4s, opacity .4s; }
.marquee img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Showroom */
.showroom { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 640px; }
.showroom-media { position: relative; overflow: hidden; }
.showroom-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.showroom-body { padding: clamp(60px, 8vw, 120px) clamp(30px, 6vw, 100px); display: flex; flex-direction: column; justify-content: center; }
.showroom-body h2 { margin: 22px 0 26px; font-size: clamp(38px, 4.4vw, 62px); }
.info-list { list-style: none; margin: 34px 0 40px; padding: 0; display: grid; gap: 18px; }
.info-list li { display: grid; grid-template-columns: 26px 1fr; gap: 16px; align-items: start; }
.info-list svg { width: 20px; height: 20px; margin-top: 4px; stroke: var(--aqua); fill: none; stroke-width: 1.5; }
.info-list a:hover { color: var(--aqua); }
.open-pill { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.08); }
.open-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa6af; }
.open-pill.is-open::before { background: #4cd18a; box-shadow: 0 0 0 4px rgba(76,209,138,.18); }
.light-pill { background: var(--aqua-soft); }

/* CTA */
.cta-band { position: relative; overflow: hidden; color: var(--white); text-align: center; padding: clamp(110px, 14vw, 200px) 0; }
.cta-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(7,29,44,.62); }
.cta-band .wrap { position: relative; z-index: 2; }
.cta-band h2 { font-size: clamp(42px, 6.4vw, 96px); max-width: 15ch; margin: 24px auto 26px; }
.cta-band p { max-width: 560px; margin: 0 auto 40px; color: rgba(255,255,255,.82); font-size: 18px; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- Peu ---------- */
.footer { background: var(--deep); color: rgba(255,255,255,.72); padding: 100px 0 36px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; }
.footer .brand img { height: 52px; filter: brightness(0) invert(1); }
.footer h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--white); font-weight: 600; margin: 8px 0 22px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--white); }
.footer .about { max-width: 330px; margin-top: 26px; }
.socials { display: flex; gap: 10px; margin-top: 26px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-light); display: grid; place-items: center; transition: background .4s, color .4s; }
.socials a:hover { background: var(--white); color: var(--ink); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom { margin-top: 80px; padding-top: 28px; border-top: 1px solid var(--line-light); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.footer-bottom nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-word { font-family: var(--serif); font-size: clamp(80px, 19vw, 300px); line-height: .8; color: rgba(255,255,255,.04); text-align: center; margin-top: 60px; letter-spacing: .02em; user-select: none; }

/* WhatsApp flotant */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: var(--white); display: grid; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.4); transition: transform .4s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

/* ---------- Pàgines interiors ---------- */
.page-hero { position: relative; min-height: min(72svh, 780px); color: var(--white); display: flex; align-items: flex-end; overflow: hidden; background: var(--deep); }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 20s var(--ease) both; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,29,44,.9) 0%, rgba(7,29,44,.3) 55%, rgba(7,29,44,.45) 100%); }
.page-hero .wrap { position: relative; z-index: 2; padding-top: 160px; padding-bottom: clamp(50px, 8vh, 90px); }
.page-hero h1 { font-size: clamp(52px, 8vw, 120px); margin: 20px 0 22px; line-height: .98; }
.page-hero p { max-width: 620px; font-size: 18px; color: rgba(255,255,255,.82); margin: 0; }
.crumbs { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.crumbs a:hover { color: var(--white); }

/* Galeria */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 50px; }
.filters button { padding: 12px 22px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; transition: background .35s, color .35s, border-color .35s; }
.filters button[aria-pressed="true"], .filters button:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.filters button span { opacity: .55; margin-left: 6px; }
.gallery { columns: 3 320px; column-gap: 16px; }
.gallery button { display: block; width: 100%; margin: 0 0 16px; break-inside: avoid; position: relative; overflow: hidden; padding: 0; }
.gallery img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.gallery button::after { content: attr(data-label); position: absolute; inset: auto 0 0 0; padding: 40px 20px 16px; text-align: left; color: var(--white); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; background: linear-gradient(0deg, rgba(7,29,44,.75), transparent); opacity: 0; transition: opacity .5s; }
.gallery button:hover img { transform: scale(1.05); }
.gallery button:hover::after { opacity: 1; }
.gallery button.hide { display: none; }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(5,20,31,.96); display: none; align-items: center; justify-content: center; padding: 70px 80px; }
.lightbox.open { display: flex; animation: fade .4s var(--ease); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox button { position: absolute; color: var(--white); width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line-light); display: grid; place-items: center; transition: background .3s; }
.lightbox button:hover { background: rgba(255,255,255,.12); }
.lightbox svg { width: 20px; height: 20px; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: 13px; letter-spacing: .2em; }
@keyframes fade { from { opacity: 0; } }

.intro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.intro-stats strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 54px; line-height: 1; color: var(--accent); }
.intro-stats div > span { font-size: 13px; color: var(--ink-mute); letter-spacing: .06em; }

/* Serveis (detall) */
.svc-layout { display: grid; grid-template-columns: 260px 1fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.svc-layout > * { min-width: 0; }
.svc-nav { position: sticky; top: 110px; }
.svc-nav p { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 18px; }
.svc-nav a { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-mute); transition: color .3s, padding .4s var(--ease); }
.svc-nav a span { font-size: 11px; letter-spacing: .1em; padding-top: 3px; }
.svc-nav a:hover, .svc-nav a.active { color: var(--ink); padding-left: 8px; }
.svc-nav a.active span { color: var(--accent); }
.svc { padding: 0 0 clamp(80px, 9vw, 130px); scroll-margin-top: 100px; }
.svc + .svc { padding-top: clamp(80px, 9vw, 130px); border-top: 1px solid var(--line); }
.svc-head { display: flex; align-items: baseline; gap: 10px 22px; margin-bottom: 30px; flex-wrap: wrap; }
.svc-head h2 { overflow-wrap: break-word; min-width: 0; }
.svc-head .n { font-size: 13px; letter-spacing: .2em; color: var(--accent); }
.svc-head h2 { font-size: clamp(40px, 4.6vw, 64px); }
.svc-cover { aspect-ratio: 16 / 8; overflow: hidden; margin: 10px 0 40px; }
.svc-cover img { width: 100%; height: 100%; object-fit: cover; }
.svc-cols { columns: 2 300px; column-gap: 50px; color: var(--ink-soft); }
.svc-cols p { break-inside: avoid; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 40px; }
.feature-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.feature { background: var(--paper); padding: 30px 28px; }
.feature h4 { font-family: var(--serif); font-size: 24px; font-weight: 500; margin: 0 0 8px; }
.feature p { margin: 0; font-size: 14.5px; color: var(--ink-mute); }
.pool-types { display: grid; gap: 50px; margin-top: 50px; }
.pool-type { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.pool-type:nth-child(even) .pt-media { order: 2; }
.pt-media { aspect-ratio: 4/3; overflow: hidden; }
.pt-media img { width: 100%; height: 100%; object-fit: cover; }
.pool-type h3 { margin-bottom: 14px; }
.pool-type p { color: var(--ink-soft); font-size: 15.5px; }
.pill { display: inline-block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; border-radius: 99px; padding: 4px 11px; margin-bottom: 14px; }
.check-list { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 30px; }
.check-list li { display: flex; gap: 12px; align-items: baseline; }
.check-list li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.big-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 36px 0; }
.big-metrics div { background: var(--white); padding: 28px; }
.big-metrics strong { font-family: var(--serif); font-weight: 400; font-size: 52px; color: var(--accent); line-height: 1; display: block; margin-bottom: 8px; }
.big-metrics p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.brand-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 34px 0; }
.brand-strip div { background: var(--white); display: grid; place-items: center; padding: 24px; height: 110px; }
.brand-strip img { max-height: 54px; max-width: 80%; object-fit: contain; }
.callout { background: var(--ink); color: var(--white); padding: 36px 40px; display: flex; gap: 30px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 36px; }
.callout p { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.3; max-width: 30ch; }
.callout .badges { display: flex; gap: 14px; }
.callout .badges img { height: 74px; width: 74px; object-fit: contain; background: var(--white); border-radius: 50%; padding: 6px; }

/* Contacte */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(50px, 7vw, 110px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; margin-top: 40px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(11,44,66,.28);
  padding: 10px 0 12px; border-radius: 0; transition: border-color .3s; width: 100%;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.consent { grid-column: 1 / -1; display: grid; gap: 12px; font-size: 13.5px; color: var(--ink-mute); }
.consent label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.consent input { margin-top: 4px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.form-note { grid-column: 1 / -1; font-size: 14px; color: var(--accent); min-height: 1.4em; margin: 0; }
.hours { width: 100%; border-collapse: collapse; margin: 18px 0 10px; }
.hours td { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hours td:last-child { text-align: right; color: var(--ink-soft); }
.hours tr.today td { color: var(--ink); font-weight: 600; }
.hours tr.today td:first-child::after { content: " · avui"; color: var(--accent); font-weight: 500; }
.contact-card { background: var(--white); border: 1px solid var(--line); padding: clamp(30px, 4vw, 48px); }
.contact-card h3 { font-size: 32px; }
.methods { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 30px; }
.method { background: var(--white); padding: 22px 26px; display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center; transition: background .3s; }
.method:hover { background: var(--aqua-soft); }
.method svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.method strong { display: block; font-size: 17px; font-weight: 600; }
.method span { font-size: 13.5px; color: var(--ink-mute); }
.map { width: 100%; height: 520px; border: 0; display: block; filter: grayscale(.4) contrast(1.05); }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.thumbs button { aspect-ratio: 4/3; overflow: hidden; padding: 0; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.thumbs button:hover img { transform: scale(1.06); }

/* ---------- Animacions d'entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .1s; }
.js .reveal.d2 { transition-delay: .2s; }
.js .reveal.d3 { transition-delay: .3s; }
.js .reveal-img { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease); }
.js .reveal-img.in { clip-path: inset(0 0 0 0); }
.js .intro-media .b.reveal-img, .js .projects .reveal-img:nth-child(2) { transition-delay: .15s; }
.js .projects .reveal-img:nth-child(3) { transition-delay: .3s; }
.js .projects .reveal-img:nth-child(4) { transition-delay: .2s; }
.js .projects .reveal-img:nth-child(5) { transition-delay: .35s; }
.js .projects .reveal-img:nth-child(6) { transition-delay: .5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal-img { opacity: 1; transform: none; clip-path: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .types { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); gap: 50px 0; }
  .reviews { grid-auto-columns: calc((100% - 24px) / 2); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .svc-layout { grid-template-columns: 1fr; }
  .svc-nav { display: none; }
  .type p { max-height: 200px; opacity: 1; }
}
@media (max-width: 820px) {
  :root { --header-h: 72px; }
  .brand img { height: 38px; }
  .section-head, .intro, .split, .showroom, .contact-grid { grid-template-columns: 1fr; }
  .showroom-media { min-height: 380px; }
  .intro-media { max-width: 520px; }
  .intro-media .badge { left: auto; right: 6%; bottom: auto; top: -30px; width: 112px; height: 112px; }
  .intro-media .badge strong { font-size: 36px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero-stats div:nth-child(n+3) { border-top: 1px solid var(--line-light); }
  .scroll-cue { display: none; }
  .projects { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; gap: 10px; }
  .projects .p1 { grid-column: 1 / -1; grid-row: span 2; }
  .projects .p2, .projects .p3, .projects .p4, .projects .p5 { grid-column: span 1; grid-row: span 1; }
  .projects .p6 { grid-column: 1 / -1; grid-row: span 1; }
  .pool-type { grid-template-columns: 1fr; gap: 24px; }
  .pool-type:nth-child(even) .pt-media { order: 0; }
  .feature-grid, .feature-grid.cols-2, .big-metrics { grid-template-columns: 1fr; }
  .brand-strip { grid-template-columns: repeat(2, 1fr); }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
  .lightbox { padding: 70px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
}
@media (max-width: 600px) {
  .types, .services { grid-template-columns: 1fr; }
  .type { aspect-ratio: 4 / 4.4; }
  .service { min-height: 280px; }
  .process { grid-template-columns: 1fr; }
  .reviews { grid-auto-columns: 88%; }
  .metric { grid-template-columns: 1fr; gap: 6px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .form { grid-template-columns: 1fr; }
  .check-list { grid-template-columns: 1fr; }
  .intro-stats { grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
  .intro-stats strong { font-size: 40px; }
  .hero-row .btn, .cta-band .btn { flex: 1 1 auto; justify-content: center; }
  .callout { padding: 30px 24px; }
  .btn { white-space: normal; text-align: center; }
  .hours td { font-size: 14px; }
  .map { height: 380px; }
}

/* ---------- Selector d'idioma ---------- */
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.lang-switch a { padding: 6px 8px; border-radius: 99px; opacity: .55; transition: opacity .3s, background .3s; }
.lang-switch a:hover { opacity: 1; }
.lang-switch a[aria-current] { opacity: 1; box-shadow: inset 0 0 0 1px currentColor; }
.topbar .lang-switch { margin-left: -12px; }
.mobile-nav .lang-switch { font-size: 14px; margin-bottom: 18px; gap: 8px; }
.mobile-nav .lang-switch a { padding: 8px 14px; }
@media (max-width: 1080px) { .topbar .lang-switch { margin-left: auto; margin-right: 4px; } }
:lang(es) .hours tr.today td:first-child::after { content: " · hoy"; }
:lang(en) .hours tr.today td:first-child::after { content: " · today"; }

/* ---------- Mapa sota demanda ---------- */
.map-consent {
  min-height: 420px; display: flex; align-items: center; color: var(--white); padding: 70px 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(186,210,229,.16) 0 2px, transparent 3px) 0 0 / 28px 28px,
    linear-gradient(135deg, #0b2c42, #071d2c);
}
.map-address { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.15; margin: 18px 0 14px; max-width: 22ch; }
.map-note { color: rgba(255,255,255,.7); max-width: 560px; margin-bottom: 30px; font-size: 15px; }
.map-note a { color: var(--aqua); }

/* ---------- Formulari: estats ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note[data-state="ok"] { color: #1f8a5b; }
.form-note[data-state="error"] { color: #b3403a; }
.form button[disabled] { opacity: .6; cursor: progress; }
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Pàgines legals ---------- */
.page-hero.legal-hero { min-height: auto; background: linear-gradient(135deg, #0b2c42, #071d2c); }
.page-hero.legal-hero::after { display: none; }
.page-hero.legal-hero h1 { font-size: clamp(44px, 6vw, 84px); }
.legal { max-width: 780px; color: var(--ink-soft); }
.legal h2 { font-size: clamp(28px, 3vw, 38px); color: var(--ink); margin: 56px 0 16px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 24px; color: var(--ink); margin: 32px 0 10px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal ul { padding-left: 20px; margin: 0 0 1.1em; }
.legal li { margin-bottom: 6px; }
.legal .updated { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 40px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0 0 1.1em; padding: 24px 28px; background: var(--white); border: 1px solid var(--line); }
.legal dt { font-weight: 600; color: var(--ink); }
.legal dd { margin: 0; }
.legal .table-wrap { overflow-x: auto; margin: 0 0 1.1em; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink); font-weight: 600; background: var(--white); }
@media (max-width: 600px) { .legal dl { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 10px; } }

/* ---------- Treballa amb nosaltres ---------- */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.area { padding: 34px 28px 38px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.area-n { display: block; font-size: 12px; letter-spacing: .2em; color: var(--accent); margin-bottom: 44px; }
.area h3 { font-size: clamp(24px, 2.2vw, 30px); }

.field-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.file-drop {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px; cursor: pointer;
  border: 1.5px dashed rgba(11,44,66,.28); border-radius: var(--radius); background: var(--white);
  transition: border-color .3s, background .3s;
}
.file-drop:hover, .file-drop.dragging { border-color: var(--accent); background: var(--aqua-soft); }
.file-drop.has-file { border-style: solid; border-color: var(--accent); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.file-drop svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.4; }
.file-drop strong { display: block; font-weight: 600; font-size: 15px; color: var(--ink); word-break: break-all; }
.file-drop small { display: block; font-size: 13px; color: var(--ink-mute); margin-top: 2px; }
.file-drop { position: relative; }

.steps-list { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 22px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
.steps-list li::before { content: counter(s); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--aqua-soft); color: var(--ink); display: grid; place-items: center; font-family: var(--serif); font-size: 22px; }
.steps-list strong { font-weight: 600; }
.steps-list span { font-size: 14.5px; color: var(--ink-mute); }

@media (max-width: 1080px) { .areas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .areas { grid-template-columns: 1fr; } .area-n { margin-bottom: 18px; } }
.field .file-drop { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 15px; color: var(--ink); }
