/* ═══════════════════════════════════════════════════════════════
   Korpus Advocats - Modern CSS
   Design Tokens + Layout + Animations + Responsive
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   1. FONTS (Custom)
   ───────────────────────────────────────── */
@font-face {
  font-family: 'Gracetians';
  src: url('assets/fonts/GRACETIANS-Stroke.otf?v=bc129a4344') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gracetians';
  src: url('assets/fonts/GRACETIANS-Italic.otf?v=49068c693a') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Sukhumvit';
  src: url('assets/fonts/sukhumvit-set_text.woff.ttf?v=e3bd4048d1') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gracetians-Cutting';
  src: url('assets/fonts/gracetians-cutting.ttf?v=37123f47ea') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Nunito Sans (variable, OFL) — text, etiquetes i botons. Allotjada localment: sense Google Fonts. */
@font-face {
  font-family: 'Nunito Sans';
  src: url('assets/fonts/nunito-sans-latin-wght-normal.woff2?v=1393acc632') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito Sans';
  src: url('assets/fonts/nunito-sans-latin-wght-italic.woff2?v=c8e4df00bd') format('woff2');
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

/* Gelasio (OFL): mètricament compatible amb Georgia. Només es descarrega on Georgia no hi és (Android, Linux). */
@font-face {
  font-family: 'Gelasio';
  src: url('assets/fonts/gelasio-latin-400-normal.woff2?v=54c64a6c8b') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gelasio';
  src: url('assets/fonts/gelasio-latin-400-italic.woff2?v=e90bcf5678') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Gelasio';
  src: url('assets/fonts/gelasio-latin-700-normal.woff2?v=8208724691') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─────────────────────────────────────────
   2. DESIGN TOKENS
   ───────────────────────────────────────── */
:root {
  /* Colors */
  --brand: #af7c58;
  --brand-dark: #8a6040;
  --brand-light: #c99a78;
  --brand-glow: rgba(175, 124, 88, 0.4);
  --ink: #17120f;
  --ink-soft: #4d4037;
  --muted: #807166;
  --paper: #fff;
  --paper-2: #f8f5f1;
  --paper-3: #efe8df;
  --line: rgba(175, 124, 88, 0.25);
  --overlay: rgba(23, 18, 15, 0.85);

  /* Typography */
  --font-body: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --font-heading: Georgia, 'Gelasio', 'Times New Roman', serif;
  --font-accent: 'Gracetians', Georgia, 'Times New Roman', serif;

  /* Spacing (fluid with clamp) */
  --space-xs: clamp(0.5rem, 1vw, 0.75rem);
  --space-sm: clamp(0.75rem, 2vw, 1.25rem);
  --space-md: clamp(1.25rem, 3vw, 2rem);
  --space-lg: clamp(2.5rem, 6vw, 4rem);
  --space-xl: clamp(3.75rem, 9vw, 6.25rem);

  /* Layout */
  --max-width: 1200px;
  --header-height: 86px;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(23, 18, 15, 0.08);
  --shadow-md: 0 8px 32px rgba(23, 18, 15, 0.12);
  --shadow-lg: 0 24px 80px rgba(23, 18, 15, 0.18);
  --shadow-brand: 0 4px 20px var(--brand-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
}

/* ─────────────────────────────────────────
   2. CSS RESET & BASE
   ───────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: var(--brand);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--paper-2);
}
::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-dark);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--brand);
}

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

/* Buttons */
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Lists */
ul, ol {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--ink);
  color: #fff;
  z-index: 9999;
  border-radius: 0;
  font-weight: 700;
  transition: top var(--duration-fast);
}
.skip-link:focus {
  top: var(--space-md);
  color: #fff;
}

/* Eyebrow text */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--ink) 0%, var(--brand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─────────────────────────────────────────
   4. HEADER
   ───────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* Sobre l'slider: transparent, lletres en accent atenuat (revisió client) */
  background: transparent;
  transition: box-shadow 0.4s ease, background 0.3s ease;
}
.site-header.scrolled {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.08);
}

/* Logo: versió blanca sobre l'slider, versió en color amb fons blanc */
.brand__logo--light { display: block; }
.brand__logo--dark { display: none; }
.site-header.scrolled .brand__logo--light { display: none; }
.site-header.scrolled .brand__logo--dark { display: block; }

/* Topbar */
.topbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: transparent;
  border-bottom: 1px solid rgba(175, 124, 88, 0.18);
  color: #fff;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition: height 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
}

/* En fer scroll la barra superior es plega i queda només la navegació blanca */
.site-header.scrolled .topbar {
  height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  transition: color 0.25s ease;
}

.topbar a:hover {
  color: var(--brand);
}

.topbar svg {
  width: 15px;
  height: 15px;
  opacity: 0.5;
  flex-shrink: 0;
}

