/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:         #FAFAF9;
  --bg-2:       #F2F4F6;
  --paper:      #FFFFFF;
  --ink:        #16232C;
  --ink-soft:   #2C3E48;
  --ink-mute:   #64757D;

  --main:       #2B5371;
  --main-2:     #1B3A50;
  --main-tint:  #E8EEF2;

  --accent:     #A9C2CC;
  --accent-soft:#DCE8EC;
  --accent-deep:#4A6B7A;

  --line:       rgba(22, 35, 44, 0.13);
  --line-soft:  rgba(22, 35, 44, 0.07);

  --serif: -apple-system, "Helvetica Neue", Helvetica, Arial, "Archivo", sans-serif;
  --sans:  -apple-system, "Helvetica Neue", Helvetica, Arial, "Archivo", sans-serif;
  --mono:  -apple-system, "Helvetica Neue", Helvetica, Arial, "Archivo", sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --radius: 20px;
}

/* =============================================================
   2. Reset
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
p { text-wrap: pretty; text-align: justify; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--main); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* =============================================================
   3. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.6rem; border-radius: 999px; font-size: .88rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out), transform .25s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--main); color: #fff; }
.btn-primary:hover { background: var(--main-2); }
.btn-accent { background: var(--accent); color: var(--main-2); }
.btn-accent:hover { background: #96B4C0; }
.btn-ghost-light { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); }
.btn-sm { padding: .6rem 1.2rem; font-size: .82rem; }

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.nav-inner {
  max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter);
  height: 138px;
  display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.75rem);
  transition: height .35s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(250, 250, 249, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav.is-scrolled .nav-inner { height: 112px; }
.brand { display: flex; align-items: center; margin-right: auto; position: relative; }
.brand-logo { display: block; height: 108px; width: auto; object-fit: contain; }

.brand-logo-text { opacity: 1; height: 94px; transition: opacity .35s var(--ease-out); }
.brand-logo-block {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  height: 94px; opacity: 0;
  transition: opacity .35s var(--ease-out);
}
.nav.is-scrolled .brand-logo-text { opacity: 0; }
.nav.is-scrolled .brand-logo-block { opacity: 1; }

.nav-links { display: none; align-items: center; gap: clamp(1rem, 1.6vw, 1.75rem); }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  position: relative; font-size: .82rem; font-weight: 500;
  white-space: nowrap; color: #fff; padding: .25rem 0;
}
.nav.is-scrolled .nav-link { color: var(--ink-soft); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { display: none; }
@media (min-width: 960px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; background: none; border: none; padding: .5rem;
}
@media (min-width: 960px) { .nav-toggle { display: none; } }
.nav-toggle span { width: 22px; height: 2px; background: #fff; transition: background-color .3s; }
.nav.is-scrolled .nav-toggle span { background: var(--main); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 95;
  background: var(--main-2); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .5s var(--ease-out);
}
html.nav-open .nav-mobile { clip-path: inset(0 0 0% 0); }
.nav-mobile-links { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.nav-mobile-link { font-size: 1.4rem; font-weight: 500; }

/* =============================================================
   5. Hero
   ============================================================= */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; color: #fff; }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-graphic { width: 100%; height: 100%; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.72) saturate(1.05); }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27,58,80,0.55), rgba(27,58,80,0.88)); }

.hero-inner {
  position: relative; z-index: 1;
  max-width: 860px; margin-inline: auto; text-align: center;
  padding: clamp(7rem, 14vw, 9rem) var(--gutter) 2rem;
}
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 1.25rem; }
.kicker-light { color: var(--accent); text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,0.45); }

.hero-title { font-size: clamp(2rem, 5.5vw, 3.6rem); letter-spacing: -0.01em; color: #fff; margin-bottom: 1.5rem; line-height: 1.15; text-shadow: 0 2px 4px rgba(0,0,0,0.35), 0 12px 32px rgba(0,0,0,0.3); }
.hero-line { display: block; }

.hero-sub {
  color: rgba(255,255,255,0.92);
  font-size: clamp(.92rem, 1.3vw, 1.05rem);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  text-align: justify;
  text-align-last: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 6px 18px rgba(0,0,0,0.25);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.hero-badge-strip {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 3rem auto 0; padding: 0 var(--gutter) 3rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 860px) { .hero-badge-strip { grid-template-columns: repeat(4, 1fr); } }
.hero-badge {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center;
  padding: 1rem .75rem; border-radius: 14px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16); font-size: .74rem; color: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
}
.hero-badge-minvu { color: var(--accent-soft); border-color: rgba(201,166,107,0.4); }

/* =============================================================
   6. Business / Servicios
   ============================================================= */
.business { padding-block: clamp(4rem, 8vw, 6rem); background: var(--paper); }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--main-2); line-height: 1.25; }
.section-title em { color: var(--main); font-style: normal; }
.section-sub { margin-top: 1rem; color: var(--ink-mute); font-size: .95rem; text-align: justify; text-align-last: center; }

