/* CPP v2 — colores originales de la marca, tema claro y oscuro */

:root {
  /* Tema claro: colores originales de CPP */
  --bg: #f7f8f8;
  --bg-deep: #eef1f2;
  --surface: #ffffff;
  --surface-2: #f1f4f6;
  --line: #dde3e6;
  --line-hi: #c3ced3;
  --accent: #1d5ae0;
  --accent-hi: #123fa8;
  --live: #0d7a63;
  --steel: #607985;
  --text: #071521;
  --text-2: #3e545f;
  --text-3: #5b7079;
  --danger: #b42318;
  --shade: rgba(7, 21, 33, .55);
  --grain: .03;
  color-scheme: light;

  --mono: "Martian Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --sans: "Instrument Sans", system-ui, "Segoe UI", sans-serif;

  --gut: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(.16, .86, .26, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* Tema oscuro: Obsidian Navy + cobalto */
:root[data-theme="dark"] {
  --bg: #050f17;
  --bg-deep: #030a10;
  --surface: #0b1a26;
  --surface-2: #102333;
  --line: #1a2d3b;
  --line-hi: #2a4253;
  --accent: #5b8cff;
  --accent-hi: #82a8ff;
  --live: #72f2d2;
  --steel: #9aafb9;
  --text: #f4f7f5;
  --text-2: #9aafb9;
  --text-3: #6f8691;
  --danger: #ff9a8b;
  --shade: #000;
  --grain: .05;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  transition: background-color .5s var(--ease), color .5s var(--ease);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  /* vías de la placa */
  background-image:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text-2) 16%, transparent) 1px, transparent 1.6px);
  background-size: 28px 28px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--accent); color: var(--bg); padding: 8px 14px; border-radius: 6px; font-weight: 600; }
.skip:focus { top: 16px; }

kbd {
  font-family: var(--mono); font-size: 10px; line-height: 1;
  padding: 4px 6px; border: 1px solid var(--line-hi); border-bottom-width: 2px;
  border-radius: 5px; color: var(--text-2); background: var(--surface);
}

/* ---------- Cambio de tema ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: themeReveal .7s var(--ease-io); }
@keyframes themeReveal { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); } to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0)); } }

/* ---------- Grano ---------- */
.grain {
  pointer-events: none; position: fixed; inset: -50%; z-index: 150; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gut);
  transition: background .4s, border-color .4s, transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.top.is-scrolled { background: color-mix(in srgb, var(--bg-deep) 86%, transparent); border-color: var(--line); backdrop-filter: blur(10px); }
.top.is-hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-mark path { transition: transform .6s var(--ease); transform-origin: 64px 64px; }
.brand-mark .m1 { fill: var(--accent); }
.brand-mark .m2 { fill: var(--text); }
.brand-mark .m3 { fill: var(--steel); }
.brand:hover .m1 { transform: translateY(-8px); }
.brand:hover .m2 { transform: translate(-7px, 4px); }
.brand:hover .m3 { transform: translate(7px, 4px); }
.brand-text { font: 700 18px/1 var(--mono); letter-spacing: -.02em; }
.brand-caret { color: var(--live); animation: blink 1.05s steps(1) 6; }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; font: 400 12.5px/1 var(--mono); text-decoration: none; color: var(--text-2);
  padding: 10px 12px; border-radius: 6px; transition: color .25s, background .25s;
}
.nav a::before { content: "./"; color: var(--text-3); opacity: 0; margin-left: -1.2em; transition: opacity .25s, margin .35s var(--ease); }
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a:hover::before, .nav a.is-active::before { opacity: 1; margin-left: 0; }
.nav a.is-active { background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.kbd-hint { display: flex; gap: 3px; background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 6px; }
.toggles { display: flex; gap: 6px; }
.toggle {
  position: relative; height: 38px; min-width: 38px; border-radius: 10px; border: 1px solid var(--line-hi);
  background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center;
  transition: border-color .3s, background .3s, transform .4s var(--ease);
}
.toggle:hover { border-color: var(--accent); }
.toggle:active { transform: scale(.94); }
.lang-toggle { display: flex; gap: 2px; padding: 3px; font: 600 11px/1 var(--mono); }
.lang-toggle span { padding: 8px 7px; border-radius: 7px; color: var(--text-3); transition: background .35s var(--ease), color .35s; }
.lang-toggle span.is-on { background: var(--accent); color: var(--bg); }
.theme-toggle svg { position: absolute; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: transform .6s var(--ease), opacity .4s; }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
:root[data-theme="dark"] .theme-toggle .i-moon, :root:not([data-theme="dark"]) .theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
.kbd-hint:hover kbd { color: var(--text); border-color: var(--text-2); }

.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-hi); background: var(--surface); border-radius: 8px; position: relative; cursor: pointer; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .4s var(--ease); }
.menu-toggle span:first-child { top: 15px; }
.menu-toggle span:last-child { top: 23px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg-deep);
  display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 90px var(--gut) 60px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { font: 600 clamp(28px, 9vw, 44px)/1.25 var(--mono); text-decoration: none; font-variation-settings: "wdth" 85; }