.topbar__divider {
  width: 1px;
  height: 18px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.15), transparent);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 64px);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  width: clamp(150px, 15vw, 220px);
  height: auto;
  max-height: 48px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.brand:hover img {
  transform: scale(1.05);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-menu a {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(175, 124, 88, 0.7);
  position: relative;
  padding: 10px 0;
  transition: color 0.25s ease;
}

.nav-menu a:not(.btn),
.nav-menu a:not(.btn):hover,
.nav-menu a:not(.btn).active {
  color: #fff;
}

.site-header.scrolled .nav-menu a:not(.btn) {
  color: var(--ink);
}

.site-header.scrolled .nav-menu a:not(.btn):hover,
.site-header.scrolled .nav-menu a:not(.btn).active {
  color: var(--brand);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), #d4a574);
  border-radius: 0;
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu .btn-header,
.nav-menu .btn-primary {
  margin-left: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.875rem 1.75rem;
  min-width: 0;
  white-space: nowrap;
  color: #fff;
}

.nav-menu .btn-primary::after {
  display: none;
}

.nav-menu .btn-primary:hover,
.nav-menu .btn-primary:focus,
.nav-menu .btn-primary.active {
  color: #fff;
}

/* Nav Toggle (hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(175, 124, 88, 0.35);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.nav-toggle:hover {
  background: rgba(0,0,0,0.06);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--brand);
  border-radius: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
@media (max-width: 900px) {
  .topbar {
    display: none;
  }

  .nav {
    min-height: 64px;
    padding: 0 var(--space-md);
  }

  .nav-toggle {
    display: flex;
  }

  .brand::before {
    display: none;
  }

  .nav-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 8px var(--space-md) 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a:not(.btn) {
    color: var(--ink);
  }

  .nav-menu a:not(.btn):hover,
  .nav-menu a:not(.btn).active {
    color: var(--brand);
  }

  .nav-menu a {
    width: 100%;
    padding: 14px 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-menu .btn-header,
  .nav-menu .btn-primary {
    width: 100%;
    margin: 16px 0 0;
    text-align: center;
    justify-content: center;
    min-width: 0;
  }

}

/* ─────────────────────────────────────────
   5. HERO SECTION
   ───────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.hero__track,
.hero__slide {
  position: absolute;
  inset: 0;
}

/* Fons: fos encadenat + zoom lent (com el slider original) */
.hero__slide {
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s var(--ease-out), visibility 0s linear 1s;
}

.hero__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: var(--pos, center);
  transform: scale(1.06);
  transition: transform 9s linear;
}

@media (max-width: 960px) {
  .hero__slide::before {
    background-image: var(--bg-sm, var(--bg));
  }
}

/* En vertical es veu només una franja de la imatge: centrem la persona */
@media (max-width: 760px) {
  .hero__slide::before {
    background-position: var(--pos-sm, var(--pos, center));
  }
}

/* Mòbil vertical: la diapositiva que ho demani es redueix perquè la cara no arribi a la vora */
@media (max-width: 760px) and (orientation: portrait) {
  .hero__slide::before {
    background-color: #000;
    background-repeat: no-repeat;
    background-size: var(--size-sm, cover);
  }
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s var(--ease-out), visibility 0s;
}

.hero__slide.is-active::before {
  transform: scale(1);
}

/* Enfosquiment suau només on hi ha text: les imatges es veuen vives */
.hero__slide--center::after,
.hero__slide--left::after,
.hero__slide--right::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__slide--center::after {
  background: radial-gradient(ellipse 45% 55% at 50% 50%, rgba(0, 0, 0, 0.45), transparent 75%);
}
.hero__slide--left::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 45%, transparent 65%);
}
.hero__slide--right::after {
  background: radial-gradient(ellipse 40% 55% at 64% 50%, rgba(0, 0, 0, 0.5), transparent 75%);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Recuadre lleuger en color accent (referències 05–07) */
.hero__frame {
  position: relative;
  z-index: 2;
  padding: clamp(2.5rem, 7vh, 5rem) clamp(1.5rem, 4vw, 3.5rem);
}

.hero__frame::before,
.hero__frame::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  border: 1px solid var(--brand);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out) 0.2s;
}
.hero__frame::before {
  top: 0;
  height: 32%;
  border-bottom: 0;
}
.hero__frame::after {
  bottom: 0;
  height: 22%;
  border-top: 0;
  border-bottom: 0;
  background: linear-gradient(90deg, var(--brand) 0 12%, transparent 12% 88%, var(--brand) 88%) bottom / 100% 1px no-repeat;
}
.is-active .hero__frame::before,
.is-active .hero__frame::after {
  opacity: 0.85;
}

.hero__frame--center {
  margin: 0 auto;
  text-align: center;
  width: min(760px, calc(100% - 2 * var(--space-md)));
}

.hero__slide--right .hero__frame--center {
  margin: 0 7% 0 auto;
}

/* Jordi: marc obert a la dreta, text a l'esquerra (referència 06) */
.hero__frame--left {
  margin-left: clamp(1rem, 11vw, 13rem);
  padding-left: clamp(2.5rem, 5vw, 5.5rem);
  width: min(620px, calc(100% - 2 * var(--space-md)));
}
.hero__frame--left::before {
  right: auto;
  width: 45%;
  height: 100%;
  border-right: 0;
  border-bottom: 0;
  background: linear-gradient(90deg, var(--brand) 0 22%, transparent 22%) bottom / 100% 1px no-repeat;
}
.hero__frame--left::after {
  left: 45%;
  right: auto;
  top: 0;
  bottom: auto;
  width: 0;
  height: 12%;
  border-left: 0;
  background: none;
}

