/* ============================================================
   ControlHorari — controlhorari.eu
   Disseny original · full-width · responsive
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --font-display: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ink: #0a0f1e;
  --head: #0d1730;
  --text: #4b5568;
  --muted: #7c86a0;

  --brand: #4f46e5;
  --brand-2: #6366f1;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #e11d48;

  --grad: linear-gradient(100deg, #6366f1 0%, #8b5cf6 55%, #22d3ee 130%);
  --grad-soft: linear-gradient(100deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12), rgba(34, 211, 238, 0.12));

  --bg: #ffffff;
  --tint: #f6f7fc;
  --line: #e6e8f2;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px -4px rgba(13, 23, 58, 0.08);
  --shadow-md: 0 14px 34px -16px rgba(13, 23, 58, 0.18);
  --shadow-lg: 0 30px 70px -28px rgba(13, 23, 58, 0.38);
  --shadow-brand: 0 12px 28px -10px rgba(99, 102, 241, 0.55);

  --container: 1240px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }

::selection { background: rgba(99, 102, 241, 0.25); }

:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 10px 10px;
  transition: top 0.25s ease;
}
.skip-link:focus { top: 0; }

.ico {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.section { position: relative; padding-block: clamp(72px, 9vw, 118px); }

.section-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { max-width: 640px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--head); line-height: 1.14; letter-spacing: -0.015em; }

h1 { font-size: clamp(2.5rem, 5.2vw, 4.05rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.14rem; font-weight: 700; }

.lead { font-size: clamp(1.02rem, 1.4vw, 1.16rem); color: var(--text); max-width: 62ch; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(99, 102, 241, 0.6); }

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }

.btn-outline { border: 1.5px solid var(--line); color: var(--head); background: #fff; }
.btn-outline:hover { border-color: var(--brand-2); color: var(--brand); transform: translateY(-2px); }

.btn-light { background: #fff; color: var(--head); box-shadow: 0 14px 30px -12px rgba(2, 6, 23, 0.45); }
.btn-light:hover { transform: translateY(-2px); }

.btn-lg { padding: 16px 30px; font-size: 16.5px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Icones ---------- */
.icon-tile {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.14));
  color: var(--brand);
  margin-bottom: 18px;
}
.icon-tile .ico { width: 24px; height: 24px; }

