/* ────────────────────────────────────────────────────────────────
   De baix a dalt — premium architecture brand site
   Design tokens + base styles
   ──────────────────────────────────────────────────────────────── */

:root {
  /* Greys */
  --white: #ffffff;
  --paper: #f6f6f4;
  --paper-2: #efeeea;
  --hairline: #e6e5e1;
  --hairline-strong: #d2d1cd;
  --carbon: #0a0a0a;
  --ink: #1a1a18;
  --ink-2: #2a2a27;
  --muted: #6e6e6a;
  --muted-2: #98978f;

  /* Accent — single, restrained */
  --accent: oklch(0.62 0.13 162);
  --accent-soft: oklch(0.62 0.13 162 / 0.10);
  --accent-line: oklch(0.62 0.13 162 / 0.35);

  /* Seccions verdes */
  --green-section: #e8f5ee;
  --green-section-2: #d4eddf;
  --green-section-text: #0f2e1c;
  --green-section-muted: #3a6b4e;
  --green-section-line: rgba(15,46,28,0.14);

  /* Sizes */
  --gutter: clamp(20px, 4vw, 56px);
  --container: 1440px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Type */
  --font-sans: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--carbon);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

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

/* ───── Container ───── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ───── Type scale ───── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.eyebrow--dark { color: rgba(255,255,255,0.62); }

.display {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
  font-size: clamp(56px, 9.6vw, 152px);
  color: var(--carbon);
}
.display--light { color: var(--white); }

.h1 {
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.02;
  font-size: clamp(44px, 6.2vw, 96px);
  margin: 0;
}
.h2 {
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.06;
  font-size: clamp(36px, 4.2vw, 64px);
  margin: 0;
}
.h3 {
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-size: clamp(24px, 2.2vw, 32px);
  margin: 0;
}
.lede {
  font-weight: 400;
  letter-spacing: -0.008em;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 56ch;
}
.lede--muted { color: var(--muted); }
.body { font-size: 17px; line-height: 1.6; color: var(--ink); }
.small { font-size: 14px; color: var(--muted); }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px 0 26px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -0.005em;
  font-size: 15px;
  transition: transform .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), opacity .25s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn .arrow {
  width: 22px; height: 22px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.14);
  transition: transform .4s var(--ease), background-color .35s var(--ease);
}
.btn .arrow svg { width: 11px; height: 11px; transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(2px); }
.btn:hover .arrow svg { transform: translateX(1px); }

.btn--primary {
  background: var(--carbon);
  color: var(--white);
}
.btn--primary:hover { background: #1f1f1d; }

.btn--ghost {
  background: transparent;
  color: var(--carbon);
  border: 1px solid var(--hairline-strong);
}
.btn--ghost .arrow { background: var(--carbon); color: var(--white); }
.btn--ghost:hover { border-color: var(--carbon); }

.btn--invert {
  background: var(--white);
  color: var(--carbon);
}
.btn--invert .arrow { background: var(--carbon); color: var(--white); }
.btn--invert:hover { background: #ededea; }

.btn--accent {
  background: var(--accent);
  color: var(--white);
}
.btn--accent:hover { filter: brightness(1.06); }

.btn--lg { height: 62px; padding: 0 26px 0 32px; font-size: 16px; }
.btn--xl {
  height: 78px;
  padding: 0 34px 0 40px;
  font-size: 19px;
  letter-spacing: -0.012em;
}
.btn--xl .arrow { width: 28px; height: 28px; }
.btn--xl .arrow svg { width: 13px; height: 13px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--carbon);
  border-bottom: 1px solid var(--carbon);
  padding-bottom: 2px;
  font-weight: 500;
  font-size: 15px;
  transition: gap .3s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.text-link:hover { gap: 12px; color: var(--accent); border-color: var(--accent); }
.text-link svg { width: 12px; height: 12px; }

/* ───── Navbar ───── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  height: 84px;
  display: flex;
  align-items: center;
  transition: background-color .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.nav__brand-mark {
  width: 80px; height: 72px;
  flex-shrink: 0;
  background-image: url('/assets/logo-mark.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center left;
  transition: transform .4s var(--ease), background-image .25s var(--ease);
}
.nav__brand:hover .nav__brand-mark { transform: translateY(-2px); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__divider {
  width: 1px; height: 16px;
  background: currentColor;
  opacity: 0.18;
  flex-shrink: 0;
}
.nav__link {
  font-size: 14px;
  color: var(--ink);
  font-weight: 450;
  letter-spacing: -0.005em;
  position: relative;
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--carbon);
  transition: width .35s var(--ease);
}
.nav__link:hover { color: var(--carbon); }
.nav__link:hover::after { width: 100%; }

.nav--scrolled {
  background: rgba(255,255,255,0.84);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--hairline);
}
.nav--dark .nav__brand,
.nav--dark .nav__link { color: rgba(255,255,255,0.92); }
.nav--dark .nav__link::after { background: var(--white); }
.nav--dark .nav__brand-mark {
  background-image: url('/assets/logo-mark-white.png');
}
.nav--dark .btn--ghost {
  color: var(--white);
  border-color: rgba(255,255,255,0.32);
}
.nav--dark .btn--ghost .arrow { background: var(--white); color: var(--carbon); }
.nav--dark .btn--ghost:hover { border-color: var(--white); }

.nav__cta { display: inline-flex; align-items: center; gap: 12px; }

.nav--menu-open {
  background: var(--white) !important;
  border-bottom-color: var(--hairline) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.nav--menu-open .nav__hamburger { color: var(--carbon); }
.nav--menu-open .nav__brand-mark { background-image: url('/assets/logo-mark.png') !important; }

/* ───── Lang selector ───── */
.lang-selector {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  padding: 3px;
}
.nav--dark .lang-selector { background: rgba(255,255,255,0.12); }
.lang-selector__btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 5px 9px;
  border-radius: 999px;
  transition: background-color .25s var(--ease), color .25s var(--ease);
  line-height: 1;
}
.lang-selector__btn:hover { color: var(--carbon); }
.lang-selector__btn.is-active {
  background: var(--white);
  color: var(--carbon);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.nav--dark .lang-selector__btn { color: rgba(255,255,255,0.6); }
.nav--dark .lang-selector__btn:hover { color: var(--white); }
.nav--dark .lang-selector__btn.is-active {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  box-shadow: none;
}
@media (max-width: 820px) {
  .lang-selector { display: none; }
}

@media (max-width: 820px) {
  .nav__links { display: none; }
}

/* ───── Hero ───── */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--carbon);
  color: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero__bg image-slot {
  width: 100%;
  height: 100%;
  --is-bg: 0;
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.25) 35%, rgba(10,10,10,0.78) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 140px;
  padding-bottom: 64px;
}
.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: auto;
  padding-bottom: 80px;
}
.hero__meta {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.hero__meta-item { color: rgba(255,255,255,0.7); font-size: 13px; letter-spacing: 0.02em; }
.hero__meta-item strong {
  display: block;
  color: var(--white);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  margin-top: 4px;
}

.hero__claim {
  max-width: 18ch;
}
.hero__subtitle {
  margin-top: 28px;
  max-width: 54ch;
  font-size: clamp(17px, 1.4vw, 21px);
  color: rgba(255,255,255,0.78);
  line-height: 1.5;
  font-weight: 400;
}
.hero__cta-row {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero__bottom {
  margin-top: 88px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.16);
}
.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.68);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero__scroll-line {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { left: -100%; }
  60%, 100% { left: 100%; }
}

