/* ============================================================
   ClauStudio — Diagnóstico Landing v3
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:           #FAF7F2;
  --bg-soft:      #FFFDF8;
  --dark:         #1F1712;
  --text:         #251C17;
  --muted:        #5F524A;
  --muted-strong: #433831;
  --card:         #FFFFFF;
  --border:       rgba(31, 23, 18, 0.10);
  --accent:       #A35A00;
  --accent-strong:#C76A1D;
  --accent-light: #F0B35E;
  --radius-btn:   10px;
  --transition:   0.22s ease;
  --max-w:        1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* ── TODOS LOS TEXTOS: MONTSERRAT 300 ── */
p, li, span, td, th, caption, blockquote,
.hero__badge, .section__badge, .faq-question span:first-child,
.form-card__sub, .form-legal, .hero__microcopy,
.feature-item p, .timeline-item p, .recibes-step__content p,
.diag-stat__label, .footer__text, .footer__link,
.cta-final__text, .recibes-trust {
  font-weight: 300;
}

/* ── TÍTULOS ── */
h1 { font-size: clamp(42px, 6vw, 74px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.08; color: var(--dark); }
h2 { font-size: clamp(32px, 4vw, 52px); font-weight: 800; letter-spacing: -0.8px; line-height: 1.14; color: var(--dark); }
h3 { font-size: clamp(16px, 1.8vw, 21px); font-weight: 700; letter-spacing: -0.3px; line-height: 1.3; color: var(--dark); }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.accent { color: var(--accent-strong); }

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,247,242,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.header__logo-link { display: flex; align-items: center; }
.header__logo-img {
  height: 52px; width: auto; object-fit: contain;
  mix-blend-mode: multiply;
}
.header__cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 13px;
  border-radius: var(--radius-btn); border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.header__cta:hover { background: var(--accent-strong); transform: translateY(-1px); }

/* ══════════════════════════════════════════
   HERO — avatares detrás del H1
══════════════════════════════════════════ */
.hero { background: var(--bg-soft); }

/* La escena contiene avatares (bg) + H1 (fg) superpuestos */
.hero__scene {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Capa de avatares: absoluta, z-index 0 */
.hero__bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Scrim central suave para legibilidad del H1 */
.hero__bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 70% at 50% 48%,
    rgba(255,253,248,0.82) 0%,
    rgba(255,253,248,0.45) 55%,
    transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* Cada avatar individual */
.avatar-item {
  position: absolute;
  border-radius: 18px;
  overflow: hidden;
  border: 2.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 28px rgba(31,23,18,0.22), 0 2px 8px rgba(163,90,0,0.06);
  background: var(--card);
  opacity: 0;
  animation: avatarBurst 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0ms) forwards;
}
.avatar-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-item.avatar-simple {
  position: static;
  opacity: 0;
  border-radius: 14px;
}

@keyframes avatarBurst {
  0%   { opacity: 0; transform: translate(var(--ox,0px), var(--oy,0px)) scale(0.05) rotate(0deg); filter: blur(8px); }
  65%  { opacity: 1; transform: translate(0,0) scale(1.1) rotate(var(--tilt,0deg)); filter: blur(0); }
  100% { opacity: 1; transform: translate(0,0) scale(1)   rotate(var(--tilt,0deg)); filter: blur(0); }
}
@keyframes simpleFade {
  from { opacity: 0; transform: scale(0.75) rotate(-4deg); }
  to   { opacity: 1; transform: scale(1)    rotate(0deg); }
}

/* Capa del título: relativa, z-index 2 (encima de avatares) */
.hero__title-layer {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 52px 0 48px;
  text-align: center;
}

/* Badge */
.hero__badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(163,90,0,0.08); color: var(--accent);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px;
  border: 1px solid rgba(163,90,0,0.18);
  margin-bottom: 28px;
}
.hero__badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* H1 con oval SVG */
.hero-title-wrapper {
  position: relative;
  display: inline-block;
  padding: 18px 36px;
  margin-bottom: 24px;
}
.hero-oval {
  position: absolute; top: -18%; left: -6%;
  width: 112%; height: 136%;
  pointer-events: none; overflow: visible;
}
.hero-oval-path {
  fill: none; stroke: var(--accent-strong); stroke-width: 9;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.50; vector-effect: non-scaling-stroke;
}

