/* =========================================================================
   Platges de Catalunya — web promocional
   Els colors, radis, ombres i tipografia surten del design system de l'app
   (docs/design-system.md). Els noms són semàntics, com a l'app.
   ========================================================================= */

/* ------------------------------------------------------------------ fonts */
/* Inter, els quatre pesos de l'app. Subconjunt llatí + llatí estès (el català
   necessita à è é í ï ò ó ú ü ç i el punt volat). Llicència SIL OFL 1.1 —
   veure fonts/Inter-LICENSE.txt. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */
:root {
  /* Marca */
  --brand: #0165b8;
  --brand-pressed: #075cbe;
  --brand-info: #005d90;
  --brand-deep: #042f58; /* derivat, per als fons foscos de la web */
  --on-brand: #f3f7ff;

  /* Superfícies */
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #f0f4f9;
  --border: #e3e8f0;

  /* Text */
  --on-surface: #121c28;
  --on-surface-header: #1e2c3e;
  --on-surface-variant: #404850;
  --on-surface-footnote: #60666c;

  /* Banderes — cinc estats, no tres */
  --flag-green: #20a250;
  --flag-green-surface: #f5fbf3;
  --flag-yellow: #9a6b00;
  --flag-yellow-surface: #fdfbf1;
  --flag-red: #d32f2f;
  --flag-red-surface: #fdf4f5;
  --flag-unknown: #6b7280;
  --flag-unknown-surface: #f3f4f6;

  /* Tints de mètrica — un per tipus de dada */
  --metric-sea-surface: #edf5ff;
  --metric-sea-value: var(--brand-info);
  --metric-jellyfish-surface: #f2f2ff;
  --metric-jellyfish-value: #4f368d;
  --metric-water-surface: #f2fafb;
  --metric-water-value: #337c90;
  --metric-transparency-surface: #f2f8fd;
  --metric-transparency-value: var(--brand-info);
  --metric-weather-surface: #fdfbf1;
  --metric-weather-value: #793611;
  --metric-uv-surface: #fdf4f5;
  --metric-uv-value: #7d1d27;

  /* Accents dels accessos ràpids */
  --accent-lilac-surface: #e6ddfc;
  --accent-sky-surface: #d8f2fd;
  --accent-amber-surface: #f9edbb;
  --accent-blue-surface: #e8f2ff;
  --favorite-surface: #eef4ff;

  /* Imatges per defecte */
  --water: #85d1e8;
  --sky: #cdeaf7;
  --sand: #f2e3c8;

  /* Radis */
  --r-bar: 15px;
  --r-btn: 10px;
  --r-card: 24px;
  --r-chip: 18px;
  --r-pill: 999px;

  /* Ombres */
  --sh-header: 0 1px 7.5px rgba(0, 0, 0, 0.25);
  --sh-card: 0 4px 10px rgba(0, 0, 0, 0.1);
  --sh-card-hero: 0 20px 40px -12px rgba(0, 0, 0, 0.16);
  --sh-pill: 0 1px 2px rgba(0, 0, 0, 0.05);

  /* Mides */
  --wrap: 1140px;
  --gutter: 20px;
}

/* ------------------------------------------------------------------ reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-info);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

h1,
h2,
h3,
h4 {
  color: var(--on-surface);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 1.35rem + 3.2vw, 3.6rem);
}
h2 {
  font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.5rem);
}
h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

li {
  margin-bottom: 0.4em;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--on-surface);
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 var(--r-btn) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------- utilitats */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 780px;
}

.section {
  padding: clamp(56px, 7vw, 104px) 0;
}

.section--muted {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section__head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--on-surface-variant);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- botons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-btn);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, color 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn--primary:hover {
  background: var(--brand-pressed);
  color: var(--on-brand);
}

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

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn--outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--on-surface);
}

.btn--outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------------------------------------------------------------- capçalera */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header.is-stuck {
  box-shadow: var(--sh-header);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 34px;
  height: auto;
}

.brand__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--on-surface-header);
  line-height: 1.15;
}

.brand__name span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--on-surface-footnote);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 8px 12px;
  border-radius: var(--r-btn);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  text-decoration: none;
}

.nav a:hover {
  background: var(--surface-muted);
  color: var(--brand);
}

