/*
Theme Name: Perales Estudio
Theme URI: https://perales.codigodigital.cl/
Author: Código Digital
Description: Tema a medida para Perales Estudio, agencia de campañas ADS. Los textos, imágenes y listados se editan con Advanced Custom Fields.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: perales
*/

:root {
  --bg: #f6f3f9;
  --ink: #2b2438;
  --muted: #5b5068;
  --soft: #8a7d99;
  --line: #e3dae9;
  --line-2: #d9cde4;
  --purple: #A87BC9;
  --purple-deep: #6b4690;
  --lilac: #D6C7E5;
  --lilac-bg: #ece3f5;
  --lime: #C2D400;
  --lime-bg: #f1f6c9;
  --lime-soft: #dfe97a;
  --white: #fff;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: 56px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--purple-deep); }
a:hover { color: var(--purple); }
h1, h2, h3, p { margin: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; width: auto; height: auto; clip: auto; }
:focus-visible { outline: 2px solid var(--purple-deep); outline-offset: 3px; }

.wrap { max-width: 1212px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.site { overflow-x: clip; }

/* ---------- Header ---------- */
:root { --hd-logo: 76px; --hd-top: 20px; --hd-bottom: 8px; --hd-font: 14px; --hd-gap: 28px; --hd-bg: #f6f3f9; }
.site-header { position: relative; z-index: 50; background: var(--hd-bg); transition: box-shadow .35s ease; }
.site-header.is-sticky { position: sticky; top: 0; }
.admin-bar .site-header.is-sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header.is-sticky { top: 46px; } }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(43, 36, 56, .08); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: var(--hd-top); padding-bottom: var(--hd-bottom); }
.brand { display: block; line-height: 0; }
.brand img { height: var(--hd-logo); width: auto; margin: calc(var(--hd-logo) * -.1) 0 calc(var(--hd-logo) * -.1) calc(var(--hd-logo) * -.18); mix-blend-mode: multiply; }
.nav { display: flex; gap: var(--hd-gap); align-items: center; font-size: var(--hd-font); font-weight: 500; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav .menu { display: flex; gap: var(--hd-gap); align-items: center; }
.nav .menu > li { position: relative; }
.nav .menu a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; transition: color .2s; }
.nav .menu a:hover { color: var(--ink); }
.nav .menu > .current-menu-item > a, .nav .menu > .current-menu-ancestor > a, .nav .menu > .current_page_item > a { color: var(--ink); border-bottom-color: var(--purple); }
.nav .menu .sub-menu { position: absolute; top: calc(100% + 14px); left: -16px; z-index: 20; min-width: 250px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 32px rgba(43, 36, 56, .14); display: none; flex-direction: column; }
.nav .menu .sub-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav .menu li:hover > .sub-menu, .nav .menu li:focus-within > .sub-menu { display: flex; }
.nav .menu .sub-menu a { padding: 11px 12px; border-radius: 8px; gap: 12px; white-space: nowrap; color: var(--ink); border: 0; display: flex; transition: background .2s; }
.nav .menu .sub-menu a:hover { background: var(--lilac); }
.nav .menu .sub-menu i { font-size: 18px; color: var(--purple-deep); }
.nav .menu .menu-caret { font-size: 12px; transition: transform .3s var(--ease); }
@keyframes pe-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; transition: color .2s; }
.nav a:hover, .nav .is-active > a { color: var(--ink); }
.nav .is-active > a { border-bottom-color: var(--purple); }
.nav .has-sub { position: relative; }
.nav .sub { position: absolute; top: 100%; left: -16px; padding-top: 14px; z-index: 20; display: none; }
.nav .has-sub:hover .sub, .nav .has-sub:focus-within .sub { display: block; }
.nav .sub-in { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 250px; box-shadow: 0 16px 32px rgba(43, 36, 56, .14); display: flex; flex-direction: column; }
.nav .sub-in a { padding: 11px 12px; border-radius: 8px; gap: 12px; white-space: nowrap; color: var(--ink); border: 0; transition: background .2s; }
.nav .sub-in a:hover { background: var(--lilac); }
.nav .sub-in i { font-size: 18px; color: var(--purple-deep); }
.nav .nav-cta { background: var(--lilac); border: 1px solid var(--purple); color: var(--ink); padding: 10px 18px; border-radius: 8px; transition: background .2s; }
.nav .nav-cta:hover { background: var(--purple); color: #fff; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; width: 44px; height: 44px; font-size: 22px; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }

/* ---------- Buttons / small bits ---------- */
.btn { display: inline-flex; gap: 8px; align-items: center; padding: 14px 22px; border-radius: 8px; font: 500 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .25s ease, color .25s ease; }
.btn-line { border: 1px solid var(--purple-deep); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--lilac); color: var(--ink); }
.btn-solid { border: 1px solid var(--purple-deep); background: var(--lilac); color: var(--ink); }
.btn-solid:hover { background: var(--purple); color: #fff; }
.btn-ghost { padding-left: 10px; padding-right: 10px; color: var(--purple-deep); }
.btn-ghost:hover { color: var(--ink); }
.btn-lime { border: 1px solid var(--lime); color: var(--lime); }
.btn-lime:hover { background: rgba(194, 212, 0, .14); color: var(--lime); }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--purple-deep); margin-bottom: 20px; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--purple); }
.note { font: 400 11px var(--mono); color: var(--soft); }
.h-sec { font-size: 40px; font-weight: 500; letter-spacing: -1.4px; line-height: 1.1; }
.h-sub { font-size: 28px; font-weight: 500; letter-spacing: -1px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- Hero ---------- */
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; padding-top: 64px; padding-bottom: 72px; align-items: end; }
.hero h1 { font-size: 60px; line-height: 1.06; font-weight: 500; letter-spacing: -2px; }
.hero .lead { max-width: 480px; margin-top: 24px; }
.hero .actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.kpis { display: flex; flex-direction: column; gap: 12px; }
.kpi-main { background: var(--lilac); border-radius: var(--radius); padding: 24px; }
.kpi-main .lbl { font-size: 13px; color: #4d3a63; }
.kpi-main .big { font-size: 64px; font-weight: 500; letter-spacing: -2.5px; line-height: 1.1; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; margin-top: 8px; }
.bars i { flex: 1; background: #fff; border-radius: 3px; transform-origin: bottom; }
.bars i:nth-child(n+5) { background: var(--purple); }
.kpi-row { display: flex; gap: 12px; }
.kpi-row > div { flex: 1; border-radius: var(--radius); padding: 18px; }
.kpi-row b { display: block; font-size: 30px; font-weight: 500; letter-spacing: -1px; }
.kpi-row span { font-size: 13px; }
.kpi-row > div:first-child { background: #fff; }
.kpi-row > div:first-child span { color: var(--muted); }
.kpi-row > div:last-child { background: var(--lime); }

/* ---------- Marquee ---------- */
.brands { padding: 8px 0 72px; }
.brands .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.marquee { overflow: hidden; padding: 14px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: pe-marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.brand-card { flex: none; width: 190px; height: 96px; margin-right: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 500; transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease, background .3s ease; }
.brand-card:hover { transform: translateY(-6px) scale(1.05); border-color: var(--purple); background: var(--lilac); box-shadow: 0 14px 28px rgba(107, 70, 144, .2); }
.brand-card .dot { width: 30px; height: 30px; border-radius: 9px; background: var(--purple); }
.brand-card:nth-child(3n+2) .dot { background: var(--lime); }
.brand-card:nth-child(3n) .dot { background: var(--lilac); }
.brand-card img { max-height: 56px; max-width: 150px; width: auto; object-fit: contain; }
@keyframes pe-marquee { to { transform: translateX(-50%); } }

/* ---------- Services (home) ---------- */
.band-white { background: #fff; }
.services-home .wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; padding-top: 72px; padding-bottom: 72px; }
.services-home .lead { font-size: 16px; margin-top: 14px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.svc-card { background: var(--lilac-bg); border-radius: 18px; padding: 26px; position: relative; overflow: hidden; text-decoration: none; color: inherit; display: block; transition: transform .3s var(--ease), box-shadow .3s ease; }
.svc-card:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: 0 16px 30px rgba(107, 70, 144, .18); color: inherit; }
.svc-card .blob { position: absolute; right: -22px; top: -22px; width: 90px; height: 90px; border-radius: 50%; background: var(--lilac); }
.svc-card .chip { width: 50px; height: 50px; border-radius: 14px; background: var(--purple); display: flex; align-items: center; justify-content: center; position: relative; transform: rotate(-6deg); }
.svc-card .chip i { font-size: 26px; color: var(--ink); }
.svc-card h3 { font-size: 21px; font-weight: 600; letter-spacing: -.4px; margin: 18px 0 8px; position: relative; }
.svc-card p { line-height: 1.55; font-size: 15px; position: relative; color: #3b3149; }
.svc-card:nth-child(even) { background: var(--lime-bg); }
.svc-card:nth-child(even) .chip { background: var(--lime); }
.svc-card:nth-child(even) .blob { background: var(--lime-soft); }
.svc-card:nth-child(3n) .chip { background: var(--lilac); }
.svc-card:last-child:nth-child(odd) { grid-column: span 2; }

/* ---------- Results (home) ---------- */
.results-home .wrap { padding-top: 72px; padding-bottom: 72px; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(170px, auto); gap: 14px; margin-top: 32px; }
.bento-card { border-radius: 20px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s ease; }
.bento-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(107, 70, 144, .18); color: var(--ink); }
.bento-card .top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; gap: 10px; }
.tag { background: rgba(255, 255, 255, .6); padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.arrow { flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .6); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.bento-card .num { font-size: 60px; font-weight: 600; letter-spacing: -3px; line-height: .95; }
.bento-card .cap { margin-top: 10px; font-size: 16px; position: relative; }
.bento-card.c1 { grid-column: span 2; grid-row: span 2; background: var(--purple); }
.bento-card.c1 .num { font-size: 132px; color: #fff; }
.bento-card.c1 .tag, .bento-card.c1 .arrow { background: rgba(255, 255, 255, .45); }
.bento-card.c2 { background: var(--lilac); }
.bento-card.c3 { background: var(--lime); }
.bento-card.c4 { background: var(--ink); color: #f6f3f9; }
.bento-card.c4 .num { color: var(--lime); }
.bento-card.c4 .tag, .bento-card.c4 .arrow { background: rgba(255, 255, 255, .14); }
.bento-card.c5 { background: #fff; }
.bento-card.c5 .num { color: var(--purple-deep); }
.bento-card.c5 .tag, .bento-card.c5 .arrow { background: var(--lilac-bg); }
.bento-card.c1 .big-bars { position: absolute; right: 22px; bottom: 22px; display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.big-bars i { width: 16px; border-radius: 5px 5px 0 0; background: #fff; opacity: .85; transform-origin: bottom; }

/* ---------- Testimonials ---------- */
.testi-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 64px; gap: 16px; }
.stars { display: flex; gap: 2px; color: var(--lime); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.testi { background: var(--lilac-bg); border-radius: 18px; padding: 24px; transition: transform .3s var(--ease), box-shadow .3s ease; }
.testi:hover { transform: translateY(-4px); box-shadow: 0 14px 26px rgba(107, 70, 144, .16); }
.testi:nth-child(3n+2) { background: var(--lime-bg); }
.testi:nth-child(3n) { background: #fff; }
.testi .q-ico { font-size: 26px; color: var(--purple); }
.testi:nth-child(3n+2) .q-ico { color: var(--lime); }
.testi:nth-child(3n) .q-ico { color: var(--lilac); }
.testi blockquote { margin: 12px 0 20px; font-size: 16px; line-height: 1.55; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--lilac); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; }
.testi:nth-child(3n+2) .avatar { background: var(--lime); }
.testi:nth-child(3n+1) .avatar { background: var(--purple); }
.who b { display: block; font-weight: 600; font-size: 14px; }
.who span { color: var(--muted); font-size: 14px; }

/* ---------- CTA ---------- */
.cta { margin: 0 var(--pad) 56px; }
.cta-in { background: var(--ink); color: #f6f3f9; border-radius: var(--radius); padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 32px; max-width: 1100px; margin: 0 auto; }
.cta h2 { font-size: 34px; font-weight: 500; letter-spacing: -1px; max-width: 460px; line-height: 1.15; }
.cta .rule { width: 48px; height: 3px; background: var(--lime); margin-top: 20px; }
.cta-wrap { padding: 0 var(--pad) 56px; max-width: 1212px; margin: 0 auto; }
.cta-wrap .cta-in { max-width: none; }
.cta-in h2 { font-size: 34px; font-weight: 500; letter-spacing: -1px; max-width: 460px; line-height: 1.15; }
.cta-in .rule { width: 48px; height: 3px; background: var(--lime); margin-top: 20px; }

.wordmark { display: inline-block; font-size: 26px; font-weight: 600; letter-spacing: -1px; color: var(--ink); line-height: 1.2; padding: 14px 0; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer > .wrap:only-child { padding-top: 32px; padding-bottom: 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--purple-deep); }
.ft-top { display: grid; grid-template-columns: 1.4fr 1.3fr .8fr; gap: 48px; padding-top: 56px; padding-bottom: 40px; }
.ft-top.no-nav { grid-template-columns: 1.4fr 1.3fr; }
.ft-brand img { height: 56px; width: auto; margin-left: -8px; display: block; mix-blend-mode: multiply; }
.ft-brand p { margin-top: 16px; line-height: 1.6; max-width: 340px; }
.ft-h { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 16px; letter-spacing: .2px; }
.ft-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ft-list li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.ft-list .ico { width: 32px; height: 32px; border-radius: 8px; background: var(--lilac-bg); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--purple-deep); flex: none; }
.ft-list small { display: block; font-size: 12px; color: var(--soft); }
.ft-list .txt { color: var(--ink); white-space: pre-line; }
.ft-list a { color: var(--ink); }
.ft-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ft-bottom { border-top: 1px solid var(--line); padding-top: 22px; padding-bottom: 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--soft); }
.ft-legal { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
@media (max-width: 1024px) { .ft-top, .ft-top.no-nav { grid-template-columns: 1fr 1fr; } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ft-top, .ft-top.no-nav { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; } .ft-bottom { flex-direction: column; align-items: flex-start; } }

/* ---------- Inner pages ---------- */
.page-hero .wrap { padding-top: 64px; padding-bottom: 48px; }
.page-hero h1 { font-size: 56px; line-height: 1.06; font-weight: 500; letter-spacing: -2px; max-width: 780px; }
.page-hero .lead { margin-top: 22px; max-width: 560px; }
.page-hero .split { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }

.svc-list { display: flex; flex-direction: column; gap: 16px; }
.svc-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; display: grid; grid-template-columns: 72px 1fr 1fr; gap: 32px; transition: border-color .25s ease; scroll-margin-top: 24px; }
.svc-row:hover, .svc-row:target { border-color: var(--purple); }
.svc-row .ico { width: 56px; height: 56px; border-radius: 12px; background: var(--lilac); display: flex; align-items: center; justify-content: center; }
.svc-row:nth-child(even) .ico { background: var(--lime); }
.svc-row .ico i { font-size: 28px; }
.svc-row .n { font: 400 12px var(--mono); color: var(--soft); }
.svc-row h2 { font-size: 28px; font-weight: 500; letter-spacing: -.8px; margin: 6px 0 10px; }
.svc-row p { color: var(--muted); line-height: 1.6; }
.checks { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.checks li { display: flex; gap: 10px; align-items: center; }
.checks i { color: var(--purple-deep); }

.steps .wrap { padding-top: 80px; padding-bottom: 72px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.step .rule { height: 2px; background: var(--purple); width: 48px; }
.step .n { font: 400 12px var(--mono); color: var(--soft); margin-top: 16px; }
.step h3 { font-size: 20px; font-weight: 500; margin: 6px 0 8px; }
.step p { color: var(--muted); font-size: 15px; line-height: 1.55; }

.filters { display: flex; gap: 8px; font-size: 14px; font-weight: 500; flex-wrap: wrap; padding-bottom: 32px; }
.filters button { font: inherit; border: 1px solid var(--line-2); background: transparent; color: var(--ink); padding: 9px 16px; border-radius: 99px; cursor: pointer; transition: background .25s; }
.filters button:hover { background: var(--lilac); }
.filters button.is-on { background: var(--ink); color: #f6f3f9; border-color: var(--ink); }
.feature { background: var(--purple); border-radius: var(--radius); padding: 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: 16px; }
.feature .meta { font-size: 13px; font-weight: 500; }
.feature .num { font-size: 112px; font-weight: 500; letter-spacing: -5px; line-height: 1; margin-top: 24px; }
.feature .cap { font-size: 18px; margin-top: 8px; }
.feature .side { display: flex; flex-direction: column; gap: 12px; }
.feature .side > div { background: rgba(255, 255, 255, .5); border-radius: 10px; padding: 14px 18px; display: flex; justify-content: space-between; }
.feature .side b { font-weight: 500; }
.feature .side a { background: var(--ink); color: #f6f3f9; border-radius: 10px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; text-decoration: none; }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 72px; }
.case { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.case:hover { transform: translateY(-4px); border-color: var(--purple); }
.case .ph { height: 150px; background: repeating-linear-gradient(135deg, #ece6f2 0 8px, #f2eef6 8px 16px); display: flex; align-items: flex-end; padding: 12px; font: 400 11px var(--mono); color: var(--soft); overflow: hidden; }
.case .ph img { object-fit: cover; display: block; margin: -12px; width: calc(100% + 24px); max-width: none; height: calc(100% + 24px); }
.case .body { padding: 22px; }
.case .meta { font-size: 12px; color: var(--purple-deep); font-weight: 500; }
.case .num { font-size: 44px; font-weight: 500; letter-spacing: -2px; margin: 10px 0 2px; line-height: 1; }
.case .cap { color: var(--muted); font-size: 15px; }
.case .cli { margin-top: 16px; font-weight: 500; font-size: 14px; }
.testi-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.testi-2 .t { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.testi-2 .q-ico { font-size: 24px; color: var(--purple); }
.testi-2 blockquote { font-size: 18px; line-height: 1.5; margin: 12px 0 20px; }
.testi-2 .avatar { width: 36px; height: 36px; }
.testi-2 .who span { color: var(--soft); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 72px; }
.about-photo { height: 380px; border-radius: var(--radius); overflow: hidden; background: repeating-linear-gradient(135deg, #ece6f2 0 10px, #f2eef6 10px 20px); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-side { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.about-side .txt { font-size: 20px; line-height: 1.6; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats > div { border-radius: var(--radius); padding: 20px; background: var(--lilac); }
.stats > div:nth-child(2) { background: #fff; }
.stats > div:nth-child(3) { background: var(--lime); }
.stats b { display: block; font-size: 36px; font-weight: 500; letter-spacing: -1.5px; }
.stats span { font-size: 13px; }
.values { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.val { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: border-color .25s; }
.val:hover { border-color: var(--purple); }
.val i { font-size: 28px; color: #8a5bb0; }
.val h3 { font-size: 19px; font-weight: 500; margin: 16px 0 8px; }
.val p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.member .ph { height: 240px; border-radius: var(--radius); background: var(--lilac); overflow: hidden; }
.member:nth-child(2) .ph { background: #e8dff0; }
.member:nth-child(3) .ph { background: #ece6f2; }
.member:nth-child(4) .ph { background: #e1e8a6; }
.member .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member b { display: block; font-weight: 500; margin-top: 12px; }
.member span { color: var(--soft); font-size: 14px; }
.pad-y { padding-top: 72px; padding-bottom: 72px; }

.contact .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; padding-top: 64px; padding-bottom: 80px; }
.contact h1 { font-size: 56px; line-height: 1.06; font-weight: 500; letter-spacing: -2px; }
.contact .lead { margin-top: 22px; max-width: 420px; }
.contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 40px; }
.contact-list .it { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.contact-list .ico { width: 44px; height: 44px; border-radius: 10px; background: var(--lilac); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.contact-list small { display: block; font-size: 13px; color: var(--soft); }
.contact-list b { font-weight: 500; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 20px; align-self: start; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label.l, .form .l { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.form input[type=text], .form input[type=email], .form textarea { width: 100%; font: 400 15px var(--font); color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px; padding: 13px 14px; background: #fff; transition: border-color .2s; }
.form input::placeholder, .form textarea::placeholder { color: var(--soft); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--purple-deep); box-shadow: 0 0 0 3px var(--lilac-bg); }
.form textarea { height: 110px; resize: vertical; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.pills label { position: relative; cursor: pointer; }
.pills input { position: absolute; opacity: 0; inset: 0; }
.pills span { display: block; border: 1px solid var(--line-2); background: #fff; padding: 9px 16px; border-radius: 99px; font-weight: 500; transition: background .2s, border-color .2s; }
.pills input:checked + span { border-color: var(--purple-deep); background: var(--lilac); }
.pills input:focus-visible + span { outline: 2px solid var(--purple-deep); outline-offset: 2px; }
.form .foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.form .foot span { font-size: 13px; color: var(--soft); }
.form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert { border-radius: 10px; padding: 14px 18px; font-size: 15px; }
.alert.ok { background: var(--lime-bg); border: 1px solid var(--lime); }
.alert.err { background: #fdecec; border: 1px solid #e7a3a3; }

.prose { max-width: 780px; padding-bottom: 80px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 28px; margin-top: 1.6em; letter-spacing: -.8px; }
.notfound { text-align: center; padding: 120px 0; }
.notfound h1 { font-size: 96px; letter-spacing: -4px; font-weight: 500; }

/* ---------- Resultados: tarjetas clicables, paginación y ventana del caso ---------- */
.feature, .case[data-open] { cursor: pointer; }
.feature { transition: transform .5s var(--ease), box-shadow .5s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(107, 70, 144, .22); }
.feature .more, .feature .side a { background: var(--ink); color: #f6f3f9; border-radius: 10px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; text-decoration: none; transition: background .3s ease; }
.feature:hover .more { background: #3b3149; }
.case .ph { align-items: center; justify-content: center; }
.case .ph-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; color: var(--soft); font: 400 12px var(--font); }
.case .ph-empty i { font-size: 26px; }
.case:focus-visible, .feature:focus-visible { outline: 2px solid var(--purple-deep); outline-offset: 3px; }
.pager { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; padding: 0 0 72px; flex-wrap: wrap; }
.pager[hidden] { display: none; }
.pager button { font: inherit; cursor: pointer; border: 1px solid var(--line-2); border-radius: 8px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--ink); transition: background .25s ease, border-color .25s ease, opacity .25s ease; }
.pager button:hover:not(:disabled) { background: var(--lilac); }
.pager button.is-on { background: var(--ink); color: #f6f3f9; border-color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .count { margin-left: 12px; color: var(--soft); font-size: 13px; font-weight: 400; }
.has-pager .cases { padding-bottom: 32px; }

body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(22, 24, 38, .6); display: flex; padding: 24px 16px; overflow-y: auto; opacity: 0; transition: opacity .3s ease; }
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal-box { position: relative; background: var(--bg); border-radius: 16px; width: 860px; max-width: 100%; margin: auto; overflow: hidden; box-shadow: 0 30px 70px rgba(22, 17, 28, .4); transform: translateY(18px) scale(.985); transition: transform .45s var(--ease); }
.modal.is-open .modal-box { transform: none; }
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; color: var(--ink); transition: transform .25s var(--ease), background .25s ease; }
.modal-x:hover { background: var(--lilac); transform: rotate(90deg); }
.modal-img { height: 260px; background: repeating-linear-gradient(135deg, #ece6f2 0 10px, #f2eef6 10px 20px); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--soft); font-size: 13px; }
.modal-img i { font-size: 30px; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-body { padding: 36px 40px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.cm-meta { font-size: 13px; font-weight: 500; color: var(--purple-deep); }
.modal h2 { font-size: 30px; font-weight: 500; letter-spacing: -1px; margin: 8px 0 16px; }
.modal p { color: var(--muted); line-height: 1.6; font-size: 15px; }
.cm-side { display: flex; flex-direction: column; gap: 10px; }
.cm-main { background: var(--purple); border-radius: 12px; padding: 18px 20px; }
.cm-main b { display: block; font-size: 52px; font-weight: 500; letter-spacing: -2px; line-height: 1; }
.cm-main span { display: block; margin-top: 6px; }
#cm-stats { display: flex; flex-direction: column; gap: 10px; }
.cm-stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; display: flex; justify-content: space-between; gap: 12px; }
.cm-stat b { font-weight: 500; }
@media (max-width: 640px) {
  .modal-body { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .modal-img { height: 180px; }
  .cm-main b { font-size: 44px; }
}

/* ---------- Reveal (only when JS is on) ---------- */
.js [data-rv] { opacity: 0; translate: 0 18px; transition: opacity .7s ease, translate .7s var(--ease), transform .5s var(--ease), box-shadow .5s ease, border-color .35s ease, background-color .35s ease; }
.js [data-rv].in { opacity: 1; translate: 0 0; }
.js .bars i, .js .big-bars i { transform: scaleY(0); transition: transform .8s var(--ease); }
.js .in .bars i, .js .in .big-bars i { transform: scaleY(1); }
.case.is-hidden, .feature.is-hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-rv] { opacity: 1; translate: 0 0; }
  .js .bars i, .js .big-bars i { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --pad: 32px; }
  .hero .wrap, .contact .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 48px; }
  .services-home .wrap, .values { grid-template-columns: 1fr; gap: 32px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr 1fr; }
  .cases { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .svc-row { grid-template-columns: 56px 1fr; }
  .svc-row .checks { grid-column: 2; }
  .page-hero h1, .contact h1 { font-size: 44px; }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: var(--pad); right: var(--pad); top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; flex-direction: column; align-items: stretch; gap: 0; box-shadow: 0 16px 32px rgba(43, 36, 56, .14); }
  .nav.is-open { display: flex; }
  .nav > a, .nav > .has-sub > a, .nav > span > a { padding: 12px; border-bottom: 0; }
  .nav .sub { position: static; padding: 0 0 0 12px; display: block; }
  .nav .sub-in { box-shadow: none; border: 0; padding: 0; min-width: 0; }
  .nav .nav-cta { text-align: center; justify-content: center; margin-top: 8px; }
  .nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .nav .menu a { padding: 12px; border-bottom: 0; display: flex; }
  .nav .menu .sub-menu { position: static; min-width: 0; padding: 0 0 0 12px; border: 0; box-shadow: none; background: transparent; }
  .nav .menu .sub-menu::before { display: none; }
  .nav .menu li.menu-item-has-children > .sub-menu { display: none; }
  .nav .menu li.menu-item-has-children.is-open > .sub-menu { display: flex; animation: pe-drop .3s var(--ease); }
  .nav .menu li.menu-item-has-children > a { justify-content: space-between; width: 100%; }
  .nav .menu li.is-open > a .menu-caret { transform: rotate(180deg); }
  .nav .menu > li { border-bottom: 1px solid var(--line); }
  .nav .menu > li:last-child { border-bottom: 0; }
  .cta-in { flex-direction: column; align-items: flex-start; padding: 32px; }
  .feature { grid-template-columns: 1fr; padding: 32px; }
  .feature .num { font-size: 84px; }
  .about-grid { grid-template-columns: 1fr; }
  .page-hero .split { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 640px) {
  :root { --pad: 20px; }
  .brand img { height: calc(var(--hd-logo) * .8); }
  .hero h1 { font-size: 38px; letter-spacing: -1.2px; }
  .page-hero h1, .contact h1 { font-size: 36px; letter-spacing: -1.2px; }
  .h-sec { font-size: 32px; }
  .svc-grid, .testi-grid, .testi-2, .cases, .values-grid, .stats, .form .row, .steps-grid { grid-template-columns: 1fr; }
  .svc-card:last-child:nth-child(odd) { grid-column: auto; }
  .bento { grid-template-columns: 1fr; }
  .bento-card.c1 { grid-column: auto; grid-row: auto; min-height: 280px; }
  .bento-card.c1 .num { font-size: 96px; }
  .kpi-main .big { font-size: 52px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .svc-row { grid-template-columns: 1fr; padding: 24px; gap: 20px; }
  .svc-row .checks { grid-column: auto; }
  .form { padding: 24px; }
  .cta-in h2 { font-size: 28px; }
  .testi-head { flex-direction: column; gap: 8px; }
}