.mobile-menu a:not(.btn)::before { content: "> "; color: var(--accent); }
.mobile-menu .btn { margin-top: 24px; align-self: flex-start; }
.mobile-menu.is-open a { animation: menuIn .6s var(--ease) both; }
.mobile-menu.is-open a:nth-child(2) { animation-delay: .05s; } .mobile-menu.is-open a:nth-child(3) { animation-delay: .1s; }
.mobile-menu.is-open a:nth-child(4) { animation-delay: .15s; } .mobile-menu.is-open a:nth-child(5) { animation-delay: .2s; }
.mobile-menu.is-open a:nth-child(6) { animation-delay: .25s; }
@keyframes menuIn { from { opacity: 0; transform: translateX(-24px); } }

/* ---------- Botones y enlaces ---------- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px; border-radius: 10px;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  overflow: hidden; isolation: isolate;
  transform: translate(var(--mx), var(--my));
  transition: background .3s, border-color .3s, color .3s, box-shadow .4s;
}
.btn span { position: relative; z-index: 1; display: inline-block; transition: transform .4s var(--ease); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
.btn-primary:hover { background: var(--accent-hi); box-shadow: 0 10px 40px -10px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-ghost { border-color: var(--line-hi); color: var(--text); background: color-mix(in srgb, var(--surface) 50%, transparent); }
.btn-ghost:hover { border-color: var(--live); color: var(--live); }
.btn:active span { transform: scale(.96); }
.btn-wa { gap: 10px; }
.btn-wa .i-wa { position: relative; z-index: 1; width: 19px; height: 19px; fill: currentColor; flex: none; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link {
  color: var(--accent); text-decoration: none; font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .3s var(--ease), color .25s;
  padding-bottom: 2px;
}
.link:hover { color: var(--accent-hi); background-size: 100% 2px; }

/* ---------- Riel de señal ---------- */
.rail { position: absolute; left: calc(var(--gut) / 2 - 1px); top: 0; width: 2px; z-index: 1; pointer-events: none; }
.rail-line { position: absolute; inset: 0; background: linear-gradient(var(--line) 60%, transparent 0) 0 0 / 2px 10px; }
.rail-signal {
  position: absolute; left: -3px; top: 0; width: 8px; height: 90px; border-radius: 8px;
  background: linear-gradient(transparent, var(--live));
  transform: translateY(0); will-change: transform;
}
.rail-pad {
  position: absolute; left: -5px; width: 12px; height: 12px; border-radius: 3px;
  background: var(--bg); border: 2px solid var(--line-hi);
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.rail-pad.is-lit { background: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) { .rail { display: none; } }

/* ---------- Secciones ---------- */
main { position: relative; }
.section { position: relative; width: min(var(--max), 100% - var(--gut) * 2); margin: 0 auto; padding: clamp(64px, 8vw, 110px) 0; }
.sec-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 72px); }
h1, h2, h3 { margin: 0; font-family: var(--mono); letter-spacing: -.035em; text-wrap: balance; }
h2 {
  font-size: clamp(28px, 4.4vw, 54px); line-height: 1.08; font-weight: 700;
  font-variation-settings: "wdth" 82;
}
h3 { font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.sec-head p { color: var(--text-2); max-width: 60ch; margin: 22px 0 0; font-size: 18px; }

[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 1.05s var(--ease), transform 1.15s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh;
  width: min(1400px, 100% - var(--gut) * 2); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  padding: 120px 0 80px;
}
.hero-prompt { font: 400 13px/1 var(--mono); color: var(--text-2); margin: 0 0 28px; }
.p-sign { color: var(--accent); margin-right: 6px; }
.p-flag { color: var(--live); }
.p-str { color: var(--accent-hi); }
.hero-title {
  font-size: clamp(38px, 4.75vw, 86px); line-height: .98; font-weight: 800; letter-spacing: -.055em;
}
.ht-line { display: block; font-variation-settings: "wdth" var(--w, 75); white-space: nowrap; }
.ht-line:last-child { color: var(--accent); }
.ht-line .ch { display: inline-block; }
.hero-sub { max-width: 52ch; color: var(--text-2); font-size: clamp(17px, 1.5vw, 19px); margin: 30px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-checks { list-style: none; padding: 0; margin: 38px 0 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.ok { color: var(--live); font-weight: 700; margin-right: 8px; }
[data-hero-item] { opacity: 0; transform: translateY(18px); }
.is-ready [data-hero-item] { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }

/* Chip con ASCII */
.chip { position: relative; margin: 0; padding: 18px 0; opacity: 0; transform: scale(.94) rotate(-1.5deg); }
.is-ready .chip { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) .25s, transform 1.4s var(--ease) .25s; }
.chip-body {
  position: relative; background: linear-gradient(160deg, var(--surface-2), var(--bg-deep) 70%);
  border: 1px solid var(--line-hi); border-radius: 18px; padding: 16px 16px 14px;
  box-shadow: 0 40px 90px -40px color-mix(in srgb, var(--shade) 80%, transparent), inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent);
}
.chip-body::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, var(--live) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite;
}
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
.chip-pins { position: absolute; left: 12%; right: 12%; height: 18px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--steel) 0 8px, transparent 8px 22px); opacity: .85; }
.chip-pins-top { top: 0; -webkit-mask: linear-gradient(#000, rgba(0,0,0,.3)); }
.chip-pins-bottom { bottom: 0; -webkit-mask: linear-gradient(rgba(0,0,0,.3), #000); }
.chip-head, .chip-foot { display: flex; justify-content: space-between; gap: 12px; font: 400 11px/1.4 var(--mono); color: var(--text-3); }
.chip-head { margin-bottom: 8px; }
.chip-foot { margin-top: 8px; color: var(--text-2); }
.chip-drag { color: var(--text-3); }
.ascii { display: block; width: 100%; aspect-ratio: 1 / .92; cursor: grab; touch-action: pan-y; }
.ascii:active { cursor: grabbing; }

/* ---------- Cinta ---------- */
.k { color: var(--accent); } .s { color: var(--live); } .n { color: var(--danger); } .f { color: var(--text); font-weight: 600; } .c { color: var(--text-3); }

/* ---------- Manifiesto ---------- */
.manifesto { width: min(1180px, 100% - var(--gut) * 2); margin: 0 auto; padding: clamp(72px, 10vw, 130px) 0 clamp(24px, 5vw, 48px); }
.manifesto-text {
  margin: 0; font: 600 clamp(28px, 4.6vw, 62px)/1.14 var(--mono); letter-spacing: -.04em;
  font-variation-settings: "wdth" 78; text-wrap: balance;
}
.manifesto-text .w { color: var(--line-hi); transition: color .35s; }
.manifesto-text .w.is-on { color: var(--text); }
.manifesto-text .w.is-head { color: var(--accent); }

/* ---------- Diff ---------- */
.diff { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-deep); font-size: 16px; }
.diff-bar { display: flex; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); font: 400 12px/1.4 var(--mono); color: var(--text-2); background: var(--surface); }
.diff-stat b { font-weight: 600; } .diff-stat .add { color: var(--live); } .diff-stat .del { color: var(--danger); }
.diff-lines { list-style: none; margin: 0; padding: 10px 0; counter-reset: ln; }
.diff-lines li {
  position: relative; display: block; padding: 12px 20px 12px 104px; color: var(--text-2);
  counter-increment: ln; clip-path: inset(0 100% 0 0);
  transition: clip-path .9s var(--ease), background .3s; transition-delay: var(--d, 0s);
}
.diff-lines li::before { content: counter(ln); position: absolute; left: 20px; font: 400 12px/1.9 var(--mono); color: var(--text-3); }
.diff-lines .g { position: absolute; left: 66px; font: 700 16px/1.6 var(--mono); }
.diff-lines strong { color: var(--text); font-weight: 600; }
.diff-lines .add { background: linear-gradient(90deg, color-mix(in srgb, var(--live) 7%, transparent), transparent 70%); }
.diff-lines .add .g { color: var(--live); }
.diff-lines .del { background: linear-gradient(90deg, color-mix(in srgb, var(--danger) 8%, transparent), transparent 70%); }
.diff-lines .del .g { color: var(--danger); }
.diff-lines .del { text-decoration: line-through; text-decoration-color: transparent; transition: clip-path .9s var(--ease), text-decoration-color .6s .9s; }
.diff.is-in .diff-lines li { clip-path: inset(0 0 0 0); }
.diff.is-in .diff-lines .del { text-decoration-color: var(--danger); }
.diff-lines li:hover { background-color: color-mix(in srgb, var(--live) 6%, transparent); }

/* ---------- IDE de servicios ---------- */
.ide {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-deep);
  box-shadow: 0 50px 100px -60px color-mix(in srgb, var(--shade) 90%, transparent);
}
.ide > *, .ide-split > * { min-width: 0; }
.ide-explorer { border-right: 1px solid var(--line); background: var(--surface); padding: 14px 0; }
.ide-label { margin: 0 18px 10px; font: 400 11px/1 var(--mono); color: var(--text-3); }
.ide-files { display: flex; flex-direction: column; }
.file {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 18px; border: 0; background: none; cursor: pointer; color: var(--text-2); transition: color .2s, background .2s;
}
.file-txt { display: grid; gap: 3px; min-width: 0; }
.file-name { font: 500 14.5px/1.25 var(--sans); color: var(--text); }
.file-path { font: 400 11px/1.2 var(--mono); color: var(--text-3); }
.file-price { margin-left: auto; flex: none; font: 600 12.5px/1 var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.file::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .4s var(--ease); }
.file .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--c, var(--text-2)); }
.file:hover { color: var(--text); background: color-mix(in srgb, var(--text) 3%, transparent); }
.file[aria-selected="true"] { color: var(--text); background: var(--surface-2); }
.file[aria-selected="true"]::before { transform: scaleY(1); }
.ide-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--surface); }
.ide-tab { font: 400 12px/1 var(--mono); padding: 13px 18px; background: var(--bg-deep); color: var(--text); border-top: 2px solid var(--accent); }
.ide-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); min-height: 420px; }
.ide-code {
  margin: 0; padding: 22px 0; overflow: auto; border-right: 1px solid var(--line);
  font: 400 13px/1.85 var(--mono); color: var(--text-2); tab-size: 2;
}
.ide-code .ln { display: block; padding: 0 18px 0 0; white-space: pre; }
.ide-code .ln::before { content: attr(data-n); display: inline-block; width: 44px; padding-right: 16px; text-align: right; color: var(--line-hi); }
.ide-code .typing::after { content: ""; display: inline-block; width: 8px; height: 1.1em; vertical-align: -3px; background: var(--live); animation: blink 1s steps(1) infinite; }
.ide-code .p { color: var(--text-3); }
.ide-preview { padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px; }
.ide-preview h3 { font-size: clamp(20px, 2vw, 25px); font-variation-settings: "wdth" 85; }
.ide-preview p { margin: 0; color: var(--text-2); }
.ide-preview ul { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; font-size: 15px; }
.ide-preview li::before { content: "✓"; color: var(--live); font-weight: 700; margin-right: 10px; }
.ide-preview .price { margin-top: auto; padding-top: 12px; display: flex; align-items: baseline; gap: 10px; }
.price > span { font: 400 12px/1 var(--mono); color: var(--text-3); }
.price strong b { font: inherit; }
.price strong { font: 700 clamp(30px, 3.2vw, 42px)/1 var(--mono); color: var(--accent); letter-spacing: -.04em; font-variation-settings: "wdth" 80; }
.ide-preview .btn { align-self: flex-start; }
.ide-preview.is-swap > * { animation: swap .6s var(--ease) both; }
.ide-preview.is-swap > *:nth-child(2) { animation-delay: .04s; } .ide-preview.is-swap > *:nth-child(3) { animation-delay: .08s; }
.ide-preview.is-swap > *:nth-child(4) { animation-delay: .12s; } .ide-preview.is-swap > *:nth-child(5) { animation-delay: .16s; }
@keyframes swap { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }

.services-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-top: 36px; }
.unsure { border: 1px dashed var(--line-hi); border-radius: 14px; padding: 24px; }
.unsure h3 { font-size: 18px; }
.unsure p { color: var(--text-2); margin: 8px 0 14px; }
.note { color: var(--text-3); font-size: 14px; margin: 0; max-width: 46ch; justify-self: end; }

/* ---------- Git log ---------- */
.gitlog { position: relative; max-width: 860px; }
.git-graph { position: absolute; left: 0; top: 0; width: 40px; height: 100%; overflow: visible; }
.git-graph path { fill: none; stroke: var(--live); stroke-width: 2; }
.gitlog::before { content: ""; position: absolute; left: 19px; top: 14px; bottom: 30px; width: 2px; background: var(--line); }
.gitlog ol { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(36px, 5vw, 60px); }
.commit { position: relative; padding-left: 72px; }
.commit .node {
  position: absolute; left: 11px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-hi); z-index: 1;
  transition: background .5s, border-color .5s, box-shadow .5s, transform .6s var(--ease);
}
.commit.is-lit .node { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 15%, transparent); transform: scale(1.1); }
.commit-head.is-lit .node { background: var(--live); border-color: var(--live); box-shadow: 0 0 0 6px color-mix(in srgb, var(--live) 15%, transparent); }
.hash { margin: 0 0 8px; font: 400 12px/1 var(--mono); color: var(--text-3); }
.commit h3 { font-size: clamp(21px, 2.6vw, 32px); font-variation-settings: "wdth" 84; transition: color .5s; color: var(--text-2); }
.commit.is-lit h3 { color: var(--text); }
.commit p:last-child { margin: 10px 0 0; color: var(--text-2); max-width: 52ch; }