.hero__counters {
  display: flex;
  gap: 48px;
  font-size: 13px;
  color: rgba(255,255,255,0.62);
}
.hero__counters strong {
  display: block;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 4px;
}

/* ───── Section scaffolding ───── */
.section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0;
}
.section--paper { background: var(--paper); }
.section--ink {
  background: var(--green-section);
  color: var(--green-section-text);
}
.section--ink .h1, .section--ink .h2 { color: var(--green-section-text); }
.section--ink .lede { color: var(--green-section-muted); }

.section-header {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 72px;
}
.section-header__index {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section-header__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.section--ink .section-header__num { color: var(--green-section-muted); }

@media (max-width: 900px) {
  .section-header { grid-template-columns: 1fr; gap: 32px; }
}

/* ───── Service feature row ───── */
.feature-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.feature-row--reverse > :first-child { order: 2; }
.feature-row--reverse > :last-child { order: 1; }

.feature-row__visual {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
}
.feature-row__visual--wide { aspect-ratio: 1/1; }
.feature-row__visual image-slot {
  width: 100%;
  height: 100%;
}

.feature-row__copy { max-width: 540px; }
.feature-row__list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  border-top: 1px solid var(--hairline);
}
.section--ink .feature-row__list { border-top-color: var(--green-section-line); }