.hero__subtitle {
  font-size: 16px; font-weight: 300; color: var(--muted-strong);
  line-height: 1.75; max-width: 580px;
  margin: 0 auto 22px;
}
.hero__bullets {
  list-style: none; display: flex; justify-content: center;
  flex-wrap: wrap; gap: 8px 22px; margin-bottom: 0;
}
.hero__bullets li {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 300; color: var(--muted-strong);
}
.hero__bullets li::before {
  content: '';
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  background: rgba(163,90,0,0.10) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23A35A00' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/10px;
  border: 1.5px solid var(--accent);
}

/* ── FORMULARIO (sección propia bajo el hero) ── */
.form-section {
  background: var(--card);
  padding: 56px 0 72px;
  border-top: 1px solid var(--border);
}
.form-wrap { max-width: 600px; margin: 0 auto; }
.form-card { background: var(--bg-soft); border-radius: 20px; padding: 36px 36px 28px; border: 1px solid var(--border); }
.form-card__title { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.form-card__sub { font-size: 13px; font-weight: 300; color: var(--muted); margin-bottom: 24px; line-height: 1.55; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11px; font-weight: 400; color: var(--muted-strong); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 13px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 300; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; appearance: none; -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235F524A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 11px;
  padding-right: 34px; cursor: pointer;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(163,90,0,0.09); background: var(--card);
}
.form-group input.error, .form-group select.error, .form-group textarea.error {
  border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192,57,43,0.07);
}
.form-group textarea { resize: vertical; min-height: 72px; }
.form-group .field-error { font-size: 11px; font-weight: 300; color: #C0392B; margin-top: 3px; display: none; }
.form-group .field-error.visible { display: block; }
.form-optional { font-size: 10px; font-weight: 300; color: var(--muted); margin-left: 3px; text-transform: none; letter-spacing: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-submit {
  width: 100%; padding: 15px; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 15px; border-radius: var(--radius-btn); border: none; cursor: pointer;
  margin-top: 8px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.form-submit:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(163,90,0,0.25); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-legal { font-size: 11px; font-weight: 300; color: var(--muted); margin-top: 12px; text-align: center; line-height: 1.5; }

/* ══════════════════════════════════════════
   BLOCK REVEAL (TextBlockAnimation adaptado)
══════════════════════════════════════════ */
.reveal-wrapper { position: relative; overflow: hidden; display: block; }
.reveal-wrapper > .reveal-block { opacity: 0; }
.reveal-wrapper.revealed > .reveal-block { opacity: 1; }
.reveal-overlay { position: absolute; inset: 0; background: var(--accent); z-index: 10; transform: translateX(-101%); }
.reveal-wrapper.revealed .reveal-overlay { animation: blockWipe 0.88s cubic-bezier(0.77, 0, 0.175, 1) forwards; }
.reveal-wrapper.revealed > .reveal-block { animation: textAppear 0s 0.44s forwards; opacity: 0; }
@keyframes blockWipe { 0% { transform: translateX(-101%); } 44% { transform: translateX(0); } 56% { transform: translateX(0); } 100% { transform: translateX(101%); } }
@keyframes textAppear { to { opacity: 1; } }

/* ══════════════════════════════════════════
   SECCIONES
══════════════════════════════════════════ */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-soft); }
.section--center { text-align: center; }
.section__badge { display: inline-block; font-size: 11px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section__title { color: var(--dark); margin-bottom: 14px; }
.section__sub { font-size: 16px; font-weight: 300; color: var(--muted-strong); max-width: 620px; line-height: 1.75; margin-bottom: 52px; }
.section--center .section__sub { margin-left: auto; margin-right: auto; }
.divider { width: 44px; height: 3px; background: var(--accent); border-radius: 2px; margin-bottom: 28px; }

/* ══════════════════════════════════════════
   FEATURE GRID — Para quién
══════════════════════════════════════════ */
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.feature-item { display: flex; flex-direction: column; gap: 10px; }
.feature-visual { aspect-ratio: 3/2; background: rgba(163,90,0,0.06); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; transition: background var(--transition), transform var(--transition); }
.feature-item:hover .feature-visual { background: rgba(163,90,0,0.11); transform: translateY(-2px); }
.feature-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.feature-icon svg { width: 26px; height: 26px; }
.feature-item h3 { font-size: 13px; font-weight: 700; color: var(--dark); }
.feature-item p { font-size: 12px; font-weight: 300; color: var(--muted); line-height: 1.65; }

/* ══════════════════════════════════════════
   TIMELINE — Qué revisamos
══════════════════════════════════════════ */
.timeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); margin-bottom: 52px; }
.timeline::before { content: ''; position: absolute; top: 23px; left: calc(100%/12); right: calc(100%/12); height: 2px; background: linear-gradient(90deg, transparent, var(--accent) 15%, var(--accent-light) 50%, var(--accent) 85%, transparent); }
.timeline-item { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; padding: 0 6px; }
.timeline-dot { width: 46px; height: 46px; border-radius: 50%; background: var(--bg-soft); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 14px; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); }
.timeline-item:hover .timeline-dot { background: rgba(163,90,0,0.10); transform: scale(1.1); box-shadow: 0 4px 16px rgba(163,90,0,0.18); }
.timeline-item h3 { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 5px; }
.timeline-item p { font-size: 11px; font-weight: 300; color: var(--muted); line-height: 1.55; }

