/* Òptica Cavex — estilos de la web (hero 3D, secciones y tema Sol/Graduadas) */

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

:root {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Web "clarita" SIEMPRE (Sol y Graduades): paleta clara por defecto, así la
     ilustración del mar se ve clara en los dos modos. El toggle Sol/Graduades
     cambia el tinte de las lentes 3D, no el fondo. */
  --bg: #f3f1ec;
  --text: #1b2c4b;
  --glass-bg: rgba(0, 0, 0, 0.04);
  --glass-border: rgba(0, 0, 0, 0.14);
  --switch-off: rgba(23, 23, 26, 0.5);
  --hint: rgba(23, 23, 26, 0.4);
}

/* Tema CLARO (Graduadas) · off-white càlid */
html.theme-light {
  --bg: #f3f1ec;
  --text: #1b2c4b;
  --glass-bg: rgba(0, 0, 0, 0.04);
  --glass-border: rgba(0, 0, 0, 0.14);
  --switch-off: rgba(23, 23, 26, 0.5);
  --hint: rgba(23, 23, 26, 0.4);
}

html, body { background: var(--bg); }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}
html { transition: background-color 0.6s var(--ease); }

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

/* Tipografía: serif editorial (Fraunces) para títulos, sans limpia para el resto */
h1, h2, h3, .hero-heading, .coll__title, .services__title, .about__title, .footer__title {
  font-family: 'Fraunces', Georgia, serif;
}
.hero-heading { color: var(--text); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Canvas 3D: capa FIJA de fondo en todo el viewport. Las gafas se ven siempre;
   al hacer scroll se van al fondo (lo controla main.js). El contenido (main,
   z-index 1) va por encima, así que las gafas solo se arrastran arriba del todo:
   en el hero el canvas queda sobre el fondo vacío y por debajo de los botones. */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;            /* sobre el titular (z1), por debajo del contenido (main z3) */
  pointer-events: auto;   /* permite arrastrar las gafas con el ratón y el dedo */
  cursor: grab;
  /* Táctil: el scroll se gestiona en JS. Si el dedo toca las gafas, las giramos
     y bloqueamos el scroll; si toca fuera, la página hace scroll normal. */
  touch-action: auto;
  opacity: 0;             /* oculto hasta que el modelo correcto esté listo */
  transition: opacity 0.9s var(--ease);
}
#gl.is-ready { opacity: 1; }

/* ---------- FONDO DE MAR (ilustración · fondo de TODA la página) ----------
   Capa FIJA detrás de todo (z0): el titular (z1), el canvas 3D (z2) y el
   contenido (z3) van por delante. Se ve claro y un pelín opaco en todas las
   secciones transparentes; las opacas (--surface) lo tapan. Las nubes derivan
   despacio. Imagen: assets/sea-placeholder.svg (para cambiar el fondo, sustituye
   ese fichero). Los bordes se recortan (overflow) para esconder la marca de agua
   de la esquina. */
