/* ============ Base ============ */
:root {
  /* Tema principal: negro y dorado, como el logo */
  --bg: #0B0A08;
  --surface: #15130F;
  --ink: #F1E9D8;
  --muted: #A39A86;
  --line: rgba(241, 233, 216, .15);
  --wave: rgba(241, 233, 216, .26);
  --accent: #E3BD72;
  --on-accent: #0B0A08;
  --gold: linear-gradient(175deg, #F8EBC6 8%, #D4AF6A 42%, #A9823F 58%, #F1DDA9 92%);
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
}
/* Tema alternativo claro: se ve agregando ?tema=claro a la dirección */
:root[data-theme="claro"] {
  --bg: #F3F0E8;
  --surface: #FBF9F4;
  --ink: #14130F;
  --muted: #6A665B;
  --line: rgba(20, 19, 15, .14);
  --wave: rgba(20, 19, 15, .26);
  --accent: #D93A22;
  --on-accent: #FFFFFF;
  --gold: linear-gradient(#D93A22, #D93A22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ============ Tipografía ============ */
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(1.45rem, 3.2vw, 2.3rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; max-width: 24ch; }
h1 em { font-style: normal; color: var(--accent); }
.gold { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.hero-logo { width: auto; height: clamp(210px, 38vh, 360px); max-width: 100%; object-fit: contain; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font: 600 1.08rem/1.25 var(--display); letter-spacing: -.01em; }
.eyebrow { font: 600 .72rem/1.3 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 46ch; color: var(--muted); }
.lead, .section-sub { text-wrap: pretty; }
.section-sub { color: var(--muted); max-width: 48ch; }

/* ============ Botones ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color .2s, color .2s; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ============ Encabezado ============ */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 .78rem/1 var(--display); letter-spacing: .26em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); }
body.is-playing .dot { animation: onair 1.4s ease-out infinite; }
@keyframes onair { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } to { box-shadow: 0 0 0 10px transparent; } }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-size: .93rem; text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { min-width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font: 500 .74rem/1 var(--mono); letter-spacing: .06em; cursor: pointer; }
.lang:hover { border-color: var(--ink); }

.nav-only-mobile, .menu-btn { display: none; }
.menu-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-btn span { width: 16px; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu-btn.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ============ Portada ============ */
.hero { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); display: grid; gap: clamp(16px, 2.2vw, 24px); justify-items: center; text-align: center; }
.hero .lead { max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px; }
.hero-player { width: 100%; max-width: 880px; text-align: left; margin-top: 6px; }

/* ============ Reproductor ============ */
.play {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--ink);
  background: transparent; display: grid; place-items: center; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.play svg { width: 16px; height: 16px; fill: currentColor; }
.play .i-pause { display: none; }
.playing > .play .i-play { display: none; }
.playing > .play .i-pause { display: block; }
.play:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.play:active:not(:disabled) { transform: scale(.94); }
.playing > .play { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.play:disabled { cursor: default; opacity: .35; }
.wave { display: block; width: 100%; height: 44px; cursor: pointer; touch-action: none; }
.time { font: 400 .8rem/1 var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: color .2s, background .2s; }
.dl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl:hover { color: var(--ink); background: var(--line); }
.missing .wave { opacity: .45; cursor: default; }
.missing .dl { visibility: hidden; }

.hero-player {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 20px;
  padding: clamp(16px, 2.2vw, 24px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.hero-player .play { width: 64px; height: 64px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hero-player .play svg { width: 20px; height: 20px; }
.hero-player .play:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hero-player .wave { height: 64px; }
.hp-body { display: grid; gap: 8px; min-width: 0; }
.hp-label { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hp-label strong { font: 600 1.05rem/1.2 var(--display); }

/* ============ Datos ============ */
.facts { display: flex; flex-wrap: wrap; gap: 14px clamp(28px, 6vw, 72px); padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts li { display: flex; align-items: baseline; gap: 8px; }
.facts strong { font: 600 1.25rem/1 var(--display); letter-spacing: -.02em; }
.facts span { color: var(--muted); font-size: .95rem; }

/* ============ Secciones ============ */
.section { padding-top: clamp(64px, 10vw, 128px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head-row { grid-template-columns: 1fr auto; align-items: end; }
.section-head-row > div { display: grid; gap: 14px; }

/* ============ Lista de demos ============ */
.demo-list { border-top: 1px solid var(--line); }
.demo {
  display: grid; grid-template-columns: auto minmax(150px, 240px) minmax(0, 1fr) auto auto; align-items: center; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.demo-meta p { color: var(--muted); font-size: .92rem; }
.demo .time { min-width: 108px; text-align: right; }

/* ============ Servicios ============ */
.services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.services li { padding: 26px 24px 30px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.services p { color: var(--muted); font-size: .97rem; max-width: 30ch; }
.num { font: 400 .74rem/1 var(--mono); color: var(--accent); letter-spacing: .06em; margin-bottom: 10px; }
.steps { margin-top: clamp(40px, 6vw, 72px); padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 22px; counter-reset: paso; }
.steps ol > li { counter-increment: paso; display: grid; gap: 6px; align-content: start; }
.steps ol > li::before { content: counter(paso); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ink); font: 500 .8rem/1 var(--mono); margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: .97rem; }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.perks li { display: grid; gap: 4px; align-content: start; }
.perks strong { font: 600 1rem/1.25 var(--display); color: var(--accent); }
.perks span { color: var(--muted); font-size: .93rem; }
.human { font-size: 1rem; padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted); }
.human strong { color: var(--ink); font-weight: 600; }
.form-legal { font-size: .84rem; color: var(--muted); }
.form-legal a, .foot-links a { color: inherit; }
.foot-links { display: inline-flex; gap: 22px; flex-wrap: wrap; }
@media (max-width: 880px) { .perks { grid-template-columns: repeat(2, 1fr); } }

/* ============ Confianza ============ */
.marquee {
  width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; padding: 6px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: cinta var(--dur, 40s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.clients { display: flex; flex-wrap: nowrap; align-items: center; font: 600 clamp(1.15rem, 2.4vw, 1.6rem)/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.clients li { display: flex; align-items: center; padding: 16px 0; }
.clients li::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 clamp(22px, 3.5vw, 40px); }
@media (prefers-reduced-motion: reduce) {
  .marquee { width: auto; margin-left: 0; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; }
  .clients { flex-wrap: wrap; white-space: normal; }
  .clients[aria-hidden] { display: none; }
}
#confianza .section-head { margin-bottom: 20px; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 36px; }
.quotes blockquote { margin: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 16px; }
.quotes p { font: 500 1.15rem/1.4 var(--display); letter-spacing: -.01em; }
.quotes footer { font-size: .9rem; color: var(--muted); }

/* ============ Sobre mí ============ */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-fallback { position: absolute; inset: 0; display: none; place-items: center; }
.portrait-fallback span { font: 600 clamp(4rem, 12vw, 8rem)/1 var(--display); letter-spacing: -.06em; color: var(--line); }
.portrait.no-photo img { display: none; }
.portrait.no-photo .portrait-fallback { display: grid; }
.about { align-items: start; }
.about-text { display: grid; gap: 20px; justify-items: start; }
.about-text > p:not(.eyebrow):not(.edu) { font-size: 1.12rem; max-width: 50ch; text-wrap: pretty; }
.timeline { display: grid; gap: 0; width: 100%; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline h3 { color: var(--accent); }
.timeline p a { color: var(--ink); text-underline-offset: 3px; }
.timeline p a:hover { color: var(--accent); }
.about-text .eyebrow + .timeline { margin-top: -8px; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; } }
.timeline p { color: var(--muted); font-size: .97rem; max-width: 52ch; }
.edu { font-size: .93rem; color: var(--muted); max-width: 60ch; }
.edu strong { color: var(--ink); font-weight: 600; }

/* ============ Videos ============ */
.video-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font: 600 .82rem/1 var(--display); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 18px; align-items: start; }
.video { display: grid; gap: 12px; }
.video-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface); cursor: pointer; }
.video.vertical .video-frame { aspect-ratio: 9 / 16; max-height: 520px; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; opacity: .88; }
button.video-frame:hover img { transform: scale(1.03); opacity: 1; }
.video-play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 30px rgba(0, 0, 0, .45); transition: transform .2s; }
.video-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 3px; }
button.video-frame:hover .video-play { transform: scale(1.08); }
.video-meta { display: grid; gap: 6px; }
.video-meta .eyebrow { color: var(--accent); }
.video-meta p { color: var(--muted); font-size: .93rem; }
.videos.two { grid-template-columns: repeat(2, 1fr); }

/* ============ En el aire ============ */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery figure { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--surface); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px; font: 600 .68rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #F1E9D8; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); }

/* ============ Novedades ============ */
.feed { min-height: 120px; }
.feed-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.feed-grid a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px; background: var(--surface); }
.feed-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.feed-grid a:hover img { transform: scale(1.04); }
.feed-grid .tag { position: absolute; bottom: 8px; left: 8px; font: 500 .56rem/1 var(--mono); letter-spacing: .06em; padding: 5px 7px; border-radius: 999px; background: rgba(15, 15, 13, .7); color: #fff; }
.feed-embed { display: flex; justify-content: center; }
.feed-embed .instagram-media { margin: 0 !important; border-radius: 12px !important; }
.feed-msg { color: var(--muted); padding: 28px 0; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.socials a, .channels a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .93rem; font-weight: 500; transition: border-color .2s, background .2s, color .2s; }
.socials a:hover, .channels a:hover { border-color: var(--ink); }

/* ============ Contacto ============ */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-intro { display: grid; gap: 16px; }
.channels { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.form { display: grid; gap: 18px; padding: clamp(20px, 3vw, 34px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.form label { display: grid; gap: 8px; }
.form label span { font: 600 .7rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 1rem; transition: border-color .2s; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--ink); }
.form .invalid { border-color: var(--accent); }
.form .btn { justify-self: start; }
.form-note { font-size: .92rem; color: var(--muted); min-height: 1.4em; }

/* ============ Pie ============ */
.foot { margin-top: clamp(72px, 11vw, 140px); border-top: 1px solid var(--line); padding: clamp(28px, 5vw, 56px) 0 28px; overflow: hidden; }
.wordmark { width: min(380px, 70%); height: auto; margin: 0 auto; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; font-size: .88rem; color: var(--muted); }
.foot-row a { text-decoration: none; }
.foot-row a:hover { color: var(--ink); }

/* ============ Móvil ============ */
.nav a { white-space: nowrap; }
@media (max-width: 1080px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0; padding: 6px var(--gutter) 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a, .nav-lang { display: block; padding: 14px 0; font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--line); text-align: left; }
  .nav a[hidden] { display: none; }
  .nav-lang { background: none; border-width: 0; color: var(--accent); cursor: pointer; font-weight: 600; }
  .nav-only-mobile { display: block; }
  .menu-btn { display: inline-flex; }
  .top .lang { display: none; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 880px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .gallery, .feed-grid { grid-template-columns: repeat(3, 1fr); }
  .videos { grid-template-columns: repeat(2, 1fr); }
  .about, .contact { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .demo { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 16px; }
  .demo .wave { grid-column: 1 / -1; grid-row: 2; }
  .demo .time { grid-column: 1 / -1; grid-row: 3; text-align: left; min-width: 0; }
  .demo .dl { grid-column: 3; grid-row: 1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .services, .steps ol { grid-template-columns: 1fr; }
  .services li { padding-right: 0; }
  .section-head-row { grid-template-columns: 1fr; justify-items: start; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .videos, .videos.two { grid-template-columns: 1fr; }
  .hero-player { grid-template-columns: auto minmax(0, 1fr); }
  .hero-player .play { width: 56px; height: 56px; }
  .hero-player .dl { display: none; }
  .hero-cta .btn { width: 100%; }
  .form .btn { width: 100%; }
  .brand { font-size: .68rem; letter-spacing: .18em; gap: 7px; }
  .top-in { gap: 10px; }
  .btn-small { white-space: nowrap; padding: 0 13px; font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
