/* ==========================================================
   Zevix Cybersecurity — Full d'estils principal
   Tema fosc corporatiu (blau / cian) + tipografia Inter / JetBrains Mono
   ========================================================== */

:root {
  /* Paleta "informe d'auditoria": negre neutre + un sol accent (ambre) + colors de gravetat */
  --bg: #0b0c0d;
  --bg-2: #101113;
  --surface: #141518;
  --surface-2: #1a1c20;
  --border: #2a2d32;
  --text: #e8e6e1;
  --muted: #8d9096;
  --primary: #f5a524;
  --primary-2: #f5a524;
  --accent: #f5a524;
  --ok: #22c55e;
  --warn: #eab308;
  --high: #f97316;
  --danger: #ef4444;
  --radius: 3px;
  --shadow: none;
  --grad: linear-gradient(var(--primary), var(--primary));
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
code, .mono { font-family: var(--mono); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 90px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .8rem; color: var(--primary);
  text-transform: uppercase; letter-spacing: .15em; margin-bottom: 12px;
}
.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: 8px;
  padding: 11px 22px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: .2s; font-family: inherit;
  text-decoration: none !important; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #0b0c0d; box-shadow: 0 6px 24px rgba(245, 165, 36, .25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245, 165, 36, .35); }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 12, 13, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.2rem; }
.logo:hover { text-decoration: none; }
.logo img { width: 36px; height: 36px; }
.logo span small { display: block; font-size: .62rem; font-weight: 500; color: var(--muted); letter-spacing: .2em; font-family: var(--mono); }
.nav-links { display: flex; list-style: none; gap: 4px; }
.nav-links a {
  color: var(--muted); padding: 8px 10px; border-radius: 8px; font-size: .92rem; font-weight: 500; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; cursor: pointer; }

@media (max-width: 1300px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 70px; left: 0; right: 0; background: var(--bg-2);
    border-bottom: 1px solid var(--border); padding: 16px 20px 22px;
    display: none; flex-direction: column; gap: 14px;
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; }
  .nav-actions { flex-direction: column; align-items: stretch; }
}
@media (min-width: 1301px) { .nav-menu { display: flex; align-items: center; gap: 18px; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 110px 0 90px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 15% 10%, rgba(245, 165, 36, .16), transparent 70%),
    radial-gradient(600px 340px at 90% 30%, rgba(245, 165, 36, .18), transparent 70%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0; opacity: .25; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 20px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 30px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 22px; margin-top: 36px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.hero-badges strong { display: block; font-size: 1.6rem; color: var(--text); }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: .82rem; color: var(--muted); margin-bottom: 22px;
}
.badge-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

/* Terminal */
.terminal {
  background: #050810; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 60px rgba(245, 165, 36, .08); overflow: hidden; font-family: var(--mono); font-size: .84rem;
}
.terminal-bar { display: flex; gap: 7px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--border); align-items: center; }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: 10px; color: var(--muted); font-size: .76rem; }
.terminal-body { padding: 18px; min-height: 290px; white-space: pre-wrap; color: #cbd5e1; }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-bad { color: var(--danger); } .t-cy { color: var(--primary); } .t-mu { color: #64748b; }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--primary); vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Targetes ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: .25s; position: relative;
}
.card:hover { border-color: rgba(245, 165, 36, .45); transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .95rem; }
.icon-box {
  width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(245, 165, 36, .1); border: 1px solid rgba(245, 165, 36, .25); color: var(--primary);
}
.icon-box svg { width: 24px; height: 24px; }
.card .tag { font-family: var(--mono); font-size: .72rem; color: var(--primary); margin-top: 14px; display: inline-block; }

/* Passos */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: 0; top: 0; font-family: var(--mono); font-weight: 700; font-size: 1.1rem;
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--primary);
}

/* CTA */
.cta-band {
  background: linear-gradient(135deg, rgba(245, 165, 36, .12), rgba(245, 165, 36, .12));
  border: 1px solid var(--border); border-radius: 20px; padding: 50px; text-align: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.cta-band p { color: var(--muted); margin-bottom: 26px; }

/* ---------- Page header ---------- */
.page-header { padding: 80px 0 60px; text-align: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.page-header::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 260px at 50% 0%, rgba(245, 165, 36, .14), transparent 70%); pointer-events: none;
}
.page-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 14px; position: relative; }
.page-header p { color: var(--muted); max-width: 680px; margin: 0 auto; font-size: 1.08rem; position: relative; }
.breadcrumb { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 18px; position: relative; }

