/* =============================================================
   ReVive Móvil — styles.css
   1. Tokens  2. Reset  3. Utilities  4. Typography  5. Components
   6. Sections  7. Effects  8. Responsive  9. Reduced-motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f3f8f6;
  --bg-2:      #eaf3ef;
  --paper:     #ffffff;
  --glass:     rgba(255, 255, 255, 0.55);
  --glass-2:   rgba(255, 255, 255, 0.32);
  --glass-brd: rgba(255, 255, 255, 0.65);

  --ink:       #0f2a24;
  --ink-soft:  #34493f;
  --ink-mute:  #63776d;

  --accent:    #0f9d70;   /* emerald — confianza + sostenibilidad */
  --accent-2:  #0ea5e9;   /* azul cielo — tecnología */
  --accent-ink:#053b2a;
  --warn:      #d97706;
  --line:      rgba(15, 42, 36, 0.12);

  --grad-1: #a7f3d0;
  --grad-2: #7dd3fc;
  --grad-3: #ccfbf1;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --nav-h: 76px;
  --container: 1240px;
}

@property --mesh-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
/* iOS Safari hace zoom automático al enfocar un campo si su font-size es menor
   de 16px. Fijamos 16px como mínimo en TODOS los campos para evitarlo. */
input, select, textarea { font-size: 16px; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.02em; font-family: var(--display); color: var(--ink); }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: rgba(15, 157, 112, 0.1);
  border: 1px solid rgba(15, 157, 112, 0.22);
}
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.section { padding: clamp(4rem, 8vw, 7.5rem) 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-top: .75rem; }
.section-head p { color: var(--ink-mute); font-size: 1.05rem; margin-top: .9rem; }
.eyebrow-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.demo-flag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--warn); background: rgba(217,119,6,0.12); border: 1px solid rgba(217,119,6,0.3);
  padding: .2rem .55rem; border-radius: 999px;
}

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; color: var(--accent-ink); text-transform: uppercase; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .96rem;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .35s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent) 0%, #059669 60%, var(--accent-2) 130%);
  color: #fff;
  box-shadow: 0 18px 34px -18px rgba(15, 157, 112, 0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -16px rgba(15,157,112,.75); }
.btn-ghost {
  background: var(--glass-2);
  color: var(--ink);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.btn-ghost:hover { background: rgba(255,255,255,.55); transform: translateY(-2px); }
.btn-sm { padding: .68rem 1.15rem; font-size: .86rem; }
.btn-block { width: 100%; }

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -35px rgba(15, 42, 36, 0.35);
}
@supports not (backdrop-filter: blur(1px)) {
  .glass-card, .btn-ghost { background: rgba(255,255,255,0.88); }
}

.icon-badge {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(15,157,112,.16), rgba(14,165,233,.16));
  color: var(--accent-ink);
  flex-shrink: 0;
}
.icon-badge svg { width: 26px; height: 26px; }

/* =============================================================
   6. Sections
   ============================================================= */

/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
}
.nav-inner {
  width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: .6rem;
}
.nav-glass {
  margin: .7rem auto 0; width: calc(100% - 2rem); max-width: calc(var(--container) - 2rem);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: 0 18px 40px -28px rgba(15,42,36,.4);
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem .6rem .55rem 1.15rem;
  position: absolute; left: 0; right: 0; top: 0;
}
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff;
}
.brand-mark svg { width: 19px; height: 19px; }

.nav-links { display: none; align-items: center; gap: 1.9rem; }
.nav-link { position: relative; font-size: .93rem; font-weight: 500; color: var(--ink-soft); padding: .3rem 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: rgba(15,42,36,.06); }
.nav-toggle svg { width: 20px; height: 20px; }