.icon-inline {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.13), rgba(34, 211, 238, 0.13));
  color: var(--brand);
  flex: none;
}
.icon-inline .ico { width: 20px; height: 20px; }
.icon-inline.light { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- Píndoles ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.pill-green { background: rgba(16, 185, 129, 0.13); color: #0b8a62; }
.pill-amber { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.pill-slate { background: rgba(100, 116, 139, 0.13); color: #52607a; }

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.check-list { list-style: none; padding: 0; display: grid; gap: 13px; margin-top: 26px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--head); font-weight: 500; }
.check-list .ico {
  width: 22px;
  height: 22px;
  padding: 4px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.13);
  color: #0b8a62;
  stroke-width: 2.6;
}

/* ============================================================
   CAPÇALERA
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: #fff;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 15, 30, 0.55), rgba(10, 15, 30, 0));
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.site-header.scrolled {
  color: var(--head);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -18px rgba(13, 23, 58, 0.25);
}
.site-header.scrolled::before { opacity: 0; }

.brand { display: inline-flex; align-items: center; gap: 11px; position: relative; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.55); }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-name b { font-weight: 800; }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  opacity: 0.88;
  padding-block: 6px;
  transition: opacity 0.2s ease;
}
.main-nav a:hover { opacity: 1; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transition: right 0.25s ease;
}
.main-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; position: relative; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  place-items: center;
  transition: background-color 0.2s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.16); }
.nav-toggle .ico { width: 22px; height: 22px; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-menu { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: #fff;
  color: var(--head);
  box-shadow: 0 30px 50px -20px rgba(13, 23, 58, 0.35);
  border-top: 1px solid var(--line);
  padding: 18px clamp(20px, 4vw, 40px) 26px;
  display: none;
}
.mobile-menu.open { display: block; animation: dropIn 0.25s ease both; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-menu nav { display: grid; gap: 4px; }
.mobile-menu a:not(.btn) {
  padding: 13px 6px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 16px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(99, 102, 241, 0.28), transparent 60%),
    radial-gradient(900px 500px at 12% 110%, rgba(34, 211, 238, 0.14), transparent 60%),
    var(--ink);
  color: #fff;
  padding-block: calc(var(--header-h) + clamp(48px, 7vw, 92px)) clamp(56px, 7vw, 96px);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(75% 70% at 55% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(75% 70% at 55% 40%, #000 30%, transparent 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
}
.glow-a { width: 480px; height: 480px; background: rgba(99, 102, 241, 0.35); top: -160px; right: -80px; animation: drift 11s ease-in-out infinite alternate; }
.glow-b { width: 380px; height: 380px; background: rgba(34, 211, 238, 0.22); bottom: -140px; left: -110px; animation: drift 13s ease-in-out infinite alternate-reverse; }
.glow-c { width: 300px; height: 300px; background: rgba(139, 92, 246, 0.25); top: 34%; left: 44%; animation: drift 15s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(36px, -26px, 0) scale(1.12); }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

.hero-copy > * { position: relative; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #dbe3ff;
}
.hero-eyebrow .ico { color: var(--cyan); }

.hero h1 { color: #fff; margin: 22px 0 20px; }
.hero-lead { font-size: clamp(1.04rem, 1.5vw, 1.2rem); color: rgba(226, 232, 255, 0.82); max-width: 34em; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-trust {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 34px;
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: rgba(226, 232, 255, 0.75);
}
.hero-trust .ico {
  width: 20px;
  height: 20px;
  padding: 3.5px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.18);
  color: #34d399;
  stroke-width: 3;
}

/* --- Maqueta del tauler --- */
.hero-visual { position: relative; }

.mock {
  position: relative;
  border-radius: 20px;
  background: #fff;
  color: var(--head);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.mock::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.06), transparent 45%);
  pointer-events: none;
}

.mock-topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfe;
}
.mock-topbar .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #fca5a5; }
.dot.amber { background: #fcd34d; }
.dot.green { background: #86efac; }
.mock-url {
  margin-left: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #eef0f9;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.mock-body { display: flex; }

.mock-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: #fbfbfe;
}
.ms-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--grad);
  margin-bottom: 6px;
}
.ms-item { width: 22px; height: 22px; border-radius: 7px; background: #e7eaf6; }
.ms-item.active { background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.8)); }

.mock-main { flex: 1; padding: 16px 18px 18px; min-width: 0; }

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.mock-head strong { font-family: var(--font-display); font-size: 13.5px; }

.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mock-stat {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfe;
  display: grid;
  gap: 1px;
}
.mock-stat span { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.mock-stat strong { font-family: var(--font-display); font-size: 15px; color: var(--head); }

.mock-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  flex: none;
}
.av-1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.av-2 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.av-3 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.av-4 { background: linear-gradient(135deg, #10b981, #34d399); }

.mr-txt { flex: 1; min-width: 0; line-height: 1.25; }
.mr-txt strong { display: block; font-size: 12.5px; color: var(--head); font-weight: 600; }
.mr-txt small { font-size: 10.5px; color: var(--muted); }

.chip {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--head);
  background: #eef0f9;
  border-radius: 8px;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}

.mock-chart {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 10px;
}
.mock-chart .bars { display: flex; align-items: flex-end; gap: 10px; height: 74px; }
.mock-chart .bars span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: #dfe3f5;
  transform-origin: bottom;
}
.mock-chart .bars span.hl { background: var(--grad); }
.bar-labels { display: flex; gap: 10px; margin-top: 7px; }
.bar-labels span { flex: 1; text-align: center; font-size: 9.5px; color: var(--muted); font-weight: 500; }