/* ---------- Proyectos ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.win {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--bg-deep);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: border-color .4s;
}
.win::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--gx) var(--gy), color-mix(in srgb, var(--live) 12%, transparent), transparent 60%);
}
.win:hover { border-color: var(--line-hi); }
.win:hover::after { opacity: 1; }
.win-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: auto 1fr; }
.win-wide .win-bar { grid-column: 1 / -1; }
.win-bar { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface); font: 400 12px/1.4 var(--mono); color: var(--text); }
.win-bar { flex-wrap: wrap; row-gap: 4px; }
.win-bar > span:first-child { white-space: nowrap; }
.win-tag { color: var(--text-3); }
.win-body { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; }
.win-body h3 { font-size: clamp(20px, 2.2vw, 27px); font-variation-settings: "wdth" 84; }
.win-body p { margin: 0; color: var(--text-2); }
.win-body .link { align-self: flex-start; margin-top: auto; }
.win-wide .win-body { justify-content: center; }
.win-live { display: inline-flex; align-items: center; gap: 8px; color: var(--live); }
.win-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.win-body .win-links .link { margin-top: 0; }
.i-ext { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -1px; }

/* Captura real: la web en computadora, con el celular asomando */
.shot { position: relative; display: block; margin: 18px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.shot-desk { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.shot-phone {
  position: absolute; right: 5%; bottom: -8%; width: 21%; height: auto;
  border: 3px solid #0a0e12; border-radius: 14px; box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .65);
  transition: transform .9s var(--ease);
}
.win:hover .shot-desk { transform: scale(1.03); }
/* Varias vistas en la misma captura: se superponen y cambia la opacidad */
.shot-view { position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease), transform .9s var(--ease); }
.shot-view.is-on { opacity: 1; }
.shot-phone { z-index: 1; }
.shot-tabs {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; gap: 2px; padding: 3px;
  border-radius: 10px; background: var(--bg-deep); border: 1px solid var(--line-hi);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5);
}
.shot-tabs button {
  border: 0; background: none; cursor: pointer; padding: 8px 11px; border-radius: 7px;
  font: 500 11.5px/1 var(--mono); color: var(--text-2); transition: background .3s, color .3s;
}
.shot-tabs button:hover { color: var(--text); }
.shot-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.win:hover .shot-phone { transform: translateY(-10px); }
/* Tarjetas medianas: imagen de la misma proporción y enlaces al pie, para que los textos se alineen */
.win:not(.win-wide) { display: flex; flex-direction: column; }
.win:not(.win-wide) > .win-body { flex: 1; }

