/* d-Lock — full d'estils
   Marca: grafit del logotip + el quadrat verd (el "bloc" protegit).
   Tipografia: Archivo, amb amplada expandida als títols (recorda el logotip). */

@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-standard-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-standard-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f3f5f4;
  --surface: #ffffff;
  --ink: #1d2125;
  --graphite: #56585a;
  --muted: #5b6166;
  --line: #d8ddda;
  --lime: #8dc63f;
  --lime-soft: #e6f2d6;
  --lime-ink: #3b6a12;
  --night: #2b2e31;
  --night-2: #363a3e;
  --night-line: #4a4f54;
  --on-night: #e9ecea;
  --on-night-muted: #b4bab7;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --step: clamp(64px, 9vw, 120px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
body.nav-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--lime-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--ink);
}
h1 { font-size: clamp(2.25rem, 5.2vw, 4.25rem); line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.1875rem; font-stretch: 112%; font-weight: 700; letter-spacing: -0.005em; line-height: 1.25; }
.h-sm { font-size: 1.25rem; font-stretch: 112%; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--muted); max-width: 40em; }
.measure { max-width: 40em; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Botons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .6em 1.15em;
  border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-stretch: 110%; font-size: .975rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lg { min-height: 52px; padding: .75em 1.4em; font-size: 1.0625rem; }
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:hover { background: #7fb733; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--graphite); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: var(--on-night-muted); color: var(--on-night); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Capçalera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand img { width: 196px; height: auto; }
@media (max-width: 1000px) { .brand img { width: 160px; } }
.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  background: none; border: 0; font: inherit; font-size: .975rem; font-weight: 600;
  color: var(--ink); text-decoration: none; cursor: pointer; border-radius: var(--radius);
}
.nav-link:hover { color: var(--lime-ink); }
.nav-link.active { box-shadow: inset 0 -3px 0 var(--lime); border-radius: 0; }
.nav-menu-btn::after {
  content: ""; width: 7px; height: 7px; margin-left: 8px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform .15s;
}
.nav-menu-btn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }

.has-menu { position: relative; }
.mega {
  display: none; position: absolute; top: calc(100% + 14px); left: -24px;
  width: min(760px, 90vw); padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--lime);
  box-shadow: 0 24px 48px -24px rgba(29, 33, 37, .35);
  grid-template-columns: 1.4fr 1fr; gap: 28px;
}
.nav-menu-btn[aria-expanded="true"] + .mega { display: grid; }
.mega-title { font-size: .875rem; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega a { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 10px; margin: 0 -10px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.mega a:hover { background: var(--paper); }
.mega a strong { display: block; font-weight: 700; font-size: .975rem; }
.mega a .mega-txt span { display: block; font-size: .875rem; color: var(--muted); line-height: 1.4; }
.mega-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--lime-soft); color: var(--lime-ink); }
.mega-col-alt { border-left: 1px solid var(--line); padding-left: 28px; }

.nav-toggle { display: none; }

@media (max-width: 1000px) {
  .site-header { backdrop-filter: none; background: var(--surface); }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 48px; height: 48px; border: 1px solid var(--line); background: var(--surface);
    border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .nav {
    display: none; position: fixed; inset: 73px 0 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 12px var(--gutter) 32px; background: var(--surface); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; min-height: 56px; padding: 0; font-size: 1.125rem; justify-content: space-between; }
  .nav-link.active { box-shadow: none; color: var(--lime-ink); }
  .mega { position: static; width: auto; padding: 0 0 16px; border: 0; box-shadow: none; grid-template-columns: 1fr; gap: 16px; }
  .mega-col-alt { border-left: 0; padding-left: 0; }
  .nav-cta { margin-top: 24px; }
}

/* ---------- Seccions ---------- */
.section { padding: var(--step) 0; }
.section-tight { padding: calc(var(--step) * .6) 0; }
.section-white { background: var(--surface); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .split, .split-even { grid-template-columns: 1fr; } }

/* ---------- Intro de pàgina ---------- */
.intro { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 80px); background: var(--surface); border-bottom: 1px solid var(--line); }
.intro-grid { display: grid; gap: 48px; }
.intro-split .intro-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.intro h1 { max-width: 14em; }
.intro-text > .lead { margin-top: 20px; }
@media (max-width: 900px) { .intro-split .intro-grid { grid-template-columns: 1fr; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }

/* ---------- Hero de portada ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 80% at 85% 30%, rgba(141, 198, 63, .16), transparent 70%),
    var(--night);
  color: var(--on-night);
  padding: clamp(56px, 8vw, 112px) 0 clamp(56px, 8vw, 104px);
}
.hero::before {
  /* graella de blocs, molt subtil */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.25rem, 4.5vw, 3.625rem); max-width: 12em; }
