/* Alex Rivera — propuesta de sitio. El sitio es una sesión de grabación:
   la navegación es la línea de tiempo, cada demo es una pista. */

:root {
  --bg: #0B0C0E;
  --bg-2: #111317;
  --bg-3: #171A1F;
  --line: #22262C;
  --line-2: #33383F;
  --text: #ECEAE4;
  --muted: #9A9EA6;
  --faint: #6B7078;
  --red: #FF4133;

  --c-slate: #8A8E97;
  --c-com: #FF7A59;
  --c-ani: #F5B83D;
  --c-game: #5CC8B0;
  --c-narr: #8FA8FF;
  --c-promo: #D08CF2;
  --c-es: #E8CFA0;

  --hdr-h: 60px;
  --gut: 24px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

html:has(#ar), html:has(#ar) body { background: var(--bg) !important; }
html:has(#ar) { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html:has(#ar) { scroll-behavior: auto; } }

.ar, .ar *, .ar *::before, .ar *::after { box-sizing: border-box; }
.ar {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--display); font-size: 17px; line-height: 1.5;
  font-variation-settings: "opsz" 16;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
:where(.ar) :where(h1, h2, h3, p, ol, ul, dl, dd, figure) { margin: 0; padding: 0; }
:where(.ar) :where(ol, ul) { list-style: none; }
:where(.ar) a { color: inherit; text-decoration: none; }
:where(.ar) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.ar) button { background: none; border: 0; cursor: pointer; padding: 0; }
:where(.ar) canvas { display: block; }
.ar em { font-style: normal; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ar ::selection { background: var(--red); color: var(--bg); }
.ar :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--mono); font-variation-settings: normal; letter-spacing: .02em; }
.dim { color: var(--muted); }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gut); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--red); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- REC dot ---------- */
.rec { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 65, 51, .5); animation: rec 1.6s ease-in-out infinite; flex: none; }
.rec-dark { background: var(--bg); box-shadow: none; animation: none; }
@keyframes rec { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 65, 51, .45); } 50% { opacity: .35; box-shadow: 0 0 0 5px rgba(255, 65, 51, 0); } }
.is-live .hdr .rec { animation: none; opacity: 1; box-shadow: 0 0 10px 1px rgba(255, 65, 51, .7); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; letter-spacing: -.005em; white-space: nowrap; transition: transform .15s ease, background .2s ease, border-color .2s ease; }
.btn:active { transform: scale(.98); }
.btn-rec { background: var(--red); color: var(--bg); }
.btn-rec:hover { background: #FF5A4E; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.ic { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ---------- header / timeline ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hdr-h);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 20px;
  padding: 0 var(--gut);
  background: rgba(11, 12, 14, .84); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; font-variation-settings: "wdth" 85; }
.tl { position: relative; height: 30px; min-width: 0; }
.tl-track { display: flex; gap: 3px; height: 100%; }
.tl-track li { flex: 1 1 0; min-width: 0; }
.tl-reg {
  display: block; height: 100%; padding: 0 9px; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--mono); font-size: 10.5px; line-height: 27px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  background: color-mix(in srgb, var(--rc) 10%, transparent); border-top: 3px solid color-mix(in srgb, var(--rc) 55%, transparent);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.tl-reg:hover { color: var(--text); }