/* ---------- Equipo ---------- */
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.member { --rx: 0deg; --ry: 0deg; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); }
.member:nth-child(2) { margin-top: 60px; }
.member-card { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 16px; color: inherit; }
.portrait { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2); transform: scale(1.04); transition: filter .7s var(--ease), transform 1s var(--ease); }
.portrait::before { /* tinte de marca */
  content: ""; position: absolute; inset: 0; z-index: 1; background: var(--mc, var(--accent)); mix-blend-mode: multiply; opacity: .45; transition: opacity .7s var(--ease);
}
.portrait::after { /* trama de puntos */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--bg) 80%, transparent) 1.1px, transparent 1.6px) 0 0 / 5px 5px;
  transition: opacity .7s var(--ease);
}
.member-card:hover .portrait img, .member-card:focus-visible .portrait img { filter: none; transform: scale(1.1); }
.member-card:hover .portrait::before, .member-card:focus-visible .portrait::before,
.member-card:hover .portrait::after, .member-card:focus-visible .portrait::after { opacity: 0; }
@media (hover: none) {
  .portrait img { filter: none; }
  .portrait::before, .portrait::after { opacity: 0; }
}
.member-module { position: absolute; top: 12px; left: 12px; z-index: 3; padding: 6px 10px; border-radius: 20px; font: 500 11px/1 var(--mono); color: var(--bg); background: var(--mc, var(--accent)); }
.member-info { display: grid; gap: 2px; padding: 16px 56px 0 4px; }
.member-info strong { font: 600 19px/1.2 var(--mono); letter-spacing: -.03em; color: var(--text); }
.member-info > span { color: var(--text-2); font-size: 15px; }
.member-open {
  position: absolute; right: 4px; bottom: 4px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-hi); color: var(--text);
  transition: background .35s, color .35s, border-color .35s, transform .5s var(--ease);
}
.member-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.member-card:hover .member-open, .member-card:focus-visible .member-open { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: rotate(90deg); }