.feature-row__list li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
  transition: padding-left .35s var(--ease), background-color .35s var(--ease);
}
.section--ink .feature-row__list li { border-bottom-color: var(--green-section-line); }

.feature-row__list li:hover { padding-left: 8px; }
.feature-row__list .li__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.section--ink .feature-row__list .li__num { color: var(--green-section-muted); }
.feature-row__list .li__title {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.012em;
  color: var(--carbon);
}
.section--ink .feature-row__list .li__title { color: var(--green-section-text); }
.feature-row__list .li__sub {
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: 0;
  text-align: right;
}

.feature-row__cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row--reverse > :first-child,
  .feature-row--reverse > :last-child { order: unset; }
}

/* ───── Inline CTA band (between sections) ───── */
.cta-band {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 36px 0;
  background: var(--white);
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band__text {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--carbon);
  line-height: 1.2;
  max-width: 50ch;
}
.cta-band__text em {
  font-style: normal;
  color: var(--accent);
}

.section--paper + .cta-band { background: var(--paper); }

/* ───── Stats strip ───── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline);
}
.stats__item {
  padding: 36px 24px 24px;
  border-right: 1px solid var(--hairline);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stats__item:last-child { border-right: none; }
.stats__num {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--carbon);
}
.stats__num small { font-size: 0.55em; color: var(--muted); margin-left: 4px; letter-spacing: -0.01em; }
.stats__label {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.005em;
  max-width: 22ch;
  line-height: 1.4;
  text-align: center;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .stats__item { border-right: none; border-bottom: 1px solid var(--hairline); }
}

/* ───── Service intro grid (construcció section) ───── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  margin-top: 56px;
}
.service-grid__cell {
  padding: 36px 32px 36px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 20px;
  align-items: start;
  transition: padding-left .35s var(--ease);
  cursor: pointer;
}
.service-grid__cell:hover { padding-left: 10px; }
.service-grid__cell:nth-child(2n) { padding-left: 32px; border-left: 1px solid var(--hairline); }
.service-grid__cell:nth-child(2n):hover { padding-left: 42px; }
.service-grid__num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; padding-top: 4px; }
.service-grid__body { max-width: 38ch; }
.service-grid__title { font-size: 21px; font-weight: 500; letter-spacing: -0.018em; line-height: 1.15; color: var(--carbon); }
.service-grid__sub { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.service-grid__chev {
  width: 36px; height: 36px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.service-grid__cell:hover .service-grid__chev {
  background: var(--carbon);
  border-color: var(--carbon);
  color: var(--white);
}

@media (max-width: 820px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-grid__cell:nth-child(2n) { padding-left: 0; border-left: none; }
}

/* ───── Big numbered list (for sostenible section) ───── */
.big-list {
  border-top: 1px solid var(--green-section-line);
  margin-top: 56px;
}
.big-list__item {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 48px;
  padding: 42px 0;
  border-bottom: 1px solid var(--green-section-line);
  align-items: baseline;
  transition: padding-left .35s var(--ease);
}
.big-list__item:hover { padding-left: 12px; }
.big-list__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-section-muted);
  letter-spacing: 0.18em;
}
.big-list__title {
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.05;
  color: var(--green-section-text);
}
.big-list__desc {
  font-size: 15px;
  color: var(--green-section-muted);
  line-height: 1.55;
  max-width: 42ch;
}
@media (max-width: 900px) {
  .big-list__item { grid-template-columns: 1fr; gap: 12px; }
}

/* ───── Solar/Domotic split cards ───── */
.split {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.split__card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease);
  min-height: 240px;
}
.split__card:hover { transform: translateY(-4px); border-color: var(--carbon); }
.section--ink .split__card { background: rgba(255,255,255,0.55); border-color: var(--green-section-line); }
.section--ink .split__card:hover { background: var(--white); border-color: var(--green-section-text); }