.sea {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(to bottom, #e6eef3, #d4e3ea);  /* base clara con un punto de azul */
}
.sea__img {
  position: absolute;
  inset: -4% -6%;
  /* Per canviar el fons, substitueix aquest fitxer SVG. */
  background-image: url('assets/sea-placeholder.svg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 56%;
  filter: brightness(1.0) saturate(1.1);
  opacity: 0.6;                     /* faint pero con color · "un pelín opaco" */
  animation: seaDrift 32s ease-in-out infinite alternate;
  will-change: transform;
}
/* Deriva lenta: las nubes y el mar se mueven un pelín */
@keyframes seaDrift {
  from { transform: translate3d(-1.2%, 0.2%, 0) scale(1.05); }
  to   { transform: translate3d(1.2%, -0.5%, 0) scale(1.08); }
}

/* ---------- NAVBAR ---------- */
.nav {
  position: relative;
  z-index: 40;   /* por encima del toggle Sol/Graduades (z20) al abrir el menú */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 0;
}
.nav__brand { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.nav__brand em { font-style: italic; font-weight: 400; }
.nav__links { display: flex; gap: clamp(1.2rem, 3vw, 2.5rem); }
.nav__links a {
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: opacity 0.2s;
}
.nav__links a:hover { opacity: 0.7; }

/* Botón hamburguesa: oculto en escritorio, visible en móvil */
.nav__toggle {
  display: none;
  position: relative;
  z-index: 30;
  width: 44px; height: 44px;
  margin: -10px -10px -10px 0;   /* área de toque cómoda sin desplazar el layout */
  border: none; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav__toggle span {
  display: block; width: 24px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- TITULAR ---------- */
.hero__top {
  position: relative;
  z-index: 1;            /* sobre el fondo, por DEBAJO del canvas de gafas (z2) */
  text-align: center;
  margin-top: clamp(0.5rem, 2vw, 1.5rem);
  overflow: hidden;
}
.hero-heading {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.92;
  white-space: nowrap;
  font-size: clamp(2.8rem, 11.5vw, 10.5rem);
}

/* ---------- TOGGLE Sol/Graduadas ---------- */
.switch {
  position: absolute;
  z-index: 20;
  bottom: clamp(7rem, 16vw, 10rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 100px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease);
}
.switch__btn {
  border: none;
  background: transparent;
  color: var(--switch-off);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.3s, background 0.3s;
}
.switch__btn.is-active {
  color: var(--bg);
  background: var(--text);
}

/* ---------- BARRA INFERIOR ---------- */
.hero__bottom {
  position: relative;
  z-index: 20;
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) clamp(1.75rem, 4vw, 2.5rem);
}
.hero__desc {
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.35;
  font-size: clamp(0.72rem, 1.2vw, 1.05rem);
  max-width: 280px;
  color: var(--text);
}

/* Botón contacto — monocromo (se invierte según el tema) */
.btn-contact {
  flex-shrink: 0;
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  padding: 0.85rem 2rem;
  border-radius: 100px;
  transition: transform 0.4s var(--ease), opacity 0.3s;
  will-change: transform;
}
.btn-contact:hover { opacity: 0.85; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  /* Navbar → menú hamburguesa */
  .nav { padding-top: 1.25rem; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: clamp(1.25rem, 4vw, 2.5rem);
    left: clamp(1.25rem, 4vw, 2.5rem);
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.6rem;
    border-radius: 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
  }
  .nav__links a:active { background: var(--glass-border); }

  /* Toggle Sol/Graduades: en flujo, justo bajo el titular (sin solaparse) */
  .switch {
    position: relative;
    top: auto; bottom: auto; left: auto;
    transform: none;
    align-self: center;
    margin-top: clamp(1.2rem, 5vw, 2rem);
  }

  /* Barra inferior apilada y a todo el ancho */
  .hero__bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero__desc { max-width: 260px; }

  /* Titulares de sección: que ajusten línea en vez de cortarse */
  .hero-heading { white-space: normal; }
}

/* Contenido por encima del canvas de fondo. Las secciones transparentes dejan
   ver las gafas detrás; los paneles (--surface) las tapan a propósito. */
main { position: relative; z-index: 3; }

/* ---------- Secciones (marquee, idea, servicios, footer) ---------- */

/* Variables extra por tema */
:root { --surface: #ffffff; --surface-2: #efece6; --line: rgba(0,0,0,0.1); --muted: rgba(27,44,75,0.55); }
html.theme-light { --surface: #ffffff; --surface-2: #efece6; --line: rgba(0,0,0,0.1); --muted: rgba(27,44,75,0.55); }

/* Reveal genérico */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); will-change: opacity, transform; }
/* Variantes: entrar des de l'esquerra / dreta (alternat a les targetes) */
.reveal.from-left  { transform: translateX(-46px); }
.reveal.from-right { transform: translateX(46px); }

/* Serveis: cada fila entra des d'un costat (alternant), conforme l'abasten en fer scroll.
   :where() manté l'especificitat baixa perquè .reveal.in (transform:none) sempre guanyi. */
.svc__item.reveal:where(:nth-child(odd))  { transform: translateX(-44px); }
.svc__item.reveal:where(:nth-child(even)) { transform: translateX(44px); }

/* Ressenyes: la columna esquerra entra des de l'esquerra; la dreta, des de la dreta */
.review.reveal:where(:nth-child(odd))  { transform: translate(-40px, 18px); }
.review.reveal:where(:nth-child(even)) { transform: translate(40px, 18px); }

.reveal.in { opacity: 1; transform: none; will-change: auto; }

/* ---------- MARQUEE ---------- */
.marquee-sec { padding: clamp(4rem, 10vw, 8rem) 0; display: flex; flex-direction: column; gap: 0.8rem; overflow: hidden; }
.mrow { display: flex; gap: 0.8rem; width: max-content; will-change: transform; }
.tile {
  flex: 0 0 auto; display: flex; align-items: center;
  font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400;
  font-size: clamp(1.2rem, 3vw, 2.4rem); color: var(--muted); white-space: nowrap;
}
.tile::after { content: '—'; margin: 0 1.4rem; color: var(--line); font-style: normal; }

/* ---------- LA IDEA ---------- */
.about {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 5vw, 2.5rem);
}
.about__title { font-weight: 600; text-transform: uppercase; line-height: 0.9; font-size: clamp(3rem, 13vw, 11rem); }
.about__text { max-width: 640px; font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-weight: 500; line-height: 1.5; color: var(--text); }
.about__text .ch { transition: opacity 0.15s linear; }

/* ---------- SERVICIOS ---------- */
.services {
  background: var(--surface); border-radius: 40px 40px 0 0;
  padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 2.5rem);
  transition: background 0.6s var(--ease);
  overflow-x: clip;   /* les files entren des dels costats: que no provoquin scroll horitzontal */
}
.services__title {
  text-align: center; font-weight: 600; text-transform: uppercase; color: var(--text);
  font-size: clamp(3rem, 12vw, 10rem); margin-bottom: clamp(2.5rem, 6vw, 5rem); line-height: 0.9;
}
.svc { max-width: 920px; margin: 0 auto; }
.svc__item { display: flex; gap: clamp(1rem, 3vw, 2.5rem); align-items: flex-start; padding: clamp(1.5rem, 3vw, 2.5rem) 0; border-top: 1px solid var(--line); }
.svc__n { font-weight: 600; font-size: clamp(2.2rem, 7vw, 5rem); color: var(--text); line-height: 0.85; flex-shrink: 0; }
.svc__body h3 { font-size: clamp(1.2rem, 2.4vw, 2rem); font-weight: 600; text-transform: uppercase; margin-bottom: 0.4rem; }
.svc__body p { color: var(--muted); font-weight: 300; max-width: 560px; font-size: clamp(0.9rem, 1.5vw, 1.15rem); }

/* ---------- MARQUES (mur de logotips · ús nominatiu) ----------
   Targetes clares amb el logotip de cada marca centrat (assets/marques/logos/).
   .coll__head/.coll__title/.coll__sub també els fan servir les ressenyes. */
.brands { background: transparent; padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 2.5rem); transition: background 0.6s var(--ease); overflow-x: clip; }
.coll__head, .reviews__head { max-width: 1100px; margin: 0 auto clamp(2rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.coll__title { font-weight: 600; text-transform: uppercase; line-height: 0.9; font-size: clamp(2.2rem, 7vw, 5rem); color: var(--text); }
.coll__sub { color: var(--muted); font-size: clamp(0.85rem, 1.3vw, 1rem); max-width: 360px; }
.brands__grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
/* Alçada FIXA → totes les caixes idèntiques (el logo se centra a dins, sense
   empènyer la caixa encara que sigui més alt, com el roundel d'etnia). */
.bcard { display: grid; place-items: center; height: clamp(108px, 12vw, 140px); padding: clamp(0.9rem, 3vw, 1.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform 0.55s var(--ease), box-shadow 0.35s var(--ease), opacity 0.6s var(--ease); }
.bcard:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,0,0,0.12); }
.blogo { max-width: 78%; max-height: 58px; width: auto; height: auto; object-fit: contain; display: block; }
.blogo--tall { max-height: 66px; }   /* etnia: roundel, un pèl més gran (dins l'alçada fixa) */
.blogo--mark { max-height: 38px; }    /* nike: el swoosh, més baix */
/* El logo és un enllaç a la web de la marca (clic → s'obre). Sense etiqueta. */
.bcard__link { display: grid; place-items: center; width: 100%; height: 100%; }
.bcard__link:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

/* ---------- CAMPANYES (mur de posters de les marques) ----------
   Masonry per columnes: cada poster conserva la seva proporció (retrats i
   apaïsats conviuen). break-inside evita que una imatge es talli entre columnes. */
.campaigns__eyebrow {
  max-width: 1100px; margin: clamp(3rem, 6vw, 4.5rem) auto clamp(1.4rem, 3vw, 2rem);
  text-align: center; text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.75rem; font-weight: 600; color: var(--muted);
}
.campaigns__eyebrow::before, .campaigns__eyebrow::after {
  content: ''; display: inline-block; width: clamp(24px, 6vw, 56px); height: 1px;
  background: var(--line); vertical-align: middle; margin: 0 0.9em;
}
.posters { max-width: 1100px; margin: 0 auto; columns: 3; column-gap: 1rem; }
.poster {
  break-inside: avoid; margin: 0 0 1rem; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  transition: transform 0.55s var(--ease), box-shadow 0.35s var(--ease), opacity 0.6s var(--ease);
}
/* Posters: sense enllaç, però amb la mateixa resposta al hover que els logos (s'eleven). */
.poster img { display: block; width: 100%; height: auto; }
.poster:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,0,0,0.12); }
@media (max-width: 900px) { .posters { columns: 2; } }
@media (max-width: 540px) { .posters { columns: 1; } }