/* Tarjeta desplegada */
.profile { width: min(940px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.profile::backdrop { background: color-mix(in srgb, var(--bg-deep) 72%, transparent); backdrop-filter: blur(8px); animation: fadeIn .4s var(--ease); }
.profile.is-closing::backdrop { animation: fadeOut .38s var(--ease) forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
body.has-dialog { overflow: hidden; }
.profile-card {
  --mc: var(--accent);
  position: relative; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 60px 120px -40px color-mix(in srgb, var(--shade) 60%, transparent);
  max-height: calc(100dvh - 32px);
}
.profile-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--mc); z-index: 2; }
.profile-media { position: relative; background: var(--surface-2); min-height: 100%; overflow: hidden; }
.profile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-module { position: absolute; left: 16px; bottom: 10px; font: 800 64px/1 var(--mono); letter-spacing: -.06em; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); font-variation-settings: "wdth" 80; }
.profile-body { position: relative; padding: clamp(22px, 3.5vw, 36px); display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.profile-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.profile-kicker { margin: 0; font: 400 12px/1.4 var(--mono); color: var(--text-3); }
.profile-close { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line-hi); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; transition: transform .45s var(--ease), background .3s; }
.profile-close:hover { transform: rotate(90deg); background: var(--surface-2); }
.profile-close svg, .profile-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.profile h3 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.05; font-variation-settings: "wdth" 82; }
.profile-role { margin: -2px 0 0; color: var(--mc); font-weight: 600; }
.profile-bio { margin: 4px 0 6px; color: var(--text-2); max-width: 52ch; }
.profile-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); align-self: flex-start; margin-top: 6px; }
.profile-tabs button { border: 0; background: none; cursor: pointer; padding: 8px 14px; border-radius: 9px; font: 500 13px/1 var(--sans); color: var(--text-2); transition: background .3s, color .3s, box-shadow .3s; }
.profile-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--line-hi), 0 6px 16px -10px color-mix(in srgb, var(--shade) 50%, transparent); }
.profile-panel { min-height: 150px; }
.profile-quote {
  margin: 0 0 4px; padding: 2px 0 2px 16px; border-left: 2px solid var(--mc);
  font: 400 13.5px/1.6 var(--mono); color: var(--text); font-variation-settings: "wdth" 90;
}
.profile-quote::before { content: "// "; color: var(--text-3); }
.at-cpp { display: grid; gap: 12px; padding-top: 8px; }
.at-summary { margin: 0; font-weight: 600; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tasks li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 15px; animation: chipIn .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.tasks li::before { content: "→"; position: absolute; left: 0; color: var(--mc); font-family: var(--mono); }
.at-cpp .chips { margin-top: 2px; }
.stack { display: grid; gap: 14px; padding-top: 8px; }
.stack-label { margin: 0 0 6px; font: 500 11.5px/1 var(--mono); color: var(--text-3); }
.stack .chips { margin: 0; }
.stack .chips li { font: 500 12.5px/1 var(--mono); padding: 8px 12px; }
.profile-panel.is-swap > * { animation: swap .5s var(--ease) both; }
.facts { margin: 6px 0 0; display: grid; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line-hi); }
.facts dt { font: 400 12px/1.6 var(--mono); color: var(--text-3); }
.facts dd { margin: 0; font-size: 15px; }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border-radius: 30px; border: 1px solid var(--line-hi); background: var(--surface-2); font-size: 14px; animation: chipIn .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px) scale(.94); } }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: auto; padding-top: 14px; }
.profile-actions [hidden] { display: none; }
.profile-nav { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--text-3); }
.profile-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-hi); background: none; color: var(--text); cursor: pointer; display: grid; place-items: center; transition: background .3s, border-color .3s, color .3s; }
.profile-nav button:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
/* Índice de cada bloque del cuerpo, para escalonar su entrada. */
.profile-body > *:nth-child(2) { --si: 1; }
.profile-body > *:nth-child(3) { --si: 2; }
.profile-body > *:nth-child(4) { --si: 3; }
.profile-body > *:nth-child(5) { --si: 4; }
.profile-body > *:nth-child(6) { --si: 5; }
.profile-body > *:nth-child(7) { --si: 6; }
.profile-body > *:nth-child(8) { --si: 7; }
.profile-body > *:nth-child(9) { --si: 8; }

/* Al cambiar de socio el cuerpo entraba en bloque. Ahora va en cascada. */
.profile-card.slide-next .profile-body > *:not(.profile-nav), .profile-card.slide-next .profile-media img { animation: slideNext .58s var(--ease) both; animation-delay: calc(var(--si, 0) * .035s); }
.profile-card.slide-prev .profile-body > *:not(.profile-nav), .profile-card.slide-prev .profile-media img { animation: slidePrev .58s var(--ease) both; animation-delay: calc(var(--si, 0) * .035s); }

/* Al abrir, el contenido entra detrás del FLIP de la tarjeta en vez de estar
   ya puesto desde el primer cuadro. */