/* Tipografia de les diapositives: Georgia, paraules clau en accent (sense cursiva, com a les referències) */
.hero__eyebrow {
  font-family: var(--font-heading);
  font-size: clamp(0.6875rem, 1vw, 0.875rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.9rem;
}

.hero__eyebrow--line::before {
  content: '';
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  margin-right: 0.9rem;
  vertical-align: middle;
  background: var(--brand);
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.875rem, 3.3vw, 3.25rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: #fff;
}

.hero__title em {
  font-style: normal;
  color: var(--brand);
}

/* Entrada del text: des de la dreta i amb fos, escalonat (com el slider original) */
.hero__eyebrow,
.hero__title {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.is-active .hero__eyebrow {
  opacity: 1;
  transform: none;
  transition-delay: 0.35s;
}
.is-active .hero__title {
  opacity: 1;
  transform: none;
  transition-delay: 0.47s;
}

/* Llegibilitat del menú transparent sobre imatges clares (el vídeo de núvols) */
.hero::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 240px;
  z-index: 3;
  background: linear-gradient(rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

/* Controls */
.hero__arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.hero__arrow:hover {
  background: #000;
  color: var(--brand);
}
.hero__arrow svg {
  width: 20px;
  height: 20px;
}
.hero__arrow--prev { left: clamp(12px, 2vw, 32px); }
.hero__arrow--next { right: clamp(12px, 2vw, 32px); }

.hero__dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(28px, 8vh, 72px);
  translate: -50% 0;
  display: flex;
  gap: 10px;
}
.hero__dots button {
  width: 30px;
  height: 14px;
  background: linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)) center / 100% 2px no-repeat;
  transition: background-size var(--duration-base) var(--ease-out);
}
.hero__dots button.is-active {
  background-image: linear-gradient(#fff, #fff);
}
.hero__dots button {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
}

@media (max-width: 760px) {
  .hero__frame--center,
  .hero__slide--right .hero__frame--center,
  .hero__frame--left {
    margin: auto var(--space-md) 18vh;
    width: auto;
    text-align: center;
    padding: 2rem 1.25rem;
  }
  .hero__slide {
    align-items: flex-end;
  }
  .hero__slide--center::after,
  .hero__slide--left::after,
  .hero__slide--right::after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 70%);
  }
  .hero__frame--left::before { width: 100%; height: 32%; border-right: 1px solid var(--brand); background: none; }
  .hero__frame--left::after { display: none; }
  .hero__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide::before { transition: none; transform: none; }
  .hero__eyebrow, .hero__title { transform: none; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────
   6. BUTTONS
   ───────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: 1px solid transparent;
  border-radius: 0;
  overflow: hidden;
  transition:
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-base) var(--ease-out);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.5s var(--ease-out);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-3px) scaleX(1.05);
  box-shadow: 0 8px 28px var(--brand-glow);
}

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

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-brand);
}

.btn-header {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-header:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--brand-glow);
}

/* ─────────────────────────────────────────
   7. SECTIONS BASE
   ───────────────────────────────────────── */
.section {
  padding: clamp(56px, 7vh, 96px) var(--space-md);
  scroll-margin-top: 100px;
}

@media (min-width: 1025px) {
  .section {
    min-height: calc(100vh - 116px);
    display: grid;
    align-content: center;
  }
}

#contacte {
  scroll-margin-top: 102px;
}

.contact-section {
  position: relative;
  background: linear-gradient(135deg, #14100d 0%, #080706 100%);
  color: #fff;
}

.contact-section .container {
  position: relative;
  z-index: 1;
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1fr);
  gap: clamp(28px, 4vw, 58px);
  align-items: start;
}

.contact-copy h2,
.contact-copy p {
  color: #fff;
}

/* Revisió client v2: «— CONTACTA» en coure (el blanc de .contact-copy p el tapava) */
.contact-copy .eyebrow {
  color: var(--brand);
}

.contact-copy > p:not(.eyebrow):not(.contact-urgent) {
  color: rgba(255, 255, 255, 0.72);
  max-width: 620px;
}

.section__header {
  text-align: center;
  margin-bottom: clamp(28px, 4vh, 52px);
}

.section__header .eyebrow {
  justify-content: center;
}

.section h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.45rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
  color: inherit;
}

/* Títols Georgia: la paraula destacada en cursiva i color accent (com a les referències) */
.section h2 em {
  font-style: italic;
  color: var(--brand);
}

/* Negretes del text en color accent */
.section p strong,
.section li strong {
  color: var(--brand);
}

.contact-section h2 {
  color: #fff;
}

.section__desc {
  max-width: none;
  margin: var(--space-sm) auto 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--brand);
}

/* Section variants */
.section--light {
  background: var(--paper-2);
}

.section--dark {
  background: #100d0b;
  color: #fff;
}

.section--dark h2 {
  color: #fff;
}