.hero .lead { margin-top: 24px; color: var(--on-night-muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Panell d'estat d'exemple */
.status { margin: 0; background: var(--surface); color: var(--ink); border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); overflow: hidden; }
.status-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.status-head strong { font-stretch: 112%; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); }
.status-sample { margin-left: auto; font-size: .8rem; color: var(--muted); }
.status-rows { list-style: none; margin: 0; padding: 6px 0; }
.status-rows li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 20px; }
.status-rows li + li { border-top: 1px solid #edf0ee; }
.status-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--paper); color: var(--graphite); }
.status-text { min-width: 0; }
.status-text strong { display: block; font-size: .95rem; line-height: 1.3; }
.status-text span { display: block; font-size: .825rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-grid; padding: 4px 10px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-ink); font-size: .775rem; font-weight: 700; white-space: nowrap; }
.status-alert { background: #fbf6ec; }
.status-alert .status-ico { background: #fde8e4; color: #b3261e; }
.pill-swap > span { grid-area: 1 / 1; }
.pill-a { color: #b3261e; opacity: 0; }
.pill-b { opacity: 1; }
.pill-swap { background: var(--lime-soft); }
.status-foot { display: flex; align-items: center; gap: 16px; padding: 14px 20px; background: var(--paper); border-top: 1px solid var(--line); }
.status-foot p { margin: 0; font-size: .85rem; line-height: 1.35; }
.status-foot strong { display: block; font-size: .9rem; }
.status-foot span { color: var(--muted); }
.status-321 { display: flex; gap: 6px; }
.mini { display: grid; grid-template-columns: repeat(2, 7px); gap: 2px; }
.mini i { width: 7px; height: 7px; background: var(--graphite); }
.mini-1 i, .mini-2 i { background: var(--lime); }

@media (prefers-reduced-motion: no-preference) {
  .status-rows li { animation: row-in .5s cubic-bezier(.2,.7,.3,1) both; animation-delay: calc(.35s + var(--r) * .14s); }
  @keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .status-alert .pill-swap { animation: pill-bg 3.6s both; }
  .pill-a { animation: pill-out 3.6s both; }
  .pill-b { animation: pill-in 3.6s both; }
  .status-alert { animation: row-in .5s cubic-bezier(.2,.7,.3,1) both, alert-bg 3.6s both !important; animation-delay: calc(.35s + var(--r) * .14s), 0s !important; }
  @keyframes pill-bg { 0%, 60% { background: #fde8e4; } 75%, 100% { background: var(--lime-soft); } }
  @keyframes pill-out { 0%, 30% { opacity: 0; } 35%, 60% { opacity: 1; } 75%, 100% { opacity: 0; } }
  @keyframes pill-in { 0%, 60% { opacity: 0; } 75%, 100% { opacity: 1; } }
  @keyframes alert-bg { 0%, 60% { background: #fdeeea; } 85%, 100% { background: #fbf6ec; } }
}

/* Franja de confiança */
.trust { background: #232629; border-top: 1px solid var(--night-line); color: var(--on-night-muted); }
.trust-row { list-style: none; margin: 0 auto; padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.trust-row li { padding-left: 18px; border-left: 3px solid var(--lime); }
.trust-row strong { display: block; color: #fff; font-stretch: 125%; font-weight: 800; font-size: 1.375rem; line-height: 1.1; }
.trust-row span { display: block; margin-top: 4px; font-size: .9rem; line-height: 1.4; }
@media (max-width: 800px) { .trust-row { grid-template-columns: 1fr 1fr; } }

/* Graella de serveis */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tiles li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.tiles a { display: flex; flex-direction: column; height: 100%; padding: 32px 28px 28px; color: var(--ink); text-decoration: none; transition: background-color .15s; }
.tiles a:hover { background: #f8fbf3; }
.tile-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--lime-soft); color: var(--lime-ink); margin-bottom: 22px; }
.tiles h3 { font-size: 1.3125rem; font-stretch: 118%; font-weight: 800; margin-bottom: .4em; }
.tiles p { color: var(--muted); margin-bottom: 20px; }
.tile-more { margin-top: auto; font-weight: 700; font-size: .925rem; color: var(--lime-ink); display: inline-flex; align-items: center; gap: 8px; }
.tile-more::after { content: ""; width: 8px; height: 8px; background: var(--lime); transition: transform .15s; }
.tiles a:hover .tile-more::after { transform: translateX(4px); }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .tiles a { padding: 24px 20px; } }

/* Blocs: tres còpies de les mateixes dades */
.blockfield { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 22px); }
.bf-panel { background: var(--paper); border: 1px solid var(--line); padding: clamp(10px, 1.6vw, 18px); }
.bf-panel-2 { background: var(--night); border-color: var(--night); }
.bf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.blk { aspect-ratio: 1; display: block; background: transparent; border: 1px dashed #c3c9c6; }
.blk.on { border: 0; background: var(--graphite); }
.bf-panel-1 .blk.on { background: var(--lime); }
.bf-panel-2 .blk.off { border-color: var(--night-line); }
.bf-panel-2 .blk.on { background: var(--lime); }
.bf-label { margin: 12px 0 0; font-size: .875rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.bf-panel-2 .bf-label { color: var(--on-night); }

@media (prefers-reduced-motion: no-preference) {
  .blk.on { animation: blk-in .35s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--p) * .55s + var(--i) * 28ms + .15s); }
  @keyframes blk-in { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Llistes de característiques ---------- */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 56px; }
.features-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.features-1 { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.features li { position: relative; padding-left: 26px; }
.features li::before { content: ""; position: absolute; left: 0; top: .42em; width: 10px; height: 10px; background: var(--lime); }
.features h3 { margin-bottom: .35em; }
.features-icons li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding-left: 0; align-items: start; }
.features-icons li::before { display: none; }
.ficon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: var(--lime-soft); color: var(--lime-ink); }
.section-white .ficon { background: #edf6e0; }
.dark .ficon { background: rgba(141, 198, 63, .14); color: var(--lime); }
.features p { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .features-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .features, .features-3 { grid-template-columns: 1fr; gap: 28px; } }

/* Llista de serveis a la portada */
.services { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.services li { border-bottom: 1px solid var(--line); }
.services a {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 24px; gap: 24px; align-items: baseline;
  padding: 26px 0; color: var(--ink); text-decoration: none;
}
.services a:hover { background: linear-gradient(90deg, var(--lime-soft), transparent 70%); }
.services h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.5rem); font-stretch: 120%; font-weight: 800; }
.services p { margin: 0; color: var(--muted); }
.services .go { width: 14px; height: 14px; background: var(--lime); justify-self: end; align-self: center; transition: transform .15s; }
.services a:hover .go { transform: scale(1.4); }
@media (max-width: 720px) { .services a { grid-template-columns: 1fr 20px; } .services p { grid-column: 1; } .services .go { grid-row: 1; grid-column: 2; } }

/* Passos (seqüència real) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.steps li { counter-increment: s; padding: 28px 24px 8px 0; border-right: 1px solid var(--line); margin-right: 24px; }
.steps li:last-child { border-right: 0; margin-right: 0; }
.steps li::before {
  content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 18px;
  background: var(--ink); color: #fff; font-weight: 800; font-stretch: 120%;
}
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2) { border-right: 0; margin-right: 0; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 24px; } }

/* ---------- Banda fosca ---------- */
.dark {
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--night);
  color: var(--on-night);
}
.dark h2, .dark h3 { color: #fff; }
.dark p, .dark .lead { color: var(--on-night-muted); }
.dark a { color: var(--lime); }
.dark .features li::before { background: var(--lime); }
.dark .features p { color: var(--on-night-muted); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--night-line); }
.facts li { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--night-line); }
.facts strong { display: block; color: #fff; font-stretch: 115%; font-size: 1.0625rem; margin-bottom: 4px; }
.facts span { color: var(--on-night-muted); font-size: .95rem; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
.facts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; }
@media (max-width: 960px) { .facts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .facts-4 { grid-template-columns: 1fr; } }
.resumen .btn { width: 100%; justify-content: center; text-align: center; }

/* ---------- Bloc destacat ---------- */
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--lime); padding: clamp(24px, 4vw, 40px); }
.callout h2, .callout h3 { margin-top: 0; }
.callout h2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.callout p:last-child { margin-bottom: 0; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag-list li { padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); font-size: .925rem; }
.section-white .tag-list li { background: var(--paper); }

/* Catàleg de compatibilitat */
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.catalog > div { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.catalog h3 { margin-bottom: 14px; }
.catalog ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); }
.catalog li { padding-left: 18px; position: relative; }
.catalog li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; background: var(--graphite); }
@media (max-width: 900px) { .catalog { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .catalog { grid-template-columns: 1fr; } }

/* ---------- Plans ---------- */
.plans-table { width: 100%; border-collapse: collapse; background: var(--surface); border-top: 2px solid var(--ink); }
.plans-table th, .plans-table td { padding: 18px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plans-table thead th { font-size: .9rem; font-weight: 700; color: var(--muted); }
.plans-table tbody th { font-stretch: 115%; font-weight: 800; font-size: 1.125rem; }
.plans-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plans-table .price { font-weight: 700; font-size: 1.125rem; }
.plans-table .cta-cell { text-align: right; width: 1%; white-space: nowrap; }
.plans-note { margin-top: 16px; font-size: .925rem; color: var(--muted); }
@media (max-width: 720px) {
  .plans-table thead { display: none; }
  .plans-table, .plans-table tbody, .plans-table tr, .plans-table th, .plans-table td { display: block; width: 100%; }
  .plans-table tr { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; }
  .plans-table th, .plans-table td { border: 0; padding: 0; text-align: left; }
  .plans-table tbody th { grid-column: 1 / -1; }
  .plans-table td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--muted); }
  .plans-table .num { text-align: left; }
  .plans-table .cta-cell { grid-column: 1 / -1; text-align: left; margin-top: 8px; }
}


/* ---------- Paquets ---------- */
.packs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.pack { display: flex; flex-direction: column; align-items: flex-start; padding: 32px 28px 36px; border-right: 1px solid var(--line); background: var(--surface); position: relative; }
.pack:last-child { border-right: 0; }
.pack h2 { font-size: clamp(1.75rem, 2.6vw, 2.125rem); margin-bottom: .3em; }
.pack-for { color: var(--muted); min-height: 3.2em; }
.pack-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 8px 0 20px; }
.pack-price strong { font-size: 2.25rem; font-stretch: 120%; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pack-price .pack-quote { font-size: 1.5rem; }
.pack-from, .pack-unit { color: var(--muted); font-size: .925rem; }
.pack-unit { flex-basis: 100%; }
.pack-extra { display: grid; gap: 4px; margin: -8px 0 22px; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.pack-extra strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pack-featured .pack-extra { color: var(--on-night-muted); }
.pack-featured .pack-extra strong { color: #fff; }
.storage .storage-examples + p { margin-top: 18px; }
.pack-base { margin: 28px 0 10px; font-weight: 700; font-size: .95rem; }
.pack > .btn + .pack-list { margin-top: 28px; }
.pack-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pack-list li { position: relative; padding-left: 22px; line-height: 1.45; }
.pack-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 9px; height: 9px; background: var(--lime); }
.pack-featured { background: var(--night); color: var(--on-night); border-right-color: var(--night); }
.pack-featured h2, .pack-featured .pack-price strong { color: #fff; }
.pack-featured .pack-for, .pack-featured .pack-from, .pack-featured .pack-unit { color: var(--on-night-muted); }
.pack-flag { position: absolute; top: -2px; left: 28px; transform: translateY(-100%); margin: 0; padding: 4px 10px; background: var(--lime); color: var(--ink); font-size: .825rem; font-weight: 700; }
@media (max-width: 900px) {
  .packs { grid-template-columns: 1fr; border-top: 0; gap: 40px; }
  .pack { border-right: 0; border-top: 2px solid var(--ink); }
  .pack-featured { border-top-color: var(--lime); }
  .pack-for { min-height: 0; }
}

.addons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.addons li { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.addons h3 { margin-bottom: .4em; }
.addons p { color: var(--muted); margin-bottom: 12px; }
.addons span { margin-top: auto; font-size: .875rem; font-weight: 700; color: var(--lime-ink); }
@media (max-width: 900px) { .addons { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .addons { grid-template-columns: 1fr; } }

.legacy-plans summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.legacy-plans summary::-webkit-details-marker { display: none; }
.legacy-plans summary span { color: var(--muted); }
.legacy-plans summary strong { display: block; color: var(--ink); font-stretch: 112%; font-size: 1.125rem; }
.legacy-plans summary::after { content: "+"; font-size: 1.75rem; font-weight: 300; line-height: 1; color: var(--ink); }
.legacy-plans[open] summary::after { content: "−"; }
.legacy-plans[open] .plans-table { margin-top: 24px; }


/* ---------- Diagrames ---------- */
.diagram { margin: 0; padding: clamp(12px, 2vw, 20px); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.diagram svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.dg-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.dg-box-dark { fill: var(--night); }
.dg-box-bad { fill: #fdf1ef; stroke: #f0c4bd; stroke-width: 1.5; }
.dg-t { font-size: 14px; font-weight: 700; font-stretch: 112%; fill: var(--ink); }
.dg-t-w { font-size: 14px; font-weight: 700; font-stretch: 112%; fill: #fff; }
.dg-s { font-size: 12px; fill: var(--muted); }
.dg-s-w { font-size: 12px; fill: var(--on-night-muted); }
.dg-ico { color: var(--graphite); }
.dg-ico-l { color: var(--lime); }
.dg-ico-d { color: var(--ink); }
.dg-b { fill: var(--graphite); }
.dg-l { fill: var(--lime); }
.dg-bad { fill: #d9534a; }
.dg-empty { fill: none; stroke: #c3c9c6; stroke-dasharray: 3 2; }
.dg-box-dark .dg-empty, .dg-empty-d { stroke: var(--night-line); }
.dg-link { fill: none; stroke: var(--lime); stroke-width: 2.5; stroke-dasharray: 6 5; }
.dg-link-solid { fill: none; stroke: var(--graphite); stroke-width: 2.5; }
.dg-link-bad { fill: none; stroke: #d9534a; stroke-width: 2; stroke-dasharray: 5 5; }
.dg-head { fill: var(--graphite); }
.dg-dot { fill: var(--lime); stroke: var(--surface); stroke-width: 2; }
.dg-lead { fill: none; stroke: var(--graphite); stroke-width: 1.25; }
.dg-attack { stroke: #d9534a; stroke-width: 4; stroke-linecap: round; }
.dg-attack-head { fill: #d9534a; }
.dg-wall { fill: var(--lime); }
.dg-off { fill: #e4e8e6; stroke: #cfd5d2; }
.dg-x { stroke: #d9534a; stroke-width: 4; stroke-linecap: round; fill: none; }
.dg-run { fill: var(--night-2); stroke: var(--night-line); }
.dg-unit { fill: var(--night-2); }
.dg-slot { fill: var(--night-line); }
.dg-led { fill: var(--lime); }
.dg-led-warn { fill: #e3a325; }
.dg-badge { fill: var(--lime); stroke: var(--paper); stroke-width: 4; }
.dg-env rect { fill: var(--surface); stroke: var(--graphite); stroke-width: 1.5; }
.dg-env path { fill: none; stroke: var(--graphite); stroke-width: 1.5; }
.dg-env-bad rect { fill: #fdf1ef; stroke: #d9534a; stroke-width: 1.5; }
.dg-env-bad path { fill: none; stroke: #d9534a; stroke-width: 1.5; }
.dg-track { fill: #e4e8e6; }
.dg-fill { fill: var(--lime); }
.dg-node { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.dg-node-sq { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.dg-hub { fill: var(--night); stroke: var(--lime); stroke-width: 4; }
.dg-ring4 { fill: var(--night); }
.dg-ring3 { fill: #4b5054; }
.dg-ring2 { fill: #6f7a63; }
.dg-ring1 { fill: var(--lime); }

/* ---------- Formularis ---------- */
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid #b9c0bc; border-radius: var(--radius);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--lime); outline-offset: 0; border-color: var(--ink); }
.field .invalid, .field input.invalid, .field textarea.invalid { border-color: #b3261e; }
.validation-message { color: #b3261e; font-size: .9rem; margin-top: 6px; }
.field .check, .check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--lime-ink); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 20px 24px; border-left: 6px solid var(--lime); background: var(--lime-soft); }
.notice h2 { font-size: 1.375rem; margin-bottom: .35em; }
.notice p:last-child { margin: 0; }
.notice-error { border-left-color: #b3261e; background: #fbeceb; }

.contact-card { display: grid; gap: 22px; }
.contact-card dl { margin: 0; display: grid; gap: 18px; }
.contact-card dt { font-size: .9rem; color: var(--muted); }
.contact-card dd { margin: 0; font-weight: 700; font-stretch: 110%; font-size: 1.125rem; }

/* ---------- Clients ---------- */
.clients { background: var(--surface); border-top: 1px solid var(--line); }
.logo-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 40px; align-items: center; }
.logo-grid img { max-height: 46px; width: auto; margin: 0 auto; opacity: .78; }
@media (max-width: 900px) { .logo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } .logo-grid img { max-height: 40px; } }

.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; }
.quotes blockquote { margin: 0; font-size: 1.125rem; line-height: 1.5; }
.quotes figcaption { margin-top: 14px; font-size: .925rem; color: var(--muted); }
.quotes figcaption strong { display: block; color: var(--ink); }
.quotes figure { margin: 0; padding-top: 20px; border-top: 4px solid var(--lime); }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta-band { background: var(--night); color: var(--on-night); padding: clamp(56px, 8vw, 96px) 0; }
.cta-grid > div:first-child::before { content: ""; display: block; width: 64px; height: 8px; margin-bottom: 28px; background: var(--lime); }
.cta-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: end; }
.cta-band h2 { color: #fff; max-width: 14em; }
.cta-band p { color: var(--on-night-muted); font-size: 1.125rem; max-width: 34em; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } .cta-actions { justify-content: flex-start; } }

/* ---------- Peu ---------- */
.site-footer { background: #232629; color: var(--on-night-muted); padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { color: var(--lime); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.2fr)); gap: 40px; }
.footer-brand img:first-child { width: 150px; margin-bottom: 18px; }
.footer-brand p { max-width: 30em; }
.partner-badge { width: 170px; margin-top: 8px; }
.footer-title { color: #fff; font-weight: 700; font-stretch: 112%; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer address { font-style: normal; line-height: 1.8; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--night-line); font-size: .8125rem; line-height: 1.5; color: var(--on-night-muted); }
.footer-legal p { margin: 0; }
.site-footer .footer-legal a { color: var(--on-night-muted); }
.site-footer .footer-legal a:hover { color: var(--lime); }
.footer-legal ul { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.footer-legal li + li::before { content: ""; display: inline-block; width: 1px; height: 11px; margin: 0 14px; background: var(--night-line); vertical-align: -1px; }
@media (max-width: 600px) { .footer-legal { flex-direction: column; align-items: flex-start; gap: 14px; } }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Text legal ---------- */
.prose { background: var(--surface); padding: clamp(24px, 5vw, 64px); border: 1px solid var(--line); }
.prose p, .prose ul, .prose ol, .prose h2, .prose h3 { max-width: 96ch; }
.prose h2 { font-size: 1.375rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #33383c; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper); }
.table-scroll { overflow-x: auto; }

/* ---------- Equip ---------- */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px; }
.team-photo { aspect-ratio: 1; margin-bottom: 16px; overflow: hidden; border-radius: 10px; background: var(--paper); position: relative; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .25s; }
.team li:hover .team-photo img { filter: none; }
.team-photo::after { content: ""; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; background: var(--lime); }
.team-initials { position: absolute; inset: 0; display: grid; place-items: center; background: var(--night); color: #fff; font-size: 2.5rem; font-weight: 800; font-stretch: 125%; }
.team strong { display: block; font-stretch: 115%; font-size: 1.1875rem; }
.team-role { display: block; color: var(--lime-ink); font-weight: 700; font-size: .9rem; margin: 2px 0 8px; }
.team p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; } }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 48px; }
.timeline li { position: relative; padding: 28px 20px 0 0; border-top: 2px solid var(--night-line); }
.timeline li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; background: var(--lime); }
.timeline span { display: block; color: var(--lime); font-weight: 800; font-stretch: 125%; font-size: 1.5rem; line-height: 1; margin-bottom: 10px; }
.timeline strong { display: block; color: #fff; font-stretch: 112%; line-height: 1.3; margin-bottom: 6px; }
.timeline p { margin: 0; font-size: .925rem; }
@media (max-width: 900px) { .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr 1fr; } }

.not-found { padding: var(--step) 0; }

/* Ajustos de mòbil per a la portada */
@media (max-width: 560px) {
  .status-text span { white-space: normal; }
  .status-rows li { padding: 10px 14px; gap: 10px; }
  .status-head, .status-foot { padding-left: 14px; padding-right: 14px; }
  .tiles a { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; }
  .tile-ico { width: 44px; height: 44px; margin: 0; grid-row: span 3; }
  .tiles h3 { font-size: 1.125rem; }
  .tiles p { margin-bottom: 10px; }
}

/* ---------- Calculadora ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.calc-form { display: grid; gap: 28px; }
.calc-group { margin: 0; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 16px; min-width: 0; }
.calc-group legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; display: flex; align-items: center; gap: 12px; font-weight: 800; font-stretch: 118%; font-size: 1.25rem; }
.calc-step { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--ink); color: #fff; font-size: .95rem; }
.calc-counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.counter label { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.counter label .icon { color: var(--lime-ink); }
.counter .hint { display: block; font-size: .825rem; color: var(--muted); margin-bottom: 8px; }
.counter input { font-size: 1.5rem; font-weight: 800; font-stretch: 115%; text-align: center; }
.calc-q { margin: 6px 0 0; font-weight: 700; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: block; height: 100%; padding: 14px 16px; border: 1.5px solid #c8cfcb; border-radius: 10px; font-size: .875rem; color: var(--muted); line-height: 1.4; transition: border-color .12s, background-color .12s; }
.choice strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 2px; }
.choice input:checked + span { border-color: var(--lime-ink); background: var(--lime-soft); box-shadow: inset 0 0 0 1px var(--lime-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.calc-check { margin-top: 4px; }
.calc .check { font-weight: 400; }
.calc .check + .check { margin-top: 10px; }
@media (max-width: 960px) {
  .calc { grid-template-columns: 1fr; }
  .calc-result { order: -1; position: sticky; top: 73px; z-index: 5; }
  .calc-result .resumen { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.5); }
  .calc-result .resumen-motivo, .calc-result .resumen-tabla, .calc-result .resumen-incluye, .calc-result .resumen-espacio, .calc-result .resumen-total span, .calc-result .resumen-total small { display: none; }
  .calc-result .resumen-label { grid-column: 1 / -1; margin: 0; font-size: .75rem; }
  .calc-result .resumen-pack { font-size: 1.375rem; margin: 0; }
  .calc-result .resumen-total { margin: 0; padding: 0; border: 0; display: block; }
  .calc-result .resumen-total strong { font-size: 1.25rem; }
  .calc-result .resumen::before { width: 40px; height: 4px; }
}
@media (max-width: 640px) { .calc-counters, .choices { grid-template-columns: 1fr; } .choices-2 { grid-template-columns: 1fr 1fr; } }

.calc-result { position: sticky; top: 96px; }
.resumen { background: var(--night); color: var(--on-night); border-radius: 12px; padding: clamp(22px, 3vw, 32px); position: relative; overflow: hidden; }
.resumen::before { content: ""; position: absolute; left: 0; top: 0; width: 64px; height: 6px; background: var(--lime); }
.resumen-label { margin: 0 0 6px; font-size: .85rem; color: var(--on-night-muted); }
.resumen-pack { color: #fff; font-size: clamp(2rem, 3.4vw, 2.5rem); margin: 0 0 8px; }
.resumen-motivo { color: var(--on-night-muted); font-size: .95rem; margin-bottom: 20px; }
.resumen-tabla { width: 100%; border-collapse: collapse; font-size: .95rem; }
.resumen-espacio { margin: 16px 0 4px; padding-top: 14px; border-top: 1px solid var(--night-line); display: grid; gap: 6px; }
.resumen-espacio .resumen-label { margin: 0; }
.espacio-cifra { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.espacio-cifra strong { color: #fff; font-size: 1.375rem; font-weight: 800; font-stretch: 115%; font-variant-numeric: tabular-nums; }
.espacio-cifra span { color: var(--lime); font-size: .875rem; font-weight: 700; }
.resumen-espacio small { color: var(--on-night-muted); font-size: .8rem; line-height: 1.4; }
.espacio-barra { height: 8px; border-radius: 4px; background: var(--night-line); overflow: hidden; margin: 4px 0 2px; }
.espacio-barra span { display: block; height: 100%; background: var(--lime); border-radius: 4px; transition: width .2s; }
.espacio-barra span.lleno { background: #f2a33a; }
.resumen-tabla th, .resumen-tabla td { padding: 9px 0; border-top: 1px solid var(--night-line); text-align: left; font-weight: 400; }
.resumen-tabla td { color: #fff; }
.resumen-tabla td:nth-child(2) { text-align: center; width: 3.5em; color: var(--on-night-muted); }
.resumen-tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.resumen-total { margin: 8px 0 22px; padding-top: 14px; border-top: 2px solid var(--lime); display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; }
.resumen-total span { color: var(--on-night-muted); }
.resumen-total strong { color: #fff; font-size: 1.75rem; font-stretch: 120%; font-weight: 800; font-variant-numeric: tabular-nums; }
.resumen-total small { grid-column: 1 / -1; color: var(--on-night-muted); font-size: .8rem; }
.resumen-base { margin: 0 0 8px; font-weight: 700; color: #fff; font-size: .9rem; }
.resumen-incluye ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .925rem; }
.resumen-incluye li { position: relative; padding-left: 20px; line-height: 1.4; }
.resumen-incluye li::before { content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; background: var(--lime); }
.calc-done { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .calc-done { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }

/* ---------- Analitzador de domini ---------- */
.tool-card { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--lime); border-radius: 12px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 24px 48px -28px rgba(29, 33, 37, .35); }
.tool-card .form { gap: 16px; }
.tool-card .btn { width: 100%; }
.input-lg { font-size: 1.25rem !important; font-weight: 700; min-height: 56px !important; }
.tool-note { margin: 0; font-size: .85rem; color: var(--muted); }
.hero-checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.hero-checks li { display: flex; align-items: center; gap: 12px; }
.hero-checks .icon { color: var(--lime-ink); flex: none; }

.informe-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: center; margin-bottom: 36px; }
.informe-head h1 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); margin: 4px 0 10px; }
.informe-dom { margin: 0; font-weight: 700; color: var(--lime-ink); font-stretch: 112%; }
.informe-meta { margin: 0; color: var(--muted); }
.grade { width: clamp(110px, 16vw, 150px); aspect-ratio: 1; border-radius: 16px; display: grid; place-content: center; text-align: center; color: #fff; background: var(--night); }
.grade span { font-size: clamp(3.5rem, 8vw, 5rem); font-weight: 800; font-stretch: 125%; line-height: 1; }
.grade small { font-size: .95rem; opacity: .85; }
.grade-a, .grade-b { background: var(--lime-ink); }
.grade-c { background: #a86b00; }
.grade-d, .grade-e { background: #b3261e; }
@media (max-width: 560px) { .informe-head { grid-template-columns: 1fr; } }

.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.checks li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 10px; }
.checks h3 { font-size: 1.0625rem; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.checks p { margin: 0; color: #33383c; }
.check-consejo { margin-top: 8px !important; color: var(--muted) !important; font-size: .95rem; }
.check-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--graphite); }
.check-pill { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.check-ok { border-left-color: var(--lime) !important; }
.check-ok .check-ico, .check-ok .check-pill { background: var(--lime-soft); color: var(--lime-ink); }
.check-aviso { border-left-color: #e3a325 !important; }
.check-aviso .check-ico, .check-aviso .check-pill { background: #fdf3dc; color: #8a5800; }
.check-mal { border-left-color: #d9534a !important; }
.check-mal .check-ico, .check-mal .check-pill { background: #fde8e4; color: #b3261e; }
@media (max-width: 860px) { .checks { grid-template-columns: 1fr; } }
.field input[type="checkbox"], .check input[type="checkbox"] { min-height: 0; width: 20px; height: 20px; padding: 0; margin-top: 2px; flex: none; }

/* Banda d'eines (portada) */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tool { display: grid; gap: 14px; align-content: start; padding: clamp(24px, 3vw, 36px); border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tool-dark { background: var(--night); border-color: var(--night); color: var(--on-night); }
.tool-dark h3 { color: #fff; }
.tool-dark p { color: var(--on-night-muted); }
.tool h3 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-stretch: 120%; font-weight: 800; margin: 0; }
.tool p { margin: 0; }
.tool .tile-ico { margin: 0; }
.tool-dark .tile-ico { background: rgba(141, 198, 63, .16); color: var(--lime); }
.tool-inline { display: flex; gap: 10px; margin-top: 6px; }
.tool-inline input { flex: 1; min-width: 0; min-height: 52px; padding: 0 14px; font: inherit; font-size: 1.0625rem; border: 1px solid var(--night-line); border-radius: var(--radius); background: var(--night-2); color: #fff; }
.tool-inline input::placeholder { color: var(--on-night-muted); }
.tool-inline input:focus { outline: 3px solid var(--lime); outline-offset: 0; }
@media (max-width: 800px) { .tools { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .tool-inline { flex-direction: column; } }

.counter-wide { max-width: 420px; }
.counter-wide .hint { max-width: 36em; }

/* Espai al núvol (preus) */
.storage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.storage-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.storage-price strong { font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 800; font-stretch: 120%; line-height: 1; }
.storage-price span { color: var(--muted); }
.storage-examples { width: 100%; border-collapse: collapse; background: var(--surface); border-top: 2px solid var(--ink); }
.storage-examples th, .storage-examples td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.storage-examples thead th { font-size: .9rem; color: var(--muted); font-weight: 700; }
.storage-examples .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 860px) { .storage { grid-template-columns: 1fr; } }

/* Preguntes freqüents */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 20px 0; font-weight: 700; font-stretch: 108%; color: var(--ink); line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 300; line-height: 1; color: var(--ink); }
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.faq details p { margin: 0 0 22px; max-width: 64ch; color: var(--muted); }
.dark .faq summary, .dark .faq summary::after { color: #fff; }

/* Sectors */
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 2px solid var(--ink); }
.sectors > li { padding: 32px 0; border-bottom: 1px solid var(--line); }
.sectors h2 { font-size: 1.375rem; margin: 0 0 8px; }
.sectors .sector-reto { margin: 0 0 14px; color: var(--muted); }
.sectors ul { margin: 0 0 14px; padding-left: 18px; }
.sectors ul li { margin-bottom: 6px; }
.sectors .sector-norma { margin: 0; font-size: .925rem; }
.sectors .sector-norma strong { color: var(--ink); }
@media (max-width: 900px) { .sectors { grid-template-columns: 1fr; } }

/* ---------- Assistent de xat ---------- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.chat-fab svg { color: var(--lime); }
.chat-fab:hover { background: #000; }
.chat-panel { position: fixed; right: 20px; bottom: 20px; z-index: 61; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.25); overflow: hidden; }
.chat-panel[hidden], .chat-fab[hidden] { display: none; }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--ink); color: #fff; }
.chat-head strong { font-stretch: 112%; }
.chat-head small { display: block; color: var(--on-night-muted); font-size: .8rem; margin-top: 2px; }
.chat-badge { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: var(--lime); color: var(--ink); font-size: .7rem; font-weight: 800; vertical-align: 2px; }
.chat-close { border: 0; background: transparent; color: #fff; padding: 4px; cursor: pointer; border-radius: 6px; }
.chat-close:hover { background: rgba(255,255,255,.1); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f3f5f4; }
.chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: .925rem; line-height: 1.5; }
.chat-msg p { margin: 0 0 .5em; } .chat-msg p:last-child { margin-bottom: 0; }
.chat-msg ul { margin: .2em 0 .5em; padding-left: 1.2em; } .chat-msg li { margin-bottom: .2em; }
.chat-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink); }
.chat-user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat-bot a { color: var(--lime-ink); font-weight: 600; }
.chat-dots { display: inline-flex; gap: 4px; } .chat-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: chatdot 1s infinite ease-in-out; }
.chat-dots i:nth-child(2) { animation-delay: .15s; } .chat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chatdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .chat-dots i { animation: none; opacity: .6; } }
.chat-sugs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: #f3f5f4; }
.chat-sugs:empty { display: none; }
.chat-sugs button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .825rem; padding: 6px 10px; border-radius: 999px; cursor: pointer; text-align: left; }
.chat-sugs button:hover { border-color: var(--lime); background: var(--lime-soft); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: .95rem; line-height: 1.4; max-height: 120px; }
.chat-form textarea:focus { outline: 2px solid var(--lime); border-color: transparent; }
.chat-send { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--lime); color: var(--ink); cursor: pointer; }
.chat-legal { margin: 0; padding: 0 14px 10px; font-size: .72rem; line-height: 1.4; color: var(--muted); }
@media (max-width: 520px) {
  .chat-fab span { display: none; }
  .chat-fab { padding: 14px; right: 16px; bottom: 16px; }
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
}
@media print { .chat-fab, .chat-panel { display: none !important; } }
