/* Prisma — tema público de MediosAVS.
   Paleta cian → turquesa → coral → sol, Bricolage Grotesque + Instrument Sans.
   El modo claro/oscuro va en <html data-theme>; Apariencia fija el de partida. */
/* ═════════════ Tokens ═════════════ */
:root {
  /* Marca: escala armónica cian → turquesa → coral → sol */
  --cyan: #06b6d4;
  --teal: #22d3c5;
  --coral: #ff6b4a;
  --sun: #ffc53d;

  --bg: #f6f2ea;
  --surface: #fffdf9;
  --surface-2: #efe9dd;
  --ink: #10212a;
  --muted: #4b5a61;
  --line: rgba(16, 33, 41, 0.12);
  --cyan-ink: #0e7490;     /* cian legible sobre claro (5.2:1) */
  --coral-ink: #c2410c;    /* coral legible sobre claro (4.9:1) */
  --on-coral: #10212a;
  --grad-text: linear-gradient(95deg, #0891b2 0%, #0e9f97 35%, #e8553a 75%, #d9480f 100%);
  --grad-line: linear-gradient(90deg, var(--cyan), var(--teal), var(--coral), var(--sun));
  --tile-cyan: #dff4f6;
  --tile-coral: #fde4dc;
  --tile-sun: #fdf0cf;
  --tile-teal: #dcf3ee;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;
  --wrap: 1440px;
  --pad: clamp(20px, 4vw, 40px);

  /* Tokens de movimiento (transitions.dev) */
  --duration-stagger: 40ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-slow: 400ms;
  --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);

  /* Text states swap */
  --text-swap-dur: 260ms;
  --text-swap-translate-y: 18px;
  --text-swap-blur: 4px;
  --text-swap-ease: ease-in-out;
  /* Spinning counter */
  --reel-dur: 1600ms;
  --reel-cell: 48px;
  --reel-stagger: 90ms;
  --reel-ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* Texts reveal */
  --stagger-dur: 600ms;
  --stagger-distance: 14px;
  --stagger-stagger: 70ms;
  --stagger-blur: 3px;
  --stagger-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Tabs sliding */
  --tabs-dur: 250ms;
  --tabs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tabs-text-muted: var(--muted);
  --tabs-text-active: var(--ink);
  --tabs-bar-bg: var(--surface-2);
  --tabs-pill-bg: var(--surface);
  /* Card tilt */
  --tilt-perspective: 1000px;
  --tilt-return: 1000ms;
  --tilt-return-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tilt-follow: 400ms;
  --tilt-follow-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tilt-glare-opacity: 0.32;
  --tilt-glare-fade: 300ms;
  --tilt-glare-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Accordion */
  --acc-expand: 250ms;
  --acc-collapse: 250ms;
  --acc-chevron: 250ms;
  --acc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Learn more */
  --learn-shift: 3px;
  --learn-spread: 8deg;
  --learn-in: 350ms;
  --learn-out: 350ms;
  --learn-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Toggle */
  --toggle-dur: 350ms;
  --toggle-travel: 22px;
  --toggle-ov1: 1px;
  --toggle-ov2: 0px;
  --toggle-track: 200ms;
  --toggle-ease: cubic-bezier(0.34, 1.35, 0.64, 1);
}

[data-theme="dark"] {
  --bg: #0b1820;
  --surface: #10232e;
  --surface-2: #17303d;
  --ink: #e8f0f2;
  --muted: #a5b6bc;
  --line: rgba(232, 240, 242, 0.12);
  --cyan-ink: #3fd5ec;
  --coral-ink: #ff8a6b;
  --grad-text: linear-gradient(95deg, #22d3ee 0%, #2ee6c9 35%, #ff8a6b 72%, #ffc53d 100%);
  --tile-cyan: #0f3340;
  --tile-coral: #3a2224;
  --tile-sun: #352d18;
  --tile-teal: #10342f;
  color-scheme: dark;
}

/* ═════════════ Base ═════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--duration-slow) ease, color var(--duration-slow) ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--coral); color: #10212a; }
.wrap { width: min(var(--wrap), 100% - var(--pad) * 2); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }
/* El recorte de background-clip se come el borde derecho del último glifo.
   El padding lo mete en el área pintada; el margen negativo no abre un hueco. */
.grad { display: inline-block; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; color: transparent; padding: 0.04em 0.18em 0.1em 0.02em; margin-right: -0.18em; }
.only-dark { display: none; }
[data-theme="dark"] .only-dark { display: block; }
[data-theme="dark"] .only-light { display: none; }

/* Botones: una forma (píldora), una acción principal por pantalla */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  font: 600 16px/1 var(--font-text); text-decoration: none; cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--coral); color: var(--on-coral); }
.btn--primary:hover { background: #ff8366; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { transform: translateY(-2px); }

/* Learn more hover (transitions.dev #24) */
.t-learn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--ink); }
.t-learn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.t-learn-chevron { display: inline-flex; transform: translateX(0); transition: transform var(--learn-out) var(--learn-ease); }
.t-learn-arm { transform-box: view-box; transform-origin: 10px 8px; vector-effect: non-scaling-stroke; transition: transform var(--learn-out) var(--learn-ease); }
.t-learn:hover .t-learn-chevron { transform: translateX(var(--learn-shift)); transition-duration: var(--learn-in); }
.t-learn:hover .t-learn-arm { transition-duration: var(--learn-in); }
.t-learn:hover .t-learn-arm-top { transform: rotate(var(--learn-spread)); }
.t-learn:hover .t-learn-arm-bot { transform: rotate(calc(var(--learn-spread) * -1)); }

/* Texts reveal (transitions.dev #18) */
.t-stagger-line {
  display: block; opacity: 0;
  transform: translateY(var(--stagger-distance));
  filter: blur(var(--stagger-blur));
  transition: opacity var(--stagger-dur) var(--stagger-ease), transform var(--stagger-dur) var(--stagger-ease), filter var(--stagger-dur) var(--stagger-ease);
  will-change: transform, opacity, filter;
}
.t-stagger-line--2 { transition-delay: calc(var(--stagger-stagger) * 1); }
.t-stagger-line--3 { transition-delay: calc(var(--stagger-stagger) * 2); }
.t-stagger-line--4 { transition-delay: calc(var(--stagger-stagger) * 3); }
.t-stagger-line--5 { transition-delay: calc(var(--stagger-stagger) * 4); }
.t-stagger.is-shown .t-stagger-line { opacity: 1; transform: translateY(0); filter: blur(0); }
html:not(.js) .t-stagger-line { opacity: 1; transform: none; filter: none; }

/* ═════════════ Cabecera ═════════════ */
.top { position: sticky; top: 0; z-index: 50; background: var(--bg); transition: background-color var(--duration-slow) ease; }
.top::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--grad-line); transform: scaleX(0); transform-origin: left; transition: transform var(--duration-very-slow) var(--ease-smooth-out); }
.top.is-scrolled::after { transform: scaleX(1); }
.top__row { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand img, .brand svg { height: 42px; width: auto; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: 10px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; text-decoration: none; transition: color var(--duration-quick), background-color var(--duration-quick); }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.top__end { display: flex; align-items: center; gap: 14px; }
.menu-btn { display: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); font: 600 15px var(--font-text); cursor: pointer; }
.drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--duration-fast) var(--ease-smooth-out); }
.drawer[data-open="true"] { grid-template-rows: 1fr; }
.drawer__inner { overflow: hidden; }
.drawer nav { display: grid; gap: 4px; padding: 8px 0 24px; }
.drawer nav a { padding: 12px 4px; font: 600 26px/1.1 var(--font-display); letter-spacing: -0.02em; text-decoration: none; }
.top__end .btn, .mode { white-space: nowrap; }
@media (max-width: 1080px) {
  .nav, .top__end .btn { display: none; }
  .mode > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu-btn { display: inline-flex; align-items: center; }
  .top__end { margin-left: auto; }
}