/* --- Xips flotants --- */
.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--head);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  animation: floaty 6s ease-in-out infinite alternate;
}
.float-chip .ico {
  width: 21px;
  height: 21px;
  padding: 4px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #0b8a62;
  stroke-width: 3;
}
.fc-1 { top: -20px; right: 4%; animation-delay: 0.6s; }
.fc-2 { bottom: 26px; left: -26px; }

@keyframes floaty {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
  animation: floaty 3s ease-in-out infinite alternate;
}
.hero-scroll:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.hero-scroll .ico { width: 20px; height: 20px; }

/* ============================================================
   NORMATIVA
   ============================================================ */
.section-legal { background: var(--bg); }

.legal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.legal-card {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.legal-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.4);
}
.legal-card h3 { margin-bottom: 9px; }
.legal-card p { font-size: 15px; }

.legal-note {
  margin-top: 34px;
  padding: 20px 26px;
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, rgba(99, 102, 241, 0.08), rgba(34, 211, 238, 0.07));
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-left: 4px solid var(--brand);
  color: var(--head);
  font-size: 15.5px;
  max-width: 900px;
}
.legal-note strong { font-weight: 700; }

/* ============================================================
   FUNCIONALITATS
   ============================================================ */
.section-features { background: var(--tint); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  padding: 30px 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.35);
}
.feature-card p { font-size: 15px; margin-top: 9px; }

/* variants de color d'icona */
.feature-card:nth-child(3n+2) .icon-tile {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.13), rgba(236, 72, 153, 0.1));
  color: var(--violet);
}
.feature-card:nth-child(3n) .icon-tile {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(34, 211, 238, 0.14));
  color: #0284c7;
}

/* ============================================================
   COM FUNCIONA
   ============================================================ */
.section-dark {
  background:
    radial-gradient(900px 480px at 88% 0%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--ink);
  color: rgba(226, 232, 255, 0.78);
  overflow: hidden;
}
.steps-bg { position: absolute; inset: 0; pointer-events: none; }
.steps-bg .glow { opacity: 0.4; }

.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: #a5b4fc; }
.section-dark .lead { color: rgba(226, 232, 255, 0.72); }

.steps-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: 30px 28px 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.step-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(165, 180, 252, 0.35);
}
.step-card h3 { color: #fff; margin: 14px 0 9px; font-size: 1.18rem; }
.step-card p { font-size: 15px; }

.step-num {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, #818cf8, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.95;
}

/* ============================================================
   PANELL DE CONTROL
   ============================================================ */
.section-panel { background: var(--bg); }

.panel-inner {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

.panel-copy p { font-size: 15.5px; }

.panel-visual { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }

.panel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.panel-big { grid-row: span 2; display: flex; flex-direction: column; }

.pc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.pc-head strong { font-family: var(--font-display); font-size: 14px; color: var(--head); }

.panel-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-height: 210px;
  padding-top: 8px;
}
.pb-col { flex: 1; display: grid; gap: 8px; justify-items: center; height: 100%; grid-template-rows: 1fr auto; }
.pb-bar {
  align-self: end;
  width: 100%;
  max-width: 44px;
  height: var(--h);
  border-radius: 9px 9px 4px 4px;
  background: #dfe3f5;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.pb-bar.hl { background: var(--grad); }
.pb-bar.dim { background: #eceef8; }
.pb-col small { font-size: 11px; color: var(--muted); font-weight: 500; }
.visible .pb-bar { transform: scaleY(1); }
.visible .pb-col:nth-child(2) .pb-bar { transition-delay: 0.08s; }
.visible .pb-col:nth-child(3) .pb-bar { transition-delay: 0.16s; }
.visible .pb-col:nth-child(4) .pb-bar { transition-delay: 0.24s; }
.visible .pb-col:nth-child(5) .pb-bar { transition-delay: 0.32s; }
.visible .pb-col:nth-child(6) .pb-bar { transition-delay: 0.4s; }
.visible .pb-col:nth-child(7) .pb-bar { transition-delay: 0.48s; }

.panel-stack { display: grid; gap: 18px; align-content: start; }

.pc-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 4px;
}
.pc-row + .pc-row { border-top: 1px dashed var(--line); }
.icon-inline .ico { width: 19px; height: 19px; }

/* ============================================================
   MÒBIL
   ============================================================ */
.section-mobile { background: var(--tint); overflow: hidden; }

.mobile-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

.mobile-visual { position: relative; display: grid; justify-items: center; padding: 30px 0; }

.phone {
  position: relative;
  width: min(300px, 78vw);
  border-radius: 44px;
  background: var(--ink);
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(13, 23, 58, 0.06);
}
.phone::before {
  content: "";
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(99, 102, 241, 0.22), transparent 70%);
  z-index: -1;
}
.phone-notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 22px;
  border-radius: 999px;
  background: var(--ink);
  z-index: 2;
}