.business-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .business-grid { grid-template-columns: repeat(3, 1fr); } }

.business-card {
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 2rem; transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.business-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(22,35,44,0.08); }
.card-icon {
  width: 56px; height: 56px; border-radius: 14px; background: var(--main-tint); color: var(--main);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem;
}
.business-body .business-eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: .6rem; }
.business-body h3 { font-size: 1.2rem; color: var(--main-2); margin-bottom: .75rem; }
.business-body p { color: var(--ink-mute); margin-bottom: 1.3rem; font-size: .9rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-list li {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .03em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 999px; background: var(--main-tint); color: var(--main-2);
}

/* =============================================================
   7. Strengths
   ============================================================= */
.strengths { padding-block: clamp(4rem, 8vw, 6rem); background: var(--bg-2); }
.strengths-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 780px) { .strengths-grid { grid-template-columns: repeat(4, 1fr); } }
.strength-card {
  background: var(--paper); border-radius: var(--radius); padding: 1.75rem;
  border: 1px solid var(--line-soft);
}
.strength-num { font-family: var(--mono); font-size: 1.5rem; color: var(--accent-deep); letter-spacing: .05em; display: block; margin-bottom: .5rem; }
.strength-card h3 { font-size: 1rem; color: var(--main-2); margin-bottom: .6rem; }
.strength-card p { color: var(--ink-mute); font-size: .85rem; }

/* =============================================================
   8. Team
   ============================================================= */
.team { padding-block: clamp(4rem, 8vw, 6rem); background: var(--paper); }
.team-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; max-width: 700px; margin-inline: auto; }
@media (min-width: 600px) { .team-grid { grid-template-columns: 1fr 1fr; } }
.team-card {
  text-align: center; padding: 2rem 1.5rem; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line-soft);
}
.team-avatar {
  width: 88px; height: 88px; border-radius: 50%; background: var(--main); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--mono);
  font-size: 1.3rem; letter-spacing: .05em; margin: 0 auto 1rem; overflow: hidden;
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1.05rem; color: var(--main-2); }
.team-role { font-family: var(--mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-deep); margin: .4rem 0 1rem; text-align: center; }
.team-bio { font-size: .7rem; color: var(--ink-soft); text-align: justify; text-align-last: center; margin-bottom: 1.1rem; }
.team-contact { display: block; font-size: .85rem; color: var(--ink-mute); margin-top: .3rem; }
.team-contact:hover { color: var(--main); text-decoration: underline; }

/* =============================================================
   9. Testimonials
   ============================================================= */
.testimonials { padding-block: clamp(4rem, 8vw, 6rem); background: var(--bg-2); }
.testimonial-slider { max-width: 720px; margin: 0 auto; overflow: hidden; }
.testimonial-track { display: flex; transition: transform .5s var(--ease-out); }
.testimonial-card {
  flex: 0 0 100%; background: var(--paper); border-radius: var(--radius); padding: 2.5rem;
  border: 1px solid var(--line-soft); text-align: center;
}
.testimonial-card p { color: var(--ink-soft); font-size: 1.02rem; text-align: justify; text-align-last: center; margin-bottom: 1.5rem; }
.testimonial-card footer { display: flex; flex-direction: column; gap: .25rem; }
.t-name { font-weight: 600; color: var(--main); }
.t-role { font-size: .85rem; color: var(--ink-mute); }

.testimonial-nav { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2rem; }
.testimonial-arrow {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--paper); display: flex; align-items: center; justify-content: center;
  transition: background-color .2s var(--ease-out);
}
.testimonial-arrow:hover { background: var(--main-tint); }
.testimonial-dots { display: flex; gap: .5rem; }
.testimonial-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); border: none; padding: 0; }
.testimonial-dot.is-active { background: var(--main); }
.testimonials-note { text-align: center; font-size: .75rem; color: var(--ink-mute); margin-top: 1.5rem; }

/* =============================================================
   10. Contact
   ============================================================= */
