/* CyberPymes · página única
   Fuentes alojadas en /fonts (sin peticiones a terceros) */

@font-face { font-family: "Varela Round"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/varela-round-latin-400-normal.woff2") format("woff2"); }

:root {
  --blue-dark: #044cd0;
  --blue-darker: #02358f;
  --hero: #0066cc;
  --hero-dark: #005cb8;
  --soft: #f1f6ff;
  --ink: #2b303c;
  --text: #414141;
  --text-strong: #252525;
  --muted: #5c6270;
  --foot: #171717;
  --green: #178a42;
  --green-dark: #0f6e33;
  --font: "Varela Round", "Varela", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 60px; }
body {
  margin: 0; background: #fff; color: var(--text);
  font-family: var(--font); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); }
a:hover { color: var(--blue-darker); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .dev :focus-visible, .contact :focus-visible { outline-color: #fff; }

.wrap { width: min(1290px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--font); font-weight: 400; color: var(--ink); line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.375rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

/* ---------- Cabecera ---------- */
.top { position: relative; z-index: 50; background: #fff; box-shadow: 0 1px 8px rgba(0, 0, 0, .08); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: block; line-height: 0; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; align-items: center; }
.nav a { color: var(--text-strong); text-decoration: none; font-size: 1.0625rem; padding: .4rem 15px; }
.nav a:hover, .nav a:focus-visible { color: var(--blue-dark); }
.burger { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink); }
.burger svg { width: 28px; height: 28px; display: block; }

/* ---------- Hero ---------- */
.hero { background: var(--hero) url("img/score-bg.png") no-repeat 50% 0 / cover; color: #fff; padding-block: 50px 30px; text-align: center; }
.hero__in img { width: 100%; max-width: 646px; margin: 0 auto 1.2rem; }
.hero h1 { color: #fff; margin: 0 0 .3em; }
.hero p { font-size: 1.25rem; margin: 0; }

/* ---------- Servicios ---------- */
.services { padding-block: 40px 50px; }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service { text-align: center; padding: 2rem 1.2rem; border: 1px solid #efefef; border-radius: 3px; }
.service img { width: 128px; height: 128px; margin: 0 auto 1.4rem; }
.service h3 { color: var(--text); margin-bottom: .5rem; }
.service p { margin: 0 auto; color: var(--muted); line-height: 1.6; max-width: 24em; }

/* ---------- Programación a medida ---------- */
.dev { background: var(--hero); color: #fff; padding-block: 50px; }
.dev__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.dev h2, .pair__item h2 { font-size: 1.75rem; text-align: center; }
.dev h2 { color: #fff; margin-bottom: 1.5rem; }
.dev__left img { width: 100%; max-width: 440px; margin: 2rem auto 0; }
.techs { display: grid; grid-template-columns: repeat(4, 100px); gap: 2px; list-style: none; margin: 1rem auto 1.5rem; padding: 0; justify-content: center; }
.techs img { width: 100px; height: 100px; }
.dev__right p { text-align: center; font-size: 1.0625rem; line-height: 1.7; max-width: 27rem; margin: 0 auto; }

/* ---------- Sitio web / Tienda ---------- */
.pair { padding-block: 50px; }
.pair__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.pair__item img { width: 250px; height: 250px; margin: 0 auto 1rem; }
.pair__item h2 { margin-bottom: 1.6rem; }
.pair__item p { font-size: 1.0625rem; line-height: 1.7; color: var(--text-strong); }

/* ---------- Contacto ---------- */
.contact { background: var(--hero-dark) url("img/score-bg.png") no-repeat 50% 0 / cover; color: #fff; padding-block: 90px; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.formbox { background: var(--hero); padding: 12px; box-shadow: 0 0 30px 6px rgba(255, 255, 255, .5); max-width: 614px; }
.contact__info { text-align: center; font-size: 1.0625rem; }
.contact__info h2 { color: #fff; font-size: 2.75rem; }
.contact__info img { width: 100%; max-width: 420px; margin: 1.5rem auto; }
.contact__info p { margin-bottom: .8rem; }
.contact__info .hours { font-size: 1rem; line-height: 1.7; }
.form { display: grid; gap: 1rem; }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; font: inherit; color: #495057; background: #fff;
  border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; padding: .5rem .75rem;
}
.form input[type="text"], .form input[type="email"] { height: 38px; }
.form textarea { min-height: 7rem; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 3px solid rgba(255, 255, 255, .6); outline-offset: 0; }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-size: 1rem; padding-block: .3rem; cursor: pointer; }
.form .check a { color: #fff; }
.form .check input { accent-color: #fff; width: 1.375rem; height: 1.375rem; flex: none; margin: 0; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  justify-self: start; cursor: pointer; font: inherit; font-size: 1.25rem; color: #fff;
  background: var(--green); border: 0; border-radius: 5px; padding: 8px 16px;
  transition: background .15s ease;
}
.btn:hover { background: var(--green-dark); }
.btn[disabled] { opacity: .6; cursor: wait; }
.status { margin: 0; min-height: 1.4em; }
.status.ok { color: #d6ffe2; }
.status.err { color: #fff; background: #b3261e; padding: .3rem .6rem; border-radius: 4px; }
.status:empty { padding: 0; }

/* ---------- Logos ---------- */
.logos { padding-block: 1.2rem; background: var(--soft); }
.logos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 3rem; }
.logos img { height: 35px; width: auto; mix-blend-mode: multiply; }

/* ---------- Pie ---------- */
.foot { background: var(--foot); color: #fff; padding: 1.6rem 0; font-size: .9375rem; }
.foot__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.foot p { margin: 0; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; margin: 0; padding: 0; }
.foot a { color: #a2a2a2; text-decoration: none; }
.foot a:hover { color: #fff; }

/* ---------- Aparición suave ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.services__grid .reveal:nth-child(2) { transition-delay: .1s; }
.services__grid .reveal:nth-child(3) { transition-delay: .2s; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .burger { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1rem;
    box-shadow: 0 8px 12px rgba(0, 0, 0, .08);
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid #eef1f7; }
  .services__grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .dev__grid, .pair__grid, .contact__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .formbox { margin-inline: auto; width: 100%; }
  .contact { padding-block: 60px; }
}
@media (max-width: 576px) {
  .techs { grid-template-columns: repeat(4, 1fr); max-width: 100%; }
  .techs img { width: 100%; height: auto; }
  .contact__info h2 { font-size: 2.2rem; }
  .logos ul { gap: 1rem 1.5rem; }
  .logos img { height: 30px; }
  .foot ul { gap: 0 1.5rem; }
  .foot a { display: inline-block; padding: .75rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- Páginas legales ---------- */
.legal { width: min(820px, 100% - 2.5rem); margin: 2.5rem auto 5rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.legal h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); margin-top: 2.2rem; }
.legal p, .legal li { max-width: 70ch; }
.legal .upd { color: var(--muted); font-size: .95rem; }
.back { color: var(--ink); text-decoration: none; font-size: 1.0625rem; }
.back:hover { color: var(--blue-dark); }