.split__icon {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.section--ink .split__icon { border-color: var(--green-section-line); color: var(--green-section-muted); }
.split__title {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.split__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: auto;
}
.section--ink .split__desc { color: var(--green-section-muted); }

@media (max-width: 1000px) {
  .split { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .split { grid-template-columns: 1fr; }
}

/* ───── Final CTA mega ───── */
.cta-final {
  background: var(--carbon);
  color: var(--white);
  padding: clamp(120px, 14vw, 200px) 0;
  position: relative;
  overflow: hidden;
}
.cta-final__bg {
  position: absolute; inset: 0;
  opacity: 0.18;
  background-image: url('/assets/logo-mark-white.png');
  background-size: 52%;
  background-position: 108% 55%;
  background-repeat: no-repeat;
  pointer-events: none;
  filter: blur(0px);
}
.cta-final__inner { position: relative; z-index: 2; }
.cta-final__title {
  font-size: clamp(48px, 8vw, 128px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
  color: var(--white);
  max-width: 16ch;
}
.cta-final__title em {
  font-style: normal;
  color: var(--accent);
}
.cta-final__sub {
  margin-top: 32px;
  font-size: clamp(17px, 1.4vw, 21px);
  color: rgba(255,255,255,0.7);
  max-width: 52ch;
  line-height: 1.5;
}
.cta-final__row {
  margin-top: 56px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ───── Footer ───── */
.footer {
  background: var(--carbon);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer__brand { display: inline-flex; flex-shrink: 0; }
.footer__brand-mark { width: 96px; height: 86px; flex-shrink: 0; background: url('/assets/logo-mark-white.png') no-repeat center left/contain; }
.footer__about { margin-top: 20px; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.6); max-width: 36ch; }
.footer__heading { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.5); font-family: var(--font-mono); margin-bottom: 18px; }
.footer__link { display: block; color: rgba(255,255,255,0.78); font-size: 14.5px; padding: 6px 0; transition: color .25s var(--ease); }
.footer__link:hover { color: var(--white); }
.footer__link--btn { background: none; border: none; cursor: pointer; text-align: left; width: 100%; font: inherit; letter-spacing: inherit; }
.footer__zones {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  margin-bottom: 24px;
}
.footer__zones-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 10px;
}
.footer__zones-list {
  font-size: 12px;
  color: rgba(255,255,255,0.32);
  line-height: 1.7;
  max-width: 900px;
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ───── Floating sticky CTA ───── */
.float-cta {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 22px;
  border-radius: 999px;
  background: var(--carbon);
  color: var(--white);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  box-shadow: 0 20px 50px -16px rgba(0,0,0,0.45), 0 4px 16px -2px rgba(0,0,0,0.18);
  transform: translateY(80px);
  opacity: 0;
  transition: transform .55s var(--ease), opacity .45s var(--ease), background-color .35s var(--ease);
  pointer-events: none;
}
.float-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.float-cta:hover { background: var(--accent); }
.float-cta__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  position: relative;
}
.float-cta:hover .float-cta__dot { background: var(--white); }
.float-cta__dot::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
.float-cta:hover .float-cta__dot::after { border-color: rgba(255,255,255,0.8); }
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

@media (max-width: 600px) {
  .float-cta { bottom: 16px; right: 16px; height: 52px; padding: 0 18px; font-size: 13px; }
}

/* ───── Modal ───── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(8,8,8,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.modal-backdrop.is-open { opacity: 1; }

.modal {
  width: 100%;
  max-width: 1000px;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  box-shadow: 0 30px 90px -20px rgba(0,0,0,0.5), 0 8px 32px -8px rgba(0,0,0,0.18);
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .35s var(--ease);
  max-height: 92vh;
  overflow-y: auto;
}
.modal-backdrop.is-open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal__aside {
  background: var(--carbon);
  color: var(--white);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.modal__aside::before {
  content: "";
  position: absolute;
  right: -30%; top: -20%;
  width: 500px; height: 500px;
  background: url('/assets/logo-mark-white.png') no-repeat center/contain;
  opacity: 0.05;
  pointer-events: none;
}
.modal__aside-title {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.05;
  position: relative;
}
.modal__aside-sub {
  font-size: 14.5px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  margin-top: 16px;
  position: relative;
}
.modal__aside-meta {
  border-top: 1px solid rgba(255,255,255,0.16);
  padding-top: 24px;
  display: grid;
  gap: 14px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  position: relative;
}
.modal__aside-meta-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: center;
}
.modal__aside-meta-item .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }

.modal__form {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}
.modal__close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.modal__close:hover { background: var(--carbon); color: var(--white); }

.modal__form-eyebrow { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }
.modal__form-title { font-size: 22px; font-weight: 500; letter-spacing: -0.018em; color: var(--carbon); margin: 4px 0 8px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}
.field__input,
.field__select,
.field__textarea {
  font: inherit;
  font-size: 15.5px;
  color: var(--carbon);
  background: var(--white);
  border: none;
  border-bottom: 1px solid var(--hairline-strong);
  padding: 10px 0 12px;
  transition: border-color .25s var(--ease);
  outline: none;
  width: 100%;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.field__input:focus,
.field__select:focus,
.field__textarea:focus { border-color: var(--carbon); }
.field__textarea { resize: vertical; min-height: 80px; padding-top: 14px; line-height: 1.5; }
.field__select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%230a0a0a' stroke-width='1.4' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 24px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.modal__submit-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 12px;
}
.modal__legal {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: 4px;
  border: 1px solid var(--hairline);
}
.modal__legal a {
  color: var(--carbon);
  border-bottom: 1px solid var(--hairline-strong);
  white-space: nowrap;
}

/* ───── Field error state ───── */
.field--error .field__input,
.field--error .field__select,
.field--error .field__textarea {
  border-color: #c0392b;
}
.field__error {
  font-size: 11.5px;
  color: #c0392b;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ───── Button loading / disabled state ───── */
.btn--loading,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.modal__success {
  background: var(--white);
  padding: 60px 44px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.modal__success-tick {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
}

@media (max-width: 820px) {
  .modal { grid-template-columns: 1fr; max-height: 96vh; }
  .modal__aside { padding: 32px 28px; }
  .modal__form { padding: 32px 28px; }
  .field-row { grid-template-columns: 1fr; gap: 16px; }
}

/* ───── Hero background image ───── */
.hero__bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* ───── Feature row images ───── */
.feature-row__visual-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 6px;
}

/* ───── Image slot styling (mantingut per compatibilitat) ───── */
image-slot {
  border-radius: inherit !important;
}
.placeholder-bg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,0.018) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #ecebe6 0%, #dfdeda 100%);
  z-index: 0;
}
.placeholder-bg--dark {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #1a1a18 0%, #0a0a0a 100%);
}

/* ───── Fade-in on scroll — més dinàmic ───── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s var(--ease-out),
    transform 1.1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ───── Transicions entre seccions ───── */

/* Línia animada entre sections */
.section::before {
  content: "";
  display: block;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width 1.4s var(--ease-out);
  position: absolute;
  top: 0; left: 0;
}
.section.is-in::before { width: 100%; }

/* Parallax lleuger a la imatge del hero */
@media (prefers-reduced-motion: no-preference) {
  .hero__bg-img {
    transform: scale(1.06);
    transition: transform 12s linear;
  }
  .hero:hover .hero__bg-img,
  .hero__bg-img.is-loaded {
    transform: scale(1);
  }
}

/* Slide-in horitzontal per als títols de secció */
.reveal--left {
  transform: translateX(-32px);
  opacity: 0;
}
.reveal--left.is-in {
  transform: translateX(0);
  opacity: 1;
}
.reveal--right {
  transform: translateX(32px);
  opacity: 0;
}
.reveal--right.is-in {
  transform: translateX(0);
  opacity: 1;
}

/* Scale-in per a targetes */
.reveal--scale {
  transform: scale(0.95) translateY(20px);
  opacity: 0;
}
.reveal--scale.is-in {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Counter pulse quan entra */
@keyframes countPulse {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}
.stats__item {
  opacity: 0;
  animation: none;
}
.stats__item.is-in {
  animation: countPulse 0.75s var(--ease-out) forwards;
}
.stats__item:nth-child(1).is-in { animation-delay: 0ms; }
.stats__item:nth-child(2).is-in { animation-delay: 100ms; }
.stats__item:nth-child(3).is-in { animation-delay: 200ms; }
.stats__item:nth-child(4).is-in { animation-delay: 300ms; }

/* Split cards en cascada — només opacity/transform d'entrada */
.split__card:not(.is-in) {
  opacity: 0;
  transform: translateY(24px);
}
.split__card { transition-property: opacity, transform, border-color, background-color; }
.split__card:nth-child(1) { transition-delay: 0ms; }
.split__card:nth-child(2) { transition-delay: 100ms; }
.split__card:nth-child(3) { transition-delay: 200ms; }
.split__card:nth-child(4) { transition-delay: 300ms; }

/* Service grid cells en cascada */
.service-grid__cell:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
}
.service-grid__cell:nth-child(1) { transition-delay: 0ms; }
.service-grid__cell:nth-child(2) { transition-delay: 80ms; }
.service-grid__cell:nth-child(3) { transition-delay: 160ms; }
.service-grid__cell:nth-child(4) { transition-delay: 240ms; }
.service-grid__cell:nth-child(5) { transition-delay: 320ms; }
.service-grid__cell:nth-child(6) { transition-delay: 400ms; }

/* Big list items en cascada */
.big-list__item:not(.is-in) {
  opacity: 0;
  transform: translateX(-20px);
}
.big-list__item {
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out), padding-left .35s var(--ease);
}
.big-list__item.is-in { opacity: 1; transform: translateX(0); }
.big-list__item:nth-child(1) { transition-delay: 0ms; }
.big-list__item:nth-child(2) { transition-delay: 100ms; }
.big-list__item:nth-child(3) { transition-delay: 200ms; }
.big-list__item:nth-child(4) { transition-delay: 300ms; }