.section--dark p,
.section--dark li {
  color: rgba(255, 255, 255, 0.85);
}

/* ─────────────────────────────────────────
   8. SECTION GRID LAYOUTS
   ───────────────────────────────────────── */
.section__grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.section__grid--two {
  grid-template-columns: 1fr 1fr;
}

/* ─────────────────────────────────────────
   9. KORPUS / VALUES SECTION
   ───────────────────────────────────────── */
.section.intro {
  background: var(--paper-2);
  padding-bottom: 0;
}

/* La nostra Visió: text justificat + Themis en coure */
.vision {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
}

.vision h2 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.05;
}

.title-rule {
  display: block;
  width: 40px;
  height: 1px;
  margin: var(--space-md) 0;
  background: var(--brand);
}

.section.intro p {
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
}

.vision__media {
  justify-self: center;
}

.vision__media img {
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, rgba(0, 0, 0, 0.82) 78%, rgba(0, 0, 0, 0.45) 87%, rgba(0, 0, 0, 0.14) 94%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 70%, rgba(0, 0, 0, 0.82) 78%, rgba(0, 0, 0, 0.45) 87%, rgba(0, 0, 0, 0.14) 94%, transparent 99%);
  width: min(100%, 340px);
}

/* Els nostres Valors: quadres units, sense arrodonir */
.values-block {
  margin-top: var(--space-xl);
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--paper-3);
  border-left: 1px solid var(--paper-3);
}

.values > article {
  position: relative;
  background: #fff;
  border-right: 1px solid var(--paper-3);
  border-bottom: 1px solid var(--paper-3);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  transition: background var(--duration-base) var(--ease-out);
}

.values > article::before {
  content: '';
  position: absolute;
  inset: -1px 0 auto;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}

.values > article:hover {
  background: var(--paper-2);
}

.values > article:hover::before {
  transform: scaleX(1);
}

.values > article span {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 3.5vw, 2.75rem);
  line-height: 1;
  font-weight: 400;
  color: rgba(175, 124, 88, 0.35);
  margin-bottom: 0.4rem;
}

.values > article h3 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.section.intro .values > article p {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0;
}

/* Lema */
.motto {
  margin: 0;
  padding: clamp(2rem, 5vw, 3.25rem) var(--space-md);
  background: var(--paper-2);
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  line-height: 1.45;
  color: var(--brand);
}

/* Lema al peu dels serveis (revisió client v2): abans era al peu de la web */
.motto--services {
  margin-top: clamp(28px, 4vw, 48px);
  background: none;
  text-wrap: balance;
}

.section.intro .motto {
  text-align: center;
  color: var(--brand);
}

@media (max-width: 900px) {
  .vision {
    grid-template-columns: 1fr;
  }
  .vision__media img {
    width: min(70%, 280px);
  }
  .values {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* ─────────────────────────────────────────
   10. SERVICES SECTION
   ───────────────────────────────────────── */
#serveis {
  background: #fff;
  padding-bottom: clamp(20px, 2.5vw, 32px);
}

#equip {
  padding-top: clamp(32px, 4vw, 56px);
  min-height: auto;
}

/* Capçalera: títol a l'esquerra, introducció en accent a la dreta (referència 15) */
.services-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.services-header > div {
  padding-right: clamp(1.5rem, 4vw, 3.5rem);
}

.services-header h2 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.05;
}

.services-header__intro {
  padding: var(--space-md) 0 var(--space-md) clamp(1.5rem, 4vw, 3.5rem);
  border-left: 1px solid rgba(175, 124, 88, 0.45);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.55;
  color: var(--brand);
}

/* 12 targes quadrades i unides (referències 16–17) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #fff;
  border: 1px solid #fff;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.5rem, 2.6vw, 2.25rem) clamp(2.25rem, 3.5vw, 3rem);
  transition: background var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}

.service-card:hover {
  background: var(--paper-3);
  box-shadow: inset 2px 0 0 var(--brand);
}

.service-card__icon {
  width: 34px;
  height: 34px;
  color: var(--brand);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--brand);
  margin-bottom: 0.9rem;
}

.service-card__text p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: justify;
  hyphens: auto;
}

.service-card__text p + p {
  margin-top: 0.6rem;
}

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

@media (max-width: 760px) {
  .services-header {
    grid-template-columns: 1fr;
  }
  .services-header > div {
    padding-right: 0;
  }
  .services-header__intro {
    padding: 0 0 0 1.25rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────
   11. TEAM SECTION
   ───────────────────────────────────────── */