/* `.nav a` guanya per especificitat a `.btn--primary`, i sense això el CTA del
   menú mòbil surt amb el text gris fosc sobre el blau. */
.nav a.btn--primary {
  background: var(--brand);
  color: var(--on-brand);
}

.nav a.btn--primary:hover {
  background: var(--brand-pressed);
  color: var(--on-brand);
}

.header-cta {
  padding: 11px 18px;
}

/* El CTA existeix dues vegades: dins del menú (per al desplegable del mòbil) i
   al costat del menú (per a l'escriptori). A partir de 901 px només ha de
   sortir el segon; si no, el botó es duplica a la capçalera. */
@media (min-width: 901px) {
  .nav > .btn {
    display: none;
  }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  cursor: pointer;
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
}

.nav-toggle span::before {
  top: -6px;
}
.nav-toggle span::after {
  top: 6px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-card);
    display: none;
  }

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

  .nav a {
    padding: 12px;
  }

  .header-cta {
    display: none;
  }

  .nav .btn {
    margin-top: 8px;
  }
}

/* --------------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(168deg, #062a4d 0%, var(--brand-deep) 42%, #01518f 100%);
  color: #fff;
  padding: clamp(56px, 7vw, 96px) 0 0;
}

.hero::before {
  /* Reflex de llum sobre l'aigua, no és una imatge. */
  content: '';
  position: absolute;
  inset: -30% 40% 40% -10%;
  background: radial-gradient(closest-side, rgba(133, 209, 232, 0.28), transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  color: #fff;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--water);
}

.hero__lead {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 34em;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  margin-bottom: 22px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
}

.hero__tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--water);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 18px;
}

.hero__note {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.66);
  margin: 0;
}

.hero__points {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.hero__points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.hero__points li::before {
  content: '';
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--flag-green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 4.7 8.4 9.5 3.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__waves {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(40px, 6vw, 72px);
}

/* Botons de botiga */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 16px;
  border-radius: var(--r-btn);
  background: #fff;
  color: var(--on-surface);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-badge:hover {
  color: var(--on-surface);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-badge__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge__text small {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--on-surface-footnote);
}

.store-badge__text strong {
  font-size: 0.9375rem;
  font-weight: 700;
}

/* ------------------------------------------------------------- mockup app */
.phone {
  position: relative;
  width: min(330px, 100%);
  margin-inline: auto;
  border-radius: 44px;
  padding: 11px;
  background: linear-gradient(160deg, #2b3a4b, #101923);
  box-shadow: 0 34px 70px -18px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.phone__screen {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.35;
  color: var(--on-surface);
}

.phone__notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 20px;
  border-radius: var(--r-pill);
  background: #101923;
  z-index: 3;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 30px 12px 10px;
  background: var(--surface);
  box-shadow: var(--sh-header);
  position: relative;
  z-index: 2;
}

.app-bar img {
  width: 22px;
}

.app-bar__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--on-surface-header);
}

.app-bar__chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: #f4f8fd;
  color: var(--brand-info);
  font-size: 11px;
  font-weight: 500;
}

.app-body {
  padding: 14px 12px 66px;
}

.app-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--on-surface);
  margin: 0 0 2px;
}

.app-subtitle {
  font-size: 11.5px;
  color: var(--on-surface-variant);
  margin: 0 0 12px;
}

.beach-card {
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-card-hero);
}

.beach-card__photo {
  position: relative;
  height: 124px;
  /* La platja del placeholder: cel, aigua i sorra amb els tokens de l'app. */
  background: linear-gradient(
    180deg,
    var(--sky) 0%,
    #a5dced 44%,
    var(--water) 45%,
    #6cc2de 72%,
    var(--sand) 73%,
    #e8d3ad 100%
  );
}

.beach-card__sun {
  position: absolute;
  /* Per sota de la píndola de bandera, que ocupa la cantonada dreta. */
  top: 46px;
  right: 34px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffe9a8;
  box-shadow: 0 0 0 8px rgba(255, 233, 168, 0.35);
}

.pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 600;
  box-shadow: var(--sh-pill);
}

.pill--distance {
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  backdrop-filter: blur(4px);
}

.pill--flag {
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--flag-green);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.pill--flag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flag-green);
}

.beach-card__body {
  padding: 12px;
}

.beach-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface);
  margin: 0;
}

