/* ==========================================================================
   TIPOGRAFIES LOCALS · zero connexions a Google
   Cormorant Garamond · Plus Jakarta Sans · Cinzel
   Fitxers variables .woff2 (subconjunts latin i latin-ext) a assets/fonts/
   ========================================================================== */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/cinzel-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   TELLA FOTÒGRAFS · Estudi d'Autor & Galeria 3D Fluida
   Mode Nocturn (defecte) + Mode Diürn · Paleta Monocroma (Blanc i Negre)
   --------------------------------------------------------------------------
   Tot l'accent de la web passa per estes variables. Per canviar de paleta
   (per exemple a un accent de color), només cal tocar estes quatre:
     --accent           → accent sobre fons fosc / capçalera
     --accent-soft      → accent atenuat
     --accent-on-dark   → accent dins de les targetes fosques
     --accent-on-light  → accent dins de les targetes clares
   ========================================================================== */

/* --- VARIABLES DEL TEMA --- */
:root,
[data-theme="dark"] {
  --bg-body: #0a0a0b;
  --bg-dark-card: rgba(15, 15, 17, 0.94);
  --bg-light-card: rgba(250, 250, 250, 0.97);
  --text-primary: #f4f4f5;
  --text-muted: #9c9ca3;
  --text-dark: #101012;
  --text-dark-muted: #5c5c63;
  /* Paleta monocroma */
  --accent: #ededf0;
  --accent-soft: #c3c3ca;
  --accent-contrast: #0a0a0b;
  --accent-on-dark: #ededf0;
  --accent-on-light: #26262b;
  --accent-on-dark-soft: #bcbcc3;
  --accent-faint: #c4c4ca;
  --card-border-dark: rgba(255, 255, 255, 0.14);
  --card-border-light: rgba(20, 20, 22, 0.16);
  --header-bg: rgba(10, 10, 11, 0.75);
  --header-bg-scroll: rgba(10, 10, 11, 0.92);
  --canvas-clear: #0a0a0b;
  --lightbox-bg: rgba(6, 6, 7, 0.95);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-cinzel: 'Cinzel', serif;
  --shadow-card: 0 24px 64px -12px rgba(0, 0, 0, 0.35), 0 8px 24px -4px rgba(0, 0, 0, 0.2);
  --radius-card: 8px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-body: #f4f4f5;
  --bg-dark-card: rgba(28, 28, 31, 0.92);
  --bg-light-card: rgba(255, 255, 255, 0.97);
  --text-primary: #f4f4f5;
  --text-muted: #9c9ca3;
  --accent: #17171a;
  --accent-soft: #45454c;
  --accent-contrast: #ffffff;
  --header-bg: rgba(244, 244, 245, 0.80);
  --header-bg-scroll: rgba(244, 244, 245, 0.95);
  --card-border-dark: rgba(255, 255, 255, 0.16);
  --card-border-light: rgba(20, 20, 22, 0.16);
  --canvas-clear: #ececee;
  --lightbox-bg: rgba(12, 12, 14, 0.95);
}

/* Header text adapts in light mode */
[data-theme="light"] .brand-logo-img { filter: invert(1); }
[data-theme="light"] .site-header { border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .nav-link { color: #555; }
[data-theme="light"] .nav-link:hover { color: #111; }
[data-theme="light"] .nav-btn { background: #1a1a1a; color: #fff; }
[data-theme="light"] .nav-btn:hover {
  background: #ffffff;
  color: #111113;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22), 0 6px 18px rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .mobile-menu-toggle span { background: #333; }
[data-theme="light"] .hud-inner { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .hud-label { color: var(--accent-soft); }
[data-theme="light"] .hud-count { color: #666; }
[data-theme="light"] .hud-btn { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.12); color: #333; }

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-body);
  line-height: 1.6;
  transition: background-color 0.6s ease;
}

/* ==========================================================================
   3D WEBGL CANVAS BACKGROUND
   ========================================================================== */
#canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: auto;
  overflow: hidden;
}

#webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#webgl-canvas:active {
  cursor: grabbing;
}

/* ==========================================================================
   CAPÇALERA
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 0;
}

.brand-wordmark {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text-primary);
  white-space: nowrap;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.brand-logo:hover .brand-wordmark { color: var(--accent-soft); }

[data-theme="light"] .brand-wordmark { color: #16161a; }

.brand-logo-img {
  height: 44px;
  width: auto;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.brand-logo:hover .brand-logo-img {
  opacity: 0.8;
}

.main-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  padding: 0.35rem 0;
}

.nav-link:hover { color: #ffffff; }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }

.nav-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dark);
  background: #ffffff;
  text-decoration: none;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  background: transparent;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Theme Toggle */
.theme-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--accent);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s ease;
}

.theme-toggle:hover {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

[data-theme="light"] .theme-toggle {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.12);
  color: var(--accent);
}

.hidden { display: none !important; }

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #ffffff;
  transition: 0.3s;
}