.team-section {
  background: linear-gradient(180deg, #fff 0%, #f8f5f2 100%);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.team-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--paper-3);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.team-card:hover,
.team-card:focus-visible {
  border-color: var(--brand);
  box-shadow: inset 0 -2px 0 var(--brand);
  outline: none;
}

.team-card__photo {
  display: block;
  overflow: hidden;
}

.team-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: brightness(var(--photo-brightness, 1)) contrast(1.08) url(#duotone-sepia);
  transition: transform 0.5s ease;
  transform-origin: 0 0;
  scale: var(--face-scale, 1);
  translate: var(--face-x, 0) var(--face-y, 0);
}

/* Iguala l'exposició i l'enquadrament (cares a la mateixa alçada i mida) */
.team-card img[src*="equip-ingrid"] { --photo-brightness: 1.12; --face-scale: 1.388; --face-x: -33.3%; --face-y: -16.1%; }
.team-card img[src*="equip-jordi"] { --photo-brightness: 1.05; --face-scale: 1.225; --face-x: -22.5%; --face-y: -7.1%; }
.team-card img[src*="equip-judith"] { --photo-brightness: 0.9; --face-scale: 1.248; --face-x: -13.6%; --face-y: -0.15%; }
.team-card img[src*="equip-debora"] { --photo-brightness: 0.92; --face-scale: 1.275; --face-x: -24.6%; --face-y: -27.3%; }

.team-card:hover img {
  transform: scale(1.03);
  filter: none;
}

.team-card__info {
  padding: 22px;
}

.team-card__info h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.team-card__info p {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--brand);
}

.team-card--dark {
  background: #15110e;
  border-color: rgba(255, 255, 255, 0.08);
}

.team-card--dark .team-card__info h3 {
  color: #fff;
}

.team-card--dark .team-card__info p {
  color: var(--brand-light);
}


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

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

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ─────────────────────────────────────────
   12. LOCATION SECTION
   ───────────────────────────────────────── */
#ubicacio {
  background: linear-gradient(135deg, #15110e 0%, #080706 100%);
}

/* Nova seu: text justificat + fotos quadrades (revisió client) */
.seu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.seu h2 {
  font-size: clamp(2.25rem, 4.8vw, 3.75rem);
}

#ubicacio .seu__text p:not(.eyebrow) {
  font-size: 1rem;
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
  color: rgba(255, 255, 255, 0.82);
}

#ubicacio strong {
  color: var(--brand);
}

#ubicacio a:not(.btn) {
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#ubicacio .seu__notice {
  margin: var(--space-md) 0;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--brand);
  background: rgba(175, 124, 88, 0.12);
}

.seu__info {
  display: grid;
  border-top: 1px solid rgba(175, 124, 88, 0.25);
}

.seu__info > div {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(175, 124, 88, 0.25);
}

.seu__info dt {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  padding-top: 0.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.seu__icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: -0.15rem;
}

.seu__info dd {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.seu__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}

.seu__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seu__photo--main {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
}

.seu__photo--detail {
  grid-column: 2;
  aspect-ratio: 4 / 3;
  margin-top: -18%;
  border: 6px solid #0d0a08;
  position: relative;
}

.seu__map {
  margin-top: var(--space-lg);
}

.seu__map iframe {
  display: block;
  border: 0;
  border-radius: 0;
  filter: grayscale(0.35) contrast(1.05);
}

.seu__routes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

#ubicacio .seu__routes a {
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(175, 124, 88, 0.5);
  color: #fff;
  text-decoration: none;
  transition: background var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}

#ubicacio .seu__routes a:hover {
  background: var(--brand);
  border-color: var(--brand);
}

@media (max-width: 900px) {
  .seu {
    grid-template-columns: 1fr;
  }
  .seu__info > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* ─────────────────────────────────────────
   13. HISTORY SECTION — El nostre nom
   ───────────────────────────────────────── */
.historia-img {
  width: 100%;
  min-height: 430px;
  object-fit: cover;
  border-radius: 0;
}

.historia__text p:not(.eyebrow) {
  text-align: justify;
  hyphens: auto;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

.historia__text strong {
  color: var(--brand);
}

/* «– Korpus Advocats» no es parteix: el guió no queda penjant a final de línia */
.historia__title-brand {
  white-space: nowrap;
}

/* Revisió client v2: frase d'entrada en Nunito Sans, amb «Korpus Advocats» en negreta coure */
.historia__text p.historia__lead {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1.8vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink);
  text-align: left;
}

.historia__lead strong {
  font-weight: 800;
}

/* Lema al peu de la secció, centrat, amb una línia coure a sobre */
.historia__motto {
  width: fit-content;
  max-width: 100%;
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--brand);
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.45;
  color: var(--brand);
  text-align: center;
  text-wrap: balance;
}

/* ─────────────────────────────────────────
   14. CONTACT SECTION
   ───────────────────────────────────────── */
.contact-copy .title-rule {
  margin: var(--space-sm) 0 var(--space-md);
}

.contact-intro,
.contact-urgent,
.cant-move p,
.form-intro {
  text-align: justify;
  hyphens: auto;
}

.contact-copy .contact-intro {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--brand-light);
  margin-bottom: var(--space-md);
}

.contact-urgent {
  border-left: 2px solid var(--brand);
  padding: 0.9rem 1.1rem;
  background: rgba(175, 124, 88, 0.12);
  color: rgba(255, 255, 255, 0.85) !important;
  line-height: 1.6;
}

.contact-urgent a {
  color: #fff;
  font-weight: 800;
}