.nav-mobile {
  position: fixed; inset: 0; z-index: 490; background: rgba(243,248,246,.98);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.nav-mobile.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-mobile a { font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.nav-mobile .btn { margin-top: .5rem; }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 3.5rem);
  padding-bottom: 4rem;
  overflow: hidden;
  max-width: 100%;
}
.hero-mesh {
  position: absolute; top: -10%; left: -10%; right: -10%; height: 130%; z-index: -1;
  background:
    radial-gradient(at 18% 22%, var(--grad-1) 0%, transparent 55%),
    radial-gradient(at 82% 12%, var(--grad-2) 0%, transparent 55%),
    radial-gradient(at 55% 85%, var(--grad-3) 0%, transparent 55%);
  filter: blur(70px) saturate(140%);
  animation: meshDrift 34s ease-in-out infinite;
  opacity: .85;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.18) rotate(8deg); }
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
.hero-copy { max-width: 620px; }
.hero-copy .kicker { margin-bottom: 1.3rem; }
.hero-title { font-size: clamp(2.4rem, 6vw, 3.9rem); }
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub { margin-top: 1.25rem; font-size: 1.12rem; color: var(--ink-mute); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.6rem; }
.hero-trust-item { display: flex; align-items: center; gap: .55rem; font-size: .85rem; color: var(--ink-mute); font-weight: 500; }
.hero-trust-item svg { width: 18px; height: 18px; color: var(--accent); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 340px; }
.hero-phone-wrap {
  position: relative;
  filter: drop-shadow(0 50px 60px rgba(15, 42, 36, 0.28));
  animation: phoneBob 6s ease-in-out infinite;
}
@keyframes phoneBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.hero-stat-chip {
  position: absolute; display: flex; align-items: center; gap: .5rem;
  padding: .6rem .9rem; border-radius: 14px;
  background: var(--glass); backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-brd); box-shadow: 0 20px 34px -22px rgba(15,42,36,.4);
  font-size: .82rem; font-weight: 600; color: var(--ink);
}
.hero-stat-chip svg { width: 16px; height: 16px; color: var(--accent); }
.chip-1 { top: 6%; left: -4%; }
.chip-2 { bottom: 10%; right: -6%; }

/* ---- Advantages ---- */
.advantages-grid { display: grid; grid-template-columns: 1fr; gap: 1.15rem; }
.advantage-card { padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.advantage-card:hover { transform: translateY(-6px); box-shadow: 0 40px 60px -30px rgba(15,42,36,.4); }
.advantage-card h3 { font-size: 1.15rem; }
.advantage-card p { color: var(--ink-mute); font-size: .95rem; }

/* ---- How it works ---- */
.steps-band { background: linear-gradient(180deg, rgba(15,157,112,.06), transparent); }
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; counter-reset: step; }
.step-card { position: relative; padding: 1.9rem 1.6rem 1.6rem; }
.step-num {
  font-family: var(--mono); font-size: .82rem; color: var(--accent-ink); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; background: rgba(15,157,112,.14); margin-bottom: 1rem;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.step-card p { color: var(--ink-mute); font-size: .92rem; }
.step-connector { display: none; }

/* ---- Services strip ---- */
.services-scroller {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: .5rem; margin: 0 -1.25rem; padding-inline: 1.25rem;
  scrollbar-width: none;
}
.services-scroller::-webkit-scrollbar { display: none; }
.service-chip {
  scroll-snap-align: start; flex: 0 0 auto; min-width: 240px;
  padding: 1.4rem; display: flex; flex-direction: column; gap: .7rem;
}
.service-chip h4 { font-size: 1rem; }
.service-chip p { font-size: .86rem; color: var(--ink-mute); }

/* ---- Calculator ---- */
.calc-section { position: relative; }
.calc-wrap { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.calc-panel { padding: clamp(1.5rem, 4vw, 2.5rem); }
.calc-steps-nav { display: flex; gap: .5rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.calc-steps-nav span {
  font-family: var(--mono); font-size: .72rem; padding: .35rem .7rem; border-radius: 999px;
  background: rgba(15,42,36,.06); color: var(--ink-mute); transition: background .3s, color .3s;
}
.calc-steps-nav span.is-active { background: var(--accent); color: #fff; }
.calc-steps-nav span.is-done { background: rgba(15,157,112,.2); color: var(--accent-ink); }

.calc-step { display: none; }
.calc-step.is-active { display: block; animation: fadeUp .5s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.calc-input-toggle { display: flex; gap: .6rem; margin-bottom: 1.2rem; }
.calc-input-toggle button {
  flex: 1; padding: .8rem; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.5); font-weight: 600; font-size: .9rem; color: var(--ink-mute);
  transition: all .3s var(--ease-out);
}
.calc-input-toggle button.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.calc-dropzone {
  border: 1.5px dashed rgba(15,42,36,.28); border-radius: 16px; padding: 2rem 1rem;
  text-align: center; cursor: pointer; transition: border-color .3s, background .3s;
}
.calc-dropzone:hover, .calc-dropzone.is-drag { border-color: var(--accent); background: rgba(15,157,112,.05); }
.calc-dropzone svg { width: 34px; height: 34px; color: var(--accent); margin-inline: auto; margin-bottom: .7rem; }
.calc-dropzone p { font-size: .9rem; color: var(--ink-mute); }
.calc-dropzone strong { color: var(--ink); }
.calc-preview { margin-top: 1rem; display: none; align-items: center; gap: .8rem; }
.calc-preview.is-visible { display: flex; }
.calc-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

.calc-field { margin-top: 1rem; }
.calc-field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: .45rem; }
.calc-field textarea, .calc-field input, .calc-field select {
  width: 100%; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.7); font: inherit; color: var(--ink);
}
.calc-field textarea { min-height: 90px; resize: vertical; }
.calc-field input:focus, .calc-field textarea:focus, .calc-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,157,112,.16); }
.calc-hint { font-size: .78rem; color: var(--ink-mute); margin-top: .4rem; }

