/* ==========================================================================
   WhiteMoon Fisio · demo de landing de fisioterapia

   Maqueta editorial oscura tomada de la demo de reservas de restaurante:
   hero a sangre, titulares en serif display, secciones numeradas, esquinas
   casi rectas y mucho aire. Acento violeta WhiteMoon.
   ========================================================================== */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(../fonts/fraunces-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(../fonts/fraunces-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300; font-display: swap; src: url(../fonts/fraunces-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300; font-display: swap; src: url(../fonts/fraunces-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(../fonts/sora-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(../fonts/sora-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #08080d;
  --bg2: #0e0e16;
  --card: #111118;
  --card2: #16161f;
  --p: #7c4dff;              /* violeta: botones y fondos de acento */
  --p-hover: #9d70ff;
  --p-text: #a583ff;         /* violeta claro: texto destacado sobre oscuro */
  --g: #00d4aa;              /* verde WhiteMoon: solo detalles y estados */
  --text: #f0f0f5;
  --muted: #9494aa;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .17);

  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem;
  --r: 3px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t: .25s;
  --gutter: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -.005em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 em, h2 em { font-style: italic; color: var(--p-text); }
p { text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--p-text); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--p); color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: .7rem 1.1rem; background: var(--p); color: #fff; font-weight: 600; }
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.eyebrow {
  color: var(--p-text);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* Botones ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.25rem;
  border: 1px solid transparent; border-radius: var(--r);
  background: none; font-size: .95rem; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--p { background: var(--p); color: #fff; }
.btn--p:hover { background: var(--p-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--p-text); color: var(--p-text); }
.btn--lg { min-height: 52px; padding: .85rem 1.6rem; font-size: 1rem; }

.demo-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .6rem .3rem .5rem;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: rgba(255, 255, 255, .03);
  color: var(--muted); font-size: .72rem; font-weight: 500; white-space: nowrap;
}
.demo-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 3px rgba(0, 212, 170, .18); }

/* Entrada al hacer scroll: solo con JS (clase en <html>) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .svcs > .reveal:nth-child(2), .js .cifras > .reveal:nth-child(2), .js .metodo__lista > .reveal:nth-child(2), .js .contacto__grid > .reveal:nth-child(2) { transition-delay: .08s; }
.js .svcs > .reveal:nth-child(3), .js .cifras > .reveal:nth-child(3), .js .metodo__lista > .reveal:nth-child(3), .js .contacto__grid > .reveal:nth-child(3) { transition-delay: .16s; }
.js .svcs > .reveal:nth-child(4) { transition-delay: .24s; }

/* Cabecera ---------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 30;
  background: rgba(8, 8, 13, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: var(--s5); min-height: 76px; }
.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; margin-right: auto; }
.brand__kicker { color: var(--muted); font-size: .62rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; }
.brand__mark { margin-top: .3rem; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.nav__links { display: flex; gap: var(--s6); }
.nav__links a { position: relative; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--p-text); transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta { min-height: 42px; padding: .55rem 1.2rem; }
@media (max-width: 900px) { .nav__links { display: none; } }
@media (max-width: 520px) { .demo-tag { display: none; } }

/* Hero a sangre ----------------------------------------------------------- */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100svh; padding-top: 120px; overflow: hidden; }
.hero__foto { position: absolute; inset: 0; z-index: -2; display: block; background: var(--bg); }
.hero__foto img {
  width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%;
  /* el póster original es claro: se oscurece y se tiñe de violeta */
  filter: brightness(.5) contrast(1.08) saturate(.85);
  animation: lenta 22s var(--ease) both;
}
@keyframes lenta { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 78% 30%, rgba(124, 77, 255, .28), transparent 70%); mix-blend-mode: screen; pointer-events: none; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(8, 8, 13, .97) 0%, rgba(8, 8, 13, .74) 38%, rgba(8, 8, 13, .3) 70%, rgba(8, 8, 13, .6) 100%),
    linear-gradient(90deg, rgba(8, 8, 13, .72) 0%, rgba(8, 8, 13, 0) 65%);
}
.hero__inner { padding-bottom: clamp(2.5rem, 7vh, 5rem); }
.hero h1 { max-width: 11ch; margin-top: var(--s4); font-size: clamp(3rem, 9vw, 7.5rem); line-height: .98; letter-spacing: -.035em; }
.hero__lead { max-width: 44ch; margin-top: var(--s5); color: #c9c9d6; font-size: clamp(1rem, 1.6vw, 1.15rem); font-weight: 300; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero__datos { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.hero__datos > div { padding: var(--s4) var(--s4) var(--s5) 0; }
.hero__datos dt { color: var(--muted); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; }
.hero__datos dd { margin-top: .35rem; font-size: .88rem; }
@media (max-width: 600px) {
  .hero__datos { grid-template-columns: 1fr; }
  .hero__datos > div { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
  .hero__datos dd { margin: 0; text-align: right; }
}

/* Intro editorial --------------------------------------------------------- */
.intro { padding: clamp(5rem, 12vw, 10rem) 0; }
.intro__grid { display: grid; grid-template-columns: 1fr; gap: var(--s6); }
.intro__label { color: var(--muted); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; }
.intro__texto { max-width: 26ch; font-family: var(--font-display); font-size: clamp(1.9rem, 4.4vw, 3.6rem); font-weight: 300; line-height: 1.12; letter-spacing: -.02em; }
.intro__texto em { font-style: italic; color: var(--p-text); }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--line); }
.cifras dt { font-family: var(--font-display); font-size: clamp(3.2rem, 8vw, 6.5rem); font-weight: 300; line-height: 1; letter-spacing: -.04em; font-variant-numeric: lining-nums; }
.cifras dd { max-width: 24ch; margin-top: var(--s3); color: var(--muted); font-size: .92rem; }
@media (min-width: 900px) { .intro__grid { grid-template-columns: 1fr 3fr; } .cifras { grid-column: 2; } }
@media (max-width: 600px) {
  .cifras { grid-template-columns: 1fr; gap: var(--s5); }
  .cifras > div { display: grid; grid-template-columns: 5rem 1fr; align-items: end; gap: var(--s4); }
  .cifras dt { font-size: 3.4rem; }
  .cifras dd { margin: 0; }
}

/* Bloques ----------------------------------------------------------------- */
.bloque { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.bloque--alt { background: var(--bg2); }
.bloque__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s5) 3rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.bloque h2 { max-width: 16ch; margin-top: var(--s4); font-size: clamp(2.3rem, 5.6vw, 4.6rem); line-height: 1.02; }
.bloque__lead { max-width: 40ch; color: var(--muted); }
.nota { margin-top: var(--s5); color: var(--muted); font-size: .8rem; }

/* Servicios: cuatro tarjetas con foto --------------------------------------- */
.svcs { display: grid; grid-template-columns: 1fr; gap: var(--s7) var(--s5); }
.svc { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.svc picture { display: block; margin-bottom: var(--s3); overflow: hidden; border-radius: var(--r); background: var(--card); }
.svc img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .svc:hover img { transform: scale(1.035); } }
.svc__num { color: var(--p-text); font-family: var(--font-display); font-size: clamp(2.4rem, 4.4vw, 3.4rem); font-weight: 300; line-height: .9; letter-spacing: -.04em; }
.svc h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.svc p { max-width: 36ch; color: var(--muted); font-size: .92rem; }
.enlace { align-self: flex-start; margin-top: auto; padding: .35rem 0; border: 0; border-bottom: 1px solid var(--p-text); background: none; color: var(--p-text); font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.enlace:hover { color: var(--text); border-color: var(--text); }
@media (min-width: 640px) { .svcs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .svcs { grid-template-columns: repeat(4, 1fr); } }

/* Método: tres pasos con número grande ------------------------------------ */
.metodo { position: relative; overflow: hidden; }
.metodo__fantasma { position: absolute; top: .5rem; right: -.05em; z-index: 0; font-family: var(--font-display); font-size: clamp(6rem, 18vw, 17rem); font-style: italic; font-weight: 300; line-height: 1; color: var(--text); opacity: .045; pointer-events: none; user-select: none; }
.metodo .wrap { position: relative; z-index: 1; }
.metodo__lista { display: grid; gap: var(--s6); }
.paso { padding-top: var(--s5); border-top: 1px solid var(--p); }
.paso__num { display: block; color: var(--p-text); font-family: var(--font-display); font-size: clamp(3.5rem, 7vw, 6rem); font-weight: 300; line-height: .9; letter-spacing: -.04em; }
.paso h3 { margin-top: var(--s4); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.paso p { max-width: 36ch; margin-top: var(--s2); color: var(--muted); font-size: .95rem; }
@media (min-width: 900px) { .metodo__lista { grid-template-columns: repeat(3, 1fr); gap: var(--s7); } }
.metodo__cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: clamp(2.5rem, 6vw, 4rem); }

/* Sofía ------------------------------------------------------------------- */
.sofia { padding: clamp(4.5rem, 10vw, 8rem) 0; overflow: hidden; }
.sofia__grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.sofia__foto { position: relative; display: block; max-width: 460px; overflow: hidden; border-radius: 4px; background: var(--card); }
.sofia__foto img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.sofia__foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 8, 13, .55), transparent 40%); pointer-events: none; }
.sofia__foto figcaption { position: absolute; left: var(--s5); bottom: var(--s4); z-index: 1; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.sofia__txt h2 { max-width: 14ch; margin-top: var(--s4); font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.02; }
.sofia__txt p:not(.eyebrow) { max-width: 48ch; margin-top: var(--s5); color: var(--muted); }
.sofia__txt .btn { margin-top: var(--s6); }
@media (min-width: 900px) { .sofia__grid { grid-template-columns: 1fr 1fr; } .sofia__foto { margin-left: calc(-1 * var(--gutter)); max-width: none; } }

/* Contacto ---------------------------------------------------------------- */
.contacto h2 { max-width: 18ch; margin-top: var(--s4); font-size: clamp(2.3rem, 5.6vw, 4.6rem); line-height: 1.02; }
.contacto__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); margin-top: clamp(2.5rem, 6vw, 4rem); }
.contacto__grid > div { padding-top: var(--s4); border-top: 1px solid var(--p); }
.contacto__grid dt { color: var(--muted); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.contacto__grid dd { margin-top: var(--s3); font-size: 1.05rem; line-height: 1.55; }
.contacto__grid a { text-decoration: underline; text-decoration-color: var(--p-text); text-underline-offset: 4px; transition: color var(--t) var(--ease); }
.contacto__grid a:hover { color: var(--p-text); }
.contacto__grid .contacto__nota { margin-top: var(--s2); color: var(--muted); font-size: .8rem; }
@media (max-width: 900px) { .contacto__grid { grid-template-columns: 1fr; gap: var(--s5); } }
.cierre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); margin-top: clamp(3.5rem, 8vw, 5.5rem); padding: clamp(2rem, 5vw, 3rem); border: 1px solid var(--line-strong); border-radius: 4px; background: radial-gradient(80% 160% at 0% 100%, rgba(124, 77, 255, .2), transparent 60%), var(--card); }
.cierre__txt { max-width: 30ch; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 300; line-height: 1.15; }
.cierre__txt span { display: block; color: var(--muted); font-style: italic; }

