/* ==========================================================================
   PORTAFOLIO · estilos
   Organización: 1 tokens · 2 base · 3 componentes comunes · 4 cabecera ·
   5 hero · 6 proyectos · 7 servicios · 8 Performance Lab · 9 sobre mí ·
   10 contacto · 11 pie · 12 visor · 13 animaciones y movimiento reducido
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #0e0b16;
  --ink-2: #17132a;
  --ink-3: #241d3d;
  --paper: #f6f2ea;
  --paper-2: #fffdf9;
  --text-dark: #17132a;
  --muted-dark: #5a5470;
  --text-light: #f4f0ff;
  --muted-light: #b8b0d0;
  --line-dark: rgba(23, 19, 42, .14);
  --line-light: rgba(255, 255, 255, .14);

  --pink: #ff4d8d;
  --orange: #ff8a3d;
  --yellow: #ffc857;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --accent-text: #b4124f;          /* acento legible sobre fondos claros */
  --focus: #5b3fe0;

  --grad: linear-gradient(105deg, #ff4d8d 0%, #ff8a3d 55%, #ffc857 100%);
  --grad-cool: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);

  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 68px;
  --gutter: 1rem;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
main:focus { outline: none; }

section[id], div[id="scenarios"] { scroll-margin-top: calc(var(--header-h) + 8px); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.section-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.panel :focus-visible { outline-color: var(--yellow); }

.container { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: .7rem 1rem; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: .75rem; }

/* ---------- 3. Componentes comunes ---------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-light { background: var(--paper); }
.section-paper { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--text-light); }

.eyebrow {
  font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 1rem;
}
.section-dark .eyebrow { color: var(--yellow); }

h1, h2, h3, h4 { line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 750; }
h4 { font-size: 1.05rem; font-weight: 700; }

.section-head { max-width: 46rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-intro { margin-top: 1rem; font-size: 1.1rem; color: var(--muted-dark); }
.section-dark .section-intro { color: var(--muted-light); }
.fine-print { margin-top: 2rem; font-size: .88rem; color: var(--muted-dark); max-width: 50rem; }
.fine-print-dark { color: var(--muted-light); margin-top: .8rem; }
.sub-h { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); margin: 1.4rem 0 .8rem; }
.sub-h:first-child { margin-top: 0; }
.sub-h-light { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); margin: 1.8rem 0 .8rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 750; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-sm { padding: .55rem 1.05rem; font-size: .92rem; }
.btn-primary { background: var(--grad); color: #1a0b14; box-shadow: 0 8px 26px -10px rgba(255, 77, 141, .75); }
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(255, 77, 141, .9); }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: var(--text-light); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline-light { border-color: rgba(255, 255, 255, .55); color: #fff; background: transparent; margin-top: 1rem; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; margin-top: 1.6rem; }
.btn-dark:hover { background: var(--ink-3); }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-row-tight { gap: .5rem; }

.text-link { color: var(--accent-text); font-weight: 700; }
.text-link-light { color: var(--yellow); font-weight: 700; text-underline-offset: 3px; }

.notice {
  margin-bottom: 1.6rem; padding: .9rem 1.1rem; border-left: 4px solid var(--orange);
  background: rgba(255, 138, 61, .13); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .95rem;
}
.notice-dark { background: rgba(255, 200, 87, .1); border-left-color: var(--yellow); color: var(--text-light); }

.tag {
  display: inline-block; font-size: .72rem; font-weight: 750; letter-spacing: .02em;
  padding: .25rem .65rem; border-radius: 999px; background: rgba(23, 19, 42, .08); color: var(--text-dark);
}
.tag-concept { background: #ece8ff; color: #3b2a9e; }
.tag-ai { background: #d9f6fb; color: #075e70; }
.tag-real { background: #dcf5e7; color: #0b6b3a; }

.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { padding: .35rem .8rem; border-radius: 999px; background: rgba(23, 19, 42, .08); font-size: .9rem; font-weight: 600; }
.pill-placeholder, .placeholder-block, .placeholder-text {
  border: 1.5px dashed rgba(23, 19, 42, .4); background: rgba(255, 200, 87, .18);
}
.placeholder-text { padding: .5rem .8rem; border-radius: 10px; font-size: .9rem; color: inherit; }

/* ---------- 4. Cabecera y navegación ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(14, 11, 22, .88); color: var(--text-light);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-light);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 9px; background: var(--grad); transform: rotate(12deg); flex: none; }
.brand-name { font-size: 1.05rem; white-space: nowrap; }

.site-nav ul { display: flex; gap: .25rem; }
.site-nav a:not(.btn) {
  display: block; padding: .5rem .75rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem;
  color: var(--muted-light); transition: color .2s ease, background-color .2s ease;
}
.site-nav a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a[aria-current="true"] { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-cta-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: .7rem; }
.lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 2px; }
.lang button {
  border: 0; background: transparent; color: inherit; cursor: pointer; font-weight: 800; font-size: .8rem;
  padding: .3rem .65rem; border-radius: 999px; letter-spacing: .04em;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--ink); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .3);
  background: transparent; cursor: pointer; position: relative; color: #fff;
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  position: absolute; left: 50%; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transform: translateX(-50%); transition: transform .25s ease, opacity .2s ease;
}
.menu-bars { top: 50%; margin-top: -1px; }
.menu-bars::before, .menu-bars::after { content: ""; left: 50%; }
.menu-bars::before { top: -7px; }
.menu-bars::after { top: 7px; }
.menu-open .menu-bars { background: transparent; }
.menu-open .menu-bars::before { transform: translateX(-50%) translateY(7px) rotate(45deg); }
.menu-open .menu-bars::after { transform: translateX(-50%) translateY(-7px) rotate(-45deg); }

@media (max-width: 1040px) {
  .menu-toggle { display: inline-block; }
  .nav-cta { display: none; }
  .nav-cta-mobile { display: inline-flex; margin: .6rem .75rem 0; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--ink); border-bottom: 1px solid var(--line-light); padding: .8rem var(--gutter) 1.2rem;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: .1rem; }
  .js .site-nav a:not(.btn) { padding: .85rem .75rem; font-size: 1.05rem; }
  .no-js .site-nav { display: none; }
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(60% 55% at 82% 18%, rgba(124, 92, 255, .38), transparent 62%),
    radial-gradient(50% 45% at 8% 92%, rgba(255, 77, 141, .28), transparent 62%),
    var(--ink);
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }

.hero h1 { font-size: clamp(2.7rem, 7.4vw, 5.9rem); font-weight: 850; letter-spacing: -.045em; line-height: .98; }
.h1-line { display: block; }
.h1-accent {
  font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: -.03em;
  color: var(--yellow);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .h1-accent {
    background: var(--grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent; padding-bottom: .08em;
  }
}
.hero .lead { margin-top: 1.6rem; font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted-light); max-width: 34rem; }
.hero .btn-row { margin-top: 2rem; }
.hero-note { margin-top: 2rem; font-size: .88rem; color: var(--muted-light); max-width: 32rem; border-left: 2px solid rgba(255, 255, 255, .25); padding-left: .9rem; }

.hero-visual { position: relative; width: min(100%, 480px); aspect-ratio: 1; margin-inline: auto; }
.orb { position: absolute; border-radius: 50%; }
.orb-a { inset: 12% 8% 8% 14%; background: radial-gradient(circle at 32% 28%, #ffc857 0%, #ff4d8d 42%, #7c5cff 100%); box-shadow: 0 40px 90px -30px rgba(255, 77, 141, .7); }
.orb-b { width: 34%; height: 34%; right: 2%; top: 4%; background: radial-gradient(circle at 30% 30%, #8bf1ff, #22d3ee 45%, #3b3fd9); opacity: .95; }
.ring { position: absolute; inset: 4%; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .28); }
.ring-2 { inset: -3%; border-style: dashed; border-color: rgba(255, 255, 255, .16); }

.glass {
  position: absolute; padding: .75rem 1rem; border-radius: 16px; min-width: 7.4rem;
  background: rgba(20, 15, 40, .55); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  font-weight: 750; font-size: .9rem;
}
.glass-label { display: inline-flex; align-items: center; gap: .5rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); display: inline-block; }
.dot-2 { background: var(--yellow); } .dot-3 { background: var(--orange); } .dot-4 { background: var(--cyan); }
.glass-1 { left: -2%; top: 14%; }
.glass-2 { right: -2%; top: 44%; }
.glass-3 { left: 6%; bottom: 8%; }
.glass-4 { right: 10%; bottom: 0; }
.funnel-mini { display: block; margin-top: .6rem; }
.funnel-mini i { display: block; height: 6px; border-radius: 4px; margin-top: 4px; background: var(--grad); }
.funnel-mini i:nth-child(1) { width: 100%; } .funnel-mini i:nth-child(2) { width: 68%; } .funnel-mini i:nth-child(3) { width: 36%; }
.wave { display: block; height: 10px; width: 80px; margin-top: .6rem; border-radius: 99px; background: repeating-linear-gradient(90deg, var(--yellow) 0 3px, transparent 3px 7px); }
.cube { display: block; width: 28px; height: 28px; margin: .7rem 0 .2rem .4rem; transform: rotateX(55deg) rotateZ(45deg); background: var(--grad-cool); box-shadow: 7px 7px 0 rgba(0, 0, 0, .35); }

/* ---------- 6. Proyectos ---------- */
.filters { display: grid; gap: 1.2rem; margin-bottom: 1.2rem; }
.filter-label { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; background: transparent;
  border: 1.5px solid rgba(23, 19, 42, .35); border-radius: 999px; padding: .45rem .95rem; font-weight: 650; font-size: .92rem;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-count { font-size: .75rem; opacity: .75; font-variant-numeric: tabular-nums; }
.result-count { margin: 1rem 0 1.4rem; font-weight: 650; color: var(--muted-dark); }

.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-dark); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -26px rgba(23, 19, 42, .5); }
.card-cover { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--c1, #7c5cff), var(--c2, #ff4d8d)); overflow: hidden; }
.cover-motif { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(14, 11, 22, .72); color: #fff; border: 1.5px solid rgba(255, 255, 255, .6);
}
.card-body { display: flex; flex-direction: column; gap: .7rem; padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.card-title { font-size: 1.15rem; font-weight: 750; line-height: 1.2; }
.card-desc { color: var(--muted-dark); font-size: .95rem; }
.link-btn {
  margin-top: auto; align-self: flex-start; background: none; border: 0; padding: .3rem 0; cursor: pointer;
  font-weight: 800; color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.link-btn:hover { color: var(--ink); }

.empty-state { text-align: center; padding: 3rem 1.5rem; border: 2px dashed rgba(23, 19, 42, .3); border-radius: var(--radius); display: grid; gap: .8rem; justify-items: center; }
.empty-state p { color: var(--muted-dark); max-width: 34rem; }

.legend { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2.5rem; font-size: .88rem; color: var(--muted-dark); }
.legend > div { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.legend dt, .legend dd { margin: 0; }

/* ---------- 7. Servicios ---------- */
.family { margin-top: clamp(2rem, 5vw, 3.5rem); }
.family-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line-dark); padding-bottom: .8rem; }
.family-num { font-family: var(--font-serif); font-style: italic; font-size: 2rem; color: var(--accent-text); }
.family-title { font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
.service-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.service-card { display: flex; flex-direction: column; gap: .7rem; background: var(--paper); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 1.5rem; }
.service-name { font-size: 1.2rem; font-weight: 800; }
.service-desc { color: var(--muted-dark); font-size: .98rem; }
.service-sub { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); margin-top: .3rem; }
.service-items { display: grid; gap: .35rem; font-size: .94rem; margin-bottom: .6rem; }
.service-items li { position: relative; padding-left: 1.4rem; }
.service-items li::before { content: ""; position: absolute; left: 0; top: .55em; width: .7rem; height: .7rem; border-radius: 3px; background: var(--grad); transform: rotate(45deg) scale(.8); }
.service-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- 8. Performance Lab ---------- */
.lab { background: radial-gradient(70% 40% at 90% 0%, rgba(124, 92, 255, .22), transparent 60%), var(--ink); }
.panel {
  margin-top: 2rem; background: var(--ink-2); border: 1px solid var(--line-light); border-radius: 26px;
  padding: clamp(1.2rem, 3.2vw, 2.4rem);
}
.panel:focus { outline: none; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.6rem; }
.panel-sub { margin-top: .4rem; color: var(--muted-light); }
.tag-hypo { display: inline-block; margin-top: .6rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--yellow); padding: .2rem .6rem; border-radius: 6px; }

.sim-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .sim-grid { grid-template-columns: .9fr 1.1fr; gap: 3rem; } }