/* ==========================================================================
   HUD DE LA CINTA 3D · dos estats
   · reduït  → la resta de la web (píndola discreta)
   · gran    → quan només es veu la cinta (missatge + navegació)
   ========================================================================== */
.ribbon-hud {
  position: fixed;
  bottom: 2rem;
  left: 2.5rem;
  z-index: 50;
  pointer-events: none;
  width: fit-content;                 /* la píndola s'ajusta al contingut */
  max-width: calc(100vw - 5rem);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Amagat mentre s'està en la secció del formulari */
.ribbon-hud.is-hidden {
  opacity: 0;
  transform: translateY(14px);
}

.ribbon-hud.is-hidden .hud-panel { pointer-events: none; }

/* ---- El panell (una sola peça en tots dos estats) ---- */
.hud-panel {
  position: relative;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  width: 16rem;
  padding: 0.8rem 1rem 0.85rem;
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.74);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 16px 44px -14px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform-origin: bottom left;
  transition:
    width 0.62s cubic-bezier(0.22, 1.4, 0.36, 1),
    padding 0.62s cubic-bezier(0.22, 1.4, 0.36, 1),
    border-radius 0.62s cubic-bezier(0.22, 1.4, 0.36, 1),
    background 0.5s ease,
    box-shadow 0.7s ease;
}

/* Fil de llum que s'encén en l'estat gran */
.hud-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.ribbon-hud.is-gallery .hud-panel {
  width: 21.5rem;
  padding: 1.05rem 1.3rem 1.1rem;
  border-radius: 20px;
  background: rgba(12, 12, 14, 0.88);
  box-shadow: 0 28px 70px -18px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ribbon-hud.is-gallery .hud-panel::before {
  opacity: 1;
  transform: scaleX(1);
}

[data-theme="light"] .hud-panel {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 44px -18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .hud-panel::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.28), transparent);
}

/* ---- Files ---- */
.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hud-label {
  font-family: var(--font-cinzel);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-soft);
  white-space: nowrap;
  transition: color 0.5s ease, font-size 0.5s ease;
}

.ribbon-hud.is-gallery .hud-label {
  font-size: 0.65rem;
  color: var(--text-primary);
}

.hud-count {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Barra de navegació: clicable i arrossegable ---- */
.hud-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: ew-resize;
  touch-action: none;
  transition: height 0.55s cubic-bezier(0.22, 1.4, 0.36, 1), background 0.3s ease;
}

.ribbon-hud.is-gallery .hud-track { height: 6px; }
.hud-track:hover { background: rgba(255, 255, 255, 0.28); }
.hud-track:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 5px; }

[data-theme="light"] .hud-track { background: rgba(0, 0, 0, 0.14); }
[data-theme="light"] .hud-track:hover { background: rgba(0, 0, 0, 0.24); }

.hud-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 5%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.1s linear, box-shadow 0.3s ease;
}

.ribbon-hud.is-gallery .hud-progress-bar {
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .ribbon-hud.is-gallery .hud-progress-bar {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
}

.hud-progress-bar::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ribbon-hud.is-gallery .hud-progress-bar::after,
.hud-track:hover .hud-progress-bar::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ---- Missatge integrat: s'obri dins del panell ---- */
.hud-message-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(6px);
  transition:
    grid-template-rows 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.06s,
    opacity 0.45s ease 0.12s,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
}

.ribbon-hud.is-gallery .hud-message-wrap {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.hud-message {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.hud-message strong {
  color: var(--text-primary);
  font-weight: 500;
  font-style: italic;
}

[data-theme="light"] .hud-message { color: var(--text-dark-muted); }
[data-theme="light"] .hud-message strong { color: var(--text-dark); }

/* ---- Botons ---- */
.hud-row-actions {
  justify-content: flex-start;
  gap: 0.5rem;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    width 0.55s cubic-bezier(0.22, 1.4, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 1.4, 0.36, 1),
    opacity 0.4s ease,
    transform 0.25s ease;
}

.hud-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  transform: translateY(-1px);
}

[data-theme="light"] .hud-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  color: #333;
}

/* Els botons de navegació només existixen en l'estat gran */
.hud-btn-nav {
  width: 0;
  height: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: scale(0.6);
  transition: width 0.55s cubic-bezier(0.22, 1.4, 0.36, 1) 0.14s,
              height 0.55s cubic-bezier(0.22, 1.4, 0.36, 1) 0.14s,
              border-width 0.25s ease 0.14s,
              opacity 0.4s ease 0.2s,
              transform 0.55s cubic-bezier(0.22, 1.4, 0.36, 1) 0.14s;
}

.ribbon-hud.is-gallery .hud-btn {
  width: 34px;
  height: 34px;
}