.profile-card.is-entering:not(.slide-next):not(.slide-prev) .profile-body > *:not(.profile-nav) { animation: swap .6s var(--ease) both; animation-delay: calc(.14s + var(--si, 0) * .04s); }
@keyframes slideNext { from { opacity: 0; transform: translateX(28px); } }
@keyframes slidePrev { from { opacity: 0; transform: translateX(-28px); } }
@media (max-width: 760px) {
  .profile-card { grid-template-columns: 1fr; overflow-y: auto; }
  .profile-media { height: 260px; min-height: 0; }
  .profile-media img { object-position: center 25%; }
  .profile-body { overflow: visible; }
  .facts div { grid-template-columns: 90px 1fr; }
}

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.contact-copy { position: sticky; top: 110px; }
.contact-copy > p { color: var(--text-2); margin: 22px 0 0; max-width: 46ch; }
.next-steps { margin: 30px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.next-steps li { counter-increment: s; display: flex; gap: 14px; align-items: baseline; }
.next-steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-hi); font: 600 12px/1 var(--mono); color: var(--accent); }
.reply { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); margin-top: 30px; }
.led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }

.editor-form { border: 1px solid var(--line); border-radius: 16px; background: var(--bg-deep); overflow: hidden; }
.ef-bar { display: flex; justify-content: space-between; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); font: 400 12px/1.4 var(--mono); color: var(--text-2); }
.ef-bar [data-form-state].is-dirty { color: var(--accent); }
.ef-bar [data-form-state].is-dirty::before { content: "● "; }
.ef-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; padding: clamp(20px, 3vw, 30px); }
.field { display: grid; gap: 7px; align-content: start; }
.field-full { grid-column: 1 / -1; }
.field label { font: 500 12px/1.3 var(--mono); color: var(--text-2); }
.opt { color: var(--text-3); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px;
  transition: border-color .25s, box-shadow .35s var(--ease), background .25s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { background: var(--bg); }
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field ::placeholder { color: var(--text-3); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-hi); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--live); background: var(--surface-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 14%, transparent); }
.field [aria-invalid="true"] { border-color: var(--danger) !important; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.err { margin: 0; min-height: 0; font-size: 13px; color: var(--danger); }
.err:empty { display: none; }
.check { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.check label { font: 400 14px/1.5 var(--sans); }
.check .err { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { margin: 0; font-size: 14px; }
.form-status.success { color: var(--live); }
.form-status.error { color: var(--danger); }

/* ---------- FAQ ---------- */
.faq .sec-head { margin-bottom: 36px; }
.term { max-width: 880px; border-top: 1px solid var(--line); }
.term details { border-bottom: 1px solid var(--line); }
.term summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 6px;
  padding: 24px 40px 24px 0; position: relative;
  font: 600 clamp(16px, 1.8vw, 20px)/1.35 var(--mono); letter-spacing: -.02em; font-variation-settings: "wdth" 88;
  transition: color .25s;
}
.term summary::-webkit-details-marker { display: none; }
.term summary::after { content: "+"; position: absolute; right: 6px; top: 22px; font-size: 24px; color: var(--accent); transition: transform .45s var(--ease); }
.term details[open] summary::after { transform: rotate(135deg); }
.term summary:hover { color: var(--accent-hi); }
.term details p { margin: 0; padding: 0 0 26px 30px; color: var(--text-2); max-width: 64ch; }
.term details p::before { content: "> "; color: var(--live); font-family: var(--mono); }

/* ---------- Footer ---------- */
.foot { position: relative; padding: clamp(64px, 8vw, 110px) var(--gut) 70px; border-top: 1px solid var(--line); background: var(--bg-deep); overflow: hidden; }
.foot-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; max-width: var(--max); margin: 0 auto; }
.foot-cta p { margin: 0; font: 600 clamp(22px, 3vw, 36px)/1.2 var(--mono); letter-spacing: -.035em; max-width: 24ch; font-variation-settings: "wdth" 84; }
.foot-word {
  margin: clamp(40px, 8vw, 90px) auto 0; width: fit-content; padding: 0 .06em .12em;
  font: 800 clamp(110px, 24vw, 380px)/1 var(--mono); letter-spacing: -.03em;
  font-variation-settings: "wdth" var(--fw, 75);
  color: transparent; -webkit-text-stroke: 1px var(--line-hi);
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / var(--fill, 0%) 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  user-select: none;
}
.foot-contact {
  display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 18px clamp(28px, 5vw, 72px);
  max-width: var(--max); margin: clamp(48px, 7vw, 80px) auto 0; padding-top: 28px; border-top: 1px solid var(--line);
}
.foot-contact small { display: block; margin-bottom: 6px; font: 400 11px/1 var(--mono); color: var(--text-3); }
.foot-contact p { margin: 0; color: var(--text); }
.foot-wa { display: flex; align-items: flex-end; gap: 12px; text-decoration: none; color: var(--text); font: 600 18px/1.1 var(--mono); letter-spacing: -.02em; }
.foot-wa .i-wa { width: 30px; height: 30px; fill: var(--live); flex: none; }
.foot-wa:hover { color: var(--accent); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; max-width: var(--max); margin: 32px auto 0; font-size: 14px; color: var(--text-2); }
.foot-row nav { display: flex; gap: 20px; }
.foot-row a { text-decoration: none; display: inline-block; padding: 10px 0; }
.foot-row a:hover { color: var(--accent); }
.eof { font-family: var(--mono); color: var(--text-3); }

/* ---------- WhatsApp flotante ---------- */
.wa-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(26px + 18px); z-index: 95;
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px;
  background: #25d366; color: #05301c; text-decoration: none; font: 700 15px/1 var(--sans);
  box-shadow: 0 12px 28px -10px rgba(5, 48, 28, .55);
  transition: transform .4s var(--ease), box-shadow .3s;
}
.wa-fab .i-wa { width: 24px; height: 24px; fill: currentColor; flex: none; }
.wa-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(5, 48, 28, .6); }
.wa-fab:focus-visible { outline-color: var(--accent); }
body:has(.mobile-menu.is-open) .wa-fab { display: none; }