/* Pie --------------------------------------------------------------------- */
.foot { padding: var(--s7) 0 7rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); }
.foot .brand { margin-right: 0; color: var(--text); }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.foot__links a { color: var(--muted); text-decoration: none; transition: color var(--t) var(--ease); }
.foot__links a:hover { color: var(--p-text); }
.foot__disclaimer { max-width: 70ch; margin-top: var(--s5); line-height: 1.6; }

/* Chat de Sofía ----------------------------------------------------------- */
.chat-fab {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: .6rem; min-height: 52px; padding: .7rem 1.2rem .7rem 1rem;
  border: 0; border-radius: var(--r); background: var(--p); color: #fff; font-size: .92rem; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(157, 112, 255, .4);
  transition: transform var(--t) var(--ease), background var(--t) var(--ease);
}
.chat-fab:hover { transform: translateY(-2px); background: var(--p-hover); }
.chat-fab[hidden] { display: none; }
.chat-fab__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--g); animation: pulso 2.4s var(--ease) infinite; }
@keyframes pulso { 0%, 100% { opacity: .5; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

.chat {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 50;
  display: flex; flex-direction: column; width: min(390px, calc(100vw - 2rem)); height: min(620px, calc(100dvh - 2rem));
  border: 1px solid var(--line-strong); border-radius: 4px; background: var(--card);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.chat.open { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 520px) { .chat { inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; } }
.chatHead { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--line); background: var(--bg2); }
.chatHead img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.chatHead .t { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.chatHead .t b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
.chatHead .t small { color: var(--p-text); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; }
.chatClose { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r); background: transparent; color: var(--muted); transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.chatClose:hover { color: var(--text); border-color: var(--p-text); }
.chatBody { flex: 1; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5) var(--s4); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.msg { max-width: 84%; padding: .65rem .9rem; border-radius: var(--r); font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; animation: entra var(--t) var(--ease) both; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.bot { align-self: flex-start; border: 1px solid var(--line); border-left: 2px solid var(--p); background: var(--card2); }
.msg.me { align-self: flex-end; background: var(--p); color: #fff; font-weight: 500; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: .85rem .9rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--card2); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: parpadeo 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes parpadeo { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.opts { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 2px 0 4px; }
.opt { min-height: 40px; padding: .5rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: transparent; color: var(--text); font-size: .88rem; font-weight: 500; transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease); }
.opt:hover { border-color: var(--p-text); background: rgba(124, 77, 255, .12); color: var(--p-text); }
.chatNote { padding: var(--s2) var(--s4); border-top: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: .72rem; text-align: center; }
.chatFoot { display: flex; gap: var(--s2); padding: var(--s3) var(--s4) max(var(--s4), env(safe-area-inset-bottom)); background: var(--bg2); }
.chatFoot input { flex: 1; min-width: 0; min-height: 44px; padding: .6rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); color: var(--text); font-size: 1rem; }
.chatFoot input::placeholder { color: var(--muted); }
.chatFoot input:focus { outline: none; border-color: var(--p-text); }
.chatFoot input:disabled { opacity: .5; }
.chatSend { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r); background: var(--p); color: #fff; transition: background var(--t) var(--ease); }
.chatSend:hover { background: var(--p-hover); }
.chatSend:disabled { opacity: .4; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .svc:hover img { transform: none; }
}