/* ---------- Serveis detall ---------- */
.service-detail { display: grid; grid-template-columns: 80px 1fr; gap: 26px; padding: 36px; }
.service-detail .icon-box { width: 70px; height: 70px; }
.service-detail .icon-box svg { width: 32px; height: 32px; }
.service-detail ul { list-style: none; margin: 16px 0; display: grid; gap: 8px; }
.service-detail li { padding-left: 26px; position: relative; color: var(--muted); }
.service-detail li::before { content: "›"; position: absolute; left: 6px; color: var(--primary); font-weight: 700; }
.benefit { margin-top: 14px; padding: 14px 18px; border-left: 3px solid var(--primary); background: rgba(245, 165, 36, .06); border-radius: 0 10px 10px 0; font-size: .93rem; }
.benefit strong { color: var(--primary); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tools span { font-family: var(--mono); font-size: .74rem; padding: 4px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }

/* ---------- Equip ---------- */
.member { text-align: center; padding: 34px 26px; }
.avatar {
  width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 800; color: #0b0c0d; background: var(--grad); position: relative; overflow: hidden;
  box-shadow: 0 0 0 5px var(--bg-2), 0 0 0 6px var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.member .role { font-family: var(--mono); color: var(--primary); font-size: .82rem; margin: 6px 0 14px; }
.member .studies { font-size: .88rem; color: var(--text); margin-bottom: 12px; }
.member .likes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.member .likes span { font-size: .76rem; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.member .socials { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

/* ---------- Tarifes ---------- */
.billing-toggle { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 40px; color: var(--muted); }
.switch { position: relative; width: 52px; height: 28px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); transition: .2s; }
.switch.on::after { left: 27px; }
.save { font-size: .75rem; color: var(--ok); border: 1px solid rgba(52, 211, 153, .4); padding: 2px 8px; border-radius: 999px; }
.price-card { display: flex; flex-direction: column; padding: 34px 30px; }
.price-card.featured { border-color: var(--primary); background: linear-gradient(180deg, rgba(245, 165, 36, .08), var(--surface) 40%); }
.price-card .ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #0b0c0d; font-size: .75rem; font-weight: 700; padding: 5px 14px; border-radius: 999px;
}
.price-card .level { font-family: var(--mono); font-size: .78rem; color: var(--primary); letter-spacing: .1em; text-transform: uppercase; }
.price-card h3 { font-size: 1.5rem; margin: 6px 0 8px; }
.price-card .desc { color: var(--muted); font-size: .92rem; min-height: 48px; }
.price { font-size: 2.8rem; font-weight: 800; margin: 22px 0 4px; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.price-note { font-size: .8rem; color: var(--muted); margin-bottom: 22px; }
.features { list-style: none; display: grid; gap: 11px; margin-bottom: 30px; flex: 1; }
.features li { display: flex; gap: 10px; font-size: .93rem; }
.features li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.features li.no { color: #5b6886; }
.features li.no::before { content: "✕"; color: #5b6886; }

table.compare { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.compare th, table.compare td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: center; }
table.compare th:first-child, table.compare td:first-child { text-align: left; }
table.compare thead th { background: var(--surface-2); font-size: .85rem; }
table.compare tbody tr:hover { background: var(--surface); }
.yes { color: var(--ok); font-weight: 700; } .nope { color: #5b6886; }

/* ---------- Sobre ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split p { color: var(--muted); margin-bottom: 16px; }
.timeline { position: relative; padding-left: 30px; border-left: 2px solid var(--border); display: grid; gap: 30px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -38px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--bg); }
.timeline-item .date { font-family: var(--mono); color: var(--primary); font-size: .8rem; }
.timeline-item h4 { margin: 4px 0 6px; }
.timeline-item p { color: var(--muted); font-size: .93rem; }
.value-quote { font-size: 1.35rem; font-weight: 600; border-left: 4px solid var(--primary); padding-left: 22px; margin: 20px 0; }

/* ---------- Formularis ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: .95rem; transition: .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(245, 165, 36, .15); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field .error { font-size: .78rem; color: var(--danger); margin-top: 5px; display: none; }
.field.invalid .error { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--primary); }
.alert { padding: 13px 16px; border-radius: 10px; font-size: .92rem; display: none; }
.alert.show { display: block; }
.alert-ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .4); color: var(--ok); }
.alert-err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .4); color: var(--danger); }
.alert-info { background: rgba(245, 165, 36, .07); border: 1px solid rgba(245, 165, 36, .3); color: var(--text); }

.contact-info { display: grid; gap: 18px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .icon-box { margin: 0; flex-shrink: 0; width: 46px; height: 46px; }
.contact-item h4 { font-size: .98rem; margin-bottom: 2px; }
.contact-item p { color: var(--muted); font-size: .92rem; }
.map-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); height: 260px; }
.map-box iframe { width: 100%; height: 100%; border: 0; filter: invert(.9) hue-rotate(180deg); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  background: var(--bg-2); border-right: 1px solid var(--border);
  padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.auth-side h2 { font-size: 2rem; margin-bottom: 14px; }
.auth-side p { color: var(--muted); margin-bottom: 26px; }
.auth-side ul { list-style: none; display: grid; gap: 14px; }
.auth-side li { display: flex; gap: 12px; color: var(--muted); }
.auth-side li::before { content: "◆"; color: var(--primary); }
.auth-main { display: grid; place-items: center; padding: 50px 20px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-card > p { color: var(--muted); margin-bottom: 28px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 5px; margin-bottom: 22px; }
.role-switch button { padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; font-family: inherit; }
.role-switch button.active { background: var(--surface-2); color: var(--primary); }
.demo-box { margin-top: 22px; font-size: .82rem; padding: 14px 16px; border-radius: 10px; border: 1px dashed var(--border); color: var(--muted); }
.demo-box code { color: var(--primary); }
.password-meter { height: 5px; border-radius: 4px; background: var(--border); margin-top: 8px; overflow: hidden; }
.password-meter span { display: block; height: 100%; width: 0; transition: .3s; }

/* ---------- Portal (dashboard) ---------- */
.portal { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 70px); }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--border); padding: 26px 16px; }
.sidebar h5 { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .15em; text-transform: uppercase; margin: 0 10px 12px; }
.sidebar a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: .92rem; margin-bottom: 3px; }
.sidebar a:hover, .sidebar a.active { background: var(--surface); color: var(--text); text-decoration: none; }
.sidebar a.active { color: var(--primary); }
.portal-main { padding: 34px; overflow-x: hidden; }
.portal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.portal-top h1 { font-size: 1.7rem; }
.portal-top p { color: var(--muted); }
.stat { padding: 22px; }
.stat .label { color: var(--muted); font-size: .84rem; }
.stat .value { font-size: 2rem; font-weight: 800; margin-top: 6px; }
.stat .value.critical { color: var(--danger); } .stat .value.high { color: var(--high); } .stat .value.medium { color: var(--warn); } .stat .value.low { color: var(--ok); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 22px; }
.panel h3 { font-size: 1.08rem; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sev { font-family: var(--mono); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; text-transform: uppercase; display: inline-block; }
.sev.critical { background: rgba(248, 113, 113, .15); color: var(--danger); }
.sev.high { background: rgba(251, 146, 60, .15); color: var(--high); }
.sev.medium { background: rgba(251, 191, 36, .15); color: var(--warn); }
.sev.low { background: rgba(52, 211, 153, .15); color: var(--ok); }
.risk-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; margin: 10px 0 14px; }
.risk-bar span { display: block; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.on { color: var(--ok); } .status.off { color: var(--danger); } .status.idle { color: var(--warn); }
.log { font-family: var(--mono); font-size: .8rem; background: #050810; border: 1px solid var(--border); border-radius: 10px; padding: 16px; max-height: 260px; overflow: auto; color: #94a3b8; white-space: pre; }

@media (max-width: 860px) {
  .portal { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; gap: 6px; padding: 12px; }
  .sidebar h5 { display: none; }
  .sidebar a { white-space: nowrap; margin: 0; }
  .portal-main { padding: 22px 16px; }
}

/* ---------- Blog ---------- */
.post { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-cover { height: 170px; display: grid; place-items: center; position: relative; overflow: hidden; }
.post-cover svg { width: 64px; height: 64px; color: rgba(255, 255, 255, .9); position: relative; }
.post-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; gap: 12px; font-size: .78rem; color: var(--muted); font-family: var(--mono); margin-bottom: 10px; flex-wrap: wrap; }
.post-meta .cat { color: var(--primary); }
.post h3 { font-size: 1.12rem; margin-bottom: 10px; }
.post p { flex: 1; }
.post .more { margin-top: 16px; font-weight: 600; font-size: .9rem; background: none; border: 0; color: var(--primary); cursor: pointer; text-align: left; padding: 0; font-family: inherit; }
.post .full { display: none; margin-top: 12px; color: var(--muted); font-size: .93rem; }
.post .full.open { display: block; }
.post .full p { margin-bottom: 10px; }
.filters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.filters button { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-family: inherit; font-size: .87rem; }
.filters button.active, .filters button:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Footer ---------- */
.trusted { padding: 50px 0; border-top: 1px solid var(--border); background: var(--bg-2); }
.trusted p { text-align: center; color: var(--muted); font-size: .85rem; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 26px; }
.logos { display: flex; justify-content: center; align-items: center; gap: 46px; flex-wrap: wrap; }
.logos .client-logo { display: flex; align-items: center; gap: 9px; color: #6b7a99; font-weight: 700; font-size: 1.05rem; transition: .2s; }
.logos .client-logo:hover { color: var(--text); }
.logos .client-logo svg { width: 28px; height: 28px; }
footer.site-footer { border-top: 1px solid var(--border); padding: 60px 0 26px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { font-size: .9rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: grid; gap: 9px; }
.footer-grid ul a { color: var(--muted); font-size: .9rem; }
.footer-grid ul a:hover { color: var(--primary); }
.footer-about p { color: var(--muted); font-size: .9rem; margin: 14px 0 18px; max-width: 320px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.socials a:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }
.socials svg { width: 17px; height: 17px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.newsletter { display: flex; gap: 8px; margin-top: 10px; }
.newsletter input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: inherit; }

/* ---------- Animacions ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

.back-top {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--primary); cursor: pointer;
  display: grid; place-items: center; opacity: 0; pointer-events: none; transition: .3s; z-index: 90; font-size: 1.1rem;
}
.back-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1300px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .split { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 680px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 1fr; padding: 26px; }
  .cta-band { padding: 34px 22px; }
  .hero { padding: 70px 0 60px; }
  .logos { gap: 26px; }
}

/* Mida de les icones dins de botons i de la barra lateral */
.btn svg, .sidebar a svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-item .icon-box svg { width: 22px; height: 22px; }

/* ---------- Scroll World (món 3D controlat pel scroll) ---------- */
.world { position: relative; height: 750vh; background: var(--bg); }
.world-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.world-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(11, 12, 13, .8) 100%);
}
.world-stage { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; pointer-events: none; }
.world-stage.active { opacity: 1; transform: none; pointer-events: auto; }

/* Intro i final: text centrat sobre el món */
.world-intro, .world-outro {
  position: absolute; left: 50%; top: 50%; width: min(820px, calc(100% - 32px));
  translate: -50% -50%; text-align: center; padding: 34px 28px; border-radius: 20px;
  background: radial-gradient(ellipse at center, rgba(11, 12, 13, .78) 0%, rgba(11, 12, 13, .55) 60%, transparent 100%);
}
.world-intro h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: 18px; }
.world-intro .lead { font-size: 1.1rem; color: var(--muted); margin: 0 auto 28px; max-width: 620px; }
.world-intro .hero-cta { justify-content: center; }
.world-outro h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 12px; }
.world-outro p { color: var(--muted); margin-bottom: 26px; }

/* Targetes de cada fase */
.world-caps { position: absolute; left: max(20px, calc((100% - var(--max)) / 2 + 20px)); bottom: 11vh; }
.world-cap {
  position: absolute; left: 0; bottom: 0; width: min(440px, calc(100vw - 40px));
  background: rgba(16, 17, 19, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.world-cap .num { font-family: var(--mono); color: var(--primary); font-size: .8rem; letter-spacing: .12em; }
.world-cap h3 { font-size: 1.5rem; margin: 6px 0 8px; }
.world-cap p { color: var(--muted); font-size: .95rem; }
.world-cap .tools { margin-top: 12px; }

.world-progress { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); list-style: none; display: grid; gap: 16px; }
.world-progress li { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-family: var(--mono); font-size: .75rem; color: var(--muted); cursor: pointer; }
.world-progress li::after { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border); transition: .3s; }
.world-progress li.active { color: var(--primary); }
.world-progress li.active::after { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 12px var(--primary); }
.world-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(245, 165, 36, .1); }
.world-bar span { display: block; height: 100%; width: 0; background: var(--grad); }
.world-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: .8rem; color: var(--muted); transition: opacity .4s; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { margin-bottom: 8px; } }
@media (max-width: 680px) {
  .world-progress { right: 10px; }
  .world-progress span { display: none; }
  .world-cap { padding: 18px; width: calc(100vw - 52px); }
  .world-caps { bottom: 6vh; left: 16px; }
  .world-intro .lead { font-size: 1rem; }
}