/* ---------- Barra de estado ---------- */
.status {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; height: 26px;
  display: flex; align-items: center; gap: 18px; padding: 0 14px;
  background: var(--accent); color: var(--bg); font: 500 11px/1 var(--mono);
  transform: translateY(100%); transition: transform .6s var(--ease);
}
.status.is-on { transform: none; }
.st-branch { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.status .led { background: var(--bg); box-shadow: none; width: 7px; height: 7px; }
.st-grow { flex: 1; }
[data-status-file] { transition: opacity .2s; }

/* ---------- Paleta ---------- */
.palette { position: fixed; inset: 0; z-index: 250; background: color-mix(in srgb, var(--bg-deep) 72%, transparent); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-box { width: min(560px, 100%); background: var(--bg-deep); border: 1px solid var(--line-hi); border-radius: 14px; overflow: hidden; box-shadow: 0 40px 120px -20px color-mix(in srgb, var(--shade) 90%, transparent); animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 18px 20px; font: 400 15px/1 var(--mono); color: var(--text); }
.palette input:focus { outline: none; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--text-2); }
.palette li small { font: 400 11px/1.6 var(--mono); color: var(--text-3); }
.palette li[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 var(--accent); }
.palette-hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-3); }
.palette-hint kbd + kbd { margin-left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .kbd-hint { display: none; }
  .top { gap: 12px; }
  .menu-toggle { display: block; }
  .top-actions { margin-left: auto; }
  .ide { grid-template-columns: 1fr; }
  .ide-explorer { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .hero-title { font-size: clamp(28px, 9vw, 64px); }
  .hero { grid-template-columns: 1fr; padding-top: 110px; min-height: auto; }
  .chip { max-width: 520px; width: 100%; justify-self: center; }
  .ide-split { grid-template-columns: 1fr; min-height: 0; }
  .ide-preview { order: -1; }
  .ide-code { border-right: 0; border-top: 1px solid var(--line); max-height: 200px; font-size: 12px; }
  .win-wide { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact-copy { position: static; }
  .services-foot { grid-template-columns: 1fr; }
  .note { justify-self: start; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .top .btn-sm { display: none; }
  .toggle { height: 36px; min-width: 36px; }
  /* Equipo en carrusel: la siguiente tarjeta asoma para invitar a deslizar */
  .team-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(76%, 300px); gap: 16px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gut) * -1); padding: 0 var(--gut) 6px; scroll-padding-inline: var(--gut);
  }
  .team-grid::-webkit-scrollbar { display: none; }
  .member { scroll-snap-align: start; }
  .member:nth-child(2) { margin-top: 0; }
  .ide-code { display: none; }
  .shot { margin: 12px; }
  /* En celular el teléfono ocupa la esquina inferior: el selector sube */
  .shot-tabs { top: 8px; bottom: auto; left: 8px; }
  .shot-tabs button { padding: 7px 8px; font-size: 10.5px; }
  .ef-body { grid-template-columns: 1fr; }
  .diff-lines li { padding-left: 64px; padding-right: 14px; }
  .diff-lines li::before { left: 12px; }
  .diff-lines .g { left: 38px; }
  .st-hide { display: none; }
  .status { display: none; }
  .wa-fab { bottom: max(16px, env(safe-area-inset-bottom)); min-height: 56px; padding: 0 16px; }
  .wa-fab span { display: none; }
  .foot { padding-bottom: 104px; }
  .foot-contact { grid-template-columns: 1fr; }
  .chip-drag { display: none; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  [data-reveal], [data-hero-item], .chip { opacity: 1 !important; transform: none !important; }
  .diff-lines li { clip-path: none !important; }
  .grain { display: none; }
}
.contact h2 { font-size: clamp(28px, 3.4vw, 46px); }
.ide-code, .ide-files, .palette ul { scrollbar-width: thin; scrollbar-color: var(--line-hi) transparent; }
@media (max-width: 900px) { .ide-tabs { display: none; } }
html { overflow-x: clip; }
.profile:focus, .profile:focus-visible { outline: none; }