/* ---------- RESSENYES ---------- */
.reviews { background: transparent; padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 2.5rem); transition: background 0.6s var(--ease); overflow-x: clip; }
.reviews__score { font-weight: 600; color: var(--text); font-size: clamp(1rem, 2vw, 1.3rem); }
.reviews__score span { color: var(--muted); font-weight: 300; font-size: 0.85em; }
.reviews__grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.review__stars { color: #f5b301; letter-spacing: 2px; }
.review p { color: var(--text); font-weight: 300; line-height: 1.5; }
.review cite { color: var(--muted); font-style: normal; font-weight: 600; font-size: 0.9rem; }
.reviews__note { max-width: 1100px; margin: 1.5rem auto 0; color: var(--muted); font-size: 0.78rem; font-style: italic; }
@media (max-width: 760px) { .reviews__grid { grid-template-columns: 1fr; } }

/* ---------- LA BOTIGA (info + mapa) ---------- */
.botiga {
  background: var(--surface);
  padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  transition: background 0.6s var(--ease);
  overflow-x: clip;   /* info entra des de l'esquerra i el mapa des de la dreta */
}
.botiga__info h2 { font-weight: 600; text-transform: uppercase; line-height: 0.9; font-size: clamp(2.5rem, 8vw, 6rem); margin-bottom: 1.5rem; }
.botiga__list { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.botiga__list li { color: var(--text); font-weight: 300; font-size: clamp(0.95rem, 1.4vw, 1.15rem); border-top: 1px solid var(--line); padding-top: 1rem; line-height: 1.45; }
.botiga__list span { display: block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-bottom: 0.3rem; }
.botiga__list a { border-bottom: 1px solid currentColor; }
.botiga__map { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); }
.botiga__map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 820px) { .botiga { grid-template-columns: 1fr; } }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: clamp(4rem, 10vw, 9rem) clamp(1.25rem, 5vw, 2.5rem) 3rem; display: flex; flex-direction: column; align-items: center; gap: 1.3rem; background: transparent; transition: background 0.6s var(--ease); }
/* white-space: normal → que ajuste a línea i no es talli als laterals (overflow horitzontal) */
.footer__title { font-weight: 600; text-transform: uppercase; font-size: clamp(3rem, 14vw, 12rem); line-height: 0.9; white-space: normal; }
.footer__sub { color: var(--muted); max-width: 420px; }
.footer__copy { color: var(--muted); font-size: 0.8rem; margin-top: 2rem; }
.footer__credit {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.6rem;
  opacity: 0.75;
}
.footer__credit span {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--text);
  opacity: 0.9;
}
.footer__legal { color: var(--muted); font-size: 0.62rem; letter-spacing: 0.04em; margin-top: 0.9rem; opacity: 0.55; }
.footer__legal a { border-bottom: 1px solid currentColor; }
.footer__cookies { margin-top: 0.55rem; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.05em; display: flex; flex-wrap: wrap; gap: 0.15rem 0.55rem; align-items: center; justify-content: center; }
.footer__cookies a { color: var(--muted); border-bottom: 1px solid currentColor; transition: color 0.25s var(--ease); }
.footer__cookies a:hover { color: var(--text); }
.cookie-link {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--muted); font-size: 0.72rem; letter-spacing: 0.05em;
  border-bottom: 1px solid currentColor; transition: color 0.25s var(--ease);
}
.cookie-link:hover { color: var(--text); }
.cookie-link:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- COOKIES · banner de consentiment (RGPD/LSSI) ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  display: flex; justify-content: center;
  padding: clamp(0.8rem, 2vw, 1.4rem);
  pointer-events: none;                 /* només l'interior és clicable */
  transform: translateY(130%); transition: transform 0.45s var(--ease);
}
.cookie-banner.is-in { transform: translateY(0); }
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner {
  pointer-events: auto; width: min(760px, 100%);
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(0.8rem, 2.5vw, 1.6rem);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
  padding: clamp(0.9rem, 2.5vw, 1.25rem) clamp(1rem, 3vw, 1.5rem);
}
.cookie-banner__text { flex: 1 1 260px; }
.cookie-banner__text strong { display: block; font-weight: 600; margin-bottom: 0.2rem; }
.cookie-banner__text p { color: var(--muted); font-weight: 300; font-size: 0.85rem; line-height: 1.45; }
.cookie-banner__text b { font-weight: 600; color: var(--text); }
.cookie-banner__text a { color: var(--text); border-bottom: 1px solid currentColor; }
.cookie-banner__actions { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.cookie-btn {
  border: 1px solid var(--text); border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 0.85rem; font-weight: 600; padding: 0.55rem 1.15rem; white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.cookie-btn--solid { background: var(--text); color: var(--surface); }
.cookie-btn--solid:hover { transform: translateY(-1px); }
.cookie-btn--ghost { background: transparent; color: var(--text); }
.cookie-btn--ghost:hover { background: rgba(0,0,0,0.06); }
.cookie-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Placeholder del mapa mentre no hi ha consentiment */
.map-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.75rem; text-align: center;
  padding: 1.25rem; background: var(--surface-2);
}
.map-placeholder p { color: var(--muted); font-size: 0.85rem; line-height: 1.45; max-width: 320px; }
.map-placeholder__link { color: var(--muted); font-size: 0.8rem; border-bottom: 1px solid currentColor; }
.map-placeholder__link:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: none; } }

