/*
Theme Name: Evolve IT
Theme URI: https://evolveit.es
Author: Evolve IT, S.L.
Description: Tema a medida para Evolve IT, servicios informáticos para empresas e industria (Carbonero el Mayor, Segovia). Página única con servicios, forma de trabajo, soporte y contacto. Datos editables en Apariencia > Personalizar > Datos de la empresa.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: evolve-it
*/

/* ---------- Tokens (colores del logo) ---------- */
:root {
  --teal: #34b8b5;
  --teal-600: #239c99;
  --teal-50: #e8f7f6;
  --purple: #6e358c;
  --purple-700: #57296f;
  --night: #170f24;
  --night-800: #221735;
  --ink: #1c1828;
  --muted: #5f5a6e;
  --line: #e6e3ec;
  --paper: #ffffff;
  --mist: #f6f5f9;
  --cut: 14px; /* chaflán de las esquinas, como el logo */
  --shadow: 0 12px 32px rgba(23, 15, 36, .10);
  --f-head: "Chakra Petch", "Segoe UI", sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--f-body); font-size: 17px; line-height: 1.65;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }
h1, h2, h3, h4 {
  font-family: var(--f-head); font-weight: 700; line-height: 1.08;
  letter-spacing: -.01em; color: var(--night); margin: 0 0 .5em;
}
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 999; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 16px; }

/* Esquinas en chaflán (eco del logo) */
.cut { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-family: var(--f-head); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .85rem;
  color: var(--purple);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--teal); clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%, 0 40%); }

