/* ============ COLORS I TIPUS ============ */
:root {
  --ink: #1f2523;      /* text i fons foscos */
  --plaster: #ecede8;  /* guix: fons secundari */
  --paper: #fafaf7;    /* fons principal */
  --brand: #5170ff;    /* blau del logo: accent */
  --brand-ui: #4361f5;   /* blau per a botons i enllaços: més contrast amb el text */
  --brand-dark: #3a58e8;  /* hover */
  --brand-light: #8fa3ff; /* blau sobre fons fosc */
  --tape: #f2b300;     /* groc: NOMÉS per als buits pendents */
  --line: #cdd0c9;     /* línies */
  --muted: #59615e;    /* text secundari */
  --ok: #2f7d4f;       /* confirmació */

  --font: "Archivo", system-ui, sans-serif;
  --font-nav: "Poppins", var(--font); /* la mateixa lletra que el "mov" del logo */
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; } /* que la capçalera fixa no tapi el títol */
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-stretch: 110%; line-height: 1.05; margin: 0; letter-spacing: -0.01em; overflow-wrap: break-word; }
h1 { font-size: clamp(2.1rem, 5vw, 4rem); font-weight: 800; max-width: 17ch; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 750; margin-bottom: 1.6rem; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 62ch; }

/* ============ BUITS PER OMPLIR ============ */
/* Marcats com a cinta d'obra perquè es vegin. Quan omplis el buit, treu class="pendent". */
.pendent {
  background: repeating-linear-gradient(-45deg, rgba(242,179,0,.28) 0 8px, rgba(242,179,0,.1) 8px 16px);
  outline: 1px dashed #b88900;
  outline-offset: 1px;
  padding: 0 .25em;
  border-radius: 3px;
}