/* Toggle de modo (transitions.dev #27) */
.mode { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--muted); font: 500 14px var(--font-text); cursor: pointer; }
.t-toggle { position: relative; width: 50px; height: 28px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--line); transition: background var(--toggle-track) var(--toggle-ease); }
.mode[aria-checked="true"] .t-toggle { background: var(--cyan); }
.t-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); translate: 0 0; will-change: translate; display: grid; place-items: center; }
.t-toggle-thumb svg { width: 13px; height: 13px; fill: var(--bg); }
.mode[aria-checked="true"] .t-toggle-thumb { background: #0b1820; }
.mode[aria-checked="true"] .t-toggle-thumb svg { fill: var(--sun); }
.t-toggle[data-on="true"] .t-toggle-thumb { translate: var(--toggle-travel) 0; }
.t-toggle.is-init[data-on="true"] .t-toggle-thumb { animation: t-toggle-on var(--toggle-dur) var(--toggle-ease) both; }
.t-toggle.is-init[data-on="false"] .t-toggle-thumb { animation: t-toggle-off var(--toggle-dur) var(--toggle-ease) both; }
@keyframes t-toggle-on { 0% { translate: 0 0; } 55% { translate: calc(var(--toggle-travel) + var(--toggle-ov1)) 0; } 80% { translate: calc(var(--toggle-travel) - var(--toggle-ov2)) 0; } 100% { translate: var(--toggle-travel) 0; } }
@keyframes t-toggle-off { 0% { translate: var(--toggle-travel) 0; } 55% { translate: calc(0px - var(--toggle-ov1)) 0; } 80% { translate: var(--toggle-ov2) 0; } 100% { translate: 0 0; } }

/* ═════════════ Hero ═════════════ */
.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); overflow: hidden; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: 0; pointer-events: none; border-radius: 50%; }
.hero::before { width: min(820px, 64vw); height: min(820px, 64vw); left: -14%; top: -12%; background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 28%, transparent) 0%, transparent 68%); }
.hero::after { width: min(920px, 72vw); height: min(920px, 72vw); right: -16%; top: -8%; background: radial-gradient(circle, color-mix(in srgb, var(--coral) 26%, transparent) 0%, color-mix(in srgb, var(--sun) 16%, transparent) 38%, transparent 70%); }
/* Franja de color suave detrás del arte: da profundidad sin brillo */
/* Rejilla: texto a la izquierda, ventana de estudio a la derecha. Las dos
   columnas arrancan y terminan a la misma altura. */
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; padding-top: 8px; }
.hero__place { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 8px 16px 8px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 500; }
.hero__place i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.hero__place i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--teal); animation: ping 2.4s var(--ease-smooth-out) infinite; }
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
/* Tamaño calculado para que "hechas sitios web." quepa siempre en su columna */
.hero h1 { font-size: clamp(40px, 5.4vw, 104px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.92; }
.hero h1 .swap-line { display: block; min-height: 1em; }

/* Text states swap (transitions.dev #04), con más recorrido por el tamaño */
.t-text-swap { display: inline-block; transform: translateY(0); filter: blur(0); opacity: 1; transition: transform var(--text-swap-dur) var(--text-swap-ease), filter var(--text-swap-dur) var(--text-swap-ease), opacity var(--text-swap-dur) var(--text-swap-ease); will-change: transform, filter, opacity; }
.t-text-swap.is-exit { transform: translateY(calc(var(--text-swap-translate-y) * -1)); filter: blur(var(--text-swap-blur)); opacity: 0; }
.t-text-swap.is-enter-start { transform: translateY(var(--text-swap-translate-y)); filter: blur(var(--text-swap-blur)); opacity: 0; transition: none; }

/* Spinning counter (transitions.dev #26) */
.t-reel { display: inline-flex; align-items: center; height: var(--reel-cell); font-variant-numeric: tabular-nums; }
.t-reel-col { position: relative; height: var(--reel-cell); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%); }
.t-reel-strip { display: flex; flex-direction: column; will-change: transform, filter; }
.t-reel-digit { height: var(--reel-cell); display: flex; align-items: center; justify-content: center; }
.t-reel-col { display: inline-block; }
.t-reel-col + .t-reel-col { margin-left: -0.06em; }
.hero__stats .t-reel { display: flex; height: var(--reel-cell); line-height: 1; }
.hero h1 .swap-line { white-space: nowrap; }
.hero__grid > div:first-child { position: relative; z-index: 1; }
@media (max-width: 960px) { .hero h1 { font-size: clamp(38px, 10.4vw, 84px); } }
.hero__lead { max-width: 34rem; margin-top: 28px; color: var(--muted); font-size: clamp(18px, 1.5vw, 21px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* Las cifras van al pie de la columna, alineadas con la base de la ventana */
.hero__stats { align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin: auto 0 0; padding: 0; list-style: none; }
.hero__actions { margin-bottom: 40px; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.hero__stats li { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 0; padding: 18px 16px 14px; border-radius: 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--mark, var(--cyan)) 16%, transparent), transparent 58%), var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mark, var(--cyan)) 42%, transparent); overflow: hidden; }
.hero__stats li::before { content: ""; position: absolute; top: 0; left: 16px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--mark, var(--cyan)); }
.hero__stats li:nth-child(1) { --mark: var(--cyan); }
.hero__stats li:nth-child(2) { --mark: var(--teal); }
.hero__stats li:nth-child(3) { --mark: var(--coral); }
.hero__stats strong { display: block; font: 700 clamp(30px, 3vw, 40px)/1 var(--font-display); letter-spacing: -0.04em; color: var(--mark, var(--cyan)); }
.hero__stats li > span { color: var(--muted); font-size: 13.5px; line-height: 1.25; letter-spacing: -0.01em; }

/* Ventana de estudio: un solo cuadro que se ve como diseño o como código.
   Barra arriba, vista cuadrada en medio, pie abajo. */
