/* =====================================================================
   Factura Con Cabeza · Base + Components
   Requereix tokens.css carregat abans (usa var(--fcc-*)).
   Fonts al <head> del layout: Newsreader + Hanken Grotesk.
   ===================================================================== */

/* ---- Reset mínim ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fcc-font-body);
  font-size: var(--fcc-fs-body);
  line-height: var(--fcc-lh-body);
  color: var(--fcc-ink);
  background: var(--fcc-cream);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--fcc-terracota); text-underline-offset: 3px; }
a:hover { color: var(--fcc-terracota-dark); }
::selection { background: var(--fcc-terracota-tint); }
:focus-visible { outline: 2px solid var(--fcc-petrol); outline-offset: 2px; border-radius: 4px; }

/* ---- Skip-link ---- */
.skip-link {
  position: absolute; left: var(--fcc-sp-3); top: -100px; z-index: 100;
  background: var(--fcc-petrol); color: #fff; font-weight: 700;
  padding: 10px 16px; border-radius: var(--fcc-r-md); text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: var(--fcc-sp-3); }

/* ---- Tipografia ---- */
h1, h2, h3, .fcc-display {
  font-family: var(--fcc-font-display);
  font-weight: 600;
  line-height: var(--fcc-lh-head);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fcc-fs-h1); line-height: var(--fcc-lh-tight); }
h2 { font-size: var(--fcc-fs-h2); }
h3 { font-size: var(--fcc-fs-h3); }
.fcc-lead { font-size: var(--fcc-fs-lead); color: var(--fcc-ink-soft); line-height: 1.55; }
.fcc-prose { max-width: var(--fcc-maxw-prose); }
.fcc-prose p { font-size: var(--fcc-fs-lead); line-height: 1.65; margin-bottom: var(--fcc-sp-4); }
.fcc-prose h2 { margin: var(--fcc-sp-7) 0 var(--fcc-sp-4); }
.fcc-kicker {
  font-size: var(--fcc-fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--fcc-terracota-dark);
}
.fcc-label {
  font-size: var(--fcc-fs-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--fcc-ink-faint);
}

/* ---- Layout ---- */
.fcc-container { max-width: var(--fcc-maxw); margin-inline: auto; padding-inline: var(--fcc-sp-5); }

/* ---- Wordmark + monograma (document amb cantonada doblegada) ---- */
.fcc-wordmark { font-family: var(--fcc-font-display); font-weight: 600; letter-spacing: -0.01em; }
.fcc-wordmark i { font-style: normal; color: var(--fcc-terracota); }  /* "cabeza" sempre en terracota */
.fcc-mono { display: inline-flex; flex: none; }

/* ---- Moviment + profunditat (entrades, lift, respiracio) ---- */
@keyframes fccEnter {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fccPop {
  0%   { opacity: 0; transform: translateY(6px) scale(.96); filter: blur(4px); }
  60%  { transform: translateY(0) scale(1.015); filter: blur(0); }
  100% { opacity: 1; transform: none; }
}
@keyframes fccBreathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.fcc-enter   { animation: fccEnter var(--fcc-dur-slow) var(--fcc-ease-smooth) both; }
.fcc-enter-2 { animation: fccEnter var(--fcc-dur-slow) var(--fcc-ease-smooth) both; animation-delay: 90ms; }
.fcc-enter-3 { animation: fccEnter var(--fcc-dur-slow) var(--fcc-ease-smooth) both; animation-delay: 170ms; }
.fcc-lift { transition: box-shadow var(--fcc-dur-normal) var(--fcc-ease-smooth), transform var(--fcc-dur-normal) var(--fcc-ease-smooth), border-color var(--fcc-dur-normal) var(--fcc-ease-smooth); }
.fcc-lift:hover { box-shadow: var(--fcc-shadow-lift); transform: translateY(-2px); }
.fcc-busy { animation: fccBreathe 1.4s var(--fcc-ease-in-out) infinite; }

/* ---- Botons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: var(--fcc-fs-body);
  min-height: 48px; padding: 0 22px; border-radius: var(--fcc-r-md); border: none;
  text-decoration: none;
  transition: background var(--fcc-dur-normal) var(--fcc-ease-smooth),
              transform var(--fcc-dur-fast) var(--fcc-ease-smooth),
              box-shadow var(--fcc-dur-normal) var(--fcc-ease-smooth);
}
.btn:active { transform: scale(.98); }
.btn:disabled { cursor: default; }
.btn--primary { background: var(--fcc-terracota); color: var(--fcc-cream); box-shadow: var(--fcc-shadow-card); }
.btn--primary:hover { background: var(--fcc-terracota-dark); color: var(--fcc-cream); box-shadow: var(--fcc-shadow-lift); }
.btn--secondary { background: var(--fcc-surface); color: var(--fcc-petrol); border: 1.5px solid var(--fcc-petrol); }
.btn--secondary:hover { background: var(--fcc-petrol-tint); }
.btn--ghost { background: none; color: var(--fcc-petrol); padding-inline: 6px; font-weight: 600; }
.btn--lg { min-height: 52px; font-size: var(--fcc-fs-lead); }

/* ---- Badges / segells ---- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fcc-fs-xs); font-weight: 600;
  padding: 6px 13px; border-radius: var(--fcc-r-pill); border: 1px solid;
}
.badge--petrol { color: var(--fcc-petrol); background: var(--fcc-petrol-tint); border-color: var(--fcc-petrol-line); }
.badge--ok { color: var(--fcc-ok); background: var(--fcc-ok-tint); border-color: var(--fcc-ok-line); }
.badge--neutral { color: var(--fcc-ink-soft); background: var(--fcc-cream-2); border-color: var(--fcc-line); }

/* ---- Chip de data oficial (vora or, mai countdown) ---- */
.date-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fcc-fs-xs); font-weight: 600; color: var(--fcc-petrol);
  border: 1px solid var(--fcc-gold); border-radius: var(--fcc-r-pill);
  padding: 4px 12px; white-space: nowrap; background: var(--fcc-surface);
}