/* ───── Hamburger button ───── */
.nav__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  color: var(--carbon);
  transition: background-color .25s var(--ease), color .25s var(--ease);
  flex-shrink: 0;
}
.nav__hamburger:hover { background: var(--paper-2); }
.nav--dark .nav__hamburger { color: var(--white); }
.nav--dark .nav__hamburger:hover { background: rgba(255,255,255,0.12); }

@media (max-width: 820px) {
  .nav__hamburger { display: inline-flex; }
  .nav__cta { display: none; }
}

/* ───── Mobile drawer ───── */
.nav__drawer {
  position: fixed;
  top: 84px; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 79;
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter) 40px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .35s var(--ease);
  overflow-y: auto;
}
.nav__drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav__drawer-links {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  padding-top: 8px;
}
.nav__drawer-link {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--carbon);
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  transition: color .2s var(--ease), padding-left .2s var(--ease);
  line-height: 1.1;
}
.nav__drawer-link:last-child { border-bottom: none; }
.nav__drawer-link:hover {
  color: var(--accent);
  padding-left: 8px;
}

.nav__drawer-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  margin-top: 16px;
}

.nav__drawer-lang {
  display: flex;
  gap: 8px;
}
.nav__drawer-lang-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.nav__drawer-lang-btn:hover { color: var(--carbon); border-color: var(--carbon); }
.nav__drawer-lang-btn.is-active {
  background: var(--carbon);
  color: var(--white);
  border-color: var(--carbon);
}

/* ───── Mobile-only utility ───── */
@media (min-width: 821px) {
  .nav__drawer { display: none; }
}

/* ───── Hero mòbil ───── */
@media (max-width: 820px) {
  .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-top: 52px;
  }
  .hero__counters {
    gap: 28px;
    flex-wrap: wrap;
  }
  .hero__cta-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero__cta-row .btn {
    width: 100%;
    justify-content: space-between;
  }
}

/* ───── Footer mòbil ───── */
@media (max-width: 600px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer__col--brand { grid-column: 1; }
}

/* ───── Tipografia mòbil ───── */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .nav__drawer-link { font-size: 24px; }
}

/* ───── Scroll suau ───── */
body { scroll-behavior: smooth; }

/* No-JS guard not needed — Babel app drives the page. */