.ribbon-hud.is-gallery .hud-btn-nav {
  border-width: 1px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* ---- Estat compacte real: una sola fila fina ----
   [CINTA DE RECORDS ——— 01/63 (⏸)] · tot en una línia, molt baixeta */
.ribbon-hud:not(.is-gallery) .hud-panel {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: max-content;          /* l'amplada, exactament la del contingut */
  min-width: 0;
  max-width: calc(100vw - 5rem);
  padding: 0.4rem 0.7rem 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.6);
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ribbon-hud:not(.is-gallery) .hud-row-top { display: contents; }

.ribbon-hud:not(.is-gallery) .hud-label {
  order: 1;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.ribbon-hud:not(.is-gallery) .hud-track {
  order: 2;
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3px;
  margin: 0 0.1rem;
}

.ribbon-hud:not(.is-gallery) .hud-count {
  order: 3;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.ribbon-hud:not(.is-gallery) .hud-row-actions {
  order: 4;
  gap: 0.3rem;
}

.ribbon-hud:not(.is-gallery) .hud-btn {
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.12);
}

.ribbon-hud:not(.is-gallery) .hud-btn svg { width: 11px; height: 11px; }

.ribbon-hud:not(.is-gallery) .hud-progress-bar::after { display: none; }

[data-theme="light"] .ribbon-hud:not(.is-gallery) .hud-panel {
  background: rgba(255, 255, 255, 0.72);
}

/* --- L'ESTAT GRAN, EN MODE CLAR ------------------------------------------
   ESTE ERA L'ERROR: el panell de la cinta és fosc per defecte, i la regla de
   l'estat gran —`.ribbon-hud.is-gallery .hud-panel`, tres classes— és MÉS
   ESPECÍFICA que la del tema clar (`[data-theme="light"] .hud-panel`, dos).
   Així que en mode clar, quan la cinta passava a l'estat gran, el panell
   tornava a eixir NEGRE: la regla clara perdia la batalla i mai no s'aplicava.

   Estes dos tenen prou especificitat per a guanyar de veritat. */
[data-theme="light"] .ribbon-hud.is-gallery .hud-panel {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 28px 70px -18px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* I els botons, que duien la vora blanca damunt d'un panell clar. */
[data-theme="light"] .ribbon-hud .hud-btn {
  border-color: rgba(0, 0, 0, 0.14);
}

/* En l'estat compacte el missatge ix COMPLETAMENT del flux (posició absoluta):
   així cap navegador no pot fer que la píndola s'estire per culpa d'eixe text */
.ribbon-hud:not(.is-gallery) .hud-message-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.4rem;
  flex: none;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .ribbon-hud:not(.is-gallery) .hud-panel { width: auto; padding: 0.35rem 0.6rem 0.35rem 0.75rem; }
  .ribbon-hud:not(.is-gallery) .hud-track { width: 2.4rem; }
  .ribbon-hud:not(.is-gallery) .hud-label { font-size: 0.46rem; letter-spacing: 0.1em; }
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.main-layout {
  position: relative;
  z-index: 10;
  pointer-events: none;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 7rem 2rem 6rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.section {
  position: relative;
  width: 100%;
  display: flex;
}

.glass-dark,
.glass-light {
  pointer-events: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-dark:hover,
.glass-light:hover {
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.45);
}

.glass-dark {
  background: var(--bg-dark-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border-dark);
  color: var(--text-primary);
}

.glass-light {
  background: var(--bg-light-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border-light);
  color: var(--text-dark);
}

/* ==========================================================================
   SECCIÓ HERO
   ========================================================================== */
.section-hero {
  /* La primera pantalla: capçalera + targeta + pista de scroll, sense forçar res */
  min-height: calc(100vh - 12rem);
  align-items: center;
  justify-content: flex-end;
}

.hero-card {
  width: 100%;
  max-width: 680px;
  padding: 3.5rem 3rem;
  position: relative;
  margin-right: 2rem;
}

.card-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.eyebrow-line {
  height: 1px;
  width: 36px;
  background: var(--accent-on-dark);
}

.eyebrow-text {
  font-family: var(--font-cinzel);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--accent-on-dark);
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.95rem, 1.1rem + 2.1vw, 2.7rem);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-on-dark-soft);
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 540px;
  margin-bottom: 2.2rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: transparent;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 12px 30px rgba(0, 0, 0, 0.45);
}

.btn-primary svg { transition: transform 0.3s ease; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-link {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.btn-link:hover { color: var(--accent-on-dark-soft); }

.hero-corner-badge {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  font-family: var(--font-cinzel);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.2);
}

/* En pantalles baixes, la targeta del hero es compacta perquè tot
   (targeta + pista de scroll) capia sense desbordar la primera pantalla */
@media (min-width: 901px) and (max-height: 880px) {
  .hero-card { padding: 2.6rem 2.5rem; }
  .hero-title { font-size: clamp(1.7rem, 1rem + 1.7vw, 2.3rem); }
  .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.8rem; }
  .hero-cta-group { gap: 1.25rem; }
}

/* ==========================================================================
   PISTA DE SCROLL DE LA CINTA 3D
   Viu DINS de la targeta del hero, just davall del text i dels botons.
   Així s'entén de seguida, no tapa cap fotografia i la zona de la galeria
   queda completament lliure.
   ========================================================================== */
.ribbon-hint {
  margin-top: 2.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

/* ==========================================================================
   BANDA OBERTA DE LA GALERIA
   Tram sense cap targeta al damunt perquè la cinta 3D es veja sencera.
   Ací la cinta es col·loca al centre i el HUD (a baix a l'esquerra) s'anima
   i explica què estàs veient.
   ========================================================================== */
.gallery-band {
  min-height: 48vh;
  pointer-events: none;
}

.spacer-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  pointer-events: auto;
}

.hint-mouse {
  width: 14px;
  height: 22px;
  /* La pista viu sempre dins d'una targeta fosca */
  border: 1.5px solid var(--accent-on-dark-soft);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding-top: 3px;
}

.mouse-wheel {
  width: 2px;
  height: 5px;
  background: var(--accent-on-dark-soft);
  border-radius: 1px;
  animation: wheelScroll 1.5s infinite;
}

@keyframes wheelScroll {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

.hint-text {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ==========================================================================
   SECCIÓ L'OBSERVADOR
   ========================================================================== */
.section-observador {
  min-height: 70vh;
  align-items: center;
  justify-content: flex-start;
}

.observador-card {
  width: 100%;
  max-width: 680px;
  padding: 3.5rem 3rem;
  margin-left: 2rem;
  margin-right: 0;
  position: relative;
}

.card-tag {
  display: inline-block;
  font-family: var(--font-cinzel);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  font-weight: 700;
  color: var(--accent-on-light);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1.18;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.75rem;
}

.card-body-text p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-dark-muted);
  margin-bottom: 1.3rem;
}

.card-body-text .lead-paragraph {
  font-size: 1.1rem;
  color: #22252a;
}

.card-body-text strong {
  color: var(--text-dark);
  font-weight: 600;
}

.card-body-text em {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent-on-light);
  font-style: italic;
}