.phone-screen {
  border-radius: 34px;
  background: linear-gradient(180deg, #ffffff, #f2f4fd);
  padding: 52px 22px 26px;
  display: grid;
  justify-items: center;
  gap: 13px;
  text-align: center;
}

.ph-date { font-size: 13px; font-weight: 600; color: var(--muted); }
.ph-time {
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 800;
  color: var(--head);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ph-time span { color: var(--brand-2); font-size: 30px; }

.ph-btn {
  width: 100%;
  margin-top: 6px;
  padding: 15px 20px;
  border: 0;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-brand);
}

.ph-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #0b8a62;
  font-size: 12px;
  font-weight: 600;
}
.ph-chip .ico { width: 15px; height: 15px; }

.ph-last {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.fc-3 { bottom: -6px; right: 2%; animation-delay: 1.2s; }

.mobile-copy p { font-size: 15.5px; }
.mobile-copy p + p { margin-top: 12px; }

/* ============================================================
   SECTORS
   ============================================================ */
.section-sectors { background: var(--bg); }

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sector {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--head);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.sector:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-sm);
}
.sector .icon-inline { width: 38px; height: 38px; }
.sector .icon-inline .ico { width: 18px; height: 18px; }

/* ============================================================
   PREGUNTES FREQÜENTS
   ============================================================ */
.section-faq { background: var(--tint); }