/* Alternativa sense WebGL: tot el contingut com a seccions estàtiques */
.world.world-fallback { height: auto; }
.world-fallback .world-sticky { position: static; height: auto; padding: 60px 0; overflow: visible; }
.world-fallback canvas, .world-fallback .world-vignette, .world-fallback .world-progress,
.world-fallback .world-hint, .world-fallback .world-bar { display: none; }
.world-fallback .world-stage { opacity: 1; transform: none; pointer-events: auto; }
.world-fallback .world-intro, .world-fallback .world-outro { position: static; translate: none; margin: 30px auto; background: none; }
.world-fallback .world-caps { position: static; max-width: var(--max); margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.world-fallback .world-cap { position: static; width: auto; }

/* ==========================================================
   ESTIL "INFORME D'AUDITORIA"
   La web adopta el llenguatge visual d'un expedient de pentesting:
   tipografia monoespaiada, línies fines, cantonades rectes,
   referències de document (ZVX-...) i colors de gravetat (CVSS).
   ========================================================== */

h1, h2 { font-family: var(--mono); font-weight: 600; letter-spacing: -.02em; }
h3, h4 { letter-spacing: -.005em; }
.grad-text { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--primary); }
::selection { background: var(--primary); color: #0b0c0d; }

/* Botons */
.btn { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; border-radius: 2px; font-weight: 600; }
.btn-lg { padding: 14px 24px; font-size: .84rem; }
.btn-primary { background: var(--primary); color: #0b0c0d; box-shadow: none; }
.btn-primary:hover { transform: none; box-shadow: none; background: #ffb84a; }
.btn-outline:hover { border-color: var(--text); color: var(--text); }

/* Navbar i wordmark */
.navbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.logo { font-family: var(--mono); font-weight: 600; font-size: 1.05rem; letter-spacing: .04em; gap: 8px; }
.logo .logo-mark { color: var(--primary); font-weight: 500; }
.logo-cursor { display: inline-block; width: .55em; height: 1em; background: var(--primary); vertical-align: -2px; margin-left: 2px; animation: blink 1.1s step-end infinite; }
.nav-links a { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; border-radius: 2px; }
.nav-links a:hover { background: none; color: var(--text); }
.nav-links a.active { background: none; color: var(--primary); }
.nav-links a.active::before { content: "> "; }

/* Targetes: planes, sense ombres ni moviment */
.card { border-radius: var(--radius); }
.card:hover { transform: none; box-shadow: none; border-color: #3a3e44; }
.icon-box { border-radius: 2px; background: none; border-color: var(--border); }

/* Capçaleres de pàgina = portada de document */
.page-header { text-align: left; padding: 52px 0 44px; }
.page-header::before { display: none; }
.page-header h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-header p { margin: 0; max-width: 720px; }
.breadcrumb { margin-bottom: 12px; }
.doc-strip {
  display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: .7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 8px 0; margin-bottom: 30px;
}
.doc-strip span:first-child { color: var(--primary); }

.section-head { text-align: left; max-width: none; margin: 0 0 36px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { max-width: 720px; }

/* Fitxa d'expedient */
.fitxa { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); }
.fitxa-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.fitxa-head .ref { color: var(--primary); }
.fitxa-body { padding: 24px 20px; }
.fitxa-body > h2, .fitxa-body > h3 { font-size: 1.35rem; margin-bottom: 8px; }
.fitxa-body > p { color: var(--muted); }
.fields { width: 100%; border-collapse: collapse; font-size: .93rem; margin-top: 16px; }
.fields th {
  text-align: left; vertical-align: top; width: 150px; padding: 11px 14px 11px 0; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.fields td { padding: 11px 0; border-top: 1px solid var(--border); }
.fields ul { list-style: none; display: grid; gap: 4px; }
.fields li::before { content: "– "; color: var(--muted); }
.fields code, .mono-list { font-family: var(--mono); font-size: .85rem; color: var(--primary); }
@media (max-width: 600px) { .fields th { width: 96px; } }

/* Llista numerada (substitueix les graelles de targetes) */
.num-list { list-style: none; counter-reset: n; border-top: 1px solid var(--border); }
.num-list li { counter-increment: n; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.num-list li::before { content: counter(n, decimal-leading-zero); font-family: var(--mono); color: var(--primary); font-size: 1.3rem; line-height: 1.2; }
.num-list h3 { font-size: 1.08rem; margin-bottom: 6px; }
.num-list p { color: var(--muted); }

/* Gravetat */
.sev.info { background: rgba(141, 144, 150, .15); color: var(--muted); }
.sev.high { color: var(--high); background: rgba(249, 115, 22, .15); }

/* Text censurat: es descobreix en passar-hi el ratolí */
.redacted { background: var(--text); color: transparent; padding: 0 4px; cursor: help; transition: background .25s, color .25s; border-radius: 1px; }
.redacted:hover, .redacted:focus { background: transparent; color: var(--primary); outline: none; }

/* Segell */
.stamp {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: .95rem; letter-spacing: .18em; color: var(--ok);
  border: 3px solid var(--ok); padding: 6px 16px; transform: rotate(-6deg); margin-bottom: 20px; opacity: .9;
}

/* Equip: fotos quadrades en blanc i negre */
.member { text-align: left; padding: 0; overflow: hidden; }
.avatar {
  width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; margin: 0; box-shadow: none;
  background: var(--surface-2); color: var(--primary); font-family: var(--mono); font-size: 3rem; border-bottom: 1px solid var(--border);
}
.avatar img { filter: grayscale(1) contrast(1.05); }
.member .fitxa-body h3 { font-size: 1.2rem; margin-bottom: 2px; }
.member .socials { justify-content: flex-start; margin-top: 16px; }

/* Tarifes */
.price-card.featured { background: var(--surface); }
.price-card .ribbon { background: var(--primary); color: #0b0c0d; font-family: var(--mono); letter-spacing: .1em; border-radius: 2px; }
.price { font-family: var(--mono); font-weight: 600; letter-spacing: -.03em; }
.switch, .switch::after { border-radius: 2px; }
.save { border-radius: 2px; font-family: var(--mono); }

/* Blog: capçalera de butlletí en lloc de portades amb degradat */
.post-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.filters button { border-radius: 2px; font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }

/* Taules */
table.compare thead th { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }

/* Formularis i login */
.field input, .field select, .field textarea { border-radius: 2px; }
.field label { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 500; color: var(--muted); }
.role-switch, .role-switch button, .alert, .demo-box { border-radius: 2px; }
.role-switch button { font-family: var(--mono); text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; }
.badge-pill { border-radius: 2px; font-family: var(--mono); }

/* Footer: tancament del document */
.trusted p { letter-spacing: .1em; }
.logos .client-logo { font-family: var(--mono); font-weight: 500; font-size: .9rem; color: #5d6066; }
.footer-grid h4 { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
.footer-bottom { font-family: var(--mono); font-size: .72rem; }
.socials a, .back-top, .newsletter input { border-radius: 2px; }

/* ---------- Scroll World amb estil d'informe ---------- */
.world-vignette { background: radial-gradient(ellipse at center, transparent 55%, rgba(11, 12, 13, .85) 100%); }
.world-docbar {
  position: absolute; top: 70px; left: 0; right: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: center;
  padding: 8px 16px; border-bottom: 1px solid var(--border); background: rgba(11, 12, 13, .9);
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.world-docbar span:first-child { color: var(--primary); }
.world-intro {
  left: max(16px, calc((100% - var(--max)) / 2 + 20px)); translate: 0 -50%; text-align: left; width: min(720px, calc(100% - 32px));
  background: rgba(11, 12, 13, .88); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 30px 28px;
}
.world-intro .doc-kicker, .world-outro .doc-kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--primary); text-transform: uppercase; margin-bottom: 14px; }
.world-intro h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: 20px; }
.world-intro .hero-cta { justify-content: flex-start; margin-top: 24px; }
.world-intro .fields { margin-top: 0; font-size: .9rem; }
.world-outro { background: rgba(11, 12, 13, .88); border: 1px solid var(--border); border-radius: var(--radius); }
.world-cap { background: rgba(16, 17, 19, .92); backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; border-radius: var(--radius); }
.world-cap .fitxa-head { padding: 9px 18px; }
.world-cap .fitxa-body { padding: 18px; }
.world-cap h3 { font-size: 1.3rem; margin: 0 0 8px; }
.world-cap .fields { margin-top: 12px; font-size: .86rem; }
.world-cap .fields th { width: 90px; padding: 8px 10px 8px 0; }
.world-cap .fields td { padding: 8px 0; }
.world-progress li { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.world-progress li::after { border-radius: 0; width: 18px; height: 2px; border: 0; background: var(--border); }
.world-progress li.active::after { background: var(--primary); box-shadow: none; width: 30px; }
.world-bar span { background: var(--primary); }
@media (max-width: 680px) {
  .world-docbar { justify-content: flex-start; font-size: .62rem; }
  .world-docbar span:nth-child(n+3) { display: none; }
  .world-intro { padding: 22px 18px; top: 54%; }
  .world-intro .fields th { width: 84px; }
  .world-intro .fields tr:nth-child(n+3) { display: none; }
}
/* El món 3D comença just sota la navbar (sense forat a dalt) */
.world { margin-top: -70px; }
.member .fields th { width: 96px; }
.timeline-item::before { border-radius: 0; width: 12px; height: 12px; left: -37px; }
.post-meta .cat { display: none; }

/* ---------- Recreació de l'eina (tkinter) a Serveis ---------- */
.tool-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.app-window { border: 1px solid #3a3e44; background: #dcdad5; color: #1c1c1c; font-family: "Helvetica", Arial, sans-serif; font-size: .82rem; border-radius: 4px; overflow: hidden; }
.app-title { display: flex; align-items: center; gap: 6px; background: #2d2f33; color: #d6d3cc; padding: 7px 10px; font-size: .78rem; }
.app-title i { width: 10px; height: 10px; border-radius: 50%; background: #555; display: block; }
.app-title span { margin-left: 8px; }
.app-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid #9a9893; }
.app-tabs span { padding: 5px 10px; background: #cfcdc8; border: 1px solid #9a9893; border-bottom: 0; font-size: .74rem; }
.app-tabs span.on { background: #dcdad5; font-weight: 700; }
.app-form { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; padding: 16px 14px; }
.app-form label { font-weight: 700; }
.app-form .app-check { font-weight: 400; grid-column: 1 / -1; }
.app-input { background: #fff; border: 1px solid #9a9893; padding: 3px 6px; max-width: 240px; }
.app-btn { justify-self: start; background: #e8e6e1; border: 1px solid #77756f; padding: 5px 14px; }
.app-console { margin: 0 10px 10px; border: 1px solid #9a9893; padding: 8px; }
.app-console-label { font-size: .72rem; margin-bottom: 6px; }
.app-console pre, .app-cli pre {
  background: #1e1e1e; color: #00ff00; font-family: Consolas, var(--mono); font-size: .74rem; line-height: 1.5;
  padding: 12px; margin: 0; overflow-x: auto; white-space: pre;
}
.app-cli { border: 1px solid var(--border); background: #1e1e1e; border-radius: 4px; padding: 10px; }
.app-cli .app-console-label { color: var(--muted); font-family: var(--mono); }
.app-cli pre { padding: 4px 2px; }
.dim { color: #5f8f5f; }
.caption { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: 14px; }
.risk-table td { text-align: left !important; vertical-align: top; font-size: .86rem; }
.risk-table td:nth-child(4), .risk-table td:nth-child(5) { text-align: center !important; font-family: var(--mono); }
.risk-table .sev { white-space: nowrap; }
.pending { color: var(--warn); font-style: normal; font-family: var(--mono); font-size: .8rem; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .app-form { grid-template-columns: 1fr; } .app-tabs span:nth-child(n+3) { display: none; } }

/* Captures reals de l'eina */
.tool-grid { grid-template-columns: 1fr; }
.tool-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shot { margin: 0; border: 1px solid #3a3e44; border-radius: 4px; overflow: hidden; background: #dcdad5; }
.shot-bar { display: flex; align-items: center; gap: 6px; background: #2d2f33; color: #d6d3cc; padding: 7px 10px; font-size: .74rem; font-family: Helvetica, Arial, sans-serif; }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #555; display: block; }
.shot-bar span { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-size: .72rem; padding: 8px 12px; border-top: 1px solid var(--border); }
.app-cli { max-width: 720px; }
@media (max-width: 900px) { .tool-shots { grid-template-columns: 1fr; } }
table.compare td.mono { white-space: nowrap; }

/* ---------- Cas d'èxit: xifres destacades ---------- */
.stat-big .fitxa-body { padding: 22px 20px; }
.stat-big .num { font-family: var(--mono); font-size: 2.6rem; font-weight: 600; line-height: 1; margin-bottom: 8px; color: var(--primary); }
.stat-big .num.crit { color: var(--danger); }
.stat-big .num.ok { color: var(--ok); }
.stat-big p { color: var(--muted); }

/* ---------- Glossari ---------- */
.glossari { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; border-top: 1px solid var(--border); }
.gl-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.gl-item dt { font-family: var(--mono); font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.gl-item dd { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .glossari { grid-template-columns: 1fr; } }

/* ---------- Calculadora de pressupost ---------- */
.calc-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
.calc-result { border-left: 1px solid var(--border); padding-left: 36px; }
.calc-plan { font-family: var(--mono); font-size: 1.8rem; font-weight: 600; }
.calc-grid input[type=range] { width: 100%; accent-color: var(--primary); }
@media (max-width: 760px) { .calc-grid { grid-template-columns: 1fr; } .calc-result { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; } }

/* ---------- Portal: gràfics, pla de millora i re-auditoria ---------- */
.charts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
.chart-box { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.chart-box:last-child { display: block; }
.donut { width: 150px; height: 150px; }
.donut-n { fill: var(--text); font-family: var(--mono); font-size: 26px; font-weight: 600; }
.donut-l { fill: var(--muted); font-family: var(--mono); font-size: 10px; }
.chart-legend { list-style: none; display: grid; gap: 8px; min-width: 150px; }
.chart-legend li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart-legend strong { margin-left: auto; color: var(--text); }
.hbar { display: grid; grid-template-columns: 130px 1fr 30px; gap: 10px; align-items: center; margin-bottom: 10px; }
.hbar-host { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { display: flex; height: 14px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.hbar-n { text-align: right; font-size: .85rem; }
.pla-progress { height: 10px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.pla-progress span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .4s; }
.pla-list { list-style: none; display: grid; gap: 10px; }
.pla-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 3px; background: var(--bg-2); }
.pla-item select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 2px; padding: 6px 8px; font-family: var(--mono); font-size: .8rem; }
.pla-rec { color: var(--muted); font-size: .88rem; }
.pla-item.estat-corregida { opacity: .65; }
.pla-item.estat-corregida > div { text-decoration: line-through; text-decoration-color: var(--ok); }
.pla-item.estat-curs { border-color: var(--warn); }
.cmp-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cmp-form input[type=file] { color: var(--muted); font-size: .88rem; }
.cmp-stats { margin: 6px 0 10px; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } .pla-item { flex-direction: column; align-items: stretch; } }

/* ---------- Controls de la navbar: idioma i tema ---------- */
.nav-inner { gap: 14px; }
.nav-tools { display: flex; align-items: center; gap: 8px; order: 3; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.lang-switch button, .theme-toggle {
  background: transparent; color: var(--muted); border: 0; font-family: var(--mono); font-size: .7rem;
  padding: 5px 7px; cursor: pointer; letter-spacing: .04em;
}
.lang-switch button.active { background: var(--primary); color: #0b0c0d; }
.theme-toggle { border: 1px solid var(--border); border-radius: 2px; font-size: .9rem; padding: 3px 8px; }
.lang-switch button:hover, .theme-toggle:hover { color: var(--text); }
@media (max-width: 1300px) { .nav-tools { margin-left: auto; } }

/* ---------- Tema clar ---------- */
:root[data-theme="light"] {
  --bg: #F6F6F4; --bg-2: #EDEDEA; --surface: #FFFFFF; --surface-2: #F1F1EE; --border: #D6D6D1;
  --text: #16181B; --muted: #5E6269; --primary: #A85F00; --primary-2: #A85F00; --accent: #A85F00;
  --ok: #15803D; --warn: #A16207; --high: #C2410C; --danger: #C8281C;
}
:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .lang-switch button.active,
:root[data-theme="light"] .price-card .ribbon { background: #F5A524; color: #0b0c0d; }
:root[data-theme="light"] .logo-cursor { background: #F5A524; }
:root[data-theme="light"] .map-box iframe { filter: none; }
:root[data-theme="light"] .redacted { background: #16181B; }
/* Portada 3D en tema clar: capes de text clares sobre el món */
:root[data-theme="light"] .world-vignette { background: radial-gradient(ellipse at center, transparent 55%, rgba(241, 241, 238, .85) 100%); }
:root[data-theme="light"] .world-docbar { background: rgba(246, 246, 244, .92); }
:root[data-theme="light"] .world-intro,
:root[data-theme="light"] .world-outro { background: rgba(255, 255, 255, .92); }
:root[data-theme="light"] .world-cap { background: rgba(255, 255, 255, .95); }
.nav-toggle { order: 4; }
:root[data-theme="light"] .world-progress li span { background: rgba(255, 255, 255, .85); padding: 1px 6px; }

/* Tema clar: també les consoles i les barres de les captures */
:root[data-theme="light"] .log { background: #FBFBF9; color: #3A3D42; border-color: var(--border); }
:root[data-theme="light"] .app-cli { background: #FBFBF9; border-color: var(--border); }
:root[data-theme="light"] .app-cli pre { background: #FBFBF9; color: #15803D; }
:root[data-theme="light"] .app-cli .dim, :root[data-theme="light"] .app-cli .app-console-label { color: #6B6F76; }
:root[data-theme="light"] .shot-bar { background: #E4E4DF; color: #3A3D42; }
:root[data-theme="light"] .shot-bar i { background: #B9B9B3; }
:root[data-theme="light"] .shot { border-color: var(--border); }
:root[data-theme="light"] ::selection { background: #F5A524; color: #0b0c0d; }
:root[data-theme="light"] { color-scheme: light; }