.tl-reg.on { color: var(--text); background: color-mix(in srgb, var(--rc) 22%, transparent); border-top-color: var(--rc); }
.tl-head { position: absolute; top: -6px; bottom: -6px; left: 0; width: 2px; margin-left: -1px; background: var(--red); pointer-events: none; will-change: transform; }
.tl-head::before { content: ""; position: absolute; top: 0; left: -4px; border: 5px solid transparent; border-top: 6px solid var(--red); border-bottom: 0; }
.tc { display: flex; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); }
.tc-lab { color: var(--faint); }
.meter { display: flex; gap: 3px; height: 22px; align-items: flex-end; }
.meter i { display: block; width: 4px; height: 100%; border-radius: 1px; background: linear-gradient(to top, var(--c-game) 0 60%, var(--c-ani) 60% 85%, var(--red) 85%); transform-origin: bottom; transform: scaleY(.06); opacity: .9; }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.lang button { font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 999px; color: var(--faint); letter-spacing: .06em; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.hdr-cta { height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- slate (hero) ---------- */
.slate { min-height: 100svh; padding-top: calc(var(--hdr-h) + clamp(28px, 6vh, 64px)); padding-bottom: clamp(36px, 7vh, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: clamp(20px, 3vh, 36px); }
.slate-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.rec-txt { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-variant-numeric: tabular-nums; }
.name {
  margin-top: clamp(18px, 4vh, 44px);
  font-size: clamp(64px, 15.2vw, 250px); line-height: .8; font-weight: 800; letter-spacing: -.04em;
  font-variation-settings: "wdth" 75, "opsz" 96; text-transform: none;
}
.name span { display: inline-block; }
.slate-wave { position: relative; height: clamp(96px, 17vh, 180px); }
.slate-wave canvas { width: 100%; height: 100%; }
.slate-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 24px 40px; align-items: end; }
.role { display: flex; flex-direction: column; gap: 4px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; line-height: 1.1; font-variation-settings: "wdth" 90, "opsz" 40; }
.role-langs { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 6px; }
.lede { font-size: clamp(17px, 1.35vw, 20px); color: var(--muted); max-width: 46ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- sections ---------- */
.sec { padding: clamp(84px, 11vw, 150px) 0; border-top: 1px solid var(--line); }
.sec-head { margin-bottom: clamp(34px, 5vw, 60px); }
.kicker { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 18px; }
.k-n { color: var(--red); }
.ar h2 { margin: 0; font-size: clamp(36px, 5.2vw, 72px); line-height: .98; font-weight: 750; letter-spacing: -.03em; font-variation-settings: "wdth" 82, "opsz" 72; max-width: 17ch; text-wrap: balance; }
.sec-sub { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 52ch; }
.body-l { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; max-width: 54ch; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-ani); border: 1px dashed color-mix(in srgb, var(--c-ani) 55%, transparent); border-radius: 999px; padding: 4px 10px; }

/* ---------- reels / lanes ---------- */
.demo-note { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 10px; font-size: 12.5px; line-height: 1.55; color: var(--muted); margin-bottom: 34px; max-width: 900px; }
.demo-note b { color: var(--red); letter-spacing: .12em; flex: none; }
.lanes-bar { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); gap: 24px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; padding-bottom: 10px; }
.ruler { position: relative; height: 22px; border-bottom: 1px solid var(--line); }
.ruler i { position: absolute; bottom: 6px; font-style: normal; transform: translateX(-50%); }
.ruler i:first-child { transform: none; }
.ruler i::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 1px; height: 5px; background: var(--line-2); }
.ruler i:first-child::after { left: 0; }
.lane { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); transition: opacity .3s ease; }
.lanes.has-live .lane:not(.is-playing) { opacity: .42; }
.lane-hd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.lane-n { font-size: 12px; color: var(--lc); }
.lane-t h3 { font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; font-variation-settings: "wdth" 92, "opsz" 24; }
.lane-copy { font-size: 13.5px; color: var(--muted); line-height: 1.4; margin-top: 3px; }
.lane-ctl { display: flex; gap: 6px; }
.lb { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.lb:hover { color: var(--text); border-color: var(--text); }
.lb .ic { width: 16px; height: 16px; }
.lb-play { background: var(--lc); border-color: var(--lc); color: var(--bg); }
.lb-play:hover { color: var(--bg); border-color: var(--text); }
.lb-play .ic-pause, .is-playing .lb-play .ic-play { display: none; }
.is-playing .lb-play .ic-pause { display: block; }
.lb-load input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lb-load:focus-within { outline: 2px solid var(--red); outline-offset: 3px; }
.clip {
  position: relative; height: 80px; width: var(--cw, 100%); min-width: 170px; transition: width .5s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease; border-radius: 6px; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--lc) 11%, var(--bg)); border-top: 3px solid var(--lc);
}
.clip canvas { position: absolute; left: 0; right: 0; bottom: 0; top: 18px; width: 100%; height: calc(100% - 18px); }
.clip-name, .clip-dur { position: absolute; top: 3px; font-size: 10px; letter-spacing: .06em; z-index: 1; color: color-mix(in srgb, var(--lc) 85%, var(--text)); }
.clip-name { left: 9px; right: 70px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clip-dur { right: 9px; font-variant-numeric: tabular-nums; }
.clip.drag { box-shadow: inset 0 0 0 2px var(--lc); }
.lane.is-own .clip-name::after { content: "  ·  tu audio"; color: var(--text); }
.lane.is-sample .clip-name::after { content: "  ·  prueba"; color: var(--c-ani); }

/* ---------- voice ---------- */
.voice-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.shot { position: relative; }
.shot-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, #1D2026 0%, var(--bg-2) 55%, var(--bg) 100%); border: 1px solid var(--line); }
.shot-mono { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(120px, 20vw, 260px); font-weight: 800; letter-spacing: -.01em; font-variation-settings: "wdth" 75, "opsz" 96; color: transparent; -webkit-text-stroke: 1px var(--line-2); line-height: 1; padding-bottom: 12%; }
.shot-wave { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; width: 100%; }
.shot figcaption { margin-top: 12px; }
.voice-txt .body-l + .body-l { margin-top: 16px; }
.voice-txt h2 { margin-bottom: 28px; }
.specs { margin-top: 34px; border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.specs dt, .rider dt { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; padding-top: 4px; }
.specs dd { font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chips li { border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--text); }

/* ---------- studio ---------- */
.studio-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.studio .sec-head p.mono { margin-top: 22px; }
.rider { border-top: 1px solid var(--line); }
.rider > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rider dd { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; letter-spacing: -.01em; }

/* ---------- session ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); counter-reset: s; }
.steps li { padding: 28px 28px 8px 0; border-right: 1px solid var(--line); }
.steps li + li { padding-left: 28px; }
.steps li:last-child { border-right: 0; }
.step-n { display: block; font-size: 12px; color: var(--c-narr); letter-spacing: .12em; margin-bottom: 40px; }
.steps h3 { font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; font-variation-settings: "wdth" 88, "opsz" 32; margin-bottom: 10px; }
.steps p { font-size: 15.5px; color: var(--muted); }

/* ---------- book ---------- */
.book-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.book-txt h2 { margin-bottom: 22px; }
.facts { margin-top: 30px; display: grid; gap: 10px; font-size: 12.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.facts li { display: flex; gap: 10px; align-items: center; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c-game); flex: none; }
.form { display: grid; gap: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 34px); }
.f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fld { display: grid; gap: 7px; min-width: 0; }
.fld > span { font-size: 10.5px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.fld input, .fld select, .fld textarea {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg);
  font-size: 16px; color: var(--text); outline: none; transition: border-color .2s ease, box-shadow .2s ease; -webkit-appearance: none; appearance: none;
}
.fld textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.fld select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.fld input[type="date"] { color-scheme: dark; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--faint); }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 65, 51, .18); }
.fld input.bad { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.form-msg { font-size: 14px; color: var(--muted); }
.form-msg.ok { color: var(--c-game); }
.form-msg.err { color: var(--red); }
.form.sending button[type="submit"] { opacity: .6; pointer-events: none; }

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--line); padding: 64px 0 96px; }
.ftr-name { font-size: clamp(56px, 11vw, 170px); font-weight: 800; line-height: .82; letter-spacing: -.045em; font-variation-settings: "wdth" 75, "opsz" 96; color: var(--bg-3); -webkit-text-stroke: 1px var(--line-2); }
.ftr-row { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 30px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ftr-row a:hover { color: var(--text); }
.ftr-note { margin-top: 18px; font-size: 11px; color: var(--faint); letter-spacing: .08em; }
.ftr-sign { margin-top: 8px; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.ftr-sign a { color: var(--text); border-bottom: 1px solid var(--line-2); }
.ftr-sign a:hover { border-color: var(--text); }

/* ---------- badge + toast ---------- */
.badge { position: fixed; left: 14px; bottom: 14px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; background: rgba(17, 19, 23, .92); border: 1px solid var(--line-2); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); pointer-events: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.badge .rec { width: 7px; height: 7px; }
.toast { position: fixed; left: 50%; bottom: 70px; z-index: 70; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: min(520px, calc(100% - 32px)); padding: 12px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12.5px; line-height: 1.45; transition: opacity .25s ease, transform .25s ease; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .rec { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hdr { gap: 14px; }
  .meter { display: none; }
  .slate-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .cta { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li:nth-child(3) { padding-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 860px) {
  :root { --hdr-h: 84px; --gut: 16px; }
  .hdr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 48px 22px; row-gap: 0; column-gap: 14px; padding-bottom: 8px; align-items: center; }
  .brand { grid-column: 1; grid-row: 1; }
  .tc { grid-column: 2; grid-row: 1; justify-self: end; font-size: 12px; }
  .lang { grid-column: 3; grid-row: 1; }
  .tl { grid-column: 1 / -1; grid-row: 2; height: 14px; }
  .tl-reg { font-size: 0; padding: 0; border-top-width: 3px; }
  .tl-head { top: -4px; bottom: -3px; }
  .hdr-cta, .meter { display: none; }

  .slate { min-height: 100svh; }
  .name { font-size: clamp(64px, 30vw, 200px); line-height: .78; }
  .name span { display: block; }
  .slate-foot { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cta .btn { flex: 1 1 auto; }

  .lanes-bar { grid-template-columns: minmax(0, 1fr); }
  .ruler { display: none; }
  .lane { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 0; }
  .clip { height: 66px; }

  .voice-grid, .studio-grid, .book-grid { grid-template-columns: minmax(0, 1fr); }
  .shot { max-width: 420px; }
  .specs > div, .rider > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li { padding: 22px 0 12px; border-right: 0; border-top: 1px solid var(--line); }
  .steps li:first-child { border-top: 0; }
  .step-n { margin-bottom: 14px; }
  .f2, .f3 { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { width: 100%; }
  .badge { left: 10px; bottom: 10px; font-size: 9.5px; padding: 7px 11px; }
  .badge-x { display: none; }
  .hide-sm { display: none; }
}

@media (max-width: 420px) {
  .lane-copy { font-size: 13px; }
  .lb { width: 36px; height: 36px; }
  .demo-note { flex-direction: column; gap: 6px; }
}