.studio {
  position: relative; z-index: 1; justify-self: end; align-self: center; width: 100%; max-width: 520px; margin: 0;
  display: grid; grid-template-rows: auto auto auto; gap: 10px; padding: 10px;
  border-radius: var(--r-xl); background: var(--surface);
  box-shadow: 0 50px 90px -50px rgba(11, 24, 32, 0.55), 0 0 0 1px var(--line);
}
.studio__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 0 14px; }
.studio__dots { display: flex; gap: 7px; }
.studio__dots i { width: 11px; height: 11px; border-radius: 50%; }
.studio__file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 500 13px ui-monospace, "SF Mono", Menlo, monospace; margin-left: 14px; margin-right: auto; }
.studio__bar .t-tabs { flex: none; }
.studio__bar .t-tab { padding: 4px 14px; }
@media (min-width: 961px) and (max-width: 1180px) { .studio__file { display: none; } .studio__dots { margin-right: auto; } }
.studio__view { display: grid; aspect-ratio: 1 / 1; overflow: hidden; border-radius: calc(var(--r-xl) - 10px); background: var(--surface-2); }
.studio__panel { grid-area: 1 / 1; min-width: 0; min-height: 0; transition: opacity var(--duration-slow) var(--ease-smooth-out), filter var(--duration-slow) var(--ease-smooth-out), transform var(--duration-slow) var(--ease-smooth-out), visibility 0s linear var(--duration-slow); }
.studio__panel[aria-hidden="true"] { opacity: 0; filter: blur(var(--blur-small, 2px)); transform: scale(0.985); visibility: hidden; }
.studio__panel[aria-hidden="false"] { visibility: visible; transition-delay: 0s; }
.studio__panel img { width: 100%; height: 100%; object-fit: contain; }
.studio__foot { display: flex; align-items: center; gap: 14px; padding: 2px 14px 6px; color: var(--muted); font-size: 14px; }
.studio__foot span { white-space: nowrap; }
.studio__meter { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.studio__meter i { display: block; height: 100%; width: 100%; background: var(--grad-line); transform-origin: left; transform: scaleX(0); }
.studio.is-playing .studio__meter i { animation: meter var(--studio-step, 5s) linear forwards; }
@keyframes meter { to { transform: scaleX(1); } }

/* Vista de código: el mismo trazo, escrito */
.editor { display: flex; flex-direction: column; height: 100%; padding: 22px 22px 18px; background: #0b1820; color: #cfe3e8; font: 13.5px/1.75 ui-monospace, "SF Mono", Menlo, monospace; }
.editor ol { flex: 1; margin: 0; padding: 0 0 0 2.6em; list-style: none; counter-reset: ln; overflow: hidden; }
.editor li { counter-increment: ln; position: relative; white-space: pre; min-height: 1.75em; }
.editor li::before { content: counter(ln); position: absolute; left: -2.6em; width: 1.8em; text-align: right; color: #4f6a74; }
.editor .k { color: #ff8a6b; } .editor .f { color: #3fd5ec; } .editor .s { color: #ffc53d; } .editor .c { color: #7f98a1; } .editor .n { color: #2ee6c9; }
.editor .cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: -0.2em; background: #3fd5ec; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.editor__tokens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.editor__tokens span { display: grid; gap: 6px; font-size: 11.5px; color: #a5b6bc; }
.editor__tokens span::before { content: ""; height: 34px; border-radius: 10px; background: var(--sw); }

/* Tabs sliding (transitions.dev #16) */
.t-tabs { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 4px; border-radius: 48px; background: var(--tabs-bar-bg); }
.t-tab { position: relative; appearance: none; border: 0; background: transparent; height: 40px; padding: 4px 18px; color: var(--tabs-text-muted); font: 600 15px var(--font-text); cursor: pointer; border-radius: 48px; z-index: 1; transition: color var(--tabs-dur) var(--tabs-ease); }
.t-tab:not([aria-selected="true"]):hover, .t-tab[aria-selected="true"] { color: var(--tabs-text-active); }
.t-tabs-pill { position: absolute; top: 4px; left: 0; height: 40px; width: 0; background: var(--tabs-pill-bg); border-radius: 48px; transform: translateX(0); transition: transform var(--tabs-dur) var(--tabs-ease), width var(--tabs-dur) var(--tabs-ease); will-change: transform, width; z-index: 0; pointer-events: none; box-shadow: 0 1px 2px rgba(11, 24, 32, 0.12); }

.hero__grid > *, .apps__grid > *, .head > * { min-width: 0; }
.code { white-space: pre; overflow-x: auto; }
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__actions { margin-bottom: 36px; }
  .hero__stats { margin-top: 0; }
  .studio { justify-self: stretch; max-width: 560px; }
}
@media (max-width: 480px) {
  .studio__file { display: none; }
  .editor { padding: 14px 12px 12px; font-size: 10.5px; line-height: 1.5; }
  .editor li { min-height: 1.5em; }
  .editor__tokens { margin-top: 8px; gap: 6px; }
  .editor__tokens span { font-size: 10px; gap: 4px; }
  .editor__tokens span::before { height: 22px; border-radius: 7px; }
  .hero__stats { gap: 8px; }
  .hero__stats li { padding: 16px 12px 12px; border-radius: 16px; }
  .hero__stats li::before { left: 12px; width: 20px; }
  .hero__stats li > span { font-size: 12px; }
}

/* ═════════════ Clientes (cinta) ═════════════ */
.clients { position: relative; padding: 30px 0; background: var(--surface); box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); overflow: hidden; }
/* Bordes que se desvanecen para que los logos entren y salgan suave */
.clients__viewport { -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.clients__track { display: flex; align-items: center; width: max-content; gap: clamp(40px, 4.5vw, 72px); margin: 0; padding: 0 0 0 clamp(40px, 4.5vw, 72px); list-style: none; animation: marquee 70s linear infinite; }
.clients:hover .clients__track { animation-play-state: paused; }
.clients__item { flex: none; display: flex; align-items: center; height: 76px; }
/* Logo transparente: silueta del color del tema; a color al pasar el mouse */
.clients__logo { position: relative; display: block; background: var(--logo-tint); opacity: 0.72;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
  transition: opacity var(--duration-fast) ease; }
.clients__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity var(--duration-fast) ease; }
.clients__item:hover .clients__logo { opacity: 1; background: transparent; -webkit-mask: none; mask: none; }
.clients__item:hover .clients__logo img { opacity: 1; }
/* Logo con fondo propio: va a color en una ficha */
.clients__chip { display: grid; place-items: center; padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); opacity: 0.88; transition: opacity var(--duration-fast) ease; }
.clients__chip img { object-fit: contain; }
.clients__item:hover .clients__chip { opacity: 1; }
.clients__name { color: var(--logo-tint); opacity: 0.72; font: 700 22px/1 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
:root { --logo-tint: #10212a; }
[data-theme="dark"] { --logo-tint: #e8f0f2; }
[data-theme="dark"] .clients { background: #10232e; }
[data-theme="dark"] .clients__logo, [data-theme="dark"] .clients__name { opacity: 0.8; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ═════════════ Secciones ═════════════ */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.head h2 { font-size: clamp(36px, 4.8vw, 68px); font-weight: 700; letter-spacing: -0.04em; }
.head p { color: var(--muted); font-size: 18px; max-width: 32rem; }
@media (max-width: 860px) { .head { grid-template-columns: 1fr; } }

/* Servicios: bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 290px; padding: 30px; border-radius: var(--r-lg); background: var(--surface); text-decoration: none; overflow: hidden; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.tile:hover { transform: translateY(-4px); }
.tile h3 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; }
.tile p { max-width: 34ch; color: var(--muted); }
.tile .t-learn { margin-top: auto; position: relative; z-index: 1; }
/* El dibujo va en su propio espacio: completo y sin pisar el texto */
.tile__art { order: 1; align-self: flex-end; width: 52%; max-width: 260px; height: auto; margin-top: auto; pointer-events: none; }
.tile .t-learn { order: 2; margin-top: 4px; }
.tile--a { display: grid; grid-template-columns: minmax(0, 1fr) 44%; grid-template-rows: auto auto auto 1fr auto; column-gap: 24px; }
.tile--a > :not(.tile__art) { grid-column: 1; }
.tile--a .tile__art { grid-column: 2; grid-row: 1 / -1; align-self: center; width: 100%; max-width: 380px; margin: 0; }
.tile--a .t-learn { grid-row: 5; margin-top: 16px; }
@media (max-width: 620px) {
  .tile--a { display: flex; }
  .tile--a .tile__art { width: 70%; align-self: flex-end; margin-top: 12px; }
}
.tile__art path, .tile__art circle, .tile__art rect { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tile--a { grid-column: span 4; background: var(--tile-cyan); }
.tile--b { grid-column: span 2; background: var(--tile-coral); }
.tile--c { grid-column: span 2; background: var(--tile-sun); }
.tile--d { grid-column: span 2; background: var(--surface); }
.tile--e { grid-column: span 2; background: var(--tile-teal); }
.tile--f { grid-column: span 6; min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); }
.tile--f h3 { font-size: clamp(24px, 2.2vw, 30px); }
.tile--f .t-learn { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; }
[data-theme="dark"] .tile--a .chips li { background: rgba(232, 240, 242, 0.08); }
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--a, .tile--f { grid-column: span 2; }
  .tile--b, .tile--c, .tile--d, .tile--e { grid-column: span 1; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .tile--a, .tile--b, .tile--c, .tile--d, .tile--e, .tile--f { grid-column: span 1; min-height: 240px; }
  .tile--f { min-height: 0; }
}

/* Dos oficios */
.duet { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duet__side { position: relative; padding: clamp(28px, 4vw, 52px); border-radius: var(--r-xl); overflow: hidden; }
.duet__side--dev { background: #0b1820; color: #e8f0f2; }
.duet__side--design { background: var(--coral); color: #10212a; }
[data-theme="dark"] .duet__side--dev { background: var(--surface-2); }
.duet__side h3 { font-size: clamp(34px, 3.8vw, 54px); font-weight: 700; letter-spacing: -0.04em; }
.duet__side > p { margin-top: 16px; max-width: 36ch; font-size: 18px; opacity: 0.86; }
.duet__list { display: grid; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.duet__list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.duet__list li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 6-6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 6-6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.duet__side--dev .duet__list li::before { background: var(--teal); }
/* El adorno va dentro de la tarjeta, al final, completo y sin tapar texto */
.duet__side { display: flex; flex-direction: column; }
.duet__deco { display: block; align-self: flex-end; margin-top: 28px; height: auto; opacity: 0.9; }
.duet__side--dev .duet__deco { width: 240px; }
.duet__side--design .duet__deco { width: 160px; }
.duet__deco path { fill: none; stroke-width: 2; }
.duet__knot { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; translate: -50% -50%; display: grid; place-items: center; border-radius: 50%; background: var(--bg); z-index: 2; }
.duet__knot span { width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--cyan), var(--teal), var(--coral), var(--sun), var(--cyan)); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (max-width: 860px) { .duet { grid-template-columns: 1fr; } .duet__knot { display: none; } }
.t-tab { white-space: nowrap; }
@media (max-width: 420px) { .filters .t-tab { padding: 4px 12px; } }

/* Portafolio */
.filters { margin-bottom: 32px; }
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.work { text-decoration: none; }
.work[hidden] { display: none; }
.work.is-in { animation: panel-in var(--duration-slow) var(--ease-smooth-out) both; }
.work__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 6px 0; }
.work__meta h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 700; }
.work__meta span { color: var(--muted); font-size: 15px; white-space: nowrap; }
.work__img { aspect-ratio: 16 / 10; }
.work__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.work:nth-child(2) .t-tilt-card { background: var(--tile-coral); }
@media (max-width: 760px) { .works { grid-template-columns: 1fr; } }

/* Card hover tilt (transitions.dev #19) */
.t-tilt { touch-action: pan-y; }
.t-tilt-card { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); transform: perspective(var(--tilt-perspective)) rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg)); transform-style: preserve-3d; transition: transform var(--tilt-return) var(--tilt-return-ease); will-change: transform; }
.t-tilt-card.is-tilting { transition: transform var(--tilt-follow) var(--tilt-follow-ease); }
.t-tilt-glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(circle 95px at var(--tilt-gx, 50%) var(--tilt-gy, 50%), rgba(255,255,255,0.48), rgba(255,255,255,0.06) 52%, rgba(255,255,255,0) 84%),
              radial-gradient(circle 200px at var(--tilt-gx, 50%) var(--tilt-gy, 50%), rgba(255,255,255,0.22), rgba(255,255,255,0.04) 58%, rgba(255,255,255,0) 78%),
              radial-gradient(circle 360px at var(--tilt-gx, 50%) var(--tilt-gy, 50%), rgba(255,255,255,0.10), rgba(255,255,255,0) 88%);
  transition: opacity var(--tilt-glare-fade) var(--tilt-glare-ease); }
.t-tilt.is-hover .t-tilt-glare { opacity: var(--tilt-glare-opacity); }
.work:hover .work__meta h3 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--coral); }

/* Apps móviles con el marco de iPhone (app-store-screenshots) */
.apps { background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; }
[data-theme="dark"] .apps { background: var(--surface); }
.apps__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.apps h2 { font-size: clamp(36px, 4.8vw, 68px); font-weight: 700; letter-spacing: -0.04em; }
.apps__lead { margin-top: 20px; color: var(--muted); font-size: 18px; max-width: 32rem; }
.apps__points { display: grid; gap: 18px; margin: 34px 0 0; padding: 0; list-style: none; }
.apps__points li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.apps__points i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; font-style: normal; }
.apps__points i svg { width: 22px; height: 22px; fill: none; stroke: #10212a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.apps__points strong { display: block; font-size: 18px; }
.apps__points span { color: var(--muted); }
.phone-stage { position: relative; display: grid; place-items: center; min-height: 640px; }
.phone-stage::before { content: ""; position: absolute; width: min(520px, 92%); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from 200deg, var(--cyan), var(--teal), var(--coral), var(--sun), var(--cyan)); opacity: 0.9; }
.phone-stage::after { content: ""; position: absolute; width: min(470px, 82%); aspect-ratio: 1; border-radius: 50%; background: var(--surface); }
.phone { position: relative; z-index: 1; width: 290px; aspect-ratio: 1022 / 2082; rotate: -4deg; transition: rotate var(--duration-very-slow) var(--ease-smooth-out); }
.phone:hover { rotate: 0deg; }
.phone__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.phone__screen { position: absolute; z-index: 1; left: 5.088%; top: 2.209%; width: 89.824%; height: 95.581%; border-radius: 13.725% / 6.332%; overflow: hidden; background: #f6f2ea; color: #10212a; font-size: 12px; display: flex; flex-direction: column; }
.ui-status { display: flex; justify-content: space-between; padding: 12px 22px 0; font-weight: 600; font-size: 11px; }
.ui-head { padding: 26px 18px 18px; background: #0b1820; color: #e8f0f2; border-radius: 0 0 26px 26px; margin-top: -30px; padding-top: 52px; }
.ui-head small { color: #a5b6bc; font-size: 11px; }
.ui-head b { display: block; margin-top: 2px; font: 700 21px/1.1 var(--font-display); letter-spacing: -0.02em; }
.ui-ring { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 16px; background: rgba(232, 240, 242, 0.08); }
.ui-ring svg { width: 40px; height: 40px; flex: none; }
.ui-ring span { font-size: 11px; color: #cfe3e8; }
.ui-ring strong { display: block; font-size: 13px; color: #fff; }
.ui-list { display: grid; gap: 8px; padding: 14px; }
.ui-card { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 16px; background: #fffdf9; }
.ui-card i { flex: none; width: 32px; height: 32px; border-radius: 11px; }
.ui-card div { flex: 1; min-width: 0; }
.ui-card b { display: block; font-size: 12px; }
.ui-card small { color: #4b5a61; font-size: 10.5px; }
.ui-pill { padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 600; }
.ui-pill--ok { background: #d5f3ec; color: #0b6b5b; }
.ui-pill--warn { background: #fde6c4; color: #8a4b00; }
.ui-tabbar { margin-top: auto; display: flex; justify-content: space-around; padding: 10px 10px 22px; background: #fffdf9; }
.ui-tabbar span { width: 30px; height: 30px; border-radius: 10px; background: #efe9dd; }
.ui-tabbar span:first-child { background: #ff6b4a; }
@media (max-width: 860px) { .apps__grid { grid-template-columns: 1fr; } .phone-stage { min-height: 560px; } }

/* Proceso: acordeón (transitions.dev #21) */
.steps { display: grid; gap: 12px; }
.t-acc { border-radius: var(--r-md); background: var(--surface); transition: background-color var(--duration-fast); }
.t-acc[data-open="true"] { background: var(--surface-2); }
.t-acc-head { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; width: 100%; min-height: 84px; padding: 0 26px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.t-acc-head .dot { width: 14px; height: 14px; border-radius: 50%; }
.t-acc-head b { font: 700 clamp(22px, 2.2vw, 30px)/1.1 var(--font-display); letter-spacing: -0.02em; }
.t-acc-head em { color: var(--muted); font-style: normal; font-size: 15px; }
.t-acc-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.t-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--acc-collapse) var(--acc-ease); }
.t-acc[data-open="true"] .t-acc-panel { grid-template-rows: 1fr; transition: grid-template-rows var(--acc-expand) var(--acc-ease); }
.t-acc-panel-inner { overflow: hidden; opacity: 0; filter: blur(2px); transition: opacity var(--acc-collapse) var(--acc-ease), filter var(--acc-collapse) var(--acc-ease); }
.t-acc[data-open="true"] .t-acc-panel-inner { opacity: 1; filter: blur(0); transition: opacity var(--acc-expand) var(--acc-ease), filter var(--acc-expand) var(--acc-ease); }
.t-acc-panel-inner p { padding: 0 26px 26px 58px; max-width: 70ch; color: var(--muted); }
.t-acc-chevron { display: inline-flex; transform: scaleY(1); transform-origin: center; transition: transform var(--acc-chevron) var(--acc-ease); }
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron { transform: scaleY(-1); }
@media (max-width: 620px) { .t-acc-head { grid-template-columns: auto 1fr auto; } .t-acc-head em { display: none; } .t-acc-panel-inner p { padding-left: 26px; } }

/* Cierre */
.close { position: relative; overflow: hidden; margin: 0 var(--pad); border-radius: var(--r-xl); background: var(--close-bg); color: var(--box-ink); }
/* Cierre a todo el ancho: la pincelada entra por el borde izquierdo y sale por
   el derecho. El texto se apoya en la zona vacía de arriba a la izquierda. */
.close { margin: 0; border-radius: 0; padding: clamp(72px, 9vw, 120px) 0; }
/* La pincelada cruza toda la sección por detrás del cuadro */
.close__art { position: absolute; left: 0; right: 0; bottom: 0; line-height: 0; pointer-events: none; }
.close__art img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 3; }
/* El cuadro: semitransparente para que la cinta se vea completa a través de él */
.close__box {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--r-xl);
  background: var(--box-glass);
  box-shadow: inset 0 0 0 1px var(--box-line), var(--box-shadow);
}
.close__inner { display: grid; gap: 28px; justify-items: start; }
.close__facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.close__facts li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--box-chip); }
.close__facts i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-style: normal; }
.close__facts svg { width: 20px; height: 20px; fill: none; stroke: #10212a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.close__facts small { display: block; color: var(--box-muted); font-size: 14px; }
.close__facts strong, .close__facts a { color: var(--box-ink); font-weight: 600; text-decoration: none; }
.close__facts a:hover { text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 4px; }
@media (max-width: 960px) {
  .close__box { grid-template-columns: 1fr; }
  .close { padding-bottom: 38vw; }
}
.close h2 { font-size: clamp(38px, 4.6vw, 76px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
.close p { max-width: 36ch; font-size: 19px; color: var(--box-muted); }


/* Pie */
.foot { padding: clamp(72px, 9vw, 112px) 0 36px; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.foot__brand img, .foot__brand svg { height: 44px; width: auto; shape-rendering: geometricPrecision; }
.foot__brand p { margin-top: 18px; max-width: 30ch; color: var(--muted); }
.foot h2 { margin-bottom: 14px; font: 600 15px var(--font-text); letter-spacing: 0; color: var(--muted); }
.foot ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.foot a { text-decoration: none; font-weight: 500; }
.foot a:hover { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 64px; padding-top: 24px; color: var(--muted); font-size: 15px; position: relative; }
.foot__base::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 3px; background: var(--grad-line); }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }

/* Entrada de secciones */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-smooth-out), transform 0.7s var(--ease-smooth-out); transition-delay: var(--d, 0s); }
.js .rise.is-in { opacity: 1; transform: none; }


@media (prefers-reduced-motion: reduce) {
  .t-stagger-line, .t-tabs-pill, .t-tab, .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron, .t-learn-chevron, .t-learn-arm { transition: none !important; }
  .t-tilt-card { transform: none !important; transition: none !important; }
  .t-toggle-thumb { animation: none !important; }
  .editor .cursor, .studio__meter i, .clients__track, .duet__knot span, .hero__place i::after { animation: none !important; }
  .t-text-swap, .t-reel-strip { transition: none !important; filter: none !important; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .work.is-in { animation: none; }
  .studio__panel { transition: none !important; }
}

/* ═════════════ Integración con el proyecto ═════════════ */

/* Alias que usan detail.css y las vistas base */
:root { --faint: var(--muted); --line-strong: rgba(16, 33, 41, 0.22); --bg-2: var(--surface-2); --glow: 0; --sans: var(--font-text); --accent-ink: var(--cyan-ink); }
[data-theme="dark"] { --line-strong: rgba(232, 240, 242, 0.24); }
body.site.prisma { background: var(--bg) !important; color: var(--ink) !important; font-family: var(--font-text); }
body.prisma ::selection { background: var(--coral); color: #10212a; }

/* Logo del admin, con versión clara y oscura */
.brand img, .brand svg { height: 42px; width: auto; shape-rendering: geometricPrecision; }
.brand__text { font: 700 24px/1 var(--font-display); letter-spacing: -0.03em; text-decoration: none; }

/* Interruptor de modo dentro del menú móvil */
.drawer .mode { margin: 8px 4px 0; font-size: 16px; }
.drawer .mode > span:last-child { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

/* Pie: redes */
.foot__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.foot__social a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); font-size: 14px; }
.foot__base a { color: var(--muted); margin-left: 16px; }
.foot__credit { margin: 0; }

/* ── Páginas internas (marcado site-* compartido) ── */
body.prisma .site-wrap { width: min(var(--wrap), 100% - var(--pad) * 2); margin-inline: auto; }
body.prisma .site-page { position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(32px, 5vw, 56px); background: none; overflow: visible; }
body.prisma .site-page h1 { margin: 0; font-family: var(--font-display); font-size: clamp(44px, 6vw, 92px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
body.prisma .site-page h1 em { font-style: normal; display: inline-block; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; color: transparent; padding: 0.04em 0.18em 0.1em 0.02em; margin-right: -0.18em; }
body.prisma .site-page .site-lead { margin-top: 24px !important; max-width: 40rem; color: var(--muted); font-size: clamp(18px, 1.5vw, 21px); }
body.prisma .site-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }
body.prisma .site-kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: none; }
body.prisma .site-block > .site-kicker, body.prisma .site-aside .site-kicker { background: none; padding: 0; margin-bottom: 12px; font: 700 20px/1.1 var(--font-display); letter-spacing: -0.02em; }
body.prisma .site-block > .site-kicker::before, body.prisma .site-aside .site-kicker::before { display: none; }
body.prisma .site-crumbs { justify-content: flex-start; margin-bottom: 22px; color: var(--muted); font-size: 15px; }
body.prisma .site-crumbs a { color: var(--muted); text-decoration: none; }
body.prisma .site-crumbs a:hover { color: var(--ink); }
body.prisma .site-hero-media { margin-top: clamp(32px, 5vw, 56px); border: 0; border-radius: var(--r-xl); background: var(--surface-2); }
body.prisma .site-hero-media img { max-height: 38rem; }

body.prisma .site-section { padding: clamp(56px, 8vw, 104px) 0; }
body.prisma .site-section--alt { background: var(--surface); }
body.prisma .site-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 20px 48px; align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
body.prisma .site-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 60px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }
body.prisma .site-head > .site-lead, body.prisma .site-head > .site-link { justify-self: start; }
@media (max-width: 860px) { body.prisma .site-head { grid-template-columns: 1fr; } }
body.prisma .site-lead { color: var(--muted); }

body.prisma .site-btn, body.prisma .site-btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; font: 600 16px/1 var(--font-text); text-decoration: none; cursor: pointer; transition: transform var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
body.prisma .site-btn { background: var(--coral); color: var(--on-coral); }
body.prisma .site-btn:hover { background: #ff8366; color: var(--on-coral); transform: translateY(-2px); }
body.prisma .site-btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
body.prisma .site-btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
body.prisma .site-btn:active, body.prisma .site-btn-ghost:active { transform: scale(0.97); }
body.prisma .site-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; border: 0; }
body.prisma .site-link:hover { color: var(--ink); text-underline-offset: 7px; }

body.prisma .site-grid { display: grid; gap: 20px; }
body.prisma .site-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform var(--duration-fast) var(--ease-smooth-out); }
body.prisma .site-section--alt .site-card { background: var(--surface-2); }
body.prisma a.site-card:hover { transform: translateY(-4px); }
body.prisma .site-card h3 { font-family: var(--font-display); font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
body.prisma .site-card p { color: var(--muted); }
body.prisma .site-card__more { margin-top: auto; padding-top: 12px; color: var(--ink); font-weight: 600; }

body.prisma .site-media { display: block; color: inherit; text-decoration: none; }
body.prisma .site-media__img { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2); aspect-ratio: 16 / 10; }
body.prisma .site-media__img::after { display: none; }
body.prisma .site-media__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.9s var(--ease-smooth-out); }
body.prisma .site-media:hover .site-media__img img { transform: scale(1.035); }
body.prisma .site-media__body { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; padding: 16px 6px 0; }
body.prisma .site-media__body h3 { order: 1; font-family: var(--font-display); font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
body.prisma .site-media__body > span { order: 2; color: var(--muted); font-size: 15px; }
body.prisma .site-media__body > p { order: 3; flex-basis: 100%; margin: 0; color: var(--muted); }
body.prisma .site-media:hover .site-media__body h3 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--coral); }
body.prisma .site-badge { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; }
body.prisma .site-pills span, body.prisma .site-chip { padding: 6px 12px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 13px; }

body.prisma .site-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 48px; background: var(--surface-2); width: max-content; max-width: 100%; }
body.prisma .site-filters a { padding: 10px 18px; border: 0; border-radius: 48px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: color var(--duration-quick), background-color var(--duration-quick); }
body.prisma .site-filters a:hover { color: var(--ink); }
body.prisma .site-filters a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(11, 24, 32, 0.12); }

/* Ficha de detalle (servicio, solución, proyecto, ciudad) */
body.prisma .site-prose { color: var(--ink); font-size: 17px; line-height: 1.7; }
body.prisma .site-prose h2 { padding-top: 0; border-top: 0; font-family: var(--font-display); letter-spacing: -0.03em; }
body.prisma .site-prose h3 { font-family: var(--font-display); }
body.prisma .site-prose h4 { color: var(--muted); font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 600; }
body.prisma .site-prose ul > li::before { background: var(--coral); }
body.prisma .site-prose a { color: var(--ink); text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
body.prisma .site-prose li > ul > li { border: 0; background: var(--surface-2); }
body.prisma .site-prose blockquote { border-left: 4px solid var(--teal); padding: 12px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface); }
body.prisma .site-checks li { border: 0; border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
body.prisma .site-checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--teal); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 6-6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 6-6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
body.prisma .site-faq details { border: 0; border-radius: var(--r-md); background: var(--surface); padding: 20px 22px; }
body.prisma .site-faq summary { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
body.prisma .site-faq details p { color: var(--muted); }
body.prisma .site-aside .site-card { background: var(--surface); }
body.prisma .site-sidelist a { color: var(--ink); font-weight: 500; }
body.prisma .site-sidelist a:hover { text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 4px; }
body.prisma .site-dl div { border-bottom: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
body.prisma .site-dl dt { color: var(--muted); font-size: 14px; letter-spacing: 0; text-transform: none; }
body.prisma .site-gallery a, body.prisma .site-video { border: 0; border-radius: var(--r-lg); }
body.prisma .site-visit { border: 0; background: var(--surface); }
body.prisma .site-visit__btn { background: var(--coral) !important; color: var(--on-coral) !important; box-shadow: none !important; border-radius: 999px !important; }
body.prisma .site-visit__url { color: var(--muted); }
body.prisma .site-logos img { filter: grayscale(1); opacity: 0.75; }
[data-theme="dark"] body.prisma .site-logos img { filter: grayscale(1) brightness(1.8); }

/* Nosotros */
body.prisma .site-about__row { border-top: 0; padding-top: 0; }
body.prisma .site-about__row h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; }
body.prisma .site-about__img { border-radius: var(--r-xl); }
body.prisma .hx-steps { display: grid; gap: 20px; }
@media (min-width: 760px) { body.prisma .hx-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.prisma .hx-step { padding: 28px; border: 0; border-radius: var(--r-lg); background: var(--surface); }
body.prisma .hx-step:nth-child(1) { background: var(--tile-cyan); }
body.prisma .hx-step:nth-child(2) { background: var(--tile-coral); }
body.prisma .hx-step:nth-child(3) { background: var(--tile-sun); }
body.prisma .hx-step b { color: var(--ink); font-weight: 700; }
body.prisma .hx-step h3 { margin: 14px 0 8px; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
body.prisma .hx-step p { color: var(--muted); }

/* Formularios (contacto, cotización, consulta de servicios) */
body.prisma .site-form { display: grid; gap: 18px; }
body.prisma .site-form label { display: grid; gap: 8px; color: var(--ink); font-size: 15px; font-weight: 600; }
body.prisma .site-form input, body.prisma .site-form textarea, body.prisma .site-form select {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid color-mix(in srgb, var(--ink) 40%, transparent); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 400 16px/1.4 var(--font-text); box-shadow: none;
  transition: border-color var(--duration-quick), background-color var(--duration-quick), box-shadow var(--duration-quick);
}
body.prisma .site-form textarea { min-height: 150px; }
body.prisma .site-form input::placeholder, body.prisma .site-form textarea::placeholder { color: var(--muted); opacity: 0.8; }
body.prisma .site-form input:focus, body.prisma .site-form textarea:focus, body.prisma .site-form select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 28%, transparent); }
body.prisma .site-form [aria-invalid="true"] { border-color: var(--coral-ink); }
body.prisma .site-error { color: var(--coral-ink); font-size: 14px; font-weight: 500; }
body.prisma .site-note { padding: 14px 18px; border: 0; border-radius: var(--r-md); background: var(--tile-teal); color: var(--ink); font-weight: 500; }

/* Legales, consulta de servicios y paginación */
body.prisma .site-legal h2 { font-family: var(--font-display); letter-spacing: -0.02em; }
body.prisma .site-legal h2 span { color: var(--coral-ink); }
body.prisma .site-results th { color: var(--muted); font-size: 14px; letter-spacing: 0; text-transform: none; border-bottom-color: var(--line); }
body.prisma .site-results td { border-bottom-color: var(--line); color: var(--muted); }
body.prisma .site-status--ok { color: #0f766e; } body.prisma .site-status--warn { color: #a16207; } body.prisma .site-status--bad { color: #b91c1c; }
[data-theme="dark"] body.prisma .site-status--ok { color: #2ee6c9; } [data-theme="dark"] body.prisma .site-status--warn { color: #ffc53d; } [data-theme="dark"] body.prisma .site-status--bad { color: #ff8a6b; }
body.prisma .site-pager { border-top: 0; }
body.prisma .site-pager__num.is-current { background: var(--ink); color: var(--bg); }
body.prisma .site-pager__step { border: 0; background: var(--surface); }
body.prisma a.site-pager__step:hover { background: var(--ink); color: var(--bg); }
body.prisma .site-pager__info { color: var(--muted); letter-spacing: 0; }

/* Lista de servicios */
.svc-list { display: grid; gap: 16px; }
.svc { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 200px; gap: 24px 40px; align-items: center; padding: clamp(24px, 3vw, 40px); border-radius: var(--r-xl); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.svc:hover { transform: translateY(-4px); }
.svc:nth-child(6n+1) { background: var(--tile-cyan); } .svc:nth-child(6n+2) { background: var(--tile-coral); } .svc:nth-child(6n+3) { background: var(--tile-sun); }
.svc:nth-child(6n+5) { background: var(--tile-teal); }
.svc h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 42px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }
.svc p { margin-top: 12px; color: var(--muted); }
.svc ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.svc li { padding: 6px 14px; border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 500; }
.svc .tile__art { width: 100%; max-width: 200px; margin: 0; justify-self: end; order: 0; }
.svc .t-learn { margin-top: 18px; }
@media (max-width: 960px) { .svc { grid-template-columns: minmax(0, 1fr) 140px; } .svc ul { grid-column: 1 / -1; grid-row: 2; } .svc .tile__art { grid-column: 2; grid-row: 1; } }
@media (max-width: 560px) { .svc { grid-template-columns: 1fr; } .svc .tile__art { grid-row: auto; grid-column: 1; max-width: 140px; } }

/* Cierre: variante corta para páginas internas */
.close--compact .close__box { grid-template-columns: 1fr; }

/* Las vistas antiguas traen fondos de Tailwind */
.bracket, .code-rain { display: none !important; }
body.prisma main section.bg-black, body.prisma main section.bg-zinc-950 { background: transparent; }

/* Mosaico de servicios con datos reales: seis servicios + la tarjeta de soporte */
.bento .tile--f { grid-column: span 3; min-height: 290px; flex-direction: column; align-items: stretch; justify-content: flex-start; flex-wrap: nowrap; background: var(--tile-cyan); }
.bento .tile--f h3 { font-size: clamp(26px, 2.4vw, 34px); }
.bento .tile--f .tile__art { width: 40%; max-width: 200px; }
.bento .tile--f .t-learn { margin-top: 4px; }
.bento .tile--g { grid-column: span 3; min-height: 290px; justify-content: space-between; background: var(--ink); color: var(--bg); }
.bento .tile--g h3 { max-width: 18ch; color: var(--bg); font-size: clamp(26px, 2.4vw, 34px); }
.bento .tile--g .t-learn { color: var(--bg); margin-top: auto; }
@media (max-width: 960px) { .bento .tile--f, .bento .tile--g { grid-column: span 1; } }
@media (max-width: 620px) { .bento .tile--f, .bento .tile--g { grid-column: span 1; min-height: 240px; } }

/* Rejillas de las vistas base (2 y 3 columnas) */
body.prisma .site-grid--2, body.prisma .site-grid--3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { body.prisma .site-grid--2, body.prisma .site-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { body.prisma .site-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.prisma .site-grid:has(> .site-media) { gap: 36px 20px; }
/* Dibujo de cada servicio: alto acotado para que no estire la tarjeta */
.svc .tile__art { max-height: 150px; }

/* ═════════════ Páginas internas: cabecera, cuadros y contacto ═════════════ */

/* Cabecera con la pincelada cruzando de lado a lado */
.phead { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(120px, 15vw, 220px); }
.phead__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 32px 64px; align-items: end; }
.phead h1 { font-size: clamp(46px, 6.2vw, 104px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.94; }
.phead__lead { max-width: 38rem; margin-top: 24px; color: var(--muted); font-size: clamp(18px, 1.5vw, 21px); }
.phead__facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.phead__facts li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: var(--r-md); background: var(--surface); }
.phead__facts strong { font: 800 clamp(28px, 2.6vw, 38px)/1 var(--font-display); letter-spacing: -0.04em; }
.phead__facts span { color: var(--muted); font-size: 15px; text-align: right; }
.phead__below { position: relative; z-index: 1; margin-top: clamp(28px, 4vw, 44px); }
.phead__art { position: absolute; left: 0; right: 0; bottom: -2vw; line-height: 0; pointer-events: none; opacity: 0.95; }
.phead__art img { width: 100%; height: auto; aspect-ratio: 8 / 3; }
@media (max-width: 860px) {
  .phead__grid { grid-template-columns: 1fr; }
  .phead__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phead__facts li { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; }
  .phead__facts span { text-align: left; font-size: 13px; }
}

/* Filtros del portafolio: píldoras con el número de proyectos */
.pfilters { display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: 100%; padding: 5px; border-radius: 48px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pfilters a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 48px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: color var(--duration-quick), background-color var(--duration-quick); }
.pfilters a span { min-width: 24px; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink); font-size: 12px; text-align: center; }
.pfilters a:hover { color: var(--ink); }
.pfilters a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.pfilters a[aria-current="page"] span { background: var(--coral); color: #10212a; }

/* Rejilla de cuadros */
.pgrid-sec { padding-top: 0; position: relative; z-index: 1; margin-top: clamp(-120px, -9vw, -60px); }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 860px) { .pgrid { grid-template-columns: 1fr; } }

/* El cuadro: mismo lenguaje que el CTA (panel oscuro, borde fino, sombra) */
.pbox {
  display: flex; flex-direction: column; gap: 0; padding: 12px;
  border-radius: var(--r-xl); background: var(--box-bg); color: var(--box-ink); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--box-line), var(--box-shadow);
  transition: transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) ease;
}
.pbox:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--box-line-hover), var(--box-shadow-hover); }
.pbox:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.pbox__img { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: calc(var(--r-xl) - 12px); background: var(--surface-2); }
.pbox__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.9s var(--ease-smooth-out); }
.pbox:hover .pbox__img img { transform: scale(1.04); }
.pbox__badge { position: absolute; top: 14px; left: 14px; padding: 7px 13px; border-radius: 999px; background: rgba(11, 24, 32, 0.82); color: #e8f0f2; font-size: 13px; font-weight: 600; }
.pbox__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 22px 18px 16px; }
.pbox__meta { display: inline-flex; align-items: center; gap: 8px; color: var(--box-muted); font-size: 14px; font-weight: 500; }
.pbox__meta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.pbox:nth-child(4n+2) .pbox__meta::before { background: var(--coral); }
.pbox:nth-child(4n+3) .pbox__meta::before { background: var(--sun); }
.pbox:nth-child(4n+4) .pbox__meta::before { background: var(--cyan); }
body.prisma .pbox__title { color: var(--box-ink); font-size: clamp(24px, 2.2vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.pbox__text { color: var(--box-muted); font-size: 16px; line-height: 1.55; }
.pbox__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.pbox__chips li { padding: 6px 12px; border-radius: 999px; background: var(--box-chip); color: var(--box-ink); font-size: 13px; }
.pbox__go { margin-top: auto; padding-top: 10px; color: var(--box-ink); }
.pbox:hover .pbox__go { color: var(--coral-ink); }

/* Estado vacío */
.pempty { display: grid; justify-items: start; gap: 14px; padding: clamp(32px, 5vw, 56px); border-radius: var(--r-xl); background: var(--surface); }
.pempty h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.pempty p { color: var(--muted); }

/* Paginación más ancha y alineada a los cuadros */
body.prisma .site-pager { margin-top: 48px; }

/* Contacto: formulario claro + panel oscuro como el CTA */
.contact-sec { padding-top: 0; position: relative; z-index: 1; margin-top: clamp(-120px, -9vw, -60px); }
.contact { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 24px; align-items: start; }
.contact__form { padding: clamp(24px, 4vw, 48px); border-radius: var(--r-xl); background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -50px rgba(11, 24, 32, 0.4); }
.contact__form h2, .contact__side h2 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.contact__hint { margin: 8px 0 24px; color: var(--muted); font-size: 15px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact__row small { color: var(--muted); font-weight: 400; }
body.prisma .contact__form .site-form input, body.prisma .contact__form .site-form textarea { background: var(--bg); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
body.prisma .site-form label.auth-check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
body.prisma .contact__form .site-form .auth-check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; min-height: 0; padding: 0; border: 0; border-radius: 5px; background: var(--bg); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 40%, transparent); }
body.prisma .contact__form .site-form .auth-check input:checked { background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2 6.4 11 12.5 5'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: none; }
.auth-row a { color: var(--coral-ink); font-size: 15px; font-weight: 600; }
.lookup-sec { padding-top: clamp(8px, 2vw, 24px); padding-bottom: clamp(24px, 4vw, 48px); }
.lookup-table { overflow-x: auto; padding: 8px 22px 4px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.contact__submit { justify-self: start; min-width: 220px; }
.contact__side { position: sticky; top: 100px; display: grid; gap: 18px; justify-items: start; padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: var(--box-bg); color: var(--box-ink); box-shadow: inset 0 0 0 1px var(--box-line), var(--box-shadow); }
body.prisma .contact__side h2 { color: var(--box-ink); }
.contact__side > p { color: var(--box-muted); }
.contact__side .close__facts { width: 100%; margin-top: 6px; }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } .contact__side { position: static; } }
@media (max-width: 560px) { .contact__row { grid-template-columns: 1fr; } .contact__submit { width: 100%; } }

/* Nosotros: historia y valores con la misma marca de color del hero */
.about-story { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.section:has(.about-story) { padding-bottom: clamp(36px, 5vw, 64px); }
.section:has(.about-values):not(.pgrid-sec) { padding-top: clamp(20px, 3vw, 40px); }
.about-card, .about-value { position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--mark, var(--cyan)) 16%, transparent), transparent 48%), var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mark, var(--cyan)) 42%, transparent); }
.about-card::before, .about-value::before { content: ""; position: absolute; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--mark, var(--cyan)); }
.about-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(28px, 3vw, 40px); border-radius: var(--r-xl); }
.about-card::before { left: 32px; width: 36px; }
.about-card:nth-child(1) { --mark: var(--cyan); }
.about-card:nth-child(2) { --mark: var(--coral); }
.about-card__n, .about-value b { color: var(--mark, var(--cyan)); font: 700 13px/1 var(--font-text); letter-spacing: 0.08em; }
.about-card h2 { margin: 0; font-size: clamp(32px, 3.2vw, 48px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }
.about-card__text { color: var(--muted); font-size: 17px; line-height: 1.6; }
.about-card__text p { margin: 0 0 0.85em; }
.about-card__text p:last-child { margin-bottom: 0; }
.about-card img { width: 100%; margin-top: 8px; border-radius: var(--r-md); aspect-ratio: 16 / 10; object-fit: cover; }
.about-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.about-value { display: flex; flex-direction: column; gap: 8px; min-height: 190px; padding: 24px 22px 22px; border-radius: 22px; }
.about-value::before { left: 22px; width: 28px; }
.about-value:nth-child(1) { --mark: var(--cyan); }
.about-value:nth-child(2) { --mark: var(--teal); }
.about-value:nth-child(3) { --mark: var(--coral); }
.about-value h3 { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.03em; }
.about-value p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
@media (max-width: 800px) { .about-values { grid-template-columns: 1fr; } .about-value { min-height: 0; } }

/* Ajustes: la cinta pasa por debajo del texto de la cabecera y los filtros
   se deslizan en el móvil en vez de apilarse. */
.phead__art { bottom: -7vw; }
.phead { padding-bottom: clamp(110px, 13vw, 200px); }
@media (max-width: 760px) {
  .pfilters { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-radius: 26px; }
  .pfilters::-webkit-scrollbar { display: none; }
  .pfilters a { flex: none; }
}

/* ═════════════ Cuadros que siguen el modo ═════════════
   Claro: cuadros blancos sobre papel, con borde y sombra suave.
   Oscuro: el panel azul noche de siempre. */
:root {
  --close-bg: var(--surface-2);
  --box-bg: var(--surface);
  --box-glass: rgba(255, 253, 249, 0.82);
  --box-ink: var(--ink);
  --box-muted: var(--muted);
  --box-line: rgba(16, 33, 41, 0.10);
  --box-line-hover: rgba(16, 33, 41, 0.18);
  --box-chip: var(--surface-2);
  --box-shadow: 0 40px 80px -48px rgba(16, 33, 41, 0.35);
  --box-shadow-hover: 0 50px 90px -44px rgba(16, 33, 41, 0.42);
}
[data-theme="dark"] {
  --close-bg: #0b1820;
  --box-bg: #10232e;
  --box-glass: rgba(16, 35, 46, 0.72);
  --box-ink: #e8f0f2;
  --box-muted: #a5b6bc;
  --box-line: rgba(232, 240, 242, 0.12);
  --box-line-hover: rgba(232, 240, 242, 0.22);
  --box-chip: rgba(232, 240, 242, 0.07);
  --box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.55);
  --box-shadow-hover: 0 50px 90px -40px rgba(0, 0, 0, 0.6);
}
/* El cierre en claro: sin franja negra, sobre el mismo tono de las secciones */
.close h2 { color: var(--box-ink); }
.close .btn--ghost { color: var(--box-ink); box-shadow: inset 0 0 0 2px var(--box-line-hover); }
.close .btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--box-ink); }
/* La cinta del cierre se ve un poco más suave sobre papel */
:root .close__art img { opacity: 0.9; }
[data-theme="dark"] .close__art img { opacity: 1; }

