:root {
  --blue-light: #4fc3f7;
  --blue: #1e88c7;
  --blue-dark: #0a3d67;
  --blue-glow: rgba(79, 195, 247, 0.16);

  --bg: #060911;
  --bg-alt: #0a0f1a;
  --surface: #0d1526;
  --surface-hover: #101b30;
  --line: rgba(148, 178, 214, 0.16);
  --line-strong: rgba(148, 178, 214, 0.28);

  --ink: #f3f6fb;
  --ink-soft: #93a4bf;
  --ink-faint: #5b6b85;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
p { margin: 0 0 1em; color: var(--ink-soft); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--blue-light); color: #04101c;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

.grad-text {
  background: linear-gradient(90deg, var(--blue-light), #8fe3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Insignia tipo "pill" (eyebrow flotant) - identitat visual repetida a dalt de cada secció */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-glow); border: 1px solid rgba(79, 195, 247, 0.35);
  color: var(--blue-light); font-weight: 700; font-size: 13px;
  padding: 8px 16px; border-radius: 999px; margin: 0 0 18px;
}
.pill.center { margin-left: auto; margin-right: auto; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-light); box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.2); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(90deg, var(--blue-light), var(--blue)); color: #04101c;
  box-shadow: 0 10px 30px -10px rgba(79, 195, 247, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(79, 195, 247, 0.7); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--blue-light); color: var(--blue-light); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 9, 17, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 12px; }
/* flex-shrink:0 a proposito: .wrap tiene max-width:1160px fijo, asi que a partir de ese ancho el
   espacio disponible para la cabecera ya no crece nunca mas por mucho que crezca la ventana - si el
   contenido no encaja, sin esto el navegador encogia TAMBIEN el logo (aunque su contenido no puede
   reflowear), y el texto del logo se salia de su caja y quedaba superpuesto con el primer enlace del
   menu ("BAGESTRANSrveis"). Con esto, en el peor caso el menu se desborda un poco, pero el logo
   nunca se rompe. */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; flex-shrink: 0; }
