/* =====================================================================
   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; }

/* ---- 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 .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--fcc-terracota); color: var(--fcc-cream); box-shadow: var(--fcc-shadow-sm); }
.btn--primary:hover { background: var(--fcc-terracota-dark); color: var(--fcc-cream); }
.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; }

/* ---- 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);
}
a.card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: var(--fcc-sp-3); transition: border-color .15s; }
a.card:hover { border-color: var(--fcc-petrol-line); color: inherit; }

/* ---- Callout signatura "Cuándo NO" ---- */
.callout-no {
  background: var(--fcc-cream-2); border-left: 3px solid var(--fcc-ok);
  border-radius: 0 var(--fcc-r-lg) var(--fcc-r-lg) 0;
  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);
}
.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 .12s, background .12s;
}
.opt:hover { border-color: var(--fcc-petrol-line); }
.opt[aria-pressed="true"] { border: 2px solid var(--fcc-petrol); background: var(--fcc-petrol-tint); }
.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: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--fcc-line); background: var(--fcc-surface); }
.opt[aria-pressed="true"] .opt-dot { border: 6px solid var(--fcc-petrol); }

/* ---- 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);
}
.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-petrol-tint); }

/* ---- Revelat animat ---- */
.reveal { display: none; }
.reveal.show { display: block; animation: fcc-reveal .45s ease both; }
@keyframes fcc-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .reveal.show { animation: none; } }

/* ---- 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); }
}