.beach-card__muni {
  font-size: 11px;
  font-weight: 500;
  color: var(--on-surface-variant);
  margin: 0 0 10px;
}

.bathing-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--r-bar);
  background: var(--flag-green-surface);
  border: 1px solid rgba(32, 162, 80, 0.18);
}

.bathing-banner img {
  width: 22px;
}

.bathing-banner strong {
  display: block;
  font-size: 12.5px;
  color: var(--flag-green);
}

.bathing-banner small {
  font-size: 10px;
  color: var(--on-surface-footnote);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.metric {
  padding: 9px 10px;
  border-radius: var(--r-bar);
  background: var(--surface-muted);
}

.metric__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  color: var(--on-surface-variant);
  margin-bottom: 2px;
}

.metric__label img {
  width: 13px;
  height: 13px;
}

.metric__value {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--on-surface);
}

.metric__foot {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--on-surface-footnote);
}

.metric--sea {
  background: var(--metric-sea-surface);
}
.metric--sea .metric__value {
  color: var(--metric-sea-value);
}
.metric--jellyfish {
  background: var(--metric-jellyfish-surface);
}
.metric--jellyfish .metric__value {
  color: var(--metric-jellyfish-value);
}
.metric--water {
  background: var(--metric-water-surface);
}
.metric--water .metric__value {
  color: var(--metric-water-value);
}
.metric--transparency {
  background: var(--metric-transparency-surface);
}
.metric--transparency .metric__value {
  color: var(--metric-transparency-value);
}
.metric--weather {
  background: var(--metric-weather-surface);
}
.metric--weather .metric__value {
  color: var(--metric-weather-value);
}
.metric--uv {
  background: var(--metric-uv-surface);
}
.metric--uv .metric__value {
  color: var(--metric-uv-value);
}
.metric--empty {
  background: var(--flag-unknown-surface);
}
.metric--empty .metric__value {
  color: var(--flag-unknown);
}

.app-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  padding: 8px 0 14px;
  background: var(--surface);
  box-shadow: 0 -1px 7.5px rgba(0, 0, 0, 0.1);
}

.app-nav div {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--on-surface-variant);
}

.app-nav img {
  width: 17px;
  height: 17px;
  margin: 0 auto 3px;
}

.app-nav .is-active {
  color: var(--brand);
}

/* ------------------------------------------------------------------ stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 28px;
  margin-top: -52px;
  position: relative;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
}

/* --------------------------------------------------------------- features */
.grid {
  display: grid;
  gap: 20px;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-card);
  border-color: #d5deea;
}

.card h3 {
  margin-bottom: 8px;
  color: var(--on-surface);
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-bar);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--accent-blue-surface);
}

.card__icon img {
  width: 24px;
  height: 24px;
}

.card__icon--sea {
  background: var(--metric-sea-surface);
}
.card__icon--jellyfish {
  background: var(--metric-jellyfish-surface);
}
.card__icon--water {
  background: var(--metric-water-surface);
}
.card__icon--weather {
  background: var(--metric-weather-surface);
}
.card__icon--lilac {
  background: var(--accent-lilac-surface);
}
.card__icon--sky {
  background: var(--accent-sky-surface);
}
.card__icon--amber {
  background: var(--accent-amber-surface);
}
.card__icon--favorite {
  background: var(--favorite-surface);
}
.card__icon--green {
  background: var(--flag-green-surface);
}

/* --------------------------------------------------- la regla de la bandera */
.rule {
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.82);
}

.rule h2,
.rule h3 {
  color: #fff;
}

.rule__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

.rule .eyebrow {
  color: var(--water);
}

.rule__quote {
  margin: 24px 0 0;
  padding: 18px 22px;
  border-left: 3px solid var(--water);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0 var(--r-bar) var(--r-bar) 0;
  font-size: 1.0625rem;
  color: #fff;
}

.flag-states {
  display: grid;
  gap: 12px;
}

.flag-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-bar);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.flag-state img {
  width: 42px;
  flex: none;
}

.flag-state strong {
  display: block;
  color: #fff;
  font-size: 0.9375rem;
}