.contact-label {
  margin: var(--space-lg) 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.contact-label--icon {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.contact-data {
  display: grid;
  border-top: 1px solid rgba(175, 124, 88, 0.25);
}

.contact-data li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(175, 124, 88, 0.25);
}

.contact-data svg {
  width: 26px;
  height: 26px;
  color: var(--brand);
}

.contact-data span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand); /* revisió client v2: abans blanc al 55% */
  margin-bottom: 0.2rem;
}

.contact-data a,
.contact-data p {
  color: #fff !important;
  font-size: 1rem;
  line-height: 1.5;
}

.contact-data a:hover {
  color: var(--brand) !important;
}

.contact-data .contact-data__note {
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--brand-light) !important;
}

/* Contact form */
.contact-form-wrap {
  position: relative;
}


.contact-form {
  background: #fff;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 0;
  border-top: 2px solid var(--brand);
  display: grid;
  gap: 12px;
}

.contact-form__header .contact-label {
  margin: 0 0 0.4rem;
}

.form-intro {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.form-warning {
  padding: 0.65rem 0.9rem;
  background: rgba(175, 124, 88, 0.1);
  border-left: 2px solid var(--brand);
  color: var(--brand-dark);
  font-size: 0.8125rem;
  font-weight: 700;
}

.legal-trigger--inline {
  display: inline;
  padding: 0;
  font: inherit;
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Revisió client v2: títol i etiquetes del formulari en coure */
.contact-form__header h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--brand);
  margin-bottom: 6px;
}

.contact-form label {
  display: grid;
  gap: var(--space-xs);
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
}

/* El text de privacitat també és un label: es queda gris */
.contact-form label.check-label {
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  padding: 0.78rem 0.9rem;
  border: 1px solid rgba(23, 18, 15, 0.12);
  border-radius: 0;
  background: #fbfaf8;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.contact-form textarea {
  resize: vertical;
  min-height: 92px;
}

.contact-form .invalid {
  border-color: #b63a30;
  box-shadow: 0 0 0 3px rgba(182, 58, 48, 0.15);
}

.contact-form .valid {
  border-color: rgba(46, 128, 93, 0.6);
}

.field-error {
  display: none;
  margin-top: 2px;
  color: #b63a30;
  font-size: 0.72rem;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.form-success,
.form-error {
  margin-top: 0.4rem;
  padding: 0.72rem 0.9rem;
  border-radius: 0;
  font-size: 0.84rem;
  line-height: 1.4;
}

.form-success {
  background: rgba(46, 128, 93, 0.12);
  border: 1px solid rgba(46, 128, 93, 0.36);
  color: #1f5f42;
}

.form-error {
  background: rgba(182, 58, 48, 0.1);
  border: 1px solid rgba(182, 58, 48, 0.32);
  color: #8f2e27;
}

.form-note {
  font-size: 0.7rem;
  color: var(--muted);
}

.form-privacy {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
}

.form-privacy a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.check-label {
  display: flex !important;
  align-items: flex-start;
  gap: var(--space-xs);
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.45;
  font-size: 0.75rem !important;
}

.check-label input {
  width: auto !important;
  margin-top: 0.25rem;
}

.check-label {
  flex-wrap: wrap;
}

.check-label > span:not(.field-error) {
  flex: 1;
}

.check-label .field-error {
  order: 3;
  flex-basis: 100%;
}

/* Atenció personalitzada */
.cant-move .contact-label {
  margin-top: var(--space-lg);
}

.cant-move strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  color: var(--brand); /* revisió client v2: abans blanc */
}

