/* =====================================================================
   Arreglos Sinfónicos — Editorial Dark Warm (sala de conciertos)
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg:       #0E0B09;
  --bg-2:     #15110E;
  --bg-3:     #1E1813;
  --cream:    #F2EBDA;
  --cream-2:  #DDD2BC;
  --cream-3:  #9A8C74;
  --gold:     #C9A25E;
  --gold-2:   #E2C285;
  --wine:     #7A2A22;
  --line:     rgb(var(--ink-rgb) / .12);
  /* canales RGB para transparencias (los cambia tema.css) */
  --ink-rgb:  242 235 218;
  --gold-rgb: 201 162 94;
  --wine-rgb: 122 42 34;
  --bg-rgb:   14 11 9;
  --on-gold:  var(--on-gold);
  --error:    #E8A08F;
  --mesh-opacity: .55;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --wrap: 1200px;
  --pad: clamp(20px, 5vw, 56px);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--cream-2);
  font: 300 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--cream); font-family: var(--serif); font-weight: 400; line-height: 1.08; }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--gold-2); font-variation-settings: "SOFT" 100; }
strong { color: var(--cream); font-weight: 500; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }

/* ---------- 3. Type helpers ---------- */
.eyebrow, .kicker {
  font: 500 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 22px;
}
.kicker { display: inline-flex; align-items: center; gap: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgb(var(--gold-rgb) / .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(var(--gold-rgb) / 0); } 100% { box-shadow: 0 0 0 0 rgb(var(--gold-rgb) / 0); } }
.h2 { font-size: clamp(34px, 4.6vw, 60px); letter-spacing: -.01em; margin-bottom: 26px; max-width: 18ch; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--cream); font-weight: 300; }
.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 72px); }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px; font: 500 15px/1 var(--sans); letter-spacing: .02em;
  transition: transform .35s var(--ease-out), background .35s, color .35s, border-color .35s;
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--on-gold); }
.btn-primary:hover { background: var(--gold-2); transform: translateY(-2px); }
.btn-ghost { border-color: rgb(var(--ink-rgb) / .3); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-block { width: 100%; }

/* ---------- 5. Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad); transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgb(var(--bg-rgb) / .94); padding-top: 14px; padding-bottom: 14px; border-color: var(--line); }
@supports (backdrop-filter: blur(10px)) { .nav.is-solid { background: rgb(var(--bg-rgb) / .8); backdrop-filter: blur(14px); } }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); }
.brand-clef { font-size: 34px; line-height: 1; color: var(--gold); font-family: "Segoe UI Symbol", "Noto Music", serif; }
.brand-text { font: 400 21px/1 var(--serif); letter-spacing: .01em; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); font-size: 14px; }
.nav-links a { color: var(--cream-2); position: relative; transition: color .3s; }
.nav-links a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out); }
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { border: 1px solid var(--gold); color: var(--gold-2) !important; padding: 10px 18px; border-radius: 999px; }
.nav-cta:hover { background: var(--gold); color: var(--on-gold) !important; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--cream); transition: transform .3s, top .3s; }
.nav-toggle span:first-child { top: 18px; } .nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 130px 0 90px; overflow: hidden; isolation: isolate; }
@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.hero-mesh {
  position: absolute; inset: -20%; z-index: -2; filter: blur(80px); opacity: var(--mesh-opacity);
  background:
    radial-gradient(40% 40% at 75% 35%, rgb(var(--gold-rgb) / .35), transparent 70%),
    radial-gradient(35% 35% at 15% 80%, rgb(var(--wine-rgb) / .45), transparent 70%),
    conic-gradient(from var(--mesh-angle) at 60% 50%, rgb(var(--gold-rgb) / .12), transparent 30%, rgb(var(--wine-rgb) / .18), transparent 70%, rgb(var(--gold-rgb) / .12));
  animation: mesh 22s linear infinite;
}
@keyframes mesh { to { --mesh-angle: 360deg; } }
.hero-staff { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: -1; display: grid; gap: 22px; opacity: .5; pointer-events: none; }
.hero-staff i { display: block; height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--gold-rgb) / .22) 20%, rgb(var(--gold-rgb) / .22) 80%, transparent); }
.hero-grid { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.hero-title { font-size: clamp(44px, 7vw, 100px); font-weight: 300; letter-spacing: -.02em; line-height: 1.02; margin-bottom: 28px; }
.hero-title .line { display: block; }
.hero-sub { font-size: clamp(17px, 1.4vw, 19px); max-width: 52ch; color: var(--cream-2); margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(22px, 4vw, 54px); margin: 0; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-stats div { max-width: 150px; }
.hero-stats dt { font: 300 clamp(34px, 3.4vw, 46px)/1 var(--serif); color: var(--gold-2); margin-bottom: 8px; }
.hero-stats dd { margin: 0; font-size: 13px; line-height: 1.45; color: var(--cream-3); }
.hero-figure { margin: 0; position: relative; }
.hero-photo { position: relative; border-radius: 220px 220px 8px 8px; overflow: hidden; aspect-ratio: 4/5.6; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(14,11,9,.75)); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: saturate(1.05) contrast(1.05); }
.hero-figure::before { content: ""; position: absolute; inset: -14px; border: 1px solid rgb(var(--gold-rgb) / .35); border-radius: 234px 234px 14px 14px; pointer-events: none; }
.hero-figure figcaption { position: absolute; left: 24px; bottom: 22px; z-index: 2; font: italic 300 19px/1.3 var(--serif); color: #F2EBDA; }
.hero-figure figcaption span { display: block; font: 500 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; font-style: normal; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; width: 24px; height: 40px; border: 1px solid rgb(var(--ink-rgb) / .35); border-radius: 14px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; background: var(--gold); border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Hero entrance (CSS only — content is visible even if JS fails) */
.hero-copy > * { animation: rise 1.1s var(--ease-out) both; }
.hero-copy > *:nth-child(2) { animation-delay: .12s; }
.hero-copy > *:nth-child(3) { animation-delay: .24s; }
.hero-copy > *:nth-child(4) { animation-delay: .36s; }
.hero-copy > *:nth-child(5) { animation-delay: .48s; }
.hero-figure { animation: rise 1.3s .2s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- 7. Marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 22px 0; }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 34px; animation: marquee 38s linear infinite; }
.marquee span { font: italic 300 clamp(22px, 2.4vw, 32px)/1 var(--serif); color: var(--cream); white-space: nowrap; }
.marquee b { color: var(--gold); font-weight: 400; font-size: 26px; font-family: "Segoe UI Symbol", "Noto Music", serif; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 8. Maestro ---------- */
.maestro-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.maestro-figure { margin: 0; position: relative; }
.maestro-figure img { width: 100%; border-radius: 6px; aspect-ratio: 477/619; object-fit: cover; filter: saturate(.95); }
.maestro-badge { position: absolute; right: -22px; bottom: 34px; background: var(--gold); color: var(--on-gold); padding: 18px 22px; border-radius: 4px; font: 500 12px/1.35 var(--sans); letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 20px 40px -18px rgba(0,0,0,.7); }
.maestro-badge strong { display: block; font: 400 44px/1 var(--serif); color: var(--on-gold); letter-spacing: 0; }
.creds { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.creds li { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); color: var(--cream); font-size: 15px; line-height: 1.4; }
.creds li span { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }

/* ---------- 9. Servicios ---------- */
.servicios { background: var(--bg-2); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  --mx: 50%; --my: 50%;
  position: relative; background: var(--bg-2); padding: clamp(30px, 3vw, 44px); display: flex; flex-direction: column;
  transition: background .5s; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(380px circle at var(--mx) var(--my), rgb(var(--gold-rgb) / .12), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card:hover { background: var(--bg-3); }
.card:hover::before { opacity: 1; }
.card-num { font: italic 300 22px/1 var(--serif); color: var(--gold); margin-bottom: 34px; }
.card h3 { font-size: clamp(24px, 2.2vw, 30px); margin-bottom: 16px; }
.card p { font-size: 15.5px; color: var(--cream-2); flex: 1; }
.card-link { margin-top: 18px; font-size: 14px; font-weight: 500; color: var(--gold-2); display: inline-flex; gap: 8px; }
.card-link span { transition: transform .35s var(--ease-out); }
.card-link:hover span { transform: translateX(5px); }

/* ---------- 10. Entrega / partituras ---------- */
.entrega-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; color: var(--cream); }
.checks li::before { content: "♪"; position: absolute; left: 0; top: -1px; color: var(--gold); font-size: 18px; }
.scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.score { margin: 0; background: #fff; border-radius: 3px; padding: 6px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); transition: transform .5s var(--ease-out); }
.score:nth-child(even) { transform: translateY(40px); }
.score img { width: 100%; filter: contrast(1.05); }
.score:hover { transform: translateY(-6px) rotate(-.6deg); }
.score:nth-child(even):hover { transform: translateY(34px) rotate(.6deg); }

/* ---------- 11. Proceso ---------- */
.proceso { background: var(--bg-2); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); counter-reset: s; }
.step { position: relative; padding-top: 30px; border-top: 1px solid var(--line); }
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 46px; height: 1px; background: var(--gold); }
.step-n { display: block; font: 300 46px/1 var(--serif); color: var(--gold); margin-bottom: 20px; }
.step h3 { font-size: 23px; margin-bottom: 12px; }
.step p { font-size: 15px; }

/* ---------- 12. Cita ---------- */
.quote-band { position: relative; padding: clamp(90px, 12vw, 150px) 0; text-align: center; overflow: hidden;
  background: radial-gradient(60% 80% at 50% 50%, rgb(var(--wine-rgb) / .28), transparent 70%), var(--bg); }
.quote-inner { position: relative; }
.quote-clef { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); font-size: clamp(240px, 34vw, 420px); line-height: 1; color: rgb(var(--gold-rgb) / .07); font-family: "Segoe UI Symbol", "Noto Music", serif; pointer-events: none; }
.quote-band blockquote { margin: 0 auto 26px; max-width: 900px; position: relative; }
.quote-band blockquote p { font: 300 clamp(26px, 3.4vw, 44px)/1.3 var(--serif); color: var(--cream); margin: 0; }
.quote-by { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); position: relative; }