.calc-nav-btns { display: flex; gap: .7rem; margin-top: 1.6rem; }

.calc-diag-card {
  background: rgba(15,157,112,.06); border: 1px solid rgba(15,157,112,.2); border-radius: 14px;
  padding: 1.1rem 1.2rem; margin-top: 1rem; font-size: .9rem;
}
.calc-diag-card dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin-top: .6rem; }
.calc-diag-card dt { color: var(--ink-mute); }
.calc-diag-card dd { font-weight: 600; color: var(--ink); }

.calc-map { height: 220px; border-radius: 14px; overflow: hidden; margin-top: 1rem; border: 1px solid var(--line); background: #dfeee9; }

.calc-loading { display: flex; align-items: center; gap: .7rem; font-size: .9rem; color: var(--ink-mute); padding: 1rem 0; }
.calc-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(15,157,112,.25); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.calc-result { margin-top: .5rem; }
.calc-result-hero {
  text-align: center; padding: 1.8rem 1.2rem; border-radius: 18px;
  background: linear-gradient(135deg, rgba(15,157,112,.12), rgba(14,165,233,.12));
  border: 1px solid rgba(15,157,112,.2);
}
.calc-result-hero .figure { font-family: var(--display); font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 700; color: var(--accent-ink); }
.calc-result-hero p { color: var(--ink-mute); font-size: .9rem; margin-top: .4rem; }
.calc-result-grid { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-top: 1.2rem; }
.calc-result-item { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 1rem; border-radius: 12px; background: rgba(255,255,255,.55); border: 1px solid var(--line); }
.calc-result-item .lbl { font-size: .85rem; color: var(--ink-mute); }
.calc-result-item .val { font-weight: 700; font-family: var(--display); color: var(--ink); }
.calc-disclaimer {
  margin-top: 1.2rem; font-size: .78rem; color: var(--ink-mute); background: rgba(217,119,6,.08);
  border: 1px solid rgba(217,119,6,.22); border-radius: 10px; padding: .7rem .9rem;
}
.calc-error { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.25); font-size: .85rem; color: #991b1b; }

/* ---- Testimonials ---- */
.testi-grid { display: grid; grid-template-columns: 1fr; gap: 1.15rem; }
.reviews-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; font-size: .92rem; color: var(--ink); }
.reviews-summary .testi-stars { display: flex; gap: .1rem; color: #f59e0b; }
.reviews-summary .testi-stars svg { width: 16px; height: 16px; }
.reviews-summary span:not(.demo-flag) { color: var(--ink-mute); }
.testi-card { padding: 1.7rem; display: flex; flex-direction: column; gap: 1rem; }
.testi-stars { display: flex; gap: .15rem; color: #f59e0b; }
.testi-stars svg { width: 16px; height: 16px; }
.testi-quote { font-size: .98rem; color: var(--ink-soft); }
.testi-person { display: flex; align-items: center; gap: .7rem; margin-top: auto; }
.testi-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: .85rem; }
.testi-name { font-weight: 600; font-size: .9rem; color: var(--ink); }
.testi-role { font-size: .78rem; color: var(--ink-mute); }

/* ---- FAQ ---- */
.faq-list { display: flex; flex-direction: column; gap: .8rem; max-width: 760px; margin-inline: auto; }
.faq-item { border-radius: 16px; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem; text-align: left; font-weight: 600; font-size: .98rem; color: var(--ink);
}
.faq-q svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; transition: transform .35s var(--ease-out); }
.faq-item.is-open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease-out); }
.faq-a-inner { padding: 0 1.35rem 1.15rem; color: var(--ink-mute); font-size: .92rem; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.contact-card { padding: clamp(1.5rem, 4vw, 2.2rem); }
.contact-info-list { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.3rem; }
.contact-info-item { display: flex; gap: .9rem; align-items: flex-start; }
.contact-info-item svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: .1rem; }
.contact-info-item strong { display: block; font-size: .92rem; color: var(--ink); }
.contact-info-item span { font-size: .86rem; color: var(--ink-mute); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-map { height: 260px; border-radius: 14px; overflow: hidden; margin-top: 1.3rem; border: 1px solid var(--line); background: #dfeee9; }

/* ---- Chat widget ---- */
.chat-bubble {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 600;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 20px 40px -16px rgba(15,157,112,.6);
  transition: transform .35s var(--ease-bounce);
}
.chat-bubble:hover { transform: scale(1.08); }
.chat-bubble svg { width: 26px; height: 26px; }
.chat-bubble .chat-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #f43f5e; border: 2px solid #fff; }

.chat-panel {
  position: fixed; right: 1.4rem; bottom: 5.6rem; z-index: 600;
  width: min(370px, calc(100vw - 2.4rem)); height: min(560px, calc(100vh - 8rem));
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-brd); border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(15,42,36,.5);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(.97); opacity: 0; pointer-events: none;
  transition: transform .4s var(--ease-out), opacity .3s var(--ease-out);
}
.chat-panel.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.4); }
.chat-head .icon-badge { width: 38px; height: 38px; border-radius: 12px; }
.chat-head .icon-badge svg { width: 20px; height: 20px; }
.chat-head strong { font-size: .95rem; color: var(--ink); display: block; }
.chat-head span { font-size: .74rem; color: var(--accent-ink); display: flex; align-items: center; gap: .35rem; }
.chat-head span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chat-close { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(15,42,36,.06); }
.chat-close svg { width: 15px; height: 15px; }