.cant-move p {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ─────────────────────────────────────────
   15. FOOTER
   ───────────────────────────────────────── */
.footer {
  background: #0a0a0a;
  color: #fff;
  position: relative;
  padding: 0 clamp(20px, 5vw, 64px);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.footer__direct {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.625rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer__direct a {
  color: rgba(255, 255, 255, 0.82);
  transition: color var(--duration-base) var(--ease-out);
}

.footer__direct a:hover {
  color: var(--brand-light);
}

.footer__top {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 32px 0 8px;
}

.footer__brand img {
  width: 190px;
  height: auto;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.25rem;
}

.footer__nav a,
.footer__legal button {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--duration-base) var(--ease-out);
}

.footer__nav a:hover,
.footer__legal button:hover {
  color: var(--brand);
}

.footer__bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: 26px 0 30px;
}

.footer__copyright {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer__partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.footer__badge {
  display: inline-flex;
  margin-right: 8px;
}

.footer__badge img {
  height: 38px;
  width: auto;
  opacity: 0.85;
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

.footer__badge:hover img {
  opacity: 1;
  transform: translateY(-2px);
}

.footer__partners img {
  height: 38px;
  width: auto;
  opacity: 0.85;
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

.footer__partners a:has(.footer__webby) {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__webby {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.6);
}

.footer__partners img[src*="vanguardlabs-"] {
  height: 24px;
}

.footer__partners img[src*="openmind-it"] {
  height: 24px;
}

.footer__logo-swap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.footer__partners .footer__logo-swap img + img {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.footer__partners a:hover .footer__logo-swap img,
.footer__partners a:focus-visible .footer__logo-swap img {
  opacity: 0;
}

.footer__partners a:hover .footer__logo-swap img + img,
.footer__partners a:focus-visible .footer__logo-swap img + img {
  opacity: 1;
}

.footer__partners a:hover img,
.footer__partners img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer__legal button {
  white-space: nowrap;
}

.footer__legal {
  justify-self: center;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer__legal button {
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 600;
  font-size: 0.8125rem;
}

@media (max-width: 900px) {
  .footer__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1279px) {
  .footer__bottom {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .footer__partners {
    justify-content: flex-start;
  }
  .footer__legal {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .footer__partners {
    gap: 8px;
  }
  .footer__partners img {
    height: 30px;
  }
  .footer__partners img[src*="vanguardlabs-"] {
    height: 20px;
  }
  .footer__partners img[src*="openmind-it"] {
    height: 17px;
  }
  .footer__webby {
    font-size: 0.625rem;
  }
  .footer__partners a:has(.footer__webby) {
    gap: 0.3rem;
  }
}

@media (max-width: 1279px) {
  .footer__bottom {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-items: stretch;
  }
  .footer__legal {
    justify-self: end;
  }
  .footer__partners {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .footer__bottom {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px 14px;
  }
  .footer__legal {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
  }
  .footer__partners {
    grid-row: 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer__partners img[src*="vanguardlabs-"],
  .footer__partners img[src*="openmind-it"] {
    height: 22px;
  }
  .footer__webby {
    font-size: 0.6875rem;
  }
  .footer__partners a:has(.footer__webby) {
    gap: 0.5rem;
  }
  .footer__badge {
    grid-row: 3;
    margin-right: 0;
  }
  .footer__copyright {
    grid-row: 3;
  }
}

/* ─────────────────────────────────────────
   17. LEGAL MODAL
   ───────────────────────────────────────── */
.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--duration-slow) var(--ease-out),
    visibility var(--duration-slow);
}

.legal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.team-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 6, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 48px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
}

.team-modal.open {
  opacity: 1;
  visibility: visible;
}

.team-modal__backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  cursor: pointer;
}

.team-modal__container {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 1120px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0,0,0,0.5);
  border-radius: 0;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.team-modal.open .team-modal__container {
  transform: scale(1) translateY(0);
}

.team-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 210;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 24px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s, transform 0.2s;
}

.team-modal__close:hover {
  background: var(--brand-dark, #8B6344);
  transform: scale(1.1);
}

/* Fila 1: foto + presentació. Fila 2: formació i càrrecs a tot l'ample (revisió client v2),
   perquè la columna fosca no s'allargui buida fins al final de les llistes */
.team-modal__body {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  grid-template-rows: auto auto;
}

/* Sense fons fosc (revisió client v2): la foto queda sobre blanc, alineada amb el nom
   i amb el marge esquerre de les llistes */
.team-modal__photo {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: stretch;
  padding: clamp(36px, 5vw, 58px) 0 28px clamp(36px, 5vw, 58px);
}

/* La foto conserva la proporció 4:5 de l'original (abans s'estirava fins a l'alçada
   del text i en quedava només una franja). Si la presentació és més llarga que la foto
   (p. ex. Débora), la foto acompanya la lectura fins a les llistes */
.team-modal__photo img {
  position: sticky;
  top: 22px;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  border-radius: 0;
  box-shadow: 0 12px 30px rgba(42, 32, 25, 0.18);
}

.team-modal__photo-initials {
  width: 100%;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: clamp(5rem, 12vw, 8rem);
  color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 30% 22%, rgba(175, 124, 88, 0.38), transparent 32%),
    linear-gradient(135deg, #17120f, #2a2019);
  border-radius: 0;
}

.team-modal__content {
  padding: clamp(36px, 5vw, 58px) clamp(36px, 5vw, 58px) 28px;
  align-self: start;
}

.team-modal__lists {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  align-items: start;
  padding: 36px clamp(36px, 5vw, 58px) 44px;
  border-top: 1px solid var(--paper-3);
  background: var(--paper-2);
}

/* Una sola llista (p. ex. Jordi): ocupa tot l'ample repartida en dues columnes */
.team-modal__section:only-child {
  grid-column: 1 / -1;
}

.team-modal__section:only-child .team-modal__list {
  columns: 2;
  column-gap: 48px;
}

.team-modal__lists .team-modal__list-item {
  break-inside: avoid;
}

.team-modal__name {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  color: inherit;
  margin-bottom: 10px;
}

.team-modal__role {
  font-size: 0.875rem;
  font-weight: 900;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}

.team-modal__bio {
  margin-bottom: 20px;
}

.team-modal__bio p {
  color: var(--ink);
  line-height: 1.85;
  margin-bottom: 12px;
  font-size: 1rem;
  text-align: justify;
  hyphens: auto;
}

.team-modal__bio .team-modal__lead {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.5;
  color: var(--brand);
  text-align: left;
}

.team-modal__list-text {
  text-align: justify;
  hyphens: auto;
}

.team-modal__section-title {
  color: var(--brand-dark, #8B6344);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
}

.team-modal__list {
  margin-bottom: 20px;
}

.team-modal__list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.team-modal__list-dot {
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.team-modal__list-text {
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .team-modal__container {
    max-width: 100%;
    margin: 20px;
    border-radius: 0;
  }

  .team-modal__body {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .team-modal__photo {
    padding: 24px 24px 0;
  }

  .team-modal__photo img {
    width: 100%;
    max-width: none;
    min-height: 320px;
    max-height: 420px;
    margin: 0 auto;
    display: block;
  }

  .team-modal__photo-initials {
    min-height: 320px;
  }

  .team-modal__content {
    padding: 28px 24px 24px;
  }

  .team-modal__lists {
    grid-template-columns: 1fr;
    padding: 28px 24px 32px;
  }

  .team-modal__section:only-child .team-modal__list {
    columns: 1;
  }

  .team-modal__close {
    top: 12px;
    right: 12px;
  }
}

.legal-panel {
  position: relative;
  background: var(--paper);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: auto;
  padding: var(--space-lg);
  border-radius: 0;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--duration-slow) var(--ease-spring);
}

.legal-overlay.open .legal-panel {
  transform: translateY(0) scale(1);
}

.legal-close {
  position: fixed;
  top: var(--space-md);
  right: var(--space-md);
  width: 52px;
  height: 52px;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
  font-size: 1.375rem;
  line-height: 52px;
  text-align: center;
  border: none;
  box-shadow: var(--shadow-brand);
  animation: pulse-ring 2s infinite;
  transition:
    transform var(--duration-base) var(--ease-spring),
    background var(--duration-fast);
}

.legal-close:hover {
  animation: none;
  background: var(--brand-dark);
  transform: scale(1.15) rotate(90deg);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 var(--brand-glow);
  }
  70% {
    box-shadow: 0 0 0 14px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.legal-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-sm);
}

.legal-tab {
  padding: 0.625rem 1rem;
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--muted);
  transition:
    background var(--duration-fast),
    color var(--duration-fast),
    border-color var(--duration-fast);
}

.legal-tab:hover:not(.active) {
  border-color: var(--brand);
  color: var(--brand);
}

.legal-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.legal-section {
  display: none;
}

.legal-section.active {
  display: block;
}

.legal-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: var(--space-md);
}

.legal-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: var(--space-md) 0 var(--space-xs);
}

.legal-section p {
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}

.legal-section a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.legal-section ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: var(--space-sm);
}

.legal-section li {
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 0.25rem;
}

.legal-section li::marker {
  color: var(--brand);
}

.legal-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-sm);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.legal-table td:first-child {
  width: 58%;
}

.legal-section .legal-updated {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  font-style: italic;
}

@media (max-width: 600px) {
  .legal-overlay {
    padding: 0;
    align-items: flex-start;
  }

  .legal-panel {
    max-width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    padding: var(--space-md);
  }

  .legal-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 1.25rem;
  }
}

/* ─────────────────────────────────────────
   18. SCROLL ANIMATIONS
   ───────────────────────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity var(--duration-slower) var(--ease-out),
    transform var(--duration-slower) var(--ease-out);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scale-reveal {
  opacity: 0;
  transform: scale(0.93);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.scale-reveal.revealed {
  opacity: 1;
  transform: scale(1);
}

.slide-reveal {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.slide-reveal.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-reveal,
  .scale-reveal,
  .slide-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ─────────────────────────────────────────
   19. RESPONSIVE - TABLET
   ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ─────────────────────────────────────────
   20. RESPONSIVE - MOBILE
   ───────────────────────────────────────── */
@media (max-width: 900px) {
  /* Grids */
  .section__grid--two,
  .team-grid {
    grid-template-columns: 1fr;
  }

  /* Section headers */
  .section__header {
    text-align: left;
  }

  .section__header .eyebrow {
    justify-content: flex-start;
  }

  /* Team */
  .team-card img {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }

  /* La targeta és més baixa: el desplaçament vertical es recalcula */
  .team-card img[src*="equip-ingrid"] { --face-y: -26.8%; }
  .team-card img[src*="equip-jordi"] { --face-y: -11.9%; }
  .team-card img[src*="equip-judith"] { --face-y: -0.25%; }
  /* Débora: amb -45,3% la foto no arribava al peu del requadre i hi quedava una franja fosca.
     El desplaçament no pot passar de -(escala - 1) = -27,5%: la resta es fa amb object-position */
  .team-card img[src*="equip-debora"] { --face-y: -25%; object-position: 50% 19%; }
}

@media (max-width: 560px) {
  .contact-shell {
    gap: 24px;
  }

  .contact-form {
    padding: 20px;
    border-radius: 0;
  }

  .cant-move {
    padding: 14px;
  }
}

  /* ─────────────────────────────────────────
   21. RESPONSIVE - SMALL MOBILE
   ───────────────────────────────────────── */
@media (max-width: 560px) {
  .brand img {
    width: 160px;
  }

  .contact-form {
    padding: var(--space-md);
  }
}

/* ─────────────────────────────────────────
   22. PRINT STYLES
   ───────────────────────────────────────── */
@media print {
  .site-header,
  .legal-overlay,
  .hero__arrow,
  .hero__dots,
  .hero__video {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .section {
    padding: 20pt 0;
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
