/* ==========================================================================
   Groundsight Geoservicios — sistema de estilos
   ========================================================================== */
:root {
  --bg: #f6f3ee;
  --bg-2: #ede8df;
  --surface: #ffffff;
  --ink: #0f1f25;
  --ink-2: #334a52;
  --muted: #5f7076;
  --line: #e0d9cc;
  --navy: #071a21;
  --navy-2: #0d2c36;
  --navy-3: #14404d;
  --accent: #e4692e;
  --accent-2: #c2531d;
  --accent-soft: #fbe3d5;
  --sand: #d8c7a6;
  --wa: #1fa855;
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;
  --shadow: 0 18px 44px -20px rgba(7, 26, 33, .35);
  --shadow-sm: 0 6px 18px -8px rgba(7, 26, 33, .25);
  --head: "Sora", "Manrope", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  /* Movimiento: curvas fuertes de salida; la interfaz responde en menos de 250 ms */
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --t-press: 140ms;
  --t-ui: 220ms;
  --t-enter: 640ms;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); scrollbar-color: var(--navy-3) var(--bg-2); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; caret-color: var(--accent); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button { font: inherit; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); letter-spacing: -.03em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(840px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 60ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--alt { background: var(--bg-2); }
.section--dark { background: var(--navy); color: #e6edf0; }
.section--dark .lead, .section--dark .muted { color: rgba(230, 237, 240, .72); }
.section__head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head--center { margin-inline: auto; text-align: center; }
.grid { display: grid; gap: 22px; }

/* Botones: color plano, sin sombra en reposo; se hunden al presionar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font: 600 .98rem/1 var(--head); text-decoration: none; border: 2px solid transparent; cursor: pointer; position: relative; overflow: hidden; transition: transform var(--t-press) var(--ease), background-color var(--t-ui) ease, border-color var(--t-ui) ease, color var(--t-ui) ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--sm { padding: 11px 20px; font-size: .9rem; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--wa { background: var(--wa); color: #fff; }
.btn__arrow { transition: transform var(--t-ui) var(--ease); }
.link { display: inline-flex; align-items: center; gap: 8px; font: 600 .95rem var(--head); color: var(--accent-2); text-decoration: none; }
.link svg { width: 18px; height: 18px; transition: transform var(--t-ui) var(--ease); }
.link:active svg { transform: translateX(2px); }
@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: var(--accent-2); }
  .btn--dark:hover { background: var(--navy-3); }
  .btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
  .btn--outline:hover { background: var(--navy); color: #fff; }
  .btn--wa:hover { background: #178a46; }
  .btn:hover .btn__arrow, .link:hover svg { transform: translateX(4px); }
}

/* Navegación */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; color: #fff; transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }
.nav--light { color: var(--ink); }
.nav.is-solid { background: var(--navy); color: #fff; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: min(1200px, 100% - 40px); margin-inline: auto; }
.logo { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.logo__compact { display: none; }
.logo svg { height: 32px; width: auto; display: block; }
.logo b { color: var(--accent); font-weight: 800; }
.logo small { display: block; font: 500 .66rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; opacity: .65; margin-top: 4px; }
.nav__menu { display: flex; align-items: center; gap: 4px; }
.nav__menu a:not(.btn) { text-decoration: none; font: 500 .94rem var(--head); padding: 10px 14px; border-radius: 999px; opacity: .88; position: relative; transition: opacity 160ms ease, background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) {
  .nav__menu a:not(.btn):hover { opacity: 1; background: rgba(255,255,255,.1); }
  .nav--light:not(.is-solid) .nav__menu a:not(.btn):hover { background: rgba(7,26,33,.07); }
}
.nav__menu a.is-active:not(.btn) { opacity: 1; }
.nav__menu a.is-active:not(.btn)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav__menu .btn { margin-left: 12px; }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; color: inherit; }
.nav__toggle span { display: block; height: 2px; background: currentColor; margin: 6px 0; transition: transform .3s var(--ease), opacity .2s; border-radius: 2px; }

/* Hero de inicio */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--navy); padding: calc(var(--nav-h) + 48px) 0 96px; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.08); animation: heroZoom 14s var(--ease) forwards; will-change: transform; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,26,33,.35) 0%, rgba(7,26,33,.25) 40%, rgba(7,26,33,.92) 100%), linear-gradient(90deg, rgba(7,26,33,.55) 0%, transparent 60%); }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__content { position: relative; display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: end; }
.hero h1 { max-width: 15ch; margin-bottom: 24px; }
.hero .lead { color: rgba(255,255,255,.86); margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__motto { margin: 28px 0 0; font: 500 1rem/1.4 var(--head); color: #f4a981; }
.hero__aside { display: grid; gap: 12px; }
.hero__chip { background: rgba(7,26,33,.62); border-radius: 14px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; text-decoration: none; transition: background-color var(--t-ui) ease, transform var(--t-ui) var(--ease); }
.hero__chip:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .hero__chip:hover { background: rgba(13,44,54,.85); transform: translateX(4px); } }
.hero__chip b { font: 700 1.6rem/1 var(--head); color: #fff; }
.hero__chip span { font-size: .85rem; color: rgba(255,255,255,.72); }
.hero__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px; }
.hero__scroll::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* Onda sísmica animada (SVG) */
.wave { display: block; width: 100%; height: 72px; }
.wave path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2400; stroke-dashoffset: 2400; }
.is-inview .wave path { animation: draw 2.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Marquee */
.marquee { overflow: hidden; background: var(--surface); padding: 16px 0; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 48px; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span { font: 600 .9rem var(--head); color: var(--ink-2); display: inline-flex; align-items: center; gap: 14px; }
.marquee span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Categorías (inicio) */
.cats { grid-template-columns: repeat(3, 1fr); }
.cat { position: relative; min-height: 380px; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: #fff; display: flex; align-items: flex-end; isolation: isolate; background: var(--navy-2); }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); z-index: -2; }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,26,33,.08) 0%, rgba(7,26,33,.5) 42%, rgba(7,26,33,.95) 100%); z-index: -1; }
.cat { transition: transform var(--t-press) var(--ease); }
.cat:active { transform: scale(.985); }
.cat__body { padding: 28px; width: 100%; }
.cat h3 { font-size: clamp(1.3rem, 5vw, 1.5rem); margin-bottom: 8px; hyphens: auto; overflow-wrap: break-word; }
.cat p { font-size: .95rem; color: rgba(255,255,255,.86); margin: 0 0 14px; max-width: 36ch; }
.cat__count { font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; color: #f4a981; }
.cat__count svg { width: 16px; height: 16px; transition: transform var(--t-ui) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .cat:hover img { transform: scale(1.05); }
  .cat:hover .cat__count svg { transform: translateX(4px); }
}
.cats .cat:nth-child(1), .cats .cat:nth-child(2) { grid-column: span 1; }
.cats .cat:first-child { grid-row: span 2; min-height: 100%; }

/* Franja de valor */
.values { grid-template-columns: repeat(4, 1fr); }
.value { padding: 28px; border-radius: var(--r); background: var(--surface); }
.value__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; margin-bottom: 18px; }
.value__icon svg { width: 26px; height: 26px; }
.value h3 { font-size: 1.08rem; }
.value p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Contadores */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat b { display: block; font: 700 clamp(2.6rem, 5.4vw, 4rem)/1 var(--head); color: #fff; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat b small { font-size: .5em; color: #f4a981; }
.stat span { display: block; margin-top: 8px; color: rgba(230,237,240,.7); font-size: .92rem; }

/* Proceso (timeline horizontal) */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; counter-reset: p; }
.timeline::before { content: ""; position: absolute; left: 6%; right: 6%; top: 26px; height: 2px; background: var(--line); }
.step { position: relative; counter-increment: p; }
.step__dot { width: 54px; height: 54px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); color: var(--accent-2); display: grid; place-items: center; font: 700 1.05rem var(--head); position: relative; z-index: 1; margin-bottom: 18px; transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }
.step__dot::before { content: counter(p); }
@media (hover: hover) and (pointer: fine) { .step:hover .step__dot { background: var(--accent); color: #fff; } }
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { font-size: .95rem; color: var(--ink-2); margin: 0; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.split__img { margin: 0; position: relative; }
.split__img img { width: 100%; aspect-ratio: 4/3.4; object-fit: cover; border-radius: var(--r-lg); }
.split__img--tall img { aspect-ratio: 4/4.6; }
.split__img figcaption { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.split__badge { position: absolute; left: -18px; bottom: 28px; background: var(--navy); color: #fff; border-radius: 14px; padding: 16px 20px; display: flex; gap: 14px; align-items: center; }
.split__badge b { font: 700 1.5rem/1 var(--head); color: #f4a981; }
.split__badge span { font-size: .85rem; color: rgba(255,255,255,.82); max-width: 16ch; display: block; line-height: 1.3; }
.checks { list-style: none; padding: 0; margin: 22px 0 32px; display: grid; gap: 12px; }
.checks li { padding-left: 34px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; }

/* CTA final */
.cta { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--navy); color: #fff; padding: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.cta h2 { margin-bottom: 12px; }
.cta p { color: rgba(255,255,255,.78); margin: 0; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* Cabecera de páginas interiores */
.page-hero { position: relative; padding: calc(var(--nav-h) + 72px) 0 80px; color: #fff; background: var(--navy); overflow: hidden; }
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.page-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,26,33,.95) 20%, rgba(7,26,33,.55) 70%, rgba(7,26,33,.35)); }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 18ch; }
.page-hero .lead { color: rgba(255,255,255,.82); }
.crumbs { font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: 20px; display: flex; gap: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: #fff; }

/* Servicios: subnavegación pegajosa + bloques por categoría */
.subnav { position: sticky; top: var(--nav-h); z-index: 30; background: var(--bg-2); }
.subnav__inner { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a { flex: none; text-decoration: none; font: 600 .88rem var(--head); padding: 9px 16px; border-radius: 999px; color: var(--ink-2); transition: background-color 160ms ease, color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .subnav a:hover { background: var(--bg); } }
.subnav a.is-active { background: var(--navy); color: #fff; }
.catblock { padding: clamp(56px, 7vw, 96px) 0; }
.catblock:nth-child(even) { background: var(--bg-2); }
.catblock__head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.catblock__head figure { margin: 0; }
.catblock__head img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r); }
.catblock__head figcaption { font-size: .78rem; color: var(--muted); margin-top: 8px; }
.catblock__for { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.catblock__for span { font-size: .85rem; font-weight: 600; background: var(--surface); padding: 6px 12px; border-radius: 999px; color: var(--ink-2); }
.services { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.svc { background: var(--surface); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; }
.svc__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.svc__tag { font: 800 .8rem/1 var(--head); background: var(--accent-soft); color: var(--accent-2); padding: 8px 11px; border-radius: 8px; letter-spacing: .03em; }
.svc__depth { font-size: .76rem; color: var(--muted); text-align: right; line-height: 1.3; }
.svc__depth b { display: block; color: var(--ink); font-family: var(--head); font-size: .9rem; }
.svc h3 { font-size: 1.12rem; }
.svc p { color: var(--ink-2); font-size: .95rem; }
.svc__label { font: 600 .9rem var(--head); color: var(--ink); margin: 6px 0 8px; }
.svc ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.svc li { font-size: .78rem; background: var(--bg); border-radius: 6px; padding: 5px 9px; color: var(--navy-3); }
.svc__cta { margin-top: auto; }

/* Sectores */
.sectors { grid-template-columns: repeat(3, 1fr); }
.sector { position: relative; padding: 0 0 26px; border-radius: var(--r); background: var(--surface); overflow: hidden; }
.sector__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 20px; transition: transform 600ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .sector:hover .sector__img { transform: scale(1.04); } }
.sector h3 { font-size: 1.12rem; padding: 0 26px; }
.sector p { font-size: .95rem; color: var(--ink-2); margin: 0 0 12px; padding: 0 26px; }
.sector__tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 26px; }
.sector__tags span { font-size: .74rem; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); padding: 4px 8px; border-radius: 6px; }

/* Comparativa / qué recibe el cliente */
.deliver { grid-template-columns: repeat(3, 1fr); }
.deliver__item { padding: 28px; border-radius: var(--r); background: var(--navy-2); }
.deliver__item b { display: block; font: 700 1.1rem var(--head); margin-bottom: 8px; color: #fff; }
.deliver__item p { font-size: .95rem; color: rgba(230,237,240,.8); margin: 0; }

/* FAQ */
.faq { display: grid; gap: 12px; }
details { background: var(--surface); border-radius: 16px; overflow: hidden; }
summary { cursor: pointer; padding: 20px 58px 20px 24px; font: 600 1.06rem var(--head); list-style: none; position: relative; transition: color 160ms ease; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v10M5 10h10' stroke='%23c2531d' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; transition: transform var(--t-ui) var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) { summary:hover { color: var(--accent-2); } }
details .faq__body { padding: 0 24px 22px; color: var(--ink-2); }
details[open] .faq__body { animation: faqIn var(--t-ui) var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }
details .faq__body p:last-child { margin: 0; }
.faq__group { margin-bottom: 40px; }
.faq__group h2 { font-size: 1.4rem; margin-bottom: 16px; }

/* Contacto / formulario */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-cards { display: grid; gap: 12px; margin: 26px 0; }
.contact-card { display: flex; gap: 16px; align-items: center; padding: 18px 20px; background: var(--surface); border-radius: 14px; text-decoration: none; transition: transform var(--t-ui) var(--ease); }
a.contact-card:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { a.contact-card:hover { transform: translateX(4px); } }
.contact-card__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card__icon--wa { background: #dff5e7; color: var(--wa); }
.contact-card span { display: block; font-size: .85rem; color: var(--muted); }
.contact-card b { font-family: var(--head); word-break: break-word; }
.tip { background: var(--accent-soft); color: var(--ink); padding: 16px 20px; border-radius: 12px; font-size: .95rem; }
.form { background: var(--surface); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 40px); display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 7px; font-size: .88rem; font-weight: 600; }
.form input:not([type=checkbox]), .form select, .form textarea { font: inherit; font-weight: 400; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px; background: #fcfbf9; color: var(--ink); width: 100%; transition: border-color 160ms ease, box-shadow 160ms ease; }
.form ::placeholder { color: #7a888d; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 4px rgba(20,64,77,.12); background: #fff; }
.form .is-invalid { border-color: #c0392b !important; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: .88rem; font-weight: 600; margin-bottom: 10px; }
fieldset.is-invalid legend { color: #c0392b; }
.chips-group { display: grid; gap: 10px; }
.chips-group > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-group .chips__cat { font: 600 .85rem var(--head); color: var(--ink-2); width: 100%; margin-top: 4px; }
.chip { display: inline-flex; font-weight: 500; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { padding: 8px 13px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .85rem; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform var(--t-press) var(--ease); user-select: none; background: #fff; }
.chip span:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .chip span:hover { border-color: var(--navy-3); } }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form__msg { margin: 0; font-weight: 600; min-height: 1.4em; }
.form__msg.ok { color: var(--wa); }
.form__msg.err { color: #c0392b; }
.hp { position: absolute; left: -9999px; }

/* Créditos de fotos */
.credits { font-size: .78rem; color: var(--muted); }
.credits summary { padding: 10px 0; font: 600 .82rem var(--head); color: var(--muted); }
.credits summary::after { display: none; }
.credits details { background: none; border: 0; }
.credits ul { padding-left: 18px; margin: 0; columns: 2; gap: 28px; }
.credits li { margin-bottom: 4px; break-inside: avoid; }
.credits a { color: var(--ink-2); }

/* Footer */
.footer { background: #050f14; color: rgba(255,255,255,.68); padding: 64px 0 28px; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; transition: color 160ms ease; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer__social { display: flex; gap: 10px; margin-top: 18px; }
.footer__social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; transition: background-color var(--t-ui) ease, transform var(--t-press) var(--ease); }
.footer__social a:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
  .footer a:hover { color: #fff; }
  .footer__social a:hover { background: var(--accent); }
}
.footer__social svg { width: 20px; height: 20px; }
.footer__motto { font: 500 1.05rem var(--head); color: #f4a981; margin-bottom: 10px; }
.footer__bottom { padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .8rem; }

/* WhatsApp flotante: flota de verdad, así que sí lleva sombra; el pulso se repite solo tres veces */
.wa-float { position: fixed; right: 22px; bottom: 22px; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px -6px rgba(7,26,33,.45); z-index: 60; transition: transform var(--t-press) var(--ease); }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); opacity: 0; animation: pulse 2.4s var(--ease) 2s 3; }
.wa-float:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .wa-float:hover { transform: scale(1.06); } }
.wa-float svg { width: 30px; height: 30px; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* Animaciones de aparición */
/* Entradas cortas (20 px) con curva de salida fuerte; el título aparece antes que el texto y la imagen */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity var(--t-enter) var(--ease), transform var(--t-enter) var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal="left"] { transform: translateX(-24px); }
[data-reveal="right"] { transform: translateX(24px); }
[data-reveal="scale"] { transform: scale(.97); }
[data-reveal].is-inview { opacity: 1; transform: none; }
.section__head[data-reveal] > * { opacity: 0; transform: translateY(14px); transition: opacity var(--t-enter) var(--ease), transform var(--t-enter) var(--ease); }
.section__head[data-reveal] > :nth-child(2) { transition-delay: 80ms; }
.section__head[data-reveal] > :nth-child(3) { transition-delay: 160ms; }
.section__head[data-reveal].is-inview > * { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity var(--t-enter) var(--ease), transform var(--t-enter) var(--ease); transition-delay: var(--d, 0ms); }
.stagger > *.is-inview { opacity: 1; transform: none; }
.hero [data-hero], .page-hero [data-hero] { opacity: 0; transform: translateY(20px); animation: heroIn 700ms var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes heroIn { to { opacity: 1; transform: none; } }
/* Revelado de imágenes de sección con clip-path (de abajo hacia arriba) */
.split__img[data-reveal] img, .catblock__head figure img { clip-path: inset(0 0 0 0 round var(--r-lg)); }
.split__img[data-reveal]:not(.is-inview) img { clip-path: inset(12% 0 0 0 round var(--r-lg)); }
.split__img[data-reveal] img { transition: clip-path 900ms var(--ease-in-out); }

/* Hero de una sola columna (inicio) */
.hero__content--single { grid-template-columns: 1fr; }
.hero__content--single h1 { max-width: 18ch; }
.timeline { list-style: none; padding: 0; margin: 0; }

/* Asistente "¿Qué estudio necesito?" */
.asis { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.asis__q fieldset { margin: 0 0 26px; }
.asis__q legend { font: 600 1.1rem var(--head); margin-bottom: 12px; }
.asis__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.asis__opts .chip span { font-size: .92rem; padding: 10px 15px; }
.asis__check { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; cursor: pointer; }
.asis__check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.asis__out { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: clamp(24px, 3.5vw, 40px); position: sticky; top: calc(var(--nav-h) + 20px); }
.asis__out.is-empty { background: var(--surface); color: var(--ink); }
.asis__empty-t { font: 700 1.5rem/1.2 var(--head); margin-bottom: 10px; }
.asis__empty { color: var(--ink-2); margin: 0; }
.asis__main { animation: asisIn 260ms var(--ease); }
@keyframes asisIn { from { opacity: 0; transform: translateY(8px); } }
.asis__sigla { display: block; font: 800 clamp(3rem, 7vw, 5rem)/.9 var(--head); color: #f4a981; letter-spacing: -.04em; margin-bottom: 14px; }
.asis__main h3 { font-size: 1.4rem; }
.asis__main p { color: rgba(255,255,255,.86); }
.asis__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.asis__facts dt { font-size: .85rem; color: rgba(255,255,255,.72); }
.asis__facts dd { margin: 2px 0 0; font: 600 .98rem/1.35 var(--head); }
.asis__out .link { color: #f4a981; }
.asis__sub { margin: 24px 0 8px; font-weight: 600; }
.asis__extra { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.asis__extra a { display: flex; gap: 12px; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--navy-2); text-decoration: none; transition: background-color 160ms ease; }
.asis__extra b { color: #f4a981; font-family: var(--head); min-width: 4.2em; }
.asis__extra span { color: rgba(255,255,255,.86); font-size: .94rem; }
@media (hover: hover) and (pointer: fine) { .asis__extra a:hover { background: var(--navy-3); } }
.asis__note { font-size: .95rem; color: rgba(255,255,255,.8); margin: 18px 0 22px; }
.asis__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Sección ilustrativa de tomografía (la "firma" del sitio) */
.perfil { margin: 0; }
.perfil svg { width: 100%; height: auto; display: block; overflow: visible; }
.perfil__axis text, .perfil__legend text { font: 500 13px var(--body); fill: var(--ink-2); }
.perfil__electrodes path { stroke: var(--ink); stroke-width: 2; }
.perfil__frame { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .45; }
.perfil__note { font: 600 15px var(--head); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.perfil__note--light { fill: #fff; stroke: #0d2c36; }
.perfil__notes path { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.perfil figcaption { font-size: .88rem; color: var(--ink-2); margin-top: 18px; }
.perfil[data-reveal] .perfil__data { clip-path: inset(0 100% 0 0); transition: clip-path 1600ms var(--ease-in-out) 250ms; }
.perfil.is-inview .perfil__data { clip-path: inset(0 0 0 0); }
.perfil[data-reveal] .perfil__notes { opacity: 0; transition: opacity 400ms ease 1700ms; }
.perfil.is-inview .perfil__notes { opacity: 1; }
.perfil__read { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.perfil__read li { display: flex; gap: 14px; }
.perfil__read .sw { flex: none; width: 18px; height: 18px; border-radius: 5px; margin-top: 4px; }

/* Comparador de profundidades: vertical en escritorio (la profundidad baja), horizontal en celular */
.depth { margin: 0; --h: 360px; --lbl: 2.6rem; --cat: 1.9rem; }
.depth__ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-bottom: 28px; }
.depth__ctrl label { font: 600 1.05rem var(--head); }
.depth__ctrl output { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.depth__ctrl input { flex: 1 1 260px; max-width: 460px; accent-color: var(--accent); height: 28px; cursor: pointer; }
.depth__count { margin: 0; color: var(--ink-2); flex-basis: 100%; }
.depth__plot { position: relative; padding-left: 58px; }
.depth__axis { position: absolute; left: 0; right: 0; top: calc(var(--cat) + var(--lbl)); height: var(--h); pointer-events: none; }
.depth__axis span { position: absolute; left: 0; right: 0; top: var(--p); height: 0; display: flex; align-items: center; }
.depth__axis i { font-style: normal; width: 50px; text-align: right; padding-right: 8px; font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.depth__axis span::after { content: ""; flex: 1; border-top: 1px solid rgba(15, 31, 37, .09); }
.depth__marker { position: absolute; left: 50px; right: 0; top: var(--m); height: 0; border-top: 2px solid var(--accent); z-index: 2; transition: top 200ms var(--ease); }
.depth__marker b { position: absolute; right: 0; transform: translateY(-50%); background: var(--accent); color: #fff; font: 600 .74rem var(--head); padding: 3px 8px; border-radius: 999px; }
.depth__groups { position: relative; z-index: 1; display: flex; gap: 14px; }
.depth__group { flex: var(--n) 1 0; min-width: 6.8rem; }
.depth__cat { display: block; height: var(--cat); font: 600 .85rem var(--head); color: var(--ink); white-space: nowrap; }
.depth__cols { display: flex; }
.depth__col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); }
.depth__label { height: var(--lbl); display: flex; align-items: flex-end; justify-content: center; text-align: center; font: 700 .76rem/1.15 var(--head); padding-bottom: 8px; hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.depth__track { position: relative; height: var(--h); width: 100%; }
.depth__bar { position: absolute; left: 50%; width: 14px; margin-left: -7px; top: var(--a); height: calc(var(--b) - var(--a)); min-height: 6px; background: var(--navy-3); border-radius: 4px; transform-origin: top; transition: transform 700ms var(--ease) calc(var(--i, 0) * 35ms), background-color 200ms ease; }
.depth__range { font-size: .72rem; line-height: 1.25; color: var(--ink-2); text-align: center; margin-top: 8px; padding: 0 2px; }
.depth__col.is-off .depth__bar { background: #cfc6b5; }
.depth__col.is-off .depth__label { color: var(--muted); }
.depth__col.is-current .depth__bar { background: var(--accent); }
.depth__col.is-current.is-off .depth__bar { background: var(--accent); opacity: .45; }
@media (hover: hover) and (pointer: fine) { .depth__col:hover .depth__bar { background: var(--accent-2); } }
.depth[data-reveal]:not(.is-inview) .depth__bar { transform: scaleY(0); }
.depth__tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 12px)); width: max-content; max-width: 250px; background: var(--navy); color: #fff; padding: 10px 13px; border-radius: 10px; font-size: .84rem; line-height: 1.4; pointer-events: none; box-shadow: 0 10px 24px -10px rgba(7, 26, 33, .55); }
.depth__tip b { display: block; font-family: var(--head); margin-bottom: 2px; }
.depth__tip span { display: block; color: rgba(255,255,255,.84); }
.depth__tip em { display: block; font-style: normal; color: #f4a981; margin-top: 4px; }
.depth__foot { font-size: .88rem; color: var(--ink-2); margin: 22px 0 0; }

/* Aplicaciones: lista que cambia una sola foto grande */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.apps__media { position: sticky; top: calc(var(--nav-h) + 20px); aspect-ratio: 4 / 3.3; border-radius: var(--r-lg); overflow: hidden; background: var(--navy-2); }
.apps__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 400ms ease, transform 900ms var(--ease); }
.apps__media img.is-on { opacity: 1; transform: none; }
.apps__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.apps__item { border-radius: 16px; transition: background-color 200ms ease; }
.apps__item.is-on { background: var(--surface); }
.apps__item button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: 18px 22px; font: 700 clamp(1.15rem, 2vw, 1.45rem)/1.2 var(--head); color: var(--ink-2); border-radius: 16px; transition: color 160ms ease; }
.apps__item button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.apps__item.is-on button { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .apps__item button:hover { color: var(--accent-2); } }
.apps__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 280ms var(--ease); }
.apps__body > div { overflow: hidden; padding: 0 22px; }
.apps__item.is-on .apps__body { grid-template-rows: 1fr; }
.apps__item.is-on .apps__body > div { padding-bottom: 20px; }
.apps__body p { color: var(--ink-2); margin-bottom: 12px; }
.apps__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.apps__tags a { font-size: .82rem; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); padding: 4px 9px; border-radius: 6px; text-decoration: none; }

/* Fichas de estudio (estudio-*.html) */
.page-hero .hero__cta { margin-top: 28px; }
.facts-band { background: var(--navy-2); color: #fff; padding: clamp(28px, 4vw, 44px) 0; }
.facts { display: grid; grid-template-columns: .8fr 1fr 1fr 1.3fr; gap: clamp(18px, 3vw, 40px); margin: 0; }
.facts dt { font-size: .88rem; color: rgba(255,255,255,.72); margin-bottom: 4px; }
.facts dd { margin: 0; font: 600 1.05rem/1.4 var(--head); }
.facts div:first-child dd { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; color: #f4a981; }
.facts__note { margin: 20px 0 0; color: rgba(255,255,255,.82); font-size: .95rem; }
.uses { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.uses h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.uses__obj { color: var(--ink-2); }
.uses__obj a { color: var(--accent-2); font-weight: 600; }
.limits { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.limits li { padding: 14px 18px; background: var(--bg-2); border-radius: 12px; color: var(--ink); }
.related { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.related a { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: baseline; padding: 18px 20px; background: var(--surface); border-radius: 14px; text-decoration: none; transition: transform var(--t-press) var(--ease); }
.related a:active { transform: scale(.98); }
.related b { grid-row: 1 / 3; font: 800 1.15rem var(--head); color: var(--accent-2); min-width: 3.4em; }
.related span { font: 600 1rem/1.3 var(--head); }
.related em { font-style: normal; font-size: .88rem; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .related a:hover span { color: var(--accent-2); } }
.svc h3 a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .svc h3 a:hover { color: var(--accent-2); } }
.svc__deliver { margin-bottom: 18px; }
.svc__links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.link--muted { color: var(--ink-2); }
@media (max-width: 1024px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .uses { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; } }

/* Reseñas */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rate__stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate__stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate__stars label { cursor: pointer; padding: 2px; border-radius: 8px; transition: transform var(--t-press) var(--ease); }
.rate__stars label:active { transform: scale(.9); }
.rate__stars svg { width: 38px; height: 38px; display: block; fill: #ddd5c6; transition: fill 120ms ease; }
.rate__stars input:checked ~ label svg { fill: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .rate__stars label:hover svg, .rate__stars label:hover ~ label svg { fill: var(--accent-2); }
}
.rate__stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.rate__txt { display: inline-block; margin-left: 12px; vertical-align: middle; font: 600 .95rem var(--head); color: var(--accent-2); }
.rate.is-invalid legend { color: #c0392b; }
.resenas__google { margin-top: 26px; padding: 20px 22px; background: var(--surface); border-radius: 16px; }
.resenas__google p { margin-bottom: 14px; color: var(--ink-2); }
.resenas__vacio { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; margin: 0 0 22px; }
.resenas__prom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 28px; }
.resenas__prom b { font: 800 2.6rem/1 var(--head); }
.resenas__prom > span:last-child { color: var(--ink-2); }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: #ddd5c6; display: block; }
.stars .on svg { fill: var(--accent); }
.resenas__grid { list-style: none; padding: 0; margin: 0; columns: 3 300px; column-gap: 18px; }
.resena { break-inside: avoid; background: var(--surface); border-radius: 16px; padding: 22px 24px; margin-bottom: 18px; }
.resena blockquote { margin: 12px 0 16px; font-size: 1.02rem; color: var(--ink); }
.resena__autor { margin: 0; }
.resena__autor span { display: block; font-size: .88rem; color: var(--ink-2); margin-top: 2px; }
.ask-review { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: center; padding: clamp(24px, 3.5vw, 36px) clamp(24px, 4vw, 44px); background: var(--bg-2); border-radius: var(--r-lg); margin-top: 18px; }
.ask-review h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: 6px; }
.ask-review p { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) { .ask-review { grid-template-columns: 1fr; } }

/* Rockie: asistente guiado (botón sobre el de WhatsApp; ventana que crece desde la esquina) */
.rk-launch { position: fixed; right: 22px; bottom: 94px; z-index: 61; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 4px; background: #fff; cursor: pointer; box-shadow: 0 8px 22px -6px rgba(7,26,33,.45); transition: transform var(--t-press) var(--ease); }
.rk-launch:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .rk-launch:hover { transform: scale(1.06) rotate(-4deg); } }
.rk-launch:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.rk-face { width: 100%; height: 100%; display: block; }
.rk-eyes { transform-origin: 32px 33px; animation: rkBlink 5s infinite; }
@keyframes rkBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.rk-root.is-chat .rk-launch { opacity: 0; pointer-events: none; }
.rk-hello { position: fixed; right: 94px; bottom: 100px; z-index: 61; max-width: 240px; background: #fff; color: var(--ink); border-radius: 16px 16px 4px 16px; padding: 12px 34px 12px 14px; box-shadow: 0 10px 26px -10px rgba(7,26,33,.45); cursor: pointer; font-size: .92rem; animation: rkIn 260ms var(--ease); }
.rk-hello p { margin: 0; }
.rk-hello__x { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 1.2rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.rk { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: min(380px, calc(100vw - 32px)); height: min(620px, calc(100svh - 120px)); display: flex; flex-direction: column; background: var(--bg); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px -18px rgba(7,26,33,.55); transform-origin: bottom right; opacity: 0; transform: scale(.96) translateY(8px); transition: opacity 180ms ease, transform 220ms var(--ease); }
.rk.is-open { opacity: 1; transform: none; }
.rk[hidden], .rk-hello[hidden] { display: none; }
.rk__head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--navy); color: #fff; }
.rk__avatar { width: 44px; height: 44px; border-radius: 50%; background: #fff; padding: 3px; flex: none; }
.rk__head b { display: block; font: 700 1.05rem var(--head); }
.rk__head div span { font-size: .8rem; color: rgba(255,255,255,.75); }
.rk__close { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.rk__log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.rk-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: .94rem; line-height: 1.45; animation: rkIn 220ms var(--ease); }
.rk-msg--bot { background: var(--surface); border-bottom-left-radius: 4px; align-self: flex-start; }
.rk-msg--you { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
@keyframes rkIn { from { opacity: 0; transform: translateY(6px); } }
.rk-typing { display: flex; gap: 4px; padding: 13px 14px; }
.rk-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: rkDot 900ms infinite ease-in-out; }
.rk-typing span:nth-child(2) { animation-delay: 150ms; }
.rk-typing span:nth-child(3) { animation-delay: 300ms; }
@keyframes rkDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.rk-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; animation: rkIn 220ms var(--ease); }
.rk-opt { font: 600 .86rem/1.25 var(--head); text-align: left; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--accent); background: #fff; color: var(--accent-2); cursor: pointer; text-decoration: none; transition: background-color 140ms ease, color 140ms ease, transform var(--t-press) var(--ease); }
.rk-opt:active { transform: scale(.96); }
.rk-opt--primary { background: var(--accent); color: #fff; }
.rk-opt--wa { border-color: var(--wa); color: #138a45; }
@media (hover: hover) and (pointer: fine) { .rk-opt:hover { background: var(--accent-soft); } .rk-opt--primary:hover { background: var(--accent-2); color: #fff; } }
.rk__input { display: flex; gap: 8px; padding: 10px; background: var(--surface); }
.rk__input input { flex: 1; min-width: 0; font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); }
.rk__input input:focus { outline: none; border-color: var(--navy-3); }
.rk__input button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.rk__input button svg { width: 20px; height: 20px; }
@media (max-width: 600px) {
  .rk-launch { right: 16px; bottom: 90px; width: 56px; height: 56px; }
  .rk-hello { right: 82px; bottom: 96px; max-width: 200px; }
  .rk { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100svh - 80px); }
}
@media (prefers-reduced-motion: reduce) { .rk-eyes { animation: none; } }

/* Responsive */
@media (max-width: 1024px) {
  .cats { grid-template-columns: 1fr 1fr; }
  .cats .cat:first-child { grid-row: auto; }
  .values { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { left: 26px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .step { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding-bottom: 28px; }
  .step__dot { margin: 0; }
  .sectors, .deliver { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --nav-h: 68px; }
  .nav__toggle { display: block; }
  .nav__menu { position: fixed; inset: var(--nav-h) 0 auto; background: var(--navy); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 22px; transform: translateY(-120%); transition: transform .4s var(--ease); box-shadow: 0 12px 24px rgba(0,0,0,.25); z-index: -1; color: #fff; }
  .nav__menu a:not(.btn) { padding: 14px 6px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav__menu a.is-active:not(.btn)::after { display: none; }
  .nav__menu .btn { margin: 16px 0 0; }
  .nav.is-open { background: var(--navy); color: #fff; }
  .nav.is-open .nav__menu { transform: none; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .hero { min-height: auto; padding-bottom: 72px; }
  .hero__content { grid-template-columns: 1fr; }
  .hero__aside { grid-template-columns: 1fr 1fr; }
  .hero__scroll { display: none; }
  .split, .catblock__head, .contact-grid { grid-template-columns: 1fr; }
  .split--rev .split__img { order: 2; }
  .split__badge { left: 12px; }
  .cta { grid-template-columns: 1fr; }
  .cta__actions { justify-content: flex-start; }
  .credits ul { columns: 1; }
}
@media (max-width: 600px) {
  .wrap, .narrow { width: min(100% - 32px, 1200px); }
  .cats, .values, .sectors, .deliver, .hero__aside, .form__row, .footer__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .logo__full { display: none; }
  .logo__compact { display: block; }

  .logo svg { height: 24px; }
  .cat { min-height: 300px; }
  .marquee__track { animation-duration: 30s; }
}
/* Herramientas en tableta y celular */
@media (max-width: 860px) {
  .asis, .apps { grid-template-columns: 1fr; }
  .asis__out { position: static; }
  .asis__facts { grid-template-columns: 1fr 1fr; }
  .apps__media { position: relative; top: auto; aspect-ratio: 16 / 10; }
  .perfil__read { grid-template-columns: 1fr; gap: 16px; }
  .perfil__note { font-size: 30px; stroke-width: 8px; }
  .perfil__axis text, .perfil__legend text { font-size: 24px; }
  .perfil__legend rect { height: 18px; }
  .perfil__legend text:nth-of-type(4), .perfil__legend text:nth-of-type(5) { display: none; }
  .perfil svg { margin-inline: -12px; width: calc(100% + 24px); }
  .perfil figcaption { margin-top: 26px; }
}

/* Comparador acostado (profundidad de izquierda a derecha) cuando no caben 17 columnas */
@media (max-width: 1100px) {
  .depth { --lbl-w: 96px; }
  .depth__plot { padding-left: 0; padding-top: 30px; }
  .depth__axis { left: var(--lbl-w); right: 0; top: 0; bottom: 0; height: auto; }
  .depth__axis span { top: 0; bottom: 0; left: var(--p); right: auto; width: 0; height: auto; display: block; }
  .depth__axis i { position: absolute; top: 0; left: 0; width: auto; padding: 0; transform: translateX(-50%); white-space: nowrap; font-size: .7rem; }
  .depth__axis span::after { position: absolute; top: 22px; bottom: 0; left: 0; border-top: 0; border-left: 1px solid rgba(15, 31, 37, .09); }
  .depth__marker { left: var(--m); right: auto; top: 22px; bottom: 0; height: auto; width: 0; border-top: 0; border-left: 2px solid var(--accent); transition: left 200ms var(--ease); }
  .depth__marker b { display: none; }
  .depth__groups { display: block; }
  .depth__group { min-width: 0; margin-bottom: 8px; }
  .depth__cat { height: auto; margin: 12px 0 4px; }
  .depth__cols { display: block; }
  .depth__col { display: grid; grid-template-columns: var(--lbl-w) 1fr; grid-template-rows: auto auto; align-items: center; padding: 5px 0; }
  .depth__label { grid-column: 1; grid-row: 1; height: auto; display: block; text-align: left; padding: 0 10px 0 0; font-size: .82rem; }
  .depth__track { grid-column: 2; grid-row: 1 / 3; height: 12px; }
  .depth__bar { top: 0; height: 100%; left: var(--a); width: calc(var(--b) - var(--a)); margin-left: 0; min-width: 6px; min-height: 0; transform-origin: left; }
  .depth__range { grid-column: 1; grid-row: 2; text-align: left; margin-top: 1px; padding: 0 10px 0 0; }
  .depth[data-reveal]:not(.is-inview) .depth__bar { transform: scaleX(0); }
}

/* Movimiento reducido: sin desplazamientos; se conservan los fundidos breves que ayudan a entender */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-property: opacity, color, background-color, border-color !important; transition-duration: 200ms !important; }
  [data-reveal], .stagger > *, .section__head[data-reveal] > *, .hero [data-hero], .page-hero [data-hero] { transform: none !important; }
  .hero [data-hero], .page-hero [data-hero] { opacity: 1; }
  .split__img[data-reveal] img { clip-path: none !important; }
  .hero__media img { transform: none; }
  .wave path { stroke-dashoffset: 0; }
  .perfil .perfil__data { clip-path: none !important; }
  .perfil .perfil__notes { opacity: 1 !important; }
  .depth .depth__bar { transform: none !important; }
  .apps__media img { transform: none; }
}