/* ---------- Botones ---------- */
.btn {
  --cut: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; letter-spacing: .03em;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-teal { background: var(--teal); color: var(--night); }
.btn-teal:hover { background: #4fd0cc; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-700); }
.btn-line { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.btn-line:hover { background: #fff; color: var(--night); }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5b; }
.btn-sm { padding: 10px 18px; font-size: .98rem; }

/* ---------- Topbar + cabecera ---------- */
.topbar { background: var(--night); color: #bdb5cc; font-size: .88rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.topbar-links { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar .wa-icon { width: 16px; height: 16px; color: #25d366; }

.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--purple); }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-text { font-family: var(--f-head); font-weight: 700; font-size: 1.6rem; line-height: .9; letter-spacing: .14em; }
.brand-text .mirror { display: inline-block; transform: scaleX(-1); letter-spacing: 0; }
.brand-text small { display: block; font-size: .74rem; letter-spacing: .06em; font-weight: 600; color: var(--teal-600); margin-top: 5px; text-transform: none; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.main-nav a {
  display: block; padding: 10px 14px; text-decoration: none;
  font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; color: var(--night);
}
.main-nav a:hover { color: var(--purple); }
.main-nav .nav-cta a {
  --cut: 8px; background: var(--purple); color: #fff; padding: 10px 18px; margin-left: 10px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.main-nav .nav-cta a:hover { background: var(--teal); color: var(--night); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--night); }
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--night) 30% 40%/cover no-repeat; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(23,15,36,.96) 0%, rgba(34,23,53,.90) 48%, rgba(110,53,140,.55) 100%);
}
.hero::after { /* rejilla técnica sutil */
  content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: linear-gradient(rgba(52,184,181,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(52,184,181,.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(72px, 11vw, 140px); padding-bottom: clamp(72px, 11vw, 140px); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; margin-bottom: 22px;
  background: rgba(52,184,181,.14); border: 1px solid rgba(52,184,181,.45); color: #bff0ee;
  font-family: var(--f-head); font-weight: 600; font-size: .92rem; letter-spacing: .04em;
}
.hero-badge i { width: 8px; height: 8px; background: var(--teal); box-shadow: 0 0 0 4px rgba(52,184,181,.3); }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 6vw, 4.6rem); max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 58ch; color: #d9d3e4; margin-bottom: 32px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

.facts { background: var(--purple); color: #fff; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 26px 20px; border-left: 1px solid rgba(255,255,255,.16); }
.fact:first-child { border-left: 0; }
.fact strong { display: block; font-family: var(--f-head); font-size: 1.9rem; line-height: 1; color: #9ff0ec; margin-bottom: 6px; }
.fact span { font-size: .93rem; color: #eadff1; }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--mist); }
.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  position: relative; background: #fff; padding: 30px 28px; border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal); }
.service-icon {
  width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--teal-50); color: var(--teal-600);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.service:nth-child(even) .service-icon { background: #f1e9f5; color: var(--purple); }
.service-icon svg { width: 28px; height: 28px; }
.service p { color: var(--muted); font-size: .98rem; margin: 0; }
.service.featured { background: var(--night); border-color: var(--night); color: #d9d3e4; }
.service.featured h3 { color: #fff; }
.service.featured p { color: #c4bcd3; }
.service.featured .service-icon { background: var(--teal); color: var(--night); }

/* Forma de trabajo */
.process { background: var(--night); color: #d9d3e4; }
.process h2 { color: #fff; }
.process .section-head p { color: #bdb5cc; }
.process .eyebrow { color: var(--teal); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li {
  counter-increment: s; position: relative; padding: 26px 22px;
  background: var(--night-800); border-top: 3px solid var(--teal);
}
.steps li:nth-child(even) { border-top-color: var(--purple); }
.steps li::before {
  content: "0" counter(s); display: block; font-family: var(--f-head); font-weight: 700;
  font-size: 2.4rem; line-height: 1; color: rgba(255,255,255,.18); margin-bottom: 14px;
}
.steps strong { display: block; font-family: var(--f-head); font-size: 1.25rem; color: #fff; margin-bottom: 6px; }
.steps span { font-size: .96rem; color: #bdb5cc; }

/* Soporte */
.support {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
  background: linear-gradient(120deg, var(--teal) 0%, #2aa7a4 100%); color: var(--night);
  padding: clamp(32px, 5vw, 56px);
}
.support h2 { color: var(--night); }
.support p { color: #123c3b; font-size: 1.08rem; }
.support .actions { justify-content: flex-end; }
.support .btn-line { color: var(--night); box-shadow: inset 0 0 0 2px var(--night); background: transparent; }
.support .btn-line:hover { background: var(--night); color: #fff; }
.support .btn-dark { background: var(--night); color: #fff; }
.support .btn-dark:hover { background: var(--purple); }
.support .btn-tv { background: #fff; color: var(--night); width: 100%; font-size: 1.15rem; padding: 18px 26px; }
.support .btn-tv:hover { background: var(--night); color: #fff; }
.sup-hours { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 1rem; color: #0e3534; }
.sup-hours li:last-child b { color: var(--purple-700); }
.badge-24 {
  display: inline-block; margin-top: 8px !important; padding: 5px 12px; font-family: var(--f-head); font-weight: 700;
  background: var(--purple); color: #fff !important; font-size: .95rem; letter-spacing: .03em;
}
.topbar .tb-24 { color: var(--teal); }
.support .tv-steps { font-size: .98rem; margin: 0; padding: 12px 16px; background: rgba(255,255,255,.35); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.contact-cards { display: grid; gap: 16px; }
.ccard { background: #fff; border: 1px solid var(--line); padding: 22px 24px; }
.ccard h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.ccard p { margin: 0; color: var(--ink); }
.ccard .big { display: block; font-family: var(--f-head); font-weight: 700; font-size: 2rem; color: var(--purple); text-decoration: none; line-height: 1.15; }
.ccard .mail { font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.ccard .btn { margin-top: 12px; }
.map { overflow: hidden; border: 1px solid var(--line); height: 250px; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.form { background: #fff; padding: 32px; box-shadow: var(--shadow); border-top: 4px solid var(--teal); }
.form h3 { font-size: 1.7rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 5px; color: var(--night); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--line);
  background: var(--mist); color: var(--ink); border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
.field textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.check input { margin-top: 5px; accent-color: var(--purple); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; margin-bottom: 16px; font-weight: 700; }
.notice-ok { background: var(--teal-50); color: #17605e; }
.notice-err { background: #fdeaea; color: #9b1c1c; }

/* Footer */
.site-footer { background: var(--night); color: #a9a1b8; font-size: .95rem; border-top: 4px solid var(--teal); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 1.15rem; letter-spacing: .04em; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--teal); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: .85rem; }

/* Botones flotantes */
.wa-icon { width: 20px; height: 20px; flex: none; }
.wa-fab, .call-fab {
  position: fixed; right: 20px; z-index: 60; display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%; color: #fff; transition: transform .2s;
}
.wa-fab { bottom: 20px; background: #25d366; box-shadow: 0 8px 24px rgba(37,211,102,.45); }
.wa-fab:hover { transform: scale(1.08); }
.wa-fab .wa-icon { width: 32px; height: 32px; }
.call-fab { display: none; bottom: 92px; background: var(--purple); box-shadow: 0 8px 24px rgba(110,53,140,.45); }
.call-fab svg { width: 26px; height: 26px; }

/* Páginas internas */
.page-hero { background: var(--night); color: #fff; padding: 60px 0 50px; border-bottom: 4px solid var(--teal); }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0; }
.entry { max-width: 820px; }

/* Aparición */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .support, .contact-grid { grid-template-columns: 1fr; }
  .support .actions { justify-content: flex-start; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 10px 16px 18px; }
  .main-nav .nav-cta a { margin: 8px 0 0; text-align: center; }
  .facts .wrap { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; }
  .fact { border-top: 1px solid rgba(255,255,255,.16); }
  .call-fab { display: grid; }
  .wa-fab, .call-fab { right: 16px; }
  .topbar .wrap > span, .topbar-mail { display: none; }
  .topbar .wrap { justify-content: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .services, .steps, .form-row, .site-footer .wrap { grid-template-columns: 1fr; }
  .brand-text { font-size: 1.35rem; }
  .brand-mark { width: 36px; height: 36px; }
  .actions .btn { width: 100%; }
  .form { padding: 22px; }
}