.contact { padding-block: clamp(4rem, 8vw, 6rem); background: var(--paper); }
.contact-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact-info .section-title, .contact-info .section-sub { text-align: left; }
.contact-info .section-head, .contact-info { text-align: left; }
.contact-info .kicker { text-align: left; }

.contact-details { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-details li { display: flex; flex-direction: column; gap: .2rem; }
.cd-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); }
.cd-value a:hover { color: var(--main); text-decoration: underline; }
.cd-lowercase { text-transform: lowercase; }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; position: relative; }
.form-row { display: flex; flex-direction: column; gap: .4rem; }
.form-row label { font-size: .82rem; color: var(--ink-soft); font-weight: 500; }
.form-row input, .form-row textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem;
  font: inherit; color: var(--ink); background: var(--bg);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact-form .btn { align-self: flex-start; }

.cta-success {
  position: absolute; inset: 0; background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  text-align: center; border-radius: var(--radius); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out);
}
.cta-success.is-visible { opacity: 1; pointer-events: auto; }
.cta-success svg { color: var(--main); }
.cta-success p { color: var(--ink-mute); max-width: 26rem; text-align: center; }

/* =============================================================
   11. Footer
   ============================================================= */
.footer { background: var(--main-2); color: rgba(255,255,255,0.85); padding-block: clamp(3rem, 6vw, 4rem); }
.footer-inner { display: flex; flex-direction: column; gap: 2rem; align-items: flex-start; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.footer-brand .brand-logo { height: 56px; }
.footer-tagline { flex-basis: 100%; color: rgba(255,255,255,0.55); font-size: clamp(.6rem, 1.4vw, .82rem); margin-top: .3rem; text-align: left; white-space: nowrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a { font-size: .9rem; color: rgba(255,255,255,0.75); }
.footer-links a:hover { color: #fff; }

.footer-social { display: flex; gap: .75rem; }
.footer-social-link {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75);
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.footer-social-link:hover { color: #fff; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.08); }
.footer-copy { font-size: clamp(.68rem, 1.3vw, .8rem); color: rgba(255,255,255,0.45); text-align: left; line-height: 1.5; white-space: nowrap; }

@media (min-width: 860px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
  .footer-tagline { flex-basis: auto; }
  .footer-copy { text-align: right; }
}

/* =============================================================
   11b. Propiedades
   ============================================================= */
.properties { padding-block: clamp(4rem, 8vw, 6rem); background: var(--bg-2); }
.properties-filters { display: flex; gap: .6rem; justify-content: center; margin-bottom: 2rem; }
.prop-filter {
  padding: .55rem 1.3rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-soft); font-size: .82rem; font-weight: 500;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.prop-filter.is-active { background: var(--main); color: #fff; border-color: var(--main); }

.properties-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .properties-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .properties-grid { grid-template-columns: repeat(3, 1fr); } }
.properties-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-mute); font-size: .9rem; padding: 2rem 0; }

.prop-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.prop-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(22,35,44,0.1); }
.prop-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--bg); }
.prop-card-img img { width: 100%; height: 100%; object-fit: cover; }
.prop-card-noimg { width: 100%; height: 100%; background: var(--main-tint); }
.prop-card-badge {
  position: absolute; top: .75rem; right: .75rem; font-size: .68rem; font-weight: 600;
  padding: .3rem .7rem; border-radius: 999px; background: rgba(255,255,255,0.92); color: var(--main-2);
}
.prop-card-badge-reservada { color: #A3730B; }
.prop-card-badge-vendida { color: var(--ink-mute); }
.prop-card-body { padding: 1.1rem 1.25rem 1.3rem; }
.prop-card-tipo { font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: .4rem; }
.prop-card-body h3 { font-size: 1rem; color: var(--main-2); margin-bottom: .4rem; }
.prop-card-precio { font-weight: 600; color: var(--main); margin-bottom: .3rem; }
.prop-card-specs { font-size: .8rem; color: var(--ink-mute); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(22,35,44,0.72);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-out);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-inner {
  background: var(--paper); border-radius: 18px; max-width: 900px; width: 100%; max-height: 88vh;
  overflow-y: auto; position: relative; display: flex; flex-direction: column;
}
@media (min-width: 780px) { .lightbox-inner { flex-direction: row; align-items: stretch; overflow: hidden; } }
.lightbox-close {
  position: absolute; top: .75rem; right: .75rem; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: none; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.lightbox-photo-wrap {
  position: relative; background: var(--main-2); flex: 1 1 55%;
  aspect-ratio: 4 / 3; max-height: 50vh;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 780px) { .lightbox-photo-wrap { aspect-ratio: auto; max-height: 88vh; } }
.lightbox-photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: none; cursor: pointer; font-size: 1rem;
}
.lightbox-prev { left: .75rem; } .lightbox-next { right: .75rem; }
.lightbox-body { padding: 1.75rem; flex: 1 1 45%; }
@media (min-width: 780px) { .lightbox-body { overflow-y: auto; max-height: 88vh; } }
.lightbox-tags { margin-bottom: .75rem; }
.lightbox-tags .badge { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; padding: .3rem .7rem; border-radius: 999px; background: var(--main-tint); color: var(--main-2); }
.lightbox-body h3 { font-size: 1.3rem; color: var(--main-2); margin-bottom: .4rem; }
.lightbox-meta { font-size: .85rem; color: var(--ink-mute); margin-bottom: .5rem; }
.lightbox-price { font-weight: 600; color: var(--main); font-size: 1.1rem; margin-bottom: 1rem; }
.lightbox-desc { color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.5rem; text-align: left; white-space: pre-line; }

/* =============================================================
   11c. Chat de soporte (IA)
   ============================================================= */
.chat-widget { position: fixed; right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem); z-index: 200; }
.chat-toggle {
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--main); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(18, 51, 57, 0.35);
  cursor: pointer;
  transition: background-color .25s var(--ease-out), transform .25s var(--ease-out);
}
.chat-toggle:hover { background: var(--main-2); transform: translateY(-2px); }
.chat-toggle-icon-close { display: none; }
.chat-widget.is-open .chat-toggle-icon-open { display: none; }
.chat-widget.is-open .chat-toggle-icon-close { display: block; }