.card-footer-quote {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  line-height: 0.8;
  color: var(--accent-faint);
}

.card-footer-quote blockquote {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: #3b3e47;
  line-height: 1.5;
}

/* ==========================================================================
   SECCIÓ ELS 4 PILARS
   ========================================================================== */
.section-pilars {
  min-height: 85vh;
  justify-content: flex-end;
}

.pilars-container {
  width: 100%;
  max-width: 720px;
  margin-right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pilars-header {
  padding: 2.2rem 2.8rem 1.3rem;
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-dark-muted);
}

/* --- Els 4 conceptes: quatre targetes, com la capçalera de la secció ------ */
/* La fotografia es veu SENCERA dins del seu marc: cada una amb la seua
   proporció, ni retallada ni estirada. El text de debò no és ací: apareix quan
   s'òbriga la foto en gran. */
.pilars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Cada concepte és un BOTÓ (es clica i es pot recórrer amb el teclat) amb la
   classe `glass-light`, que és la que torna a activar el ratolí damunt del
   `.main-layout`, que el té llevat. */
.pilar-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  padding: 1.05rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.pilar-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-on-light);
}

.pilar-card:focus-visible {
  outline: 2px solid var(--accent-on-light);
  outline-offset: 3px;
}

/* El marc: la foto l'ompli del tot, sense voreres.
   El tall ja està fet a la miniatura (4:3, mirant que no es talle cap cara),
   així que ací no es retalla res més: `cover` amb una imatge que ja té eixa
   proporció és exactament la imatge sencera del tall. */
.pilar-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(16, 16, 18, 0.05);
}

.pilar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pilar-card:hover .pilar-preview { transform: scale(1.03); }

.pilar-content { display: flex; flex-direction: column; }

.pilar-num {
  font-family: var(--font-serif);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-dark-muted);
}

.pilar-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-dark);
  margin-top: 0.15rem;
}

/* ==========================================================================
   LA FOTO DEL PILAR, EN GRAN
   --------------------------------------------------------------------------
   Imatge SENCERA (object-fit: contain), perquè no es retalle cap cara, i el
   text damunt, entrant esglaonat. És fosc a posta, també en mode clar: una
   fotografia es mira millor sobre negre.
   ========================================================================== */
.pill-modal {
  --pill-dir: 0;              /* cap a on vas: 1 avant, -1 arrere */
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 7, 0.97);
}

.pill-modal.obert { display: flex; }

.pill-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
}

.pill-vel {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to top,
    rgba(6, 6, 7, 0.92) 0%,
    rgba(6, 6, 7, 0.40) 36%,
    transparent 62%);
}

