/* Tipografías alojadas en el propio servidor (licencia SIL OFL 1.1, ver fonts/LICENSE.txt) */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-latin.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;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("fonts/space-grotesk-latin.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;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #d7141f;
  --red-dark: #a90f18;
  --ink: #16181d;
  --ink-2: #3b3f48;
  --muted: #6b7180;
  --line: #e6e8ec;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --dark: #111317;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(17, 19, 23, .08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin-bottom: .8em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff; text-decoration: none; font-weight: 600;
  padding: 14px 24px; border-radius: 999px; border: 2px solid var(--red);
  cursor: pointer; font: inherit; font-weight: 600;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(215, 20, 31, .25); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(215, 20, 31, .4); outline-offset: 2px; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--ink); box-shadow: none; }
.btn-light { background: #fff; color: var(--red); border-color: #fff; }
.btn-light:hover { background: #fff; color: var(--red-dark); border-color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 1.6rem; text-decoration: none; color: var(--ink); letter-spacing: -.03em; }
.logo span { color: var(--red); }
.logo-light { color: #fff; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--ink-2); font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--red); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  padding: clamp(48px, 8vw, 110px) 0;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(215, 20, 31, .08), transparent 70%),
    linear-gradient(var(--bg), var(--bg-soft));
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--red); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 32px; color: var(--muted); font-size: .9rem; }
.hero-stats strong { display: block; font-family: var(--display); font-size: 2rem; color: var(--ink); line-height: 1; }

.hero-visual { position: relative; }
.window { background: var(--dark); border-radius: var(--radius); box-shadow: 0 30px 60px rgba(17, 19, 23, .25); overflow: hidden; transform: rotate(-1.5deg); }
.window-bar { display: flex; gap: 7px; padding: 14px 16px; background: #1c1f25; }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3e47; }
.window-bar i:first-child { background: var(--red); }
.code { margin: 0; padding: 24px 26px 30px; color: #d6d9df; font: 500 .95rem/1.75 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre; overflow-x: auto; }
.code .k { color: #ff6b74; } .code .s { color: #9be29b; } .code .f { color: #8ec5ff; } .code .c { color: #7d838f; }
.badge-float {
  position: absolute; left: -24px; bottom: -22px; background: #fff; border-radius: 12px;
  padding: 12px 18px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px; animation: float 4s ease-in-out infinite;
}
.badge-float .dot { width: 10px; height: 10px; border-radius: 50%; background: #1fb75a; box-shadow: 0 0 0 4px rgba(31, 183, 90, .2); }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p:last-child { color: var(--ink-2); font-size: 1.05rem; }

.section-head { margin-bottom: 64px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 3vw, 40px); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card h3 { margin-bottom: .7em; }
.card p { margin-bottom: 1.5em; }
.card li { padding: 6px 0 6px 22px; }
.card li::before { top: 13px; }

/* Servicio técnico: bloque compacto y separado */
.tech { padding: 0 0 clamp(72px, 10vw, 130px); }
.tech-box {
  max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 20px;
  padding: 18px 24px; border-radius: 14px; background: var(--bg-soft); border: 1px dashed #d3d6dc;
}
.tech-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; }
.tech-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tech-text { flex: 1; }
.tech-text h2 { font-size: 1rem; margin: 0 0 2px; }
.tech-text p { margin: 0; font-size: .88rem; color: var(--muted); }
.tech-box .btn { flex: none; background: #fff; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--ink-2); font-size: .95rem; }
.card ul { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.card li { padding: 4px 0 4px 22px; position: relative; }
.card li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 10px; height: 6px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(215, 20, 31, .08); display: grid; place-items: center; margin-bottom: 20px; }
.icon svg, .contact-list svg { width: 26px; height: 26px; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.section-dark { background: var(--dark); color: #e9eaee; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #b9bdc6; }
.section-dark strong { color: #fff; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.values { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.values li { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); padding: 24px; }
.values li h3 { position: relative; padding-left: 18px; }
.values li h3::before { content: ""; position: absolute; left: 0; top: .35em; width: 8px; height: 8px; border-radius: 2px; background: var(--red); }
.values li p { margin: 0; font-size: .92rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { padding: 28px 24px; border-radius: var(--radius); background: var(--bg-soft); position: relative; }
.steps span { font-family: var(--display); font-weight: 700; font-size: 2.4rem; color: var(--red); opacity: .9; display: block; margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: .95rem; margin: 0; }

.cta-band { background: linear-gradient(120deg, var(--red), #ef3b33); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { margin: 0 0 .3em; color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-inner p { margin: 0; max-width: 34em; color: rgba(255, 255, 255, .88); }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact-info > p { color: var(--ink-2); }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list svg { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: rgba(215, 20, 31, .08); }
.contact-list small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--red); }

.contact-form { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.field { margin-bottom: 18px; flex: 1; }
.field-row { display: flex; gap: 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .2s, background .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); background: #fff; }
textarea { resize: vertical; }
.invalid { border-color: var(--red); background: #fff5f5; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--ink-2); margin: 4px 0 20px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.cf-turnstile { margin: 0 0 20px; min-height: 65px; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; box-shadow: none; }
.check a, .gdpr a { color: var(--red); }
.gdpr { font-size: .75rem; line-height: 1.5; color: var(--muted); margin: -8px 0 20px; }

/* Páginas legales */
.back { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2); }
.back:hover { color: var(--red); }
.legal { max-width: 800px; padding: clamp(48px, 7vw, 96px) 0; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2.2em; }
.legal p, .legal li, .legal td { color: var(--ink-2); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal a { color: var(--red); }
.legal .updated { color: var(--muted); font-size: .9rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .92rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--bg-soft); font-weight: 600; color: var(--ink); }
/* 404 */
.notfound { max-width: 640px; padding: clamp(64px, 12vw, 140px) 0; text-align: center; min-height: 60vh; }
.notfound p { color: var(--ink-2); }
.notfound .code-404 { font-family: var(--display); font-weight: 700; font-size: clamp(5rem, 16vw, 8rem); line-height: 1; color: var(--red); margin-bottom: .2em; }
.notfound-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-size: .92rem; min-height: 1.4em; }
.form-status.ok { color: #138a43; }
.form-status.err { color: var(--red); }

/* Footer */
.site-footer { background: var(--dark); color: #9aa0ab; padding: 36px 0; font-size: .88rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner nav a { text-decoration: none; }
.footer-inner nav a:hover { color: #fff; }
.site-footer .logo { font-size: 1.3rem; }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 56px; height: 56px;
  border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(37, 211, 102, .4); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; max-width: 640px; }
  .hero-inner, .about, .contact { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 520px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 20px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 16px; }
}

@media (max-width: 600px) {
  .cards, .steps, .values { grid-template-columns: 1fr; }
  .tech-box { flex-wrap: wrap; padding: 16px 18px; }
  .tech-box .btn { width: 100%; }
  .field-row { flex-direction: column; gap: 0; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-stats { gap: 20px; }
  .badge-float { left: 8px; bottom: -18px; font-size: .8rem; }
  .code { font-size: .8rem; padding: 18px; }
  .cta-inner .btn { width: 100%; }
}