/* ---- Cards ---- */
.card {
  background: var(--fcc-surface); border: 1px solid var(--fcc-line);
  border-radius: var(--fcc-r-lg); padding: var(--fcc-sp-5);
  box-shadow: var(--fcc-shadow-card);
}
a.card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: var(--fcc-sp-3);
         transition: border-color var(--fcc-dur-normal) var(--fcc-ease-smooth),
                     box-shadow var(--fcc-dur-normal) var(--fcc-ease-smooth),
                     transform var(--fcc-dur-normal) var(--fcc-ease-smooth); }
a.card:hover { border-color: var(--fcc-petrol-line); color: inherit; box-shadow: var(--fcc-shadow-lift); transform: translateY(-3px); }
.card--lead { padding: var(--fcc-sp-6); }
.card__title { font-family: var(--fcc-font-display); font-weight: 600; font-size: var(--fcc-fs-h3); line-height: 1.2; }
.card--lead .card__title { font-size: var(--fcc-fs-h2); }
.card__body { font-size: var(--fcc-fs-sm); color: var(--fcc-ink-soft); }
.card__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--fcc-sp-2);
              font-size: var(--fcc-fs-sm); color: var(--fcc-ink); }
.card__list li { position: relative; padding-left: 18px; }
.card__list li::before { content: "·"; position: absolute; left: 4px; font-weight: 700; color: var(--fcc-petrol); }
.card__more { font-size: var(--fcc-fs-sm); font-weight: 600; color: var(--fcc-petrol); margin-top: auto; padding-top: var(--fcc-sp-2); }

/* ---- Callout signatura "Cuándo NO" ---- */
.callout-no {
  background: var(--fcc-ok-tint); border: 1px solid var(--fcc-ok-line);
  border-radius: var(--fcc-r-lg);
  padding: var(--fcc-sp-5) var(--fcc-sp-6);
  display: grid; grid-template-columns: auto 1fr; gap: var(--fcc-sp-4); align-items: start;
}
.callout-no svg { flex: none; margin-top: 3px; }

/* ---- Card de resultat (checker + preview del hero) ---- */
.result-card {
  background: var(--fcc-surface); border: 1px solid var(--fcc-line);
  border-top: 3px solid var(--fcc-gold); border-radius: var(--fcc-r-lg);
  padding: var(--fcc-sp-5);
  box-shadow: var(--fcc-shadow-card);
}
.result-card--ok { background: var(--fcc-ok-tint); border-color: var(--fcc-ok-line); border-top-color: var(--fcc-ok); }
.result-card--warn { background: var(--fcc-warn-bg); border-color: var(--fcc-warn-line); border-top-color: var(--fcc-gold); }
.result-card .r-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--fcc-sp-4); }
.result-card .r-lab { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fcc-ink-soft); }
.result-card .r-sub { font-size: var(--fcc-fs-xs); color: var(--fcc-ink-soft); margin-bottom: 4px; }
.result-card .r-big {
  font-family: var(--fcc-font-display); font-weight: 600;
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.125rem); color: var(--fcc-petrol);
  line-height: 1.1; margin-bottom: var(--fcc-sp-4); text-wrap: balance;
}
.result-card--ok .r-big { color: var(--fcc-ok); }
.result-card--warn .r-big { color: var(--fcc-warn-ink); }
.result-card .r-lines { border-top: 1px solid var(--fcc-line); padding-top: var(--fcc-sp-4); display: flex; flex-direction: column; gap: var(--fcc-sp-3); }
.result-card .r-line { display: flex; gap: 10px; font-size: var(--fcc-fs-sm); line-height: 1.5; }
.result-card .r-line .dot { font-weight: 700; color: var(--fcc-petrol); }
.result-card .r-line .dot--ok { color: var(--fcc-ok); }
.result-card .r-line b { font-weight: 600; }