.chat-body { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .7rem; }
.chat-msg { max-width: 85%; padding: .65rem .9rem; border-radius: 14px; font-size: .88rem; line-height: 1.5; }
.chat-msg.from-bot { align-self: flex-start; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.from-user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.1rem 1rem; }
.chat-suggestions button { font-size: .78rem; padding: .45rem .8rem; border-radius: 999px; background: rgba(15,157,112,.1); color: var(--accent-ink); border: 1px solid rgba(15,157,112,.22); }
.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: .7rem .9rem; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); animation: typingBounce 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.chat-input-row { display: flex; gap: .6rem; padding: .9rem 1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.4); }
.chat-input-row input { flex: 1; padding: .75rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 16px; }
.chat-input-row input:focus { outline: none; border-color: var(--accent); }
.chat-send { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.chat-send svg { width: 17px; height: 17px; }

/* ---- Footer ---- */
.footer { padding: 3.5rem 0 2.2rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.2rem; }
.footer-brand p { color: var(--ink-mute); font-size: .9rem; margin-top: .8rem; max-width: 34ch; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); margin-bottom: .9rem; font-family: var(--mono); }
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { font-size: .9rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .6rem; font-size: .8rem; color: var(--ink-mute); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   7. Effects
   ============================================================= */
.magnetic { will-change: transform; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .advantages-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .testi-grid { grid-template-columns: 1fr 1fr; }
  .calc-result-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .hero-title { font-size: clamp(2.8rem, 5.4vw, 4.2rem); }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .advantages-grid { grid-template-columns: repeat(4, 1fr); }
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
  .testi-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .calc-wrap { grid-template-columns: 1fr; max-width: 760px; margin-inline: auto; }
}

@media (min-width: 1280px) {
  .container { padding-inline: 2rem; }
}

/* =============================================================
   9. Reduced-motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation: none; }
  .hero-phone-wrap { animation: none; }
  .chat-typing span { animation: none; }
}