/* ---------- RESPONSIVE secciones ---------- */
@media (max-width: 600px) {
  .svc__item { gap: 1rem; }
}

/* ---------- ACCESIBILIDAD ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .mrow { transform: none !important; }
  .sea__img { animation: none !important; }
}

/* ---------- PÀGINA 404 ---------- */
.nf {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: 1rem; padding: clamp(1.5rem, 6vw, 4rem);
}
.nf__code { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1; color: var(--text); font-size: clamp(4.5rem, 20vw, 11rem); }
.nf__title { font-family: 'Fraunces', Georgia, serif; font-weight: 500; color: var(--text); font-size: clamp(1.4rem, 4vw, 2.4rem); }
.nf__text { color: var(--muted); max-width: 440px; line-height: 1.5; font-weight: 300; }
.nf__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; margin-top: 0.8rem; }
.nf__btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--text); }

/* ---------- PÀGINES LEGALS ---------- */
.legal-head { max-width: 820px; margin: 0 auto; padding: clamp(1.2rem,3vw,2rem) clamp(1.25rem,5vw,2rem); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.legal-brand { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.15rem; color: var(--text); }
.legal-brand em { font-style: italic; font-weight: 500; }
.legal-back { color: var(--muted); font-size: 0.85rem; }
.legal-back:hover { color: var(--text); }
.legal { max-width: 820px; margin: 0 auto; padding: clamp(1rem,4vw,2rem) clamp(1.25rem,5vw,2rem) clamp(3rem,8vw,6rem); }
.legal h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(2rem,6vw,3rem); color: var(--text); line-height: 1; margin-bottom: 1.5rem; }
.legal h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(1.3rem,3.5vw,1.9rem); color: var(--text); margin: 2.5rem 0 0.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.legal h3 { font-weight: 600; font-size: 1rem; color: var(--text); margin: 1.4rem 0 0.4rem; }
.legal p, .legal li { color: var(--text); font-weight: 400; line-height: 1.6; font-size: 0.95rem; margin-bottom: 0.7rem; }
.legal ul { padding-left: 1.2rem; margin-bottom: 0.8rem; }
.legal a { color: var(--text); border-bottom: 1px solid var(--muted); }
.legal a:hover { border-color: var(--text); }
.legal strong { font-weight: 600; }
.legal-toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 2rem; }
.legal-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.legal-toc li { margin: 0; }
.legal-toc a { font-size: 0.85rem; font-weight: 500; border: 0; color: var(--muted); }
.legal-toc a:hover { color: var(--text); }
.legal-fill { background: rgba(245,179,1,0.18); border-bottom: 1px dashed #a9791a; padding: 0 3px; border-radius: 3px; font-style: normal; }
.legal-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.2rem; font-size: 0.82rem; }
.legal-table th, .legal-table td { text-align: left; padding: 0.6rem 0.7rem; border: 1px solid var(--line); vertical-align: top; color: var(--text); }
.legal-table th { background: var(--surface-2); font-weight: 600; }
.legal .cookie-link { font-size: 0.95rem; letter-spacing: 0; }
.legal-updated { color: var(--muted); font-size: 0.8rem; margin-top: 2.5rem; font-style: italic; }
.legal-foot { max-width: 820px; margin: 0 auto; padding: 2rem 1.25rem 3rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 0.8rem; }
.legal-foot a { color: var(--muted); border-bottom: 1px solid currentColor; }
@media (max-width: 600px) { .legal-table, .legal-table thead, .legal-table tbody, .legal-table th, .legal-table td, .legal-table tr { display: block; } .legal-table th { display: none; } .legal-table td { border: 0; border-bottom: 1px solid var(--line); padding: 0.35rem 0; } .legal-table tr { border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; margin-bottom: 0.8rem; } }