.chat-panel {
  position: absolute; right: 0; bottom: calc(100% + .85rem);
  width: min(360px, calc(100vw - 2rem));
  height: min(480px, 70vh);
  background: var(--paper);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(18, 51, 57, 0.28);
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(.98);
  pointer-events: none;
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
}
.chat-widget.is-open .chat-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-panel-head {
  background: var(--main); color: #fff;
  padding: 1rem 1.1rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  flex-shrink: 0;
}
.chat-panel-title { font-size: .92rem; font-weight: 600; }
.chat-panel-sub { font-size: .74rem; color: rgba(255,255,255,0.7); margin-top: .2rem; }
.chat-close { background: none; border: none; color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 .1rem; }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--bg);
}
.chat-msg {
  max-width: 84%;
  padding: .6rem .8rem;
  border-radius: 14px;
  font-size: .84rem; line-height: 1.45;
  white-space: pre-wrap;
}
.chat-msg-model { align-self: flex-start; background: var(--paper); border: 1px solid var(--line-soft); color: var(--ink-soft); border-bottom-left-radius: 4px; }
.chat-msg-user { align-self: flex-end; background: var(--main); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-typing { display: flex; gap: .3rem; align-items: center; padding-block: .8rem; }
.chat-msg-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute);
  opacity: .5; animation: chatTyping 1s ease-in-out infinite;
}
.chat-msg-typing span:nth-child(2) { animation-delay: .15s; }
.chat-msg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatTyping { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

.chat-form {
  flex-shrink: 0;
  display: flex; gap: .5rem;
  padding: .75rem;
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
}
.chat-input {
  flex: 1; border: 1px solid var(--line); border-radius: 999px;
  padding: .55rem 1rem; font-size: .84rem; color: var(--ink);
  background: var(--bg);
}
.chat-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chat-send {
  width: 38px; height: 38px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--main); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color .2s var(--ease-out);
}
.chat-send:hover { background: var(--main-2); }

@media (max-width: 420px) {
  .chat-panel { width: calc(100vw - 1.5rem); right: -.25rem; }
}

/* =============================================================
   11d. Ajustes exclusivos de móvil (hero)
   ============================================================= */
@media (max-width: 640px) {
  .nav-inner { height: 90px; }
  .nav.is-scrolled .nav-inner { height: 76px; }
  .brand-logo-text, .brand-logo-block { height: 60px; }
  .hero-inner { padding-top: 6.5rem; }
  .kicker-light { font-size: .68rem; letter-spacing: .05em; }
  .hero-title { margin-bottom: 1.1rem; }
  .hero-sub {
    text-align: center;
    text-align-last: auto;
    font-size: .88rem;
    line-height: 1.6;
  }
}

/* =============================================================
   12. Reveal animation
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }

/* =============================================================
   13. Reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