.brand-logo { border-radius: 8px; }
.brand-name {
  font-size: 18px;
  background: linear-gradient(90deg, var(--blue-light), #8fe3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.main-nav { display: flex; gap: 8px; margin-left: auto; }
.main-nav a { font-weight: 600; font-size: 14.5px; color: var(--ink-soft); white-space: nowrap; }
.main-nav a:hover { color: var(--blue-light); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .header-phone,
.header-actions .portal-link { white-space: nowrap; }
.header-actions .btn { padding: 10px 14px; font-size: 14px; }
.lang-switch { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; font-size: 12.5px; font-weight: 800; }
.lang-switch a { padding: 5px 8px; border-radius: 999px; color: var(--ink-soft); }
.lang-switch a.active { background: var(--blue-light); color: #04101c; }
.portal-link {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px;
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 12px;
}
.portal-link:hover { border-color: var(--blue-light); color: var(--blue-light); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Hero */
.hero {
  padding: 72px 0 96px; overflow: hidden; position: relative;
  background:
    radial-gradient(560px 360px at 12% -10%, var(--blue-glow), transparent 60%),
    radial-gradient(640px 420px at 100% 10%, rgba(79, 195, 247, 0.1), transparent 55%);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 700;
  color: var(--blue-light); margin: 0 0 14px;
}
.eyebrow.center { text-align: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); }
.hero-lead { font-size: 17px; max-width: 52ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 40px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 32px 40px; }
.stat-row .stat-number { display: block; font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.stat-row .stat-number .grad-text { font-size: inherit; }
.stat-row .stat-caption { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }

.hero-art { position: relative; }
.hero-brand-panel {
  aspect-ratio: 16 / 10; border-radius: var(--radius); box-shadow: var(--shadow);
  background: linear-gradient(150deg, var(--blue-dark) 0%, #071b30 55%, var(--bg) 100%);
  border: 1px solid var(--line-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 40px; text-align: center; color: #ffffff;
}
.hero-brand-logo {
  width: 92px; height: 92px; border-radius: 20px; background: #ffffff; padding: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}
.hero-brand-word { font-size: clamp(24px, 3.6vw, 32px); font-weight: 800; letter-spacing: 0.02em; margin: 0; color: #ffffff; }
.hero-brand-tag { font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin: 0; color: var(--blue-light); }
.hero-badge {
  position: absolute; left: 20px; bottom: -18px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow); font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; gap: 8px; color: var(--ink);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dot-live { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }

/* App/Portal */
.app-banner {
  margin-top: 46px; background: linear-gradient(120deg, var(--blue-dark), #0f2c47);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 40px; color: #fff; display: grid;
  grid-template-columns: 1.3fr 0.7fr; gap: 28px; align-items: center; box-shadow: var(--shadow);
}
.app-banner h3 { font-size: 22px; color: #fff; margin-bottom: 10px; }
.app-banner p { color: rgba(255,255,255,0.75); margin-bottom: 0; }
.app-banner .btn-ghost { border-color: rgba(255,255,255,0.35); }
.app-banner .btn-ghost:hover { border-color: var(--blue-light); }

/* Secciones */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(26px, 3.2vw, 38px); max-width: 46ch; }
.section-title.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-lead { font-size: 16.5px; max-width: 56ch; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Servicios */
.cards-grid {
  margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px; background: var(--blue-glow); border: 1px solid rgba(79, 195, 247, 0.3);
}
.card h3 { font-size: 18px; }
.card p { font-size: 14.5px; margin-bottom: 0; }

/* Abans/Després */
.compare-grid { margin-top: 46px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compare-card { border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); }
.compare-card.bad { background: rgba(248, 113, 113, 0.06); border-color: rgba(248, 113, 113, 0.22); }
.compare-card.good { background: var(--blue-glow); border-color: rgba(79, 195, 247, 0.3); }
.compare-card h3 { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.compare-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.compare-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--ink-soft); }
.compare-mark { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; margin-top: 1px; }
.compare-card.bad .compare-mark { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }
.compare-card.good .compare-mark { background: rgba(79, 195, 247, 0.2); color: var(--blue-light); }

/* Com funciona */
.steps-grid { margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; padding: 8px 0; }
.step-number {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #04101c; background: linear-gradient(135deg, var(--blue-light), var(--blue)); margin-bottom: 18px;
}
.step h3 { font-size: 17px; }
.step p { font-size: 14.5px; margin-bottom: 0; }

/* Cobertura */
.cobertura-inner { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; align-items: center; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-weight: 700; font-size: 13.5px; color: var(--ink);
}
.stat-box {
  background: linear-gradient(135deg, var(--blue-dark), #071b30); border: 1px solid var(--line-strong); color: #fff;
  border-radius: var(--radius); padding: 40px 28px; text-align: center; box-shadow: var(--shadow);
}
.stat-box .stat-number { display: block; font-size: 52px; font-weight: 800; letter-spacing: -0.02em; color: var(--blue-light); }
.stat-box .stat-label { font-size: 14px; opacity: .85; font-weight: 600; }

/* Nosotros */
.features-grid { margin-top: 46px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.feature h3 { font-size: 16.5px; }
.feature p { font-size: 14.5px; margin-bottom: 0; }

/* Sectores */
.sector-grid { margin-top: 42px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sector {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; font-weight: 700; font-size: 15px; color: var(--ink);
}

/* FAQ */
.faq-list { margin-top: 46px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-left: auto; margin-right: auto; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 700; font-size: 15.5px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--blue-light); font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 24px 20px; margin: 0; font-size: 14.5px; }

/* CTA final */
.final-cta {
  background: linear-gradient(120deg, var(--blue-dark), #0f2c47); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 72px 0; text-align: center;
}
.final-cta .section-title { color: #fff; }
.final-cta .section-lead { color: rgba(255,255,255,0.75); }
.final-cta-tags { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 26px; font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,0.7); }

/* Contacto */
.cta-section { background: var(--bg-alt); }
.cta-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; margin: 22px 0 0; padding: 0; font-size: 15px; }
.contact-list li { margin-bottom: 10px; color: var(--ink-soft); }
.contact-list a { color: var(--blue-light); font-weight: 700; }

.cta-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.cta-form label { font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.cta-form input, .cta-form textarea {
  font-family: var(--font); font-size: 15px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line-strong); outline: none; resize: vertical; background: var(--bg); color: var(--ink);
}
.cta-form input::placeholder, .cta-form textarea::placeholder { color: var(--ink-faint); }
.cta-form input:focus, .cta-form textarea:focus { border-color: var(--blue-light); }
.form-hint { font-size: 12.5px; color: var(--ink-faint); margin: 0; }

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,0.5);
  transition: transform .15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 30px; height: 30px; }

.header-phone {
  font-weight: 700; font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px;
}
.header-phone:hover { color: var(--blue-light); }

/* Footer */
.site-footer { background: #04060c; color: var(--ink-soft); padding: 44px 0 28px; border-top: 1px solid var(--line); }
.footer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.footer-legal { font-size: 13px; max-width: 60ch; color: var(--ink-faint); margin: 0; }
.footer-links { font-size: 13px; display: flex; gap: 8px; margin: 4px 0; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12.5px; color: var(--ink-faint); margin: 6px 0 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner, .cobertura-inner, .cta-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-grid { grid-template-columns: repeat(2, 1fr); }
  .app-banner { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 1180px) {
  .main-nav { position: fixed; top: 76px; left: 0; right: 0; bottom: 0; z-index: 99;
    background: var(--bg); flex-direction: column; padding: 24px; gap: 4px; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary, .header-actions .portal-link, .header-actions .lang-switch, .header-actions .header-phone { display: none; }
  .main-nav .lang-switch, .main-nav .portal-link { margin-top: 10px; }
}
@media (min-width: 1181px) {
  .main-nav .lang-switch, .main-nav .nav-only { display: none; }
}
@media (max-width: 720px) {
  .cards-grid, .features-grid, .sector-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 56px; }
  .stat-row { gap: 24px 32px; }
}