/* ============ CAPÇALERA ============ */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250,250,247,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: grid; grid-template-columns: 1fr auto 1fr; /* logo | menú al centre | idioma */
  align-items: center; gap: 24px; height: 64px;
}
.brand { display: block; line-height: 0; justify-self: start; }
.brand img { height: 24px; width: auto; }
.nav { display: flex; gap: 32px; }
.nav a {
  font-family: var(--font-nav); font-weight: 500; font-size: .95rem;
  text-decoration: none; color: var(--muted);
}
.lang { justify-self: end; display: flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang button {
  font-family: var(--font-nav); font-size: .85rem; font-weight: 600;
  border: 0; background: transparent; color: var(--ink);
  padding: 5px 12px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ============ BOTONS ============ */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 14px 22px; border-radius: 10px; border: 2px solid var(--ink);
}
.btn-main { background: var(--brand-ui); border-color: var(--brand-ui); color: #fff; }
.btn-ghost { background: transparent; }

/* ============ EFECTE EN PASSAR EL RATOLÍ ============ */
/* Tot el que es pot clicar es fa una mica més gran i més brillant. */
.btn, .nav a, .lang, .lang button, .brand {
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease,
              background-color .18s ease, color .18s ease;
}
.nav a { display: inline-block; }
@media (hover: hover) {
  .btn:hover { transform: scale(1.04); }
  .btn-main:hover { filter: brightness(1.12); box-shadow: 0 6px 22px rgba(81,112,255,.38); }
  .btn-ghost:hover { background: #fff; box-shadow: 0 6px 18px rgba(31,37,35,.12); }
  .nav a:hover { transform: scale(1.08); color: var(--brand-ui); }
  .brand:hover { transform: scale(1.04); filter: brightness(1.12); }
  .lang:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(81,112,255,.25); }
  .lang button[aria-pressed="false"]:hover { background: #e6eaff; color: var(--brand); }
}
.btn:active, .lang button:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .nav a:hover, .brand:hover, .lang:hover { transform: none; }
}

/* ============ HERO ============ */
.hero { padding: 72px 0 88px; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.lead { font-size: 1.2rem; color: var(--muted); margin-top: 1.4rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* La peça protagonista: el "mòbil" amb la seqüència */
.phone {
  margin: 0;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 28px;
  padding: 22px 22px 26px;
  box-shadow: 10px 10px 0 var(--plaster);
}
.phone-cap { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.feed { list-style: none; margin: 0; padding: 0; position: relative; }
.feed::before { /* línia de temps */
  content: ""; position: absolute; left: 64px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.ev {
  display: grid; grid-template-columns: 52px 1fr; gap: 24px;
  padding: 10px 0; position: relative;
}
.ev::before { /* punt */
  content: ""; position: absolute; left: 57px; top: 17px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--ink);
}
.ev-ok::before { background: var(--ok); }
.t { white-space: nowrap; font-size: .8rem; font-weight: 700; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.ev strong { display: block; font-size: .98rem; }
.ev span:not(.t) { display: block; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.ev-ok strong { color: var(--ok); }

/* Única animació: els esdeveniments van apareixent un rere l'altre */
@media (prefers-reduced-motion: no-preference) {
  .js .ev { opacity: 0; transform: translateY(6px); }
  .js .ev.on { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease; }
}

/* ============ BLOCS ============ */
.block { padding: 88px 0; }
.block-plaster { background: var(--plaster); }
.block-dark { background: var(--ink); color: var(--paper); }
.block-dark p { color: #c9cec9; }

.pains { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.pains li { border-top: 3px solid var(--ink); padding-top: 16px; font-size: 1.1rem; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s);
  display: block; font-size: 3.4rem; font-weight: 900; font-stretch: 125%;
  color: var(--brand-light); line-height: 1; margin-bottom: 14px;
}
.steps h3 { margin-bottom: .5rem; }
.note { margin-top: 3rem; font-size: 1.25rem; font-weight: 600; color: var(--paper) !important; }

.video {
  aspect-ratio: 16 / 9; width: 100%; border-radius: 16px; overflow: hidden;
  background: var(--plaster); border: 2px solid var(--ink);
}
.video video { display: block; width: 100%; height: 100%; object-fit: cover; }

.two { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 14px 0 14px 34px; border-bottom: 1px solid var(--line); position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 4px; top: 22px;
  width: 14px; height: 8px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok);
  transform: rotate(-45deg);
}

.about { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; }
.brand-card {
  aspect-ratio: 1 / 1; border-radius: 20px; background: var(--brand);
  display: grid; place-items: center; padding: 32px;
  box-shadow: 10px 10px 0 var(--plaster);
}
.brand-card img { width: 100%; height: auto; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1.5px solid var(--ink); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0;
  font-weight: 700; font-size: 1.1rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 14px;
  font-size: 1.6rem; font-weight: 400; transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

/* ============ FORMULARI ============ */
.form {
  background: var(--paper); color: var(--ink);
  border-radius: 20px; padding: 28px;
  display: grid; gap: 16px;
}
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.field label { font-size: .9rem; font-weight: 600; }
.form input[type=text], .form input[type=tel], .form input[type=email], .form select, .form textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 12px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(81,112,255,.2);
}
.form .invalid { border-color: #c2412d !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.check.invalid span { color: #c2412d; }
.form .btn { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; }
.form .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.form-status { margin: 0; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #c2412d; }
.form .contact-line { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.form .contact-line a { color: var(--brand-ui); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.foot { padding: 28px 0; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--brand-ui); }
.check a { color: inherit; }

/* ============ PÀGINES LEGALS ============ */
.legal { padding-top: 48px; padding-bottom: 88px; }
.legal article { max-width: 720px; }
.legal h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 18px 0 8px; max-width: none; }
.legal h2 { font-size: 1.3rem; margin: 2.2rem 0 .7rem; }
.legal ul { padding-left: 1.2em; max-width: 62ch; }
.legal li { margin-bottom: .4em; }
.legal a { color: var(--brand-ui); }
.legal .back { font-family: var(--font-nav); font-weight: 500; font-size: .95rem; text-decoration: none; }
.legal .back::before { content: "‹ "; }
.legal .updated { color: var(--muted); font-size: .95rem; }
.legal .data { list-style: none; padding: 18px 22px; background: var(--plaster); border-radius: 14px; }

/* ============ MÒBIL ============ */
@media (max-width: 860px) {
  .hero { padding: 40px 0 64px; }
  .hero-in, .two, .about, .contact { grid-template-columns: 1fr; gap: 40px; }
  .pains, .steps { grid-template-columns: 1fr; gap: 28px; }
  .topbar-in { display: flex; justify-content: space-between; }
  .nav { display: none; }
  .lang button { padding: 10px 14px; }          /* botons més fàcils de tocar amb el dit */
  .foot-links a, .legal .back { display: inline-block; padding: 10px 0; }
  .form .contact-line a { display: inline-block; padding: 8px 0; }
  .block { padding: 64px 0; }
  .brand-card { aspect-ratio: 16 / 7; max-width: 360px; box-shadow: 6px 6px 0 var(--plaster); }
  .field-row { grid-template-columns: 1fr; }
  .form { padding: 20px; }
  .phone { box-shadow: 6px 6px 0 var(--plaster); }
}
