/* =============================================================
   1. Tokens — editorial clínico (blanco + petróleo + salvia sobria)
   ============================================================= */
:root {
  --bg: #f7f9f8;
  --bg-2: #e9efed;
  --paper: #ffffff;
  --ink: #0e2a30;
  --ink-soft: #33555c;
  --ink-mute: #6d8a90;
  --accent: #0e5a66;
  --accent-deep: #083b43;
  --accent-2: #5f8d7b;
  --accent-2-soft: #e3efe9;
  --line: rgba(14,42,48,.12);
  --shadow: 0 24px 60px -24px rgba(8,59,67,.25);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: clip; overscroll-behavior-y: none;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -.02em; font-family: var(--serif); font-weight: 500; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
::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; }
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1140px, 100% - var(--gutter) * 2); margin-inline: auto; }
.container.narrow { width: min(760px, 100% - var(--gutter) * 2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.center { text-align: center; margin-top: 2rem; }
.fine { font-size: .82rem; color: var(--ink-mute); }
.ejemplo-tag { display: inline-block; font-size: .72rem; font-family: var(--sans); letter-spacing: .04em; background: var(--accent-2-soft); color: var(--accent-deep); border: 1px dashed var(--accent-2); border-radius: 999px; padding: .15rem .6rem; margin-top: .5rem; }
.kicker { display: flex; align-items: center; gap: .6rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.section-num { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1rem; font-weight: 600; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tint { background: var(--bg-2); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: .75rem; }
.section-head p, .lede { color: var(--ink-soft); font-size: 1.08rem; }
.manifesto h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 999px; font-weight: 600; padding: .8rem 1.6rem; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .35s; text-decoration: none; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 28px -12px rgba(8,59,67,.55); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: rgba(255,255,255,.92); color: var(--accent-deep); }
.btn-lg { padding: 1rem 2rem; font-size: 1.02rem; }
.btn-sm { padding: .55rem 1.1rem; font-size: .88rem; }

/* =============================================================
   4. Nav
   ============================================================= */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(247,249,248,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.nav.is-solid { border-bottom-color: var(--line); box-shadow: 0 8px 30px -18px rgba(8,59,67,.3); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; margin-right: auto; }
.brand img { border-radius: 10px; }
.brand em { font-style: italic; color: var(--accent); }
.brand small { display: block; font-family: var(--sans); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.nav-links { display: flex; gap: 1.2rem; }
.nav-links a { text-decoration: none; font-size: .92rem; color: var(--ink-soft); position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--accent); transition: width .3s var(--ease-out); }
.nav-links a:hover::after { width: 100%; }
.nav-ctas { display: flex; gap: .6rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: .5rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* =============================================================
   5. Hero
   ============================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: clip; border-radius: 0 0 2rem 2rem; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,45,52,.25) 0%, rgba(8,45,52,.12) 40%, rgba(247,249,248,.94) 96%); }
.hero-content { position: relative; padding: 7rem 0 4rem; max-width: 720px; }
.hero-title { font-size: clamp(2.6rem, 7vw, 4.8rem); color: #fff; text-shadow: 0 2px 30px rgba(8,45,52,.5); }
.hero-title em { color: #d9efe6; }
.hero-sub { color: #f2f7f5; font-size: 1.15rem; margin: 1.2rem 0 1.8rem; max-width: 34rem; text-shadow: 0 1px 12px rgba(8,45,52,.5); }
.hero .kicker { color: #eaf4f0; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.2rem; color: rgba(255,255,255,.85); font-size: .8rem; }

/* Cinta */
.ticker { background: var(--accent-deep); color: #eaf4f0; overflow: clip; padding: .7rem 0; font-size: .9rem; letter-spacing: .02em; }
.ticker-track { display: flex; gap: 1.4rem; width: max-content; animation: ticker 28s linear infinite; }
.ticker-track i { opacity: .5; font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Manifiesto */
.manifesto-grid { display: grid; gap: 2rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.2rem; }
.stat dt { font-family: var(--serif); font-size: 2.2rem; color: var(--accent); }
.stat dd { color: var(--ink-soft); font-size: .9rem; }

/* =============================================================
   6. Bento tratamientos
   ============================================================= */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 1.4rem; overflow: clip; padding-bottom: 1.4rem; transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out); will-change: transform; }
.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-tall img { aspect-ratio: 16/12; }
.card h3 { font-size: 1.3rem; margin: .9rem 1.2rem .3rem; }
.card p { color: var(--ink-soft); font-size: .93rem; margin: 0 1.2rem; }
.card-tag { display: inline-block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 1rem 1.2rem 0 !important; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* Pilares */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.pillar { background: var(--paper); border: 1px solid var(--line); border-radius: 1.4rem; padding: 1.6rem 1.3rem; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillar-n { font-family: var(--serif); font-style: italic; font-size: 2rem; color: var(--accent-2); }
.pillar h3 { font-size: 1.2rem; margin: .5rem 0; }
.pillar p { color: var(--ink-soft); font-size: .93rem; }

/* Equipo */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.mate { background: var(--paper); border: 1px solid var(--line); border-radius: 1.4rem; overflow: clip; padding-bottom: 1.3rem; text-align: left; }
.mate img { width: 100%; aspect-ratio: 4/4.4; object-fit: cover; }
.mate h3 { margin: 1rem 1.2rem .2rem; font-size: 1.25rem; }
.mate-role { margin: 0 1.2rem; color: var(--accent); font-weight: 600; font-size: .92rem; }
.mate-cred { margin: .2rem 1.2rem 0; color: var(--ink-mute); font-size: .85rem; }

/* Pasos */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: 1.4rem; padding: 1.5rem 1.3rem; position: relative; }
.step-n { font-family: var(--serif); font-style: italic; font-size: 2.2rem; color: var(--accent); }

/* Orientador */
.wizard { background: var(--paper); border: 1px solid var(--line); border-radius: 1.6rem; padding: clamp(1.4rem, 4vw, 2.6rem); box-shadow: var(--shadow); max-width: 760px; margin-inline: auto; }
.wizard-step { display: none; }
.wizard-step.is-active { display: block; }
.wizard h3 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { border: 1.5px solid var(--line); border-radius: 999px; padding: .7rem 1.2rem; font-weight: 500; transition: all .3s var(--ease-out); }
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .92rem; }
.field input, .field select { width: 100%; border: 1.5px solid var(--line); border-radius: .9rem; padding: .85rem 1rem; font: inherit; background: var(--bg); color: var(--ink); }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.wizard-nav { display: flex; gap: .8rem; margin-top: 1.4rem; flex-wrap: wrap; }
.wizard-result { background: var(--accent-2-soft); border: 1px solid var(--accent-2); border-radius: 1rem; padding: 1.2rem; font-size: 1.05rem; }

/* Testimonios */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }
.split h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.quote-card { background: var(--paper); border: 1px solid var(--line); border-radius: 1.6rem; padding: 2rem; box-shadow: var(--shadow); }
.quote-card blockquote { font-family: var(--serif); font-size: 1.35rem; font-style: italic; line-height: 1.5; min-height: 7rem; }
.quote-card figcaption { margin-top: 1rem; }
.quote-dots { display: flex; gap: .5rem; margin-top: 1.2rem; }
.quote-dots button { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .3s; }
.quote-dots button.is-active { background: var(--accent); }

/* FAQ */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 1.1rem; margin-bottom: .8rem; overflow: clip; }
.faq summary { cursor: pointer; padding: 1.1rem 1.3rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); flex-shrink: 0; transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem; }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: 1.6rem; padding: 2rem; }
.contact-card h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.contact-card p { margin-bottom: .6rem; }
.contact-card a:not(.btn) { color: var(--accent); font-weight: 600; }
.hours { list-style: none; padding: 1rem 0; margin: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hours li { display: flex; justify-content: space-between; padding: .3rem 0; }
.contact-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.map-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: 1.6rem; overflow: clip; padding: .8rem; }
.map-wrap iframe { width: 100%; height: 340px; border: 0; border-radius: 1rem; }
.map-wrap .fine { padding: .6rem .4rem 0; }

/* CTA final */
.cta-final { background: linear-gradient(135deg, var(--accent-deep), var(--accent)); color: #fff; padding: clamp(3.5rem, 8vw, 6rem) 0; text-align: center; border-radius: 2rem 2rem 0 0; }
.cta-final h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: .8rem; }
.cta-final h2 em { color: #d9efe6; }
.cta-final p { opacity: .9; margin-bottom: 1.8rem; font-size: 1.1rem; }

/* Footer */
.footer { background: var(--accent-deep); color: #cfe3dc; padding: 2.5rem 0 1.5rem; font-size: .9rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.footer .brand { color: #fff; }
.footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer a { color: #cfe3dc; }
.footer a:hover { color: #fff; }

/* Chat */
.chat-fab { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 200; background: var(--accent-deep); color: #fff; border-radius: 999px; padding: .9rem 1.4rem; font-size: .95rem; box-shadow: 0 18px 40px -12px rgba(8,59,67,.6); transition: transform .3s var(--ease-out); }
.chat-fab:hover { transform: translateY(-3px); }
.chat-panel { position: fixed; right: 1.2rem; bottom: 5.2rem; z-index: 200; width: min(380px, calc(100vw - 2.4rem)); background: var(--paper); border: 1px solid var(--line); border-radius: 1.4rem; box-shadow: var(--shadow); overflow: clip; display: flex; flex-direction: column; max-height: min(560px, calc(100svh - 7rem)); }
.chat-panel[hidden] { display: none; }
.chat-panel header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--accent-deep); color: #fff; padding: .9rem 1.1rem; }
.chat-panel header span { display: block; font-size: .75rem; opacity: .8; }
.chat-log { padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: .7rem; min-height: 220px; }
.msg { max-width: 88%; padding: .7rem .95rem; border-radius: 1rem; font-size: .92rem; line-height: 1.5; }
.msg-bot { background: var(--bg-2); align-self: flex-start; border-bottom-left-radius: .3rem; }
.msg-user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: .3rem; }
.msg .fine { display: block; margin-top: .4rem; }
.chat-suggest { display: flex; gap: .5rem; padding: 0 1rem .6rem; flex-wrap: wrap; }
.chat-suggest button { font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .8rem; color: var(--accent); }
.chat-suggest button:hover { border-color: var(--accent); }
.chat-form { display: flex; gap: .5rem; padding: .8rem 1rem 1rem; }
.chat-form input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: .7rem 1rem; font: inherit; min-width: 0; }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(26px); }
.is-ready [data-reveal].revealed { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }

/* Cursor */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998; border-radius: 50%; }
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring { width: 34px; height: 34px; border: 1.5px solid var(--accent); opacity: .5; mix-blend-mode: multiply; }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* =============================================================
   7. Responsive (mobile-first ya aplicado; subidas)
   ============================================================= */
@media (min-width: 720px) {
  .manifesto-grid { grid-template-columns: 180px 1fr; }
}
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.is-open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 1rem 1.5rem 1.5rem; border-bottom: 1px solid var(--line); gap: 1rem; }
  .nav-toggle { display: flex; }
  .nav-ctas .btn-ghost { display: none; }
}
@media (max-width: 560px) {
  .nav-ctas { display: none; }
  .bento, .pillars, .team, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
  .stat { padding: .8rem .6rem; }
  .stat dt { font-size: 1.6rem; }
  .hero-content { padding-bottom: 3rem; }
  .nav-ctas .btn { padding: .5rem .9rem; font-size: .8rem; }
}

/* =============================================================
   8. Reduced-motion (solo efectos intrusivos)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .hero-bg { transform: none !important; }
  .cursor-dot, .cursor-ring { display: none; }
}