.faq-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.faq-copy { position: sticky; top: calc(var(--header-h) + 30px); }
.faq-copy h2 { margin-bottom: 14px; }
.faq-copy p { margin-bottom: 26px; max-width: 40ch; }

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

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 22px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item[open] { border-color: rgba(99, 102, 241, 0.4); box-shadow: var(--shadow-sm); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--head);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-x { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--tint); flex: none; transition: background-color 0.25s ease; }
.faq-x::before, .faq-x::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: translate(-50%, -50%);
  transition: transform 0.28s ease;
}
.faq-x::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-x { background: var(--brand); }
.faq-item[open] .faq-x::before, .faq-item[open] .faq-x::after { background: #fff; }
.faq-item[open] .faq-x::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-body { padding: 0 40px 19px 0; font-size: 15px; animation: fadeSlide 0.35s ease both; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CTA
   ============================================================ */
.section-cta {
  background:
    radial-gradient(700px 300px at 85% 15%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(115deg, #4f46e5 0%, #7c3aed 55%, #0891b2 130%);
  padding-block: clamp(56px, 6vw, 84px);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-copy h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.15rem); }
.cta-copy p { color: rgba(255, 255, 255, 0.85); margin-top: 8px; font-size: 16.5px; }

/* ============================================================
   CONTACTE
   ============================================================ */
.section-contact { background: var(--bg); }

.contact-inner {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(32px, 4vw, 60px);
  align-items: stretch;
}

.contact-info {
  background:
    radial-gradient(520px 260px at 90% 0%, rgba(99, 102, 241, 0.35), transparent 60%),
    radial-gradient(420px 260px at 0% 100%, rgba(34, 211, 238, 0.18), transparent 60%),
    var(--ink);
  color: rgba(226, 232, 255, 0.82);
  border-radius: 24px;
  padding: clamp(30px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.contact-info .eyebrow { color: #a5b4fc; }
.contact-info h2 { color: #fff; margin-bottom: 14px; font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
.contact-info > p { font-size: 15.5px; margin-bottom: 26px; }

.contact-rows { list-style: none; padding: 0; display: grid; gap: 18px; }
.contact-rows li { display: flex; align-items: center; gap: 15px; }
.contact-rows strong { display: block; color: #fff; font-size: 15px; font-weight: 600; }
.contact-rows a, .contact-rows span:not(.icon-inline) { font-size: 14.5px; color: rgba(226, 232, 255, 0.72); }
.contact-rows a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* --- Formulari --- */
.contact-form-wrap { position: relative; }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(26px, 3.4vw, 40px);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 18px;
}

.contact-form[hidden] { display: none; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--head); }
.field label em { color: var(--red); font-style: normal; }
.field label small { color: var(--muted); font-weight: 500; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfbfe;
  color: var(--head);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 108px; }
.field input::placeholder, .field textarea::placeholder { color: #a6aec4; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field .err { display: none; font-size: 12.5px; color: var(--red); font-weight: 500; }
.field.invalid .err { display: block; }

.field-check { grid-template-columns: auto 1fr; align-items: start; gap: 12px; }
.field-check input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--brand);
}
.field-check label { font-size: 13.5px; font-weight: 400; color: var(--text); line-height: 1.55; }

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn-submit { justify-self: start; }
.form-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* Avís d'error d'enviament */
.form-error {
  padding: 13px 17px;
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: 12px;
  background: rgba(225, 29, 72, 0.06);
  color: #9f1239;
  font-size: 14px;
  line-height: 1.55;
}
.form-error[hidden] { display: none; }
.form-error a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* --- Estat d'èxit --- */
.form-success {
  background: #fff;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 24px;
  padding: clamp(40px, 5vw, 64px) clamp(26px, 3.4vw, 40px);
  box-shadow: var(--shadow-md);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.form-success[hidden] { display: none; }
.form-success h3 { font-size: 1.5rem; }
.form-success p { max-width: 42ch; font-size: 15.5px; }

.success-badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-brand);
  margin-bottom: 10px;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.success-badge .ico { width: 32px; height: 32px; stroke-width: 2.6; }
@keyframes pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ============================================================
   PEU DE PÀGINA
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(226, 232, 255, 0.66);
  padding-top: clamp(56px, 6vw, 80px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(30px, 4vw, 56px);
  padding-bottom: 48px;
}

.footer-brand p { font-size: 14.5px; margin-top: 16px; max-width: 34ch; }
.site-footer .brand { color: #fff; }

.footer-col { display: grid; gap: 11px; align-content: start; }
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.footer-col a { font-size: 14.5px; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13px;
}
.footer-legal a:hover { color: #fff; }

/* ============================================================
   ANIMACIONS DE SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1120px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 660px; }
  .fc-2 { left: 0; }
  .legal-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .sectors-grid { grid-template-columns: repeat(3, 1fr); }
  .panel-inner, .mobile-inner, .faq-inner, .contact-inner { grid-template-columns: 1fr; }
  .faq-copy { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: grid; }
  .header-actions .btn { display: none; }
  .steps-grid { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
  .panel-visual { grid-template-columns: 1fr; }
  .panel-big { grid-row: auto; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .legal-grid, .features-grid, .sectors-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .btn-submit, .hero-cta .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
  .hero-scroll { display: none; }
  .float-chip { font-size: 11.5px; padding: 9px 13px; }
  .fc-1 { top: -14px; right: 0; }
  .mock-side { display: none; }
  .mock-stats strong { font-size: 13.5px; }
  .mock-row .mr-txt small { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
  .cta-inner { justify-content: center; text-align: center; }
  .phone { width: min(270px, 82vw); }
  .ph-time { font-size: 46px; }
}

@media (max-width: 400px) {
  .sectors-grid { grid-template-columns: 1fr; }
}

/* ---------- Moviment reduït ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .pb-bar { transform: scaleY(1); }
}