/* ══════════════════════════════════════════
   3D TILT CARD — Diagnóstico
══════════════════════════════════════════ */
.diag-card-wrapper { display: flex; justify-content: center; perspective: 1200px; }
.diag-tilt-card { width: 100%; max-width: 680px; background: var(--card); border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 4px 32px rgba(31,23,18,0.09); padding: 36px 40px; transform-style: preserve-3d; transition: box-shadow 0.3s ease; cursor: default; will-change: transform; }
.diag-tilt-card:hover { box-shadow: 0 20px 56px rgba(31,23,18,0.15); }
.diag-card__hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.diag-card__label { font-size: 11px; font-weight: 500; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.diag-card__badge { font-size: 11px; font-weight: 400; color: var(--accent); background: rgba(163,90,0,0.08); border: 1px solid rgba(163,90,0,0.16); padding: 4px 13px; border-radius: 100px; }
.diag-steps-row { display: flex; align-items: flex-start; margin-bottom: 28px; }
.diag-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.diag-step__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(163,90,0,0.12); position: relative; z-index: 1; }
.diag-step__label { font-size: 11px; font-weight: 300; color: var(--dark); margin-top: 8px; }
.diag-step-connector { flex: 1; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); align-self: center; margin-top: -22px; }
.diag-card__ftr { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 24px; border-top: 1px solid var(--border); }
.diag-stat { display: flex; flex-direction: column; gap: 3px; }
.diag-stat__label { font-size: 10px; font-weight: 300; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.diag-stat__val { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }

/* ══════════════════════════════════════════
   RECIBES STEPS
══════════════════════════════════════════ */
.recibes-steps { max-width: 700px; margin: 0 auto 32px; }
.recibes-step { display: flex; gap: 28px; align-items: flex-start; padding: 28px 0; border-bottom: 1px solid var(--border); }
.recibes-step:last-child { border-bottom: none; }
.recibes-step__num { font-size: 42px; font-weight: 800; color: rgba(163,90,0,0.13); line-height: 1; flex-shrink: 0; width: 56px; padding-top: 3px; }
.recibes-step__content h3 { color: var(--dark); margin-bottom: 8px; }
.recibes-step__content p { font-size: 14px; font-weight: 300; color: var(--muted-strong); line-height: 1.75; }
.recibes-trust { max-width: 700px; margin: 0 auto; background: rgba(163,90,0,0.05); border: 1px solid rgba(163,90,0,0.16); border-radius: 12px; padding: 18px 24px; font-size: 14px; font-weight: 300; color: var(--accent); text-align: center; }

/* ══════════════════════════════════════════
   BOTONES
══════════════════════════════════════════ */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 28px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; border-radius: var(--radius-btn); border: none; cursor: pointer; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); text-decoration: none; }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(163,90,0,0.28); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 24px; background: transparent; color: var(--muted-strong); font-weight: 400; font-size: 13px; border-radius: var(--radius-btn); border: 1.5px solid var(--border); cursor: pointer; transition: border-color var(--transition), color var(--transition); text-decoration: none; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary--light { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 36px; background: var(--accent-light); color: var(--dark); font-weight: 700; font-size: 15px; border-radius: var(--radius-btn); border: none; cursor: pointer; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); text-decoration: none; }
.btn-primary--light:hover { background: #e8a44e; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(240,179,94,0.35); }

/* ══════════════════════════════════════════
   CTA FINAL
══════════════════════════════════════════ */
.cta-final { background: var(--dark); padding: 88px 0; }
.cta-final__inner { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-final__title { font-size: clamp(28px, 3.5vw, 44px); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.8px; }
.cta-final__text { font-size: 16px; font-weight: 300; color: rgba(255,255,255,0.68); line-height: 1.75; margin-bottom: 32px; }

/* ══════════════════════════════════════════
   FAQ
══════════════════════════════════════════ */
.faq-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: none; border: none; text-align: left; font-size: 14px; font-weight: 500; color: var(--dark); cursor: pointer; transition: color var(--transition); }
.faq-question:hover { color: var(--accent); }
.faq-chevron { flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: transform var(--transition), color var(--transition); }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.32s ease; padding: 0 24px; font-size: 14px; font-weight: 300; color: var(--muted-strong); line-height: 1.75; }
.faq-item.open .faq-answer { max-height: 200px; padding: 0 24px 20px; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer { background: var(--dark); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__brand { font-size: 15px; font-weight: 600; color: #fff; }
.footer__text { font-size: 12px; font-weight: 300; color: rgba(255,255,255,0.4); }
.footer__link { font-size: 12px; font-weight: 300; color: rgba(255,255,255,0.5); transition: color var(--transition); }
.footer__link:hover { color: var(--accent-light); }

/* ══════════════════════════════════════════
   STICKY CTA
══════════════════════════════════════════ */
.sticky-cta { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; padding: 10px 16px; background: rgba(250,247,242,0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--border); }
.sticky-cta a { display: flex; align-items: center; justify-content: center; padding: 14px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; border-radius: var(--radius-btn); text-decoration: none; }
.sticky-cta a:hover { background: var(--accent-strong); }

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

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .timeline::before { display: none; }
}
@media (max-width: 768px) {
  .hero__scene { min-height: auto; flex-direction: column; align-items: stretch; }
  .hero__bg-layer { position: static; inset: auto; height: auto; z-index: 0; }
  .hero__bg-layer::after { display: none; }
  .hero__title-layer { padding: 28px 0 36px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .section { padding: 64px 0; }
  .form-section { padding: 40px 0 56px; }
  .diag-steps-row { display: none; }
  .sticky-cta { display: block; }
  body { padding-bottom: 70px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .diag-tilt-card { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 28px 20px 20px; }
}
@media (max-width: 540px) {
  .container { padding: 0 16px; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .cta-final { padding: 60px 0; }
  .hero__title-wrapper { padding: 14px 16px; }
}