/* Ficha de proyecto: el hero de las páginas internas, la captura en una ventana
   y el texto que ya trae el proyecto junto a su ficha. */
.phead--case h1 { font-size: clamp(42px, 5.2vw, 88px); }
.phead--case .hero__place { max-width: 100%; }
.phead--case .phead__facts strong { font-size: clamp(18px, 1.7vw, 28px); line-height: 1.15; }
body.prisma .section.case-stage { position: relative; z-index: 1; padding-top: 0; padding-bottom: clamp(56px, 7vw, 96px); margin-top: clamp(-108px, -8vw, -52px); }
body.prisma .section.case-stage--plain { margin-top: 0; padding-top: clamp(8px, 2vw, 24px); }
.case-frame { overflow: hidden; border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -46px rgba(11, 24, 32, 0.5); }
.case-chrome { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; background: var(--surface-2); }
.case-chrome i { width: 10px; height: 10px; border-radius: 50%; }
.case-chrome i:nth-child(1) { background: #ff6b4a; }
.case-chrome i:nth-child(2) { background: #ffc53d; }
.case-chrome i:nth-child(3) { background: #22d3c5; }
.case-chrome span { margin-left: 8px; padding: 5px 12px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 13px; }
.case-frame > img { width: 100%; height: auto; }
.case-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.7fr); gap: 16px; align-items: start; margin-top: 16px; }
.case-story { padding: clamp(28px, 3vw, 40px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.case-story .site-prose { max-width: none; }
.case-story .site-prose h2 { margin: 2.2rem 0 0.8rem; font-size: clamp(1.55rem, 2.2vw, 2rem); }
.case-story .site-prose > :first-child { margin-top: 0; }
.case-rail { position: sticky; top: 92px; display: grid; gap: 16px; align-content: start; }
.case-rail--flow { position: static; align-self: stretch; }
.case-rail--flow .case-quote { position: sticky; top: 92px; }
.case-side { display: grid; gap: 18px; justify-items: start; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.case-side h2 { font-size: clamp(28px, 2.4vw, 36px); font-weight: 700; letter-spacing: -0.03em; }
.case-kicker { margin: 0; color: var(--coral-ink); font: 700 13px/1 var(--font-text); letter-spacing: 0.08em; text-transform: uppercase; }
.case-side dl { width: 100%; margin: 0; }
.case-side dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.case-side dt { color: var(--muted); font-weight: 500; }
.case-side dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.case-side__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.case-gallery { margin-top: 16px; }
.case-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.case-story .site-block { margin-top: 2.2rem; }
.case-story .case-kicker { display: block; margin-bottom: 14px; }
.case-story .site-checks li { background: var(--surface-2); }
.case-quote > p { margin: 0; color: var(--muted); font-size: 15px; }
.case-quote .site-form { width: 100%; }
body.prisma .case-quote .site-form input,
body.prisma .case-quote .site-form textarea { background: var(--bg); border-color: color-mix(in srgb, var(--ink) 42%, transparent); }
.case-quote .site-form button { width: 100%; }
@media (max-width: 900px) {
  .case-split { grid-template-columns: 1fr; }
  .case-rail, .case-rail--flow .case-quote { position: static; }
}