.pill-text {
  position: absolute;
  left: clamp(1.2rem, 6vw, 5rem);
  right: clamp(1.2rem, 6vw, 5rem);
  bottom: clamp(1.8rem, 8vh, 5rem);
  max-width: 46rem;
  pointer-events: none;
}

.pill-num {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.6rem;
}

.pill-titol {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4.6vw, 2.9rem);
  font-weight: 600;
  line-height: 1.12;
  color: #fff;
  margin: 0 0 0.9rem;
}

.pill-cos p {
  font-family: var(--font-sans);
  font-size: clamp(0.92rem, 1.6vw, 1.02rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
  max-width: 38rem;
  margin: 0;
}

/* L'entrada: primer la foto, i després el text, un darrere l'altre. */
.pill-modal.obert .pill-img {
  animation: pill-foto 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pill-modal.obert .pill-vel {
  animation: pill-apareix 0.9s ease 0.15s forwards;
}

.pill-num, .pill-titol, .pill-cos p {
  opacity: 0;
  transform: translateY(16px);
}

.pill-modal.obert .pill-num {
  animation: pill-entra 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.pill-modal.obert .pill-titol {
  animation: pill-entra 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.40s forwards;
}

.pill-modal.obert .pill-cos p {
  animation: pill-entra 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.58s forwards;
}

@keyframes pill-foto {
  from {
    opacity: 0;
    transform: scale(1.03) translateX(calc(var(--pill-dir, 0) * 26px));
  }
  to { opacity: 1; transform: scale(1) translateX(0); }
}

@keyframes pill-apareix { to { opacity: 1; } }

@keyframes pill-entra {
  from {
    opacity: 0;
    transform: translateY(16px) translateX(calc(var(--pill-dir, 0) * 18px));
  }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

/* --- Les fletxes: es passa d'una mirada a l'altra sense eixir d'ací ------- */
.pill-fletxa {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.pill-fletxa:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.42);
}

.pill-fletxa:active { transform: translateY(-50%) scale(0.93); }

.pill-fletxa-esq { left: clamp(0.8rem, 3vw, 2rem); }
.pill-fletxa-dre { right: clamp(0.8rem, 3vw, 2rem); }

/* En pantalles menudes les fletxes pugen dalt, al costat de la creueta: si
   estigueren als costats taparien el text, que va davall. */
@media (max-width: 620px) {
  .pill-fletxa {
    top: 1rem;
    transform: none;
    width: 42px;
    height: 42px;
  }
  .pill-fletxa:active { transform: scale(0.93); }
  .pill-fletxa-esq { left: 1rem; }
  .pill-fletxa-dre { right: 4.2rem; }
}

.pill-tancar {
  position: absolute;
  top: clamp(0.8rem, 3vh, 1.6rem);
  right: clamp(0.8rem, 3vw, 1.8rem);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.pill-tancar:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Qui demana menys moviment ho rep tot d'una, sense animació. */
@media (prefers-reduced-motion: reduce) {
  .pill-modal.obert .pill-img,
  .pill-modal.obert .pill-vel,
  .pill-modal.obert .pill-num,
  .pill-modal.obert .pill-titol,
  .pill-modal.obert .pill-cos p {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   SECCIÓ CONTACTE
   ========================================================================== */
.section-contacte {
  min-height: 70vh;
  justify-content: flex-start;
}

.contact-card {
  width: 100%;
  max-width: 680px;
  padding: 3.5rem 3rem;
  margin-left: 2rem;
  margin-right: 0;
}

.contact-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 2rem;
  font-weight: 500;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.form-group label {
  font-family: var(--font-cinzel);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

/* El textarea només es pot allargar cap avall: mai no se'n ix de la targeta */
.form-group textarea {
  resize: vertical;
  min-height: 150px;
  max-height: 45vh;
  line-height: 1.6;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-on-dark);
  background: rgba(255, 255, 255, 0.08);
}

.form-submit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.4rem;
}

.form-status {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--accent-on-dark);
}

.form-status[data-state="ok"] { color: var(--accent-on-dark); }
.form-status[data-state="info"] { color: var(--accent-on-dark-soft); }
.form-status[data-state="error"] { color: #e79292; }

.form-noscript {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.form-noscript a { color: var(--accent-on-dark); }

/* Camp trampa anti-spam: fora de la pantalla, però present per als bots */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  height: 24px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.footer-logo:hover { opacity: 0.8; }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-on-dark);
}

/* ==========================================================================
   LIGHTBOX — SIMPLIFICAT (Sols foto + navegació)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: var(--lightbox-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.lightbox-content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 20;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.lightbox-close:hover {
  background: var(--accent-on-dark);
  border-color: var(--accent-on-dark);
  color: var(--accent-contrast);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.lightbox-arrow:hover {
  background: var(--accent-on-dark);
  border-color: var(--accent-on-dark);
  color: var(--accent-contrast);
}

.lightbox-arrow-left { left: 2rem; }
.lightbox-arrow-right { right: 2rem; }

.lightbox-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 80px);
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  .hero-card,
  .pilars-container {
    max-width: 560px;
    margin-right: 1rem;
    padding: 2.5rem 2.2rem;
  }

  .observador-card,
  .contact-card {
    max-width: 560px;
    margin-left: 1rem;
    padding: 2.5rem 2.2rem;
  }

}

@media (max-width: 900px) {
  .main-layout {
    padding: 6rem 1.25rem 4rem 1.25rem;
    gap: 4rem;
  }

  .section-hero,
  .section-observador,
  .section-pilars,
  .section-contacte {
    justify-content: center;
  }

  .section-hero { min-height: calc(100vh - 11rem); }

  .hero-card,
  .observador-card,
  .pilars-container,
  .contact-card {
    margin-right: 0;
    max-width: 100%;
    padding: 2.2rem 1.6rem;
  }

  .form-row { grid-template-columns: minmax(0, 1fr); }

  /* Els quatre pilars: un davall de l'altre en pantalles menudes. */
  .pilars-grid { grid-template-columns: minmax(0, 1fr); }

  .ribbon-hud {
    bottom: 1rem;
    left: 1rem;
    max-width: calc(100vw - 2rem);
  }

  .hud-message {
    max-width: calc(100vw - 2rem);
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
  }

  .ribbon-hint {
    margin-top: 1.75rem;
    padding-top: 1.1rem;
  }

  .gallery-band { min-height: 34vh; }

  .main-nav { display: none; }

  .main-nav.mobile-active {
    display: flex;
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    background: var(--header-bg-scroll);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99;
  }

  .main-nav.mobile-active .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
  }

  .mobile-menu-toggle { display: flex; }

  .lightbox-arrow-left { left: 0.5rem; }
  .lightbox-arrow-right { right: 0.5rem; }
  .lightbox-arrow { width: 40px; height: 40px; }

  .contact-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Animació spin */
.spin { animation: spinLoader 1s linear infinite; }
@keyframes spinLoader { 100% { transform: rotate(360deg); } }

/* ==========================================================================
   PÀGINES LEGALS (Avís legal · Privacitat · Cookies)
   ========================================================================== */
.legal-body {
  min-height: 100vh;
  background: var(--bg-body);
  color: var(--text-primary);
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .legal-header { border-bottom-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .legal-header .brand-logo-img { filter: invert(1); }

.legal-back {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.legal-back:hover { color: var(--accent); }

.legal-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
}

.legal-card {
  padding: 3rem 3.25rem;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-dark);
  margin: 1rem 0 0.4rem;
}

.legal-updated {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dark-muted);
  margin-bottom: 1.75rem;
}

.legal-content {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1.75rem;
}

.legal-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 2.2rem 0 0.7rem;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content h3 {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 1.4rem 0 0.4rem;
}

.legal-content p,
.legal-content li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-dark-muted);
}

.legal-content p { margin-bottom: 1rem; }

.legal-content ul {
  margin: 0 0 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-content a { color: var(--accent-on-light); }
.legal-content strong { color: var(--text-dark); }

.legal-data {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.legal-data span { font-size: 0.92rem; color: var(--text-dark-muted); }

.legal-pending {
  display: inline-block;
  background: rgba(0, 0, 0, 0.06);
  border: 1px dashed rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  padding: 0 0.35rem;
  font-size: 0.88em;
  color: var(--text-dark);
}

.legal-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
}

[data-theme="light"] .legal-footer { border-top-color: rgba(0, 0, 0, 0.08); }

.legal-footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legal-footer a { color: var(--text-muted); text-decoration: none; }
.legal-footer a:hover { color: var(--accent); }

@media (max-width: 700px) {
  .legal-card { padding: 2rem 1.4rem; }
  .legal-title { font-size: 2rem; }
  .legal-header { padding: 0.9rem 1.1rem; }
  .legal-main { padding: 3rem 1rem 2rem; }
  .legal-footer { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   SECCIÓ CONTACTE · desplegables (correu / estudi / carta mensual)
   ========================================================================== */
.contact-intro {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.9rem;
  max-width: 30rem;
}

.contact-panels {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contact-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-panel[open] {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.contact-panel > summary,
.faq-item > summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.25s ease;
}

.contact-panel > summary::-webkit-details-marker,
.faq-item > summary::-webkit-details-marker { display: none; }

.contact-panel > summary:hover { background: rgba(255, 255, 255, 0.05); }
.faq-item > summary:hover { background: rgba(0, 0, 0, 0.03); }

.panel-num {
  font-family: var(--font-cinzel);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-on-dark-soft);
  flex: none;
}

.panel-title,
.faq-q {
  flex: 1 1 auto;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.faq-q { color: var(--text-dark); font-size: 1.05rem; }

/* Fletxa que gira en obrir */
.panel-arrow {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  opacity: 0.6;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.panel-arrow::before,
.panel-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

.panel-arrow::before { transform: rotate(0deg); }
.panel-arrow::after { transform: rotate(90deg); transition: transform 0.4s ease, opacity 0.3s ease; }

.contact-panel[open] > summary .panel-arrow,
.faq-item[open] > summary .panel-arrow { transform: rotate(180deg); opacity: 1; }

.contact-panel[open] > summary .panel-arrow::after,
.faq-item[open] > summary .panel-arrow::after { transform: rotate(0deg); opacity: 0; }

.contact-panel > summary .panel-arrow { color: var(--accent-on-dark); }
.faq-item > summary .panel-arrow { color: var(--text-dark); }

.panel-body {
  padding: 0.35rem 1.15rem 1.35rem;
  animation: panelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-text {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}

.panel-text strong { color: var(--text-primary); }

.panel-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent-on-dark-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.panel-link:hover {
  color: var(--text-primary);
  border-bottom-color: currentColor;
}

/* Mapa: només es carrega si l'usuari el demana (privacitat) */
.map-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
  filter: grayscale(0.35) contrast(1.05);
}

.map-load {
  display: block;
  width: 100%;
  padding: 1.6rem 1rem;
  background: transparent;
  border: 0;
  color: var(--accent-on-dark-soft);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}

.map-load:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   NEWSLETTER · opt-in + carta mensual
   ========================================================================== */
.form-newsletter-check { margin-top: 0.2rem; }

.newsletter-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.newsletter-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check-mark {
  position: relative;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 1px;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.newsletter-toggle input:checked + .check-mark {
  background: #ffffff;
  border-color: #ffffff;
}

.newsletter-toggle input:checked + .check-mark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #0a0a0b;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.newsletter-toggle input:focus-visible + .check-mark {
  outline: 2px solid var(--accent-on-dark);
  outline-offset: 3px;
}

.check-label {
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.55;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.newsletter-toggle:hover .check-label { color: var(--text-primary); }
.newsletter-toggle:hover .check-mark { border-color: rgba(255, 255, 255, 0.55); }

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.newsletter-input-group {
  display: flex;
  align-items: stretch;
  max-width: 30rem;
}

.newsletter-input-group input {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 0.75rem 1.2rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.newsletter-input-group input::placeholder { color: rgba(255, 255, 255, 0.32); }

.newsletter-input-group input:focus {
  outline: none;
  border-color: var(--accent-on-dark);
  background: rgba(255, 255, 255, 0.1);
}

.newsletter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  background: #ffffff;
  color: #0a0a0b;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.75rem 1.5rem;
  border: 1px solid #ffffff;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-btn:hover {
  background: transparent;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.newsletter-btn:disabled { opacity: 0.65; cursor: default; }
.newsletter-btn svg { transition: transform 0.3s ease; }
.newsletter-btn:hover svg { transform: translateX(4px); }

.newsletter-status {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--accent-on-dark);
  min-height: 1.2em;
}

.newsletter-status[data-state="error"] { color: #e79292; }
.newsletter-status[data-state="info"] { color: var(--accent-on-dark-soft); }

.newsletter-legal {
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 0.9rem;
  max-width: 30rem;
}

.newsletter-legal a { color: var(--accent-on-dark-soft); }

/* ==========================================================================
   PREGUNTES FREQÜENTS
   ========================================================================== */
.section-faq {
  min-height: 70vh;
  align-items: center;
  justify-content: flex-start;
}

.faq-container {
  width: 100%;
  max-width: 680px;
  margin-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-header { padding: 2.4rem 2.6rem 1.6rem; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-item {
  border-radius: 10px;
  overflow: hidden;
}

.faq-body {
  padding: 0 1.15rem 1.25rem;
  animation: panelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-body p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-dark-muted);
}

/* ==========================================================================
   FITXA DE CONTACTE DINS LA CINTA 3D
   ========================================================================== */
.contact-peek {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.contact-peek.is-open {
  opacity: 1;
  pointer-events: auto;
}

.contact-peek-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.contact-peek-card {
  position: relative;
  width: min(30rem, 100%);
  padding: 2.5rem 2.2rem 2rem;
  border-radius: 18px;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, 0.9);
  transform: scale(0.86) translateY(14px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1.4, 0.36, 1), opacity 0.4s ease;
}

.contact-peek.is-open .contact-peek-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.contact-peek-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease;
}

.contact-peek-close:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}

.contact-peek-tag {
  font-family: var(--font-cinzel);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-on-dark);
}

.contact-peek-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.2;
  color: #ffffff;
  margin: 0.9rem 0 1rem;
}

.contact-peek-data {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.6rem;
}

.contact-peek-data a,
.contact-peek-data span {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.contact-peek-data a:hover { color: #ffffff; }

.contact-peek-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

/* Al seu temps hi havia ací els xips «properament» i la fitxa de contacte
tenia una fila de xarxes. Tot això s'ha llevat: les xarxes viuen a les
pàgines del peu, i la portada només en té els estils del rengle (.xxs). */

@media (max-width: 900px) {
  .faq-container,
  .observador-card,
  .contact-card {
    margin-left: 0;
    max-width: 100%;
  }

  .newsletter-input-group {
    flex-direction: column;
    gap: 0.6rem;
    max-width: 100%;
  }

  .newsletter-input-group input {
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
  }

  .newsletter-btn {
    justify-content: center;
    border-radius: 999px;
  }

  .faq-header { padding: 1.8rem 1.5rem 1.2rem; }
  .contact-peek-card { padding: 2rem 1.4rem 1.6rem; }
}
/* ==========================================================================
   FORMULARI D'INSCRIPCIÓ · pàgina interna (inscripcio.html)
   No està enllaçada a la web: s'envia l'enllaç directament al client.
   Seguix el mateix patró que les pàgines legals: targeta clara (glass-light).
   ========================================================================== */
.inscripcio-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.inscripcio-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dark-muted);
}

.inscripcio-form {
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
  margin-top: 1.9rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Etiquetes en text normal (més llegibles en un formulari llarg) */
.inscripcio-form .form-group label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-dark);
}

/* Camps sobre la targeta clara: fons blanc i text fosc
   (les regles generals de .form-group estan pensades per a fons foscos) */
.inscripcio-form .form-group input,
.inscripcio-form .form-group textarea {
  background: #ffffff;
  border: 1px solid rgba(20, 20, 22, 0.2);
  color: var(--text-dark);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
}

.inscripcio-form .form-group input::placeholder,
.inscripcio-form .form-group textarea::placeholder {
  color: rgba(16, 16, 18, 0.4);
}

.inscripcio-form .form-group input:focus,
.inscripcio-form .form-group textarea:focus {
  border-color: var(--text-dark);
  background: #ffffff;
}

.inscripcio-form .form-group textarea { min-height: 130px; }

/* El botó general de la web és blanc: sobre la targeta clara ha de ser fosc */
.inscripcio-form .btn-primary {
  background: var(--text-dark);
  color: #ffffff;
}

.inscripcio-form .btn-primary:hover {
  background: #26262b;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

/* Missatges d'estat (també sobre targeta clara) */
.inscripcio-form .form-status { color: var(--text-dark); }
.inscripcio-form .form-status[data-state="info"] { color: var(--text-dark-muted); }
.inscripcio-form .form-status[data-state="error"] { color: #b3261e; }

.field-hint {
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-dark-muted);
}

.inscripcio-privacitat { margin-top: 0.3rem; }
.inscripcio-privacitat a { color: var(--text-dark); }

.inscripcio-ok {
  text-align: center;
  margin-top: 1.9rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.inscripcio-ok h2 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
}

.inscripcio-ok p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-dark-muted);
}

.inscripcio-ok a { color: var(--text-dark); }

/* El camp de data sempre va sobre una targeta clara */
.inscripcio-form input[type="date"] { color-scheme: light; }

@media (max-width: 700px) {
  .inscripcio-form .form-row { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   XARXES SOCIALS · els cercles amb monograma
   --------------------------------------------------------------------------
   Els cercles es MUNTEN un damunt de l'altre, com una cadena: eixe és el
   dibuix que va fer el fotògraf. El color el prenen del text que els envolta
   (currentColor), així que es veuen bé en clar i en fosc sense tocar res.

   El dibuix el fa xxss.js; ací només hi ha la forma.
   ========================================================================== */

/* És una cosa que ha de passar DESAPERCEBUDA: menut, fi i fluix. Només
   cobra presència quan el ratolí hi passa per damunt. */
.xxs-fila {
  --xxs-mida: 30px;
  display: flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.xxs-fila:hover { opacity: 1; }

.xxs {
  width: var(--xxs-mida);
  height: var(--xxs-mida);
  border-radius: 50%;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
}

/* El muntatge: cada cercle entra damunt de l'anterior. */
.xxs + .xxs { margin-left: calc(var(--xxs-mida) * -0.3); }

.xxs:hover { border-width: 1.5px; }

.xxs:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* El telèfon, com un enllaç discret */
.xxs-tel {
  font-family: var(--font-sans);
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.2s ease;
}

.xxs-tel:hover { opacity: 0.7; }

/* El rengle, al peu de la portada: entre els enllaços i el copyright. */
.footer-xxss {
  display: flex;
  align-items: center;
}

/* I al peu de les pàgines que no són la portada, centrat. */
.legal-xxss {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  /* Al mòbil encara més menut: hi ha menys espai i no ha de cridar. */
  .legal-xxss .xxs-fila { --xxs-mida: 28px; }
}