.flag-state span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.flag-state--unknown {
  background: rgba(107, 114, 128, 0.28);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ------------------------------------------------------------------ passos */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.step {
  position: relative;
  padding-top: 12px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------- privacitat */
.privacy-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.check-list li {
  display: flex;
  gap: 12px;
  margin: 0;
  font-size: 0.9375rem;
}

.check-list li::before {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--flag-green-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 4.7 8.4 9.5 3.6' fill='none' stroke='%2320a250' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(32, 162, 80, 0.25);
}

.check-list strong {
  color: var(--on-surface);
}

/* ------------------------------------------------------------------ fonts */
.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.source-list li {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-bar);
  font-size: 0.9375rem;
  margin: 0;
}

.source-list strong {
  display: block;
  color: var(--on-surface);
  margin-bottom: 2px;
}

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--r-bar);
  background: var(--flag-yellow-surface);
  border: 1px solid rgba(154, 107, 0, 0.25);
  font-size: 0.9375rem;
  color: #5c4200;
}

.notice::before {
  content: '!';
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--flag-yellow);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------- faq */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-bar);
  padding: 4px 20px;
}

.faq details[open] {
  border-color: #cddbea;
  box-shadow: var(--sh-card);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 34px 16px 0;
  font-weight: 600;
  color: var(--on-surface);
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -3px;
}

.faq p {
  font-size: 0.9375rem;
  padding-bottom: 6px;
}

.faq p:last-child {
  margin-bottom: 10px;
}

/* ------------------------------------------------------------------- cta */
.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--brand-deep), var(--brand));
  color: #fff;
  text-align: center;
  padding: clamp(56px, 7vw, 96px) 0;
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 46em;
  margin-inline: auto;
}

.cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: #071c30;
  color: rgba(255, 255, 255, 0.66);
  padding: 56px 0 32px;
  font-size: 0.875rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer__brand img {
  width: 36px;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
}

.footer__brand strong {
  color: #fff;
  font-size: 1rem;
}

.footer h4 {
  color: #fff;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin-bottom: 8px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------- pàgines legals */
.page-header {
  background: linear-gradient(160deg, var(--brand-deep), #01518f);
  color: #fff;
  padding: clamp(48px, 6vw, 80px) 0 clamp(36px, 5vw, 56px);
}

.page-header h1 {
  color: #fff;
  margin-bottom: 10px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  font-size: 0.9375rem;
}

.legal {
  padding: clamp(40px, 5vw, 72px) 0 clamp(56px, 7vw, 96px);
}

.legal__body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: clamp(24px, 4vw, 52px);
}

.legal__body h2 {
  font-size: 1.375rem;
  margin-top: 2em;
  padding-top: 0.6em;
  border-top: 1px solid var(--border);
}

.legal__body h2:first-of-type {
  margin-top: 0.6em;
}

.legal__body h3 {
  font-size: 1.0625rem;
  margin-top: 1.6em;
}

.legal__body p,
.legal__body li {
  font-size: 0.9375rem;
}

.legal__toc {
  background: var(--surface-muted);
  border-radius: var(--r-bar);
  padding: 20px 24px;
  margin-bottom: 8px;
}

.legal__toc h2 {
  font-size: 0.8125rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-variant);
  border: 0 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

.legal__toc ol {
  margin: 0;
  padding-left: 1.2em;
  columns: 2;
  column-gap: 28px;
  font-size: 0.875rem;
}

.legal__toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

.legal__meta {
  font-size: 0.8125rem;
  color: var(--on-surface-footnote);
  margin-bottom: 24px;
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-bar);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-muted);
  color: var(--on-surface);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.tag-fill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--flag-yellow-surface);
  border: 1px solid rgba(154, 107, 0, 0.3);
  color: #5c4200;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* --------------------------------------------------------------- animació */
/* 🔴 L'estat amagat només s'aplica si el JS s'ha executat (`html.js`, que posa
   un script en línia al <head>). Amagar per defecte i confiar que el JS ho
   desamagui deixaria la pàgina en blanc el dia que el script falli, i això és
   pitjor que quedar-se sense animació. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .hero__inner,
  .rule__inner,
  .privacy-panel {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    padding-bottom: 8px;
  }

  .phone {
    margin-top: 8px;
  }

  .grid--3,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    margin-top: -36px;
    padding: 22px 18px;
  }

  .grid--3,
  .grid--2,
  .steps,
  .source-list {
    grid-template-columns: 1fr;
  }

  .legal__toc ol {
    columns: 1;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