.field { margin-bottom: 1.3rem; }
.field-label { display: block; font-weight: 650; font-size: .95rem; margin-bottom: .45rem; }
.field-row { display: flex; align-items: center; gap: .9rem; }
.field-row input[type="range"] { flex: 1; min-width: 0; accent-color: var(--orange); height: 28px; cursor: pointer; }
.num-input {
  width: 7.6rem; padding: .5rem .65rem; border-radius: 10px; background: var(--ink);
  border: 1.5px solid rgba(255, 255, 255, .35); color: #fff; font-variant-numeric: tabular-nums;
}
.field-hint { margin-top: .3rem; font-size: .84rem; color: var(--muted-light); }

.stat-grid { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat { background: rgba(255, 255, 255, .05); border: 1px solid var(--line-light); border-radius: 14px; padding: .9rem 1rem; min-width: 0; }
.stat-label { display: block; font-size: .78rem; color: var(--muted-light); font-weight: 600; line-height: 1.3; }
.stat-value { display: block; margin-top: .35rem; font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow-wrap: anywhere; line-height: 1.15; }
.roas-card { margin-top: .8rem; padding: 1.1rem 1.2rem 1rem; border-radius: 16px; background: linear-gradient(135deg, rgba(124, 92, 255, .2), rgba(255, 77, 141, .15)); border: 1px solid var(--line-light); }
.roas-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.stat-roas { margin: 0; font-size: 2rem; }
.meter { position: relative; height: 12px; margin-top: .9rem; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.meter-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ff4d8d, #ff8a3d); transition: width .35s ease; }
.meter-fill[data-state="above"] { background: linear-gradient(90deg, #22d3ee, #34d399); }
.meter-mark { position: absolute; left: 25%; top: -5px; width: 2px; height: 22px; background: #fff; border-radius: 2px; }
.meter-legend { position: relative; height: 1.3rem; margin-top: .45rem; font-size: .75rem; color: var(--muted-light); }
.meter-legend span { position: absolute; top: 0; }
.meter-legend span:nth-child(1) { left: 0; }
.meter-legend span:nth-child(2) { left: 25%; transform: translateX(-50%); }
.meter-legend span:nth-child(3) { right: 0; }

.funnel { display: grid; gap: .6rem; }
.funnel-row { display: grid; grid-template-columns: 4.6rem 1fr 4.4rem; align-items: center; gap: .7rem; font-size: .9rem; }
.funnel-name { font-weight: 650; }
.funnel-track { display: block; height: 22px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.funnel-bar { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--grad); transition: width .4s ease; }
.funnel-bar-2 { background: linear-gradient(90deg, #ff8a3d, #ffc857); }
.funnel-bar-3 { background: var(--grad-cool); }
.funnel-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.insight { margin-top: 1.2rem; padding: .9rem 1.1rem; border-left: 3px solid var(--yellow); background: rgba(255, 255, 255, .06); border-radius: 0 12px 12px 0; font-size: .96rem; }

.rules { margin-top: 1.8rem; border-top: 1px solid var(--line-light); padding-top: 1rem; font-size: .93rem; color: var(--muted-light); }
.rules summary, .accordion summary { cursor: pointer; font-weight: 750; color: var(--text-light); padding: .4rem 0; }
.rules p { margin-top: .7rem; }

.sc-grid { display: grid; gap: 1.2rem; }
@media (min-width: 820px) { .sc-grid { grid-template-columns: 1fr 1fr; } }
.sc-card { border: 1px solid var(--line-light); border-radius: 18px; padding: 1.1rem 1.3rem .4rem; margin: 0; min-width: 0; }
.sc-card legend { padding: 0 .5rem; font-weight: 700; }
.sc-badge { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 800; }
.sc-badge-a { background: #6d4df0; color: #fff; }
.sc-badge-b { background: var(--pink); color: #1a0b14; }
.sc-sub { font-size: .86rem; color: var(--muted-light); font-weight: 500; }

.table-wrap { overflow-x: auto; margin-top: 1.6rem; border: 1px solid var(--line-light); border-radius: 16px; }
.compare { width: 100%; min-width: 600px; border-collapse: collapse; }
.compare th, .compare td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-light); text-align: left; }
.compare thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-light); background: rgba(255, 255, 255, .04); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare thead th:not(:first-child) { text-align: right; }
.delta[data-tone="up"] { color: #5eead4; }
.delta[data-tone="down"] { color: #ff9db8; }
.delta[data-tone="neutral"] { color: var(--muted-light); }

.explain { margin-top: 1.8rem; }
.explain ul { display: grid; gap: .9rem; }
.explain-item { padding: .9rem 1.1rem; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-light); }
.explain-item strong { display: block; margin-bottom: .25rem; }
.explain-reason { color: var(--muted-light); font-size: .94rem; display: block; }
.explain-none { color: var(--muted-light); }

.banner-concept { margin: 1rem 0 1.4rem; padding: .85rem 1.1rem; border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 750; font-size: .92rem; }
.case-grid { display: grid; gap: 1rem; margin-bottom: 1.6rem; }
@media (min-width: 760px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
.case-card { background: rgba(255, 255, 255, .05); border: 1px solid var(--line-light); border-radius: 16px; padding: 1.2rem 1.3rem; }
.case-card h4 { color: var(--yellow); margin-bottom: .5rem; }
.case-card p { color: var(--muted-light); font-size: .96rem; }
.accordion details { border-top: 1px solid var(--line-light); padding: .5rem 0 .8rem; }
.accordion details:last-child { border-bottom: 1px solid var(--line-light); }
.accordion details > p, .accordion details > ol, .accordion details > ul, .accordion details > dl { margin-top: .6rem; color: var(--muted-light); }
.steps { counter-reset: step; display: grid; gap: .5rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.2rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--grad); color: #1a0b14; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.bullets { display: grid; gap: .5rem; list-style: disc; padding-left: 1.2rem; }
.defs { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; }
.defs dt { font-weight: 750; color: var(--text-light); }
.defs dd { margin: 0; }
@media (max-width: 560px) { .defs { grid-template-columns: 1fr; gap: 0; } .defs dd { margin-bottom: .6rem; } }

.cta-band {
  margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: 26px; background: linear-gradient(115deg, #3a2a8a, #6b2a62 60%, #8a2b4a);
  border: 1px solid rgba(255, 255, 255, .2);
}
.cta-band p { margin-top: .5rem; max-width: 38rem; color: #e9e2ff; }

/* ---------- 9. Sobre mí ---------- */
.about-grid { display: grid; gap: 3rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.4fr 1fr; gap: 4rem; } }
.about-intro { margin-top: 1.4rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-size: 1.1rem; }
.principles { display: grid; gap: 1rem; }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principles article { padding: 1.2rem; background: #fff; border: 1px solid var(--line-dark); border-radius: 16px; }
.principles h4 { margin-bottom: .4rem; }
.principles p { color: var(--muted-dark); font-size: .94rem; }
.about-side { padding: 1.6rem; background: #fff; border: 1px solid var(--line-dark); border-radius: var(--radius); align-self: start; }
.about-side .sub-h-light:first-child { margin-top: 0; }
.social-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.social-link { display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; }
.social-link:hover { background: var(--ink); color: #fff; }
.social-list-dark .social-link { border-color: rgba(255, 255, 255, .5); color: #fff; }
.social-list-dark .social-link:hover { background: #fff; color: var(--ink); }
.cv-message { margin-top: .8rem; padding: .7rem .9rem; border-radius: 10px; background: #fff1d6; color: #5a3b00; font-size: .92rem; }

/* ---------- 10. Contacto ---------- */
.contact { background: radial-gradient(60% 50% at 10% 0%, rgba(255, 77, 141, .22), transparent 60%), radial-gradient(50% 50% at 100% 100%, rgba(124, 92, 255, .25), transparent 60%), var(--ink); }
.contact-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: .85fr 1.15fr; gap: 4rem; } }
.contact-alt { margin-top: 1.6rem; color: var(--muted-light); }
.contact .social-list { margin-top: 1.2rem; }

.form { background: var(--paper-2); color: var(--text-dark); border-radius: 26px; padding: clamp(1.3rem, 3vw, 2.2rem); display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-field { display: grid; gap: .35rem; min-width: 0; }
.form-field label { font-weight: 700; font-size: .93rem; }
.req { color: var(--accent-text); font-weight: 800; }
.opt { font-weight: 500; font-size: .8rem; color: var(--muted-dark); margin-left: .3rem; }
.form input:not([type="hidden"]), .form select, .form textarea {
  width: 100%; padding: .75rem .9rem; border-radius: 12px; background: #fff; color: var(--text-dark);
  border: 1.5px solid #7d7694;
}
.form textarea { resize: vertical; min-height: 8rem; }
.form input[aria-invalid="true"], .form select[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #b4124f; border-width: 2px; }
.form :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hint { font-size: .84rem; color: var(--muted-dark); }
.error { font-size: .88rem; font-weight: 650; color: #a10f48; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { padding: .85rem 1rem; border-radius: 12px; font-weight: 650; }
.form-status[data-tone="success"] { background: #d9f3e5; color: #0b4f31; }
.form-status[data-tone="error"] { background: #fde0e9; color: #86103b; }
.form-status[data-tone="warn"] { background: #fff0d1; color: #5f3d00; }
.form-status[data-tone="info"] { background: #e6e1ff; color: #2a1f7a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 11. Pie ---------- */
.site-footer { background: #090712; color: var(--muted-light); padding-block: 3.5rem 2rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-name { color: #fff; font-weight: 800; font-size: 1.15rem; }
.footer-studio { color: var(--muted-light); font-weight: 500; font-size: .95rem; margin-left: .4rem; }
.footer-tagline { margin: .6rem 0 1rem; max-width: 24rem; }
.footer-h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: .8rem; font-weight: 800; }
.footer-list { display: grid; gap: .45rem; }
.footer-list a { text-decoration: none; }
.footer-list a:hover { color: #fff; text-decoration: underline; }
.footer-list .placeholder-text { color: var(--muted-light); border-color: rgba(255, 255, 255, .35); background: transparent; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line-light); font-size: .9rem; }
.lang-footer { border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ---------- 12. Visor de proyecto ---------- */
.dialog {
  padding: 0; border: 0; border-radius: 24px; width: min(920px, 94vw); max-height: 92vh;
  background: var(--paper-2); color: var(--text-dark); overflow: hidden;
}
.dialog::backdrop { background: rgba(10, 8, 20, .76); }
.dialog-inner { position: relative; max-height: 92vh; overflow-y: auto; }
.dialog-close {
  position: absolute; right: .9rem; top: .9rem; z-index: 3; width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .7); background: rgba(14, 11, 22, .82); color: #fff; display: grid; place-items: center;
}
.dialog-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--c1, #7c5cff), var(--c2, #ff4d8d)); display: grid; place-items: center; overflow: hidden; }
.dialog-media iframe, .dialog-media video { width: 100%; height: 100%; border: 0; background: #000; }
.dialog-media img { width: 100%; height: 100%; object-fit: contain; }
.dialog-media .cover-motif { position: absolute; inset: 0; width: 100%; height: 100%; }
.media-note { position: relative; padding: .7rem 1rem; border-radius: 12px; background: rgba(14, 11, 22, .72); color: #fff; max-width: 80%; text-align: center; font-weight: 600; }
.media-fallback { position: absolute; left: .8rem; bottom: .6rem; background: rgba(14, 11, 22, .82); padding: .3rem .7rem; border-radius: 8px; color: var(--yellow); font-size: .85rem; }
.media-error { position: relative; padding: 1.2rem; text-align: center; color: #fff; background: rgba(14, 11, 22, .82); border-radius: 12px; max-width: 80%; display: grid; gap: .5rem; justify-items: center; }
.media-error .text-link { color: var(--yellow); }
.dialog-body { padding: 1.5rem clamp(1.2rem, 3vw, 2rem) 2rem; display: grid; gap: .8rem; justify-items: start; }
.dialog-body p { color: var(--muted-dark); font-size: 1.02rem; }
.dialog-sub { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-dark); margin-bottom: .4rem; }

/* ---------- 13. Animaciones (solo si la persona no pidió menos movimiento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .reveal-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal-ready .reveal.in { opacity: 1; transform: none; }
  .orb-a { animation: float 9s ease-in-out infinite; }
  .orb-b { animation: float 7s ease-in-out -2s infinite; }
  .ring { animation: spin 50s linear infinite; }
  .ring-2 { animation: spin 80s linear infinite reverse; }
  .glass-1 { animation: bob 6s ease-in-out infinite; }
  .glass-2 { animation: bob 7s ease-in-out -1.5s infinite; }
  .glass-3 { animation: bob 8s ease-in-out -3s infinite; }
  .glass-4 { animation: bob 6.5s ease-in-out -4s infinite; }
  .wave { animation: slide 1.4s linear infinite; }
  .dialog[open] { animation: pop .25s ease; }
  .h1-line { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .h1-accent { animation-delay: .12s; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { background-position: 7px 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Ajustes finos en móvil */
@media (max-width: 560px) {
  .brand-name { font-size: .98rem; }
  .glass { min-width: 6.4rem; font-size: .8rem; padding: .6rem .8rem; }
  .field-row { gap: .6rem; }
  .num-input { width: 6.6rem; }
  .funnel-row { grid-template-columns: 4rem 1fr 3.8rem; }
}