/* ---------- 13. Legado ---------- */
.legado-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.legado-card { background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.legado-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .8s var(--ease-out), filter .8s; }
.legado-card:hover img { transform: scale(1.05); filter: saturate(1.15); }
.legado-body { padding: 28px 30px 32px; }
.legado-body h3 { font-size: clamp(22px, 2vw, 28px); margin-bottom: 12px; }
.legado-body p { font-size: 15.5px; margin: 0; }

/* ---------- 14. Contacto ---------- */
.contacto { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 34px 0 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--cream); font-size: 15.5px; word-break: break-word; }
.contact-list li > span:first-child { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); padding-top: 4px; }
.contact-list a:hover { color: var(--gold-2); }
.socials { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form { background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: clamp(26px, 3.5vw, 44px); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--cream-3); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color: var(--cream);
  font: 300 16px/1.5 var(--sans); padding: 14px 16px; transition: border-color .3s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--bg-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 13px; color: var(--cream-3); margin: 14px 0 0; text-align: center; }
.form-error { font-size: 14px; color: var(--error); margin: 12px 0 0; text-align: center; }

/* ---------- 15. Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 70px; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer p { margin: 0; font-size: 14px; }
.footer-small { color: var(--cream-3); font-size: 12.5px !important; }

/* ---------- 16. WhatsApp float ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25D366; color: #fff; box-shadow: 0 14px 30px -10px rgba(0,0,0,.6); transition: transform .35s var(--ease-out); }
.wa-float:hover { transform: scale(1.08); }

/* ---------- 17. Reveal (JS adds .js to <html>) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .score.reveal.is-in:nth-child(even) { transform: translateY(40px); }

@media (prefers-reduced-motion: reduce) {
  .hero-mesh, .marquee-track, .dot, .scroll-cue span { animation: none; }
  .hero-copy > *, .hero-figure { animation: none; }
}

/* ---------- 18. Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; z-index: 2; }
  .nav-links {
    position: fixed; inset: 0; background: rgb(var(--bg-rgb) / .98); flex-direction: column; justify-content: center; gap: 26px;
    font-size: 22px; font-family: var(--serif); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; }
  .nav-cta { font-family: var(--sans); font-size: 16px; }
  .hero { padding-top: 110px; }
  .hero-grid, .maestro-grid, .entrega-grid, .contacto-grid, .legado-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 420px; width: 100%; margin: 0 auto; order: -1; }
  .hero-photo { aspect-ratio: 4/4.4; }
  .scroll-cue { display: none; }
  .maestro-figure { max-width: 460px; }
  .maestro-badge { right: 14px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero-stats dt { font-size: 30px; }
  .creds { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 6px; }
  .brand-text { font-size: 18px; }
  .score:nth-child(even), .js .score.reveal.is-in:nth-child(even) { transform: translateY(24px); }
}

/* ---------- 19. Asistente IA «Aria» ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-launch {
  position: fixed; right: 92px; bottom: 26px; z-index: 41; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 12px; border-radius: 999px; border: 1px solid rgb(var(--gold-rgb) / .55);
  background: var(--bg-3); color: var(--cream); font: 500 14px/1 var(--sans); cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); transition: transform .35s var(--ease-out), border-color .3s;
  animation: rise .8s 1.2s var(--ease-out) both;
}
.chat-launch:hover { transform: translateY(-2px); border-color: var(--gold); }
.chat-launch-clef { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); font-size: 19px; font-family: "Segoe UI Symbol", "Noto Music", serif; }
.chat-launch[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.chat {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 44px));
  display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid rgb(var(--gold-rgb) / .35); border-radius: 16px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.85); overflow: hidden; animation: chatIn .45s var(--ease-out);
}
.chat[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); font-size: 24px; font-family: "Segoe UI Symbol", "Noto Music", serif; flex: none; }
.chat-title { margin: 0; font: 400 20px/1.1 var(--serif); color: var(--cream); }
.chat-status { margin: 3px 0 0; font-size: 12px; color: var(--cream-3); display: flex; align-items: center; gap: 7px; }
.chat-status .dot { width: 6px; height: 6px; }
.chat-close { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--cream); font-size: 22px; line-height: 1; cursor: pointer; }
.chat-close:hover { border-color: var(--gold); color: var(--gold-2); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; word-wrap: break-word; }
.msg p { margin: 0 0 .5em; } .msg p:last-child { margin: 0; }
.msg ul { margin: .3em 0 .5em; padding-left: 18px; }
.msg-bot { align-self: flex-start; background: var(--bg-3); color: var(--cream-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--gold); color: var(--on-gold); border-bottom-right-radius: 4px; font-weight: 400; }
.msg-typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.msg-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: typing 1.2s infinite; }
.msg-typing i:nth-child(2) { animation-delay: .15s; } .msg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.resumen { align-self: stretch; max-width: 100%; background: var(--bg); border: 1px solid rgb(var(--gold-rgb) / .45); border-radius: 12px; padding: 14px; font-size: 13.5px; }
.resumen h4 { margin: 0 0 8px; font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.resumen dl { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.resumen dt { color: var(--cream-3); } .resumen dd { margin: 0; color: var(--cream); }
.resumen .btn { width: 100%; padding: 12px 16px; font-size: 14px; background: #25D366; color: #fff; }
.resumen .btn:hover { background: #1fbd59; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.chat-chips[hidden] { display: none; }
.chat-chips button { border: 1px solid rgb(var(--gold-rgb) / .45); background: none; color: var(--gold-2); border-radius: 999px; padding: 7px 12px; font: 400 13px/1.2 var(--sans); cursor: pointer; transition: background .3s, color .3s; }
.chat-chips button:hover { background: var(--gold); color: var(--on-gold); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--bg-3); }
.chat-form textarea { flex: 1; resize: none; max-height: 120px; background: var(--bg); color: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font: 300 15px/1.4 var(--sans); }
.chat-form textarea:focus { outline: none; border-color: var(--gold); }
.chat-form button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; cursor: pointer; }
.chat-form button:disabled { opacity: .5; cursor: wait; }
.chat-legal { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--cream-3); text-align: center; background: var(--bg-3); }
.chat-cta-inline { margin-top: 18px; font-size: 15px; color: var(--cream-2); }
.chat-cta-inline button { background: none; border: 0; padding: 0; color: var(--gold-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 600px) {
  .chat-launch { right: 88px; bottom: 26px; padding: 8px; }
  .chat-launch-text { display: none; }
  .chat-launch-clef { width: 36px; height: 36px; font-size: 22px; }
  .chat { right: 0; bottom: 0; width: 100vw; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .chat, .chat-launch { animation: none; } }
