/* Base, componentes, hojas apiladas, header, megamenús, menú de celular y footer.
   Las media queries van al final del archivo. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; font-family: var(--fb); font-size: 16px; line-height: 1.65; color: var(--n); background: #fff; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; }
:focus-visible { outline: 2px solid var(--m); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--m); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }
@media (min-width: 981px) { .wrap { padding-left: 48px; padding-right: 48px; } }

/* ---------- tipografía ---------- */
.sy { font-family: var(--fs); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
.h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.05; }
.h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--mu); max-width: 56ch; }
.it { font-family: var(--fl); font-style: italic; font-weight: 400; letter-spacing: 0; }
.k { font-family: var(--fm); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--m-ink); display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.k::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; flex: none; }
.hl { background: linear-gradient(transparent 58%, var(--y) 58%); padding: 0 .1em; }
.muted { color: var(--mu); }

/* ---------- botones y pills ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 12px; font-family: var(--fb); font-weight: 500; font-size: 15px; line-height: 1.2; text-decoration: none; border: 1px solid transparent; white-space: nowrap; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.btn:hover { transform: translateY(-1px); }
.bm { background: var(--m-btn); color: #fff; box-shadow: 0 8px 24px -12px rgba(242, 34, 110, .75); }
.bo { border-color: var(--n); color: var(--n); background: #fff; }
.bw { background: #fff; color: var(--n); }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.arw { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .2); margin: -6px -10px -6px 4px; }
.arw svg { width: 14px; height: 14px; }
.bo .arw, .bw .arw { background: var(--lav); }
.btn.sm .arw { width: 22px; height: 22px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.pill { display: inline-flex; align-items: center; font-family: var(--fm); font-size: 11px; letter-spacing: .04em; line-height: 1.5; padding: 2px 9px; border-radius: 6px; white-space: nowrap; }
.pill.live { background: var(--y); color: var(--n); }
.pill.cb { background: var(--n); color: #fff; }
.pill.st-diagnose { background: var(--a); color: var(--n); }
.pill.st-build { background: var(--m-btn); color: #fff; }
.pill.st-run { background: var(--na); color: #fff; }
.pill.stage { background: var(--lav); color: var(--mu); border: 1px solid var(--ln); }

/* ---------- tarjetas ---------- */
.card { background: #fff; border: 1px solid var(--ln); border-radius: 18px; padding: 22px; color: var(--n); }
.card p { color: var(--mu); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); }

/* ---------- mesh Tide ---------- */
.mesh { position: relative; overflow: hidden; isolation: isolate; background: var(--n); color: #fff; }
.mesh > .mb { position: absolute; inset: 0; z-index: -1; background: var(--tide); }
.mesh > .mb canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.mesh .k { color: var(--a); }
.mesh .lead { color: rgba(255, 255, 255, .86); }
.mesh .card { color: var(--n); }
.mesh.shape { position: absolute; top: 0; right: -4%; width: clamp(150px, 24%, 480px); height: 80%; clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%); border-radius: 0 0 0 28px; opacity: .95; z-index: 0; }
.mesh.shape::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .35), transparent 30%); }