/* ---- Opcions del checker (radio cards) ---- */
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; min-height: 56px; padding: 14px 18px;
  border: 1px solid var(--fcc-line); border-radius: var(--fcc-r-md);
  background: var(--fcc-surface); font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color var(--fcc-dur-fast) var(--fcc-ease-smooth),
              background var(--fcc-dur-fast) var(--fcc-ease-smooth),
              transform var(--fcc-dur-fast) var(--fcc-ease-smooth),
              box-shadow var(--fcc-dur-normal) var(--fcc-ease-smooth);
}
.opt:hover { border-color: var(--fcc-petrol-line); box-shadow: var(--fcc-shadow-card); }
.opt:active { transform: scale(.985); }
.opt[aria-pressed="true"] {
  border: 2px solid var(--fcc-petrol); background: var(--fcc-petrol-tint);
  box-shadow: 0 0 0 3px var(--fcc-ring-select), var(--fcc-shadow-card);
}
.opt .opt-txt { display: flex; flex-direction: column; gap: 3px; }
.opt .opt-txt b { font-weight: 600; font-size: var(--fcc-fs-body); color: var(--fcc-ink); }
.opt .opt-txt span { font-size: var(--fcc-fs-xs); color: var(--fcc-ink-soft); line-height: 1.4; }
.opt .opt-dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--fcc-line); background: var(--fcc-surface);
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 13px; font-weight: 700; line-height: 1;
  transition: border-color var(--fcc-dur-fast) var(--fcc-ease-spring),
              background var(--fcc-dur-fast) var(--fcc-ease-spring),
              color var(--fcc-dur-fast) var(--fcc-ease-spring);
}
.opt .opt-dot::after { content: "✓"; }
.opt[aria-pressed="true"] .opt-dot { border-color: var(--fcc-petrol); background: var(--fcc-petrol); color: var(--fcc-cream); }

/* ---- Handoff honest (punt de conversió a afiliat) ---- */
.handoff {
  background: var(--fcc-surface); border: 1px solid var(--fcc-line);
  border-top: 4px solid var(--fcc-petrol); border-radius: var(--fcc-r-lg);
  padding: var(--fcc-sp-5);
  box-shadow: var(--fcc-shadow-card);
}
.handoff p { font-size: var(--fcc-fs-sm); }
.handoff .trust { font-size: var(--fcc-fs-xs); color: var(--fcc-ink-soft); margin-top: var(--fcc-sp-3); margin-bottom: 0; }

/* ---- Email capture ---- */
.email-box {
  background: var(--fcc-petrol-tint); border: 1px solid var(--fcc-petrol-line);
  border-radius: var(--fcc-r-lg); padding: var(--fcc-sp-6); text-align: center;
}
.email-box form { display: flex; gap: var(--fcc-sp-3); justify-content: center; max-width: 520px; margin-inline: auto; flex-wrap: wrap; }
.email-box .input { flex: 1; min-width: 220px; }
.email-box .small { font-size: var(--fcc-fs-xs); color: var(--fcc-ink-soft); margin-top: var(--fcc-sp-4); }

/* ---- Formularis ---- */
.input {
  width: 100%; min-height: 52px; padding: 0 18px; font-family: inherit; font-size: var(--fcc-fs-body);
  color: var(--fcc-ink); background: var(--fcc-surface);
  border: 1px solid var(--fcc-petrol-line); border-radius: var(--fcc-r-md);
}
.input:focus { outline: none; border-color: var(--fcc-petrol); box-shadow: 0 0 0 3px var(--fcc-focus-ring); }

/* ---- Revelat animat (resultat: entra amb rebot suau) ---- */
.reveal { display: none; }
.reveal.show { display: block; animation: fccPop 460ms var(--fcc-ease-spring) both; }

/* ---- Reduced motion: tot a instantani ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .fcc-lift:hover, a.card:hover { transform: none !important; }
}

/* ---- Disclaimer YMYL ---- */
.disclaimer { font-size: var(--fcc-fs-xs); color: var(--fcc-ink-faint); line-height: 1.45; }

/* ---- Taules en prosa ---- */
.fcc-prose table { width: 100%; border-collapse: collapse; font-size: var(--fcc-fs-sm); margin: 0 0 var(--fcc-sp-4); border: 1px solid var(--fcc-line); border-radius: var(--fcc-r-lg); }
.fcc-prose th { background: var(--fcc-petrol-tint); text-align: left; font-weight: 600; color: var(--fcc-petrol); padding: 12px 16px; border-bottom: 1px solid var(--fcc-petrol-line); }
.fcc-prose td { padding: 13px 16px; border-bottom: 1px solid var(--fcc-line-soft); }
.fcc-prose tr:last-child td { border-bottom: none; }

/* ---- Trust strip ---- */
.trust-strip { border-top: 1px solid var(--fcc-line); border-bottom: 1px solid var(--fcc-line); background: var(--fcc-cream-2); }
.trust-strip .in { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--fcc-sp-5); padding-block: var(--fcc-sp-4); }
.trust-strip .item { display: flex; align-items: center; gap: 11px; font-size: var(--fcc-fs-sm); font-weight: 500; }
.trust-strip .item .tick { color: var(--fcc-petrol); flex: none; }
.trust-strip .item .tick--t { color: var(--fcc-terracota); }
@media (max-width: 720px) {
  .trust-strip .in { grid-template-columns: 1fr; gap: var(--fcc-sp-3); }
}