/* ---------- secciones y hojas apiladas (clases calculadas en PHP según el orden) ---------- */
.sec { padding: 96px 0; position: relative; }
.sec.dk { border-radius: 48px 48px 0 0; margin-top: -48px; z-index: 1; padding-top: 104px; }
.sec.lt { background: #fff; border-radius: 48px 48px 0 0; margin-top: -48px; z-index: 2; padding-top: 104px; }
.sec.cn { padding-top: 16px; }
.sec.pbx { padding-bottom: 144px; }
.rv { opacity: 1; transform: none; }
.js .rv:not(.in) { opacity: 0; transform: translateY(16px); }
/* El primer bloque se ve desde el primer render (LCP): sin animación de entrada. */
.js main > .sec:first-child .rv { opacity: 1; transform: none; transition: none; }
.js .rv { transition: opacity .7s, transform .7s cubic-bezier(.2, .7, .2, 1); }

/* ---------- header (píldora flotante) ---------- */
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; padding: 12px var(--gut-r) 0 var(--gut); transition: transform .38s cubic-bezier(.2, .7, .2, 1); }
.hdr.hid { transform: translateY(calc(-100% + 14px)); }
.hdr.hid .bar::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 46px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .6); transform: translateX(-50%); }
.bar { position: relative; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 22px; background: var(--n); color: #fff; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 10px 12px 10px 20px; box-shadow: 0 14px 34px -16px rgba(12, 9, 35, .55); }
.bar .logo { display: block; color: #fff; flex: none; }
.bar .logo svg { width: 112px; height: auto; }
.nav { display: flex; gap: 30px; font-size: 15.5px; font-weight: 500; align-items: center; margin: 0 auto; }
.nav a, .nav button { color: #fff; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; opacity: .92; display: inline-flex; align-items: center; gap: 4px; }
.nav a:hover, .nav button:hover, .nav button[aria-expanded="true"] { opacity: 1; color: var(--a); }
.nav .cv { width: 10px; height: 10px; transition: transform .2s; }
.nav button[aria-expanded="true"] .cv { transform: rotate(180deg); }
.nr { display: flex; align-items: center; gap: 14px; }
.fam { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .18); white-space: nowrap; }
.fam .fl { display: flex; align-items: flex-start; gap: 16px; }
.fb { display: grid; justify-items: start; gap: 3px; text-decoration: none; }
.fb img { display: block; }
.fb small { font-family: var(--fm); font-size: 9px; letter-spacing: .02em; line-height: 1; color: rgba(255, 255, 255, .62); }
.fb:hover small { color: #fff; }
.fam .ft { font-family: var(--fm); font-size: 9px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.fam img { height: 13px; width: auto; opacity: .82; transition: opacity .2s; }
.fam .fl .fb { height: auto; }
.fam .lg-tt { height: 15px; }
.fam .lg-rl { height: 12px; margin-top: 2px; }
.fam .fb:last-child small { margin-top: 1px; }
.fsite .fl .lg-tt { height: 19px; }
.fsite .fl .lg-rl { height: 14px; }
.fam a:hover img { opacity: 1; }
.lang { display: flex; gap: 2px; font-family: var(--fm); font-size: 12px; }
.lang a { color: rgba(255, 255, 255, .6); text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.lang a[aria-current="true"] { color: #fff; background: rgba(255, 255, 255, .14); }
.bar .btn { padding: 9px 15px; font-size: 14px; }
.mtog { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #fff; cursor: pointer; place-items: center; }
.mtog svg { width: 20px; height: 20px; }

/* megamenús */
.mm { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; color: var(--n); border: 1px solid var(--ln); border-radius: 20px; box-shadow: 0 30px 70px -30px rgba(12, 9, 35, .5); padding: 18px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .25s, visibility .25s; z-index: 40; }
.mm.open { opacity: 1; visibility: visible; transform: none; }
.mm-h { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 14px; }
.mm-h .k { margin: 0; }
.mm-h a svg { width: 14px; height: 14px; }
.mm-h a { font-size: 14px; color: var(--m-ink); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.mm-g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mm-t { display: block; text-decoration: none; color: inherit; border-radius: 14px; padding: 6px; transition: background .2s; }
.mm-t:hover, .mm-t:focus-visible { background: var(--lav); }
.mm-t .th { display: block; position: relative; overflow: hidden; height: 112px; border-radius: 10px; background: linear-gradient(140deg in oklab, var(--n), var(--na) 50%, var(--p) 80%, var(--m)); }
.mm-t b { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--fs); font-weight: 500; font-size: 15px; margin: 10px 4px 2px; }
.mm-t small { display: block; font-size: 12.5px; color: var(--mu); margin: 0 4px 4px; line-height: 1.4; }
.mm-f { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--lav); font-size: 13.5px; text-decoration: none; color: inherit; }
.mm-f b { font-family: var(--fs); font-weight: 500; }
.mm-svc { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mm-s { display: grid; gap: 4px; align-content: start; text-decoration: none; color: inherit; border-radius: 14px; padding: 6px 6px 10px; transition: background .2s; }
.mm-s:hover, .mm-s:focus-visible { background: var(--lav); }
.mm-s .ill { position: relative; display: flex; height: 96px; border-radius: 10px; padding: 8px; margin-bottom: 6px; overflow: hidden; background: linear-gradient(135deg in oklab, #0C0923, #393B8F, #677CBD, #F2226E, #79F2E6); }
.mm-s:nth-child(2) .ill { background: linear-gradient(160deg in oklab, #0C0923, #393B8F 40%, #F2226E); }
.mm-s:nth-child(3) .ill { background: linear-gradient(110deg in oklab, #393B8F, #677CBD 45%, #79F2E6); }
.mm-s:nth-child(4) .ill { background: linear-gradient(135deg in oklab, #F2226E, #393B8F 60%, #0C0923); }
.mm-s:nth-child(5) .ill { background: linear-gradient(200deg in oklab, #0C0923, #393B8F 50%, #677CBD); }
.mm-s .ill .pill { position: relative; z-index: 1; align-self: flex-start; font-size: 10px; }
.mm-s .ill .art { position: absolute; left: 50%; top: 60%; height: 64%; width: auto; transform: translate(-50%, -50%); }
.mm-s b { font-family: var(--fs); font-weight: 500; font-size: 15px; margin: 0 4px; line-height: 1.25; }
.mm-s small { font-size: 12.5px; color: var(--mu); margin: 0 4px; line-height: 1.4; }
.mm-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mm-col { border-radius: 14px; padding: 14px; background: var(--lav); }
.mm-col .pill { margin-bottom: 10px; }
.mm-col a { display: block; text-decoration: none; padding: 8px 0; border-top: 1px solid var(--ln); }
.mm-col a:first-of-type { border-top: 0; }
.mm-col a b { display: block; font-family: var(--fs); font-weight: 500; }
.mm-col a small { color: var(--mu); font-size: 12.5px; line-height: 1.4; display: block; }
.mm-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; }
.mm-list a { display: block; text-decoration: none; padding: 10px 12px; border-radius: 12px; }
.mm-list a:hover, .mm-list a:focus-visible { background: var(--lav); }
.mm-list b { font-family: var(--fs); font-weight: 500; display: block; }
.mm-list small { color: var(--mu); font-size: 12.5px; }

/* menú de celular */
.msheet { position: fixed; inset: 0; z-index: 70; background: var(--n); color: #fff; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gut-r) calc(env(safe-area-inset-bottom, 0px) + 16px) var(--gut); overflow-y: auto; }
.msheet .top { display: flex; align-items: center; justify-content: space-between; }
.msheet .top svg.wm { width: 112px; color: #fff; }
.msheet details { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.msheet summary { list-style: none; cursor: pointer; padding: 18px 0; font-family: var(--fs); font-size: 22px; display: flex; justify-content: space-between; align-items: center; }
.msheet summary::-webkit-details-marker { display: none; }
.msheet summary .cv { width: 14px; height: 14px; flex: none; transition: transform .2s; }
.msheet details[open] > summary .cv { transform: rotate(180deg); }
.msheet details a, .msheet .plain { display: block; text-decoration: none; color: #fff; padding: 10px 0; }
.msheet details a small { display: block; color: rgba(255, 255, 255, .6); font-size: 13px; }
.msheet .plain { font-family: var(--fs); font-size: 22px; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.msheet .bottom { margin-top: auto; padding-top: 24px; display: grid; gap: 16px; }
.msheet .bottom .btn { justify-content: center; }
.msheet .fam { border: 0; padding: 0; }
.msheet .lang a { font-size: 14px; padding: 6px 10px; }

/* ---------- footer ---------- */
.fsite { background: var(--n); color: #C9C6E6; font-size: 14px; position: relative; z-index: 3; }
.fsite .wrap { padding-top: 64px; padding-bottom: 28px; }
.fgrid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 28px; }
.fgrid .logo svg { width: 130px; color: #fff; margin-bottom: 12px; }
.fgrid h2 { font-family: var(--fb); font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 12px; }
.fgrid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fgrid a { text-decoration: none; }
.fgrid a:hover { color: #fff; }
.fsite .fe { font-family: var(--fm); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin: 22px 0 10px; color: #8F8CB0; }
.fsite .fl { display: flex; gap: 16px; align-items: center; }
.fsite .fl img { height: 15px; width: auto; opacity: .85; }
.fsite .wrap > .fb { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 48px; padding-top: 20px; color: #8F8CB0; font-size: 13px; }
.fsite .wrap > .fb nav { display: flex; gap: 16px; }
.fsite .wrap > .fb a { text-decoration: none; }

/* ---------- placeholder de páginas todavía no migradas ---------- */
.todo { padding: 120px 0 160px; }
.todo .lead { margin-top: 18px; }

/* ---------- responsive (siempre al final) ---------- */
@media (max-width: 1100px) {
	.nav { gap: 20px; font-size: 14.5px; }
}
@media (max-width: 980px) {
	.nav, .nr .fam, .nr .lang, .nr .btn { display: none; }
	.mtog { display: grid; }
	.mm { display: none; }
	.sec { padding: 72px 0; }
	.sec.dk, .sec.lt { padding-top: 80px; }
	.sec.pbx { padding-bottom: 112px; }
	.mesh.shape { width: 42%; height: 15%; opacity: .75; }
	.fgrid { grid-template-columns: 1fr 1fr; }
	.fgrid > div:first-child { grid-column: 1 / -1; }
	.grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hdr, .js .rv, .btn, .mm { transition: none; }
	.js .rv:not(.in) { opacity: 1; transform: none; }
}

/* megamenú de productos: Dolphia Brain arriba, en un bloque oscuro */
.mm-brain { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-bottom: 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: #fff; background: linear-gradient(120deg in oklab, var(--n) 0%, var(--na) 55%, var(--m) 120%); box-shadow: 0 18px 40px -24px rgba(12, 9, 35, .7); }
.mm-brain .mb-t { display: grid; gap: 2px; }
.mm-brain .mb-t b { font-family: var(--fs); font-size: 20px; font-weight: 600; }
.mm-brain .mb-t small { color: rgba(255, 255, 255, .82); font-size: 13.5px; }
.mm-brain .pill.cbx { justify-self: start; background: var(--a); color: var(--n); margin-bottom: 4px; }
.mm-brain .btn { pointer-events: none; }
.mb-ic { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, var(--m), var(--na) 75%); box-shadow: 0 0 0 6px rgba(255, 255, 255, .1); }
.mb-ic b { font: 600 11px var(--fm); }
.mb-ic i { position: absolute; width: 10px; height: 10px; border-radius: 3px; background: var(--a); }
.mb-ic i:nth-child(1) { left: -8px; top: 8px; } .mb-ic i:nth-child(2) { right: -8px; top: 8px; } .mb-ic i:nth-child(3) { left: -8px; bottom: 8px; } .mb-ic i:nth-child(4) { right: -8px; bottom: 8px; }
/* megamenú de expertise: un color por área */
.mm-list a { position: relative; padding-left: 26px; }
.mm-list a::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: var(--xc, var(--m)); }
.mm-list a:nth-child(1) { --xc: #79F2E6; } .mm-list a:nth-child(2) { --xc: #F2226E; } .mm-list a:nth-child(3) { --xc: #393B8F; }
.mm-list a:nth-child(4) { --xc: #677CBD; } .mm-list a:nth-child(5) { --xc: #FFDF0D; } .mm-list a:nth-child(6) { --xc: #0C0923; }
.mm-list a:hover { background: color-mix(in oklab, var(--xc) 14%, #fff); }

/* footer: los logos con su descripción */
.fsite .fl { align-items: flex-start; gap: 22px; }
.fsite .fl .fb small { font-size: 11px; color: #8F8CB0; }
/* los dos logos tienen alturas distintas: los centro en una fila de 20px para que queden en la misma línea y los textos de abajo también */
.fsite .fl .fb { grid-template-rows: 20px auto; align-items: center; gap: 8px; }
.fsite .fl .fb small { white-space: nowrap; }

/* descripción de cada marca con su propia tipografía */
.fb small { letter-spacing: 0; }
.fb-lg-tt small { font-family: 'Poppins', var(--fb); font-weight: 500; font-size: 9.5px; }
.fb-lg-rl small { font-family: 'Sora', var(--fb); font-weight: 400; font-size: 9.5px; }
.fsite .fl .fb-lg-tt small, .fsite .fl .fb-lg-rl small { font-size: 11.5px; }
/* laptops angostas: el bloque de la familia se achica para que entre todo en la barra */
@media (min-width: 981px) and (max-width: 1180px) {
	.nav { gap: 18px; font-size: 14.5px; }
	.bar { gap: 16px; }
	.nr { gap: 10px; }
	.fam .fl { gap: 10px; }
	.fam .lg-tt { height: 13px; } .fam .lg-rl { height: 10px; }
	.bar .btn { padding: 8px 12px; font-size: 13.5px; }
}
@media (min-width: 981px) and (max-width: 1080px) { .fam .ft, .fb small { display: none; } }
/* megamenú de productos: la pill Live va arriba del nombre en todas las tarjetas, así quedan alineadas aunque el nombre ocupe dos líneas */
#mm-products .mm-t b { display: grid; justify-items: start; gap: 6px; line-height: 1.2; }
#mm-products .mm-t b .pill { order: -1; }

/* ---------- barra de marcas (estilo ae.com): reemplaza el bloque de familia del nav ---------- */
.brandbar { background: var(--n); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.bbw { display: flex; padding: 0 var(--gut-r) 0 var(--gut); }
.bt { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 18px; text-decoration: none; color: rgba(255, 255, 255, .6); border-right: 1px solid rgba(255, 255, 255, .08); transition: background .2s, color .2s; }
.bt:first-child { border-left: 1px solid rgba(255, 255, 255, .08); }
.bt img { display: block; width: auto; opacity: .75; transition: opacity .2s; }
.bt .lg-tt { height: 14px; } .bt .lg-rl { height: 11px; }
.bt .bwm svg { display: block; height: 15px; width: auto; }
.bt small { font-family: var(--fm); font-size: 10px; line-height: 1; letter-spacing: .02em; }
.bt.fb-lg-tt small { font-family: 'Poppins', var(--fb); font-weight: 500; font-size: 10.5px; letter-spacing: 0; }
.bt.fb-lg-rl small { font-family: 'Sora', var(--fb); font-weight: 400; font-size: 10.5px; letter-spacing: 0; }
.bt:hover { color: #fff; background: rgba(255, 255, 255, .05); } .bt:hover img { opacity: 1; }
.bt.on { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 -2px 0 var(--m-btn); }
.bdot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--bc); margin-right: -2px; }
@media (max-width: 640px) {
	.bbw { padding: 0; }
	.bt { flex: 1; justify-content: center; padding: 0 8px; height: 36px; }
	.bt:first-child { border-left: 0; } .bt:last-child { border-right: 0; }
	.bt small { display: none; }
}
