/* ==========================================================================
   PrivaBook — styles.css
   Paleta real del logo: marino #1b1a2e, burdeos #72243e, gris #878888,
   crema #f4f1ec, dorado apagado #b8935f (solo confianza/seguridad).
   Dirección: "consulta privada" — contención, aire, editorial.
   ========================================================================== */

:root {
  --navy: #1b1a2e;
  --navy-soft: #24233a;
  --burgundy: #72243e;
  --burgundy-soft: #8a3450;
  --grey: #878888;
  --grey-line: #e4e0d8;
  --cream: #f4f1ec;
  --cream-warm: #ede8df;
  --gold: #b8935f;
  --ink: #1b1a2e;

  --font-display: 'Roboto Slab', Georgia, serif;
  --font-body: 'Barlow', -apple-system, sans-serif;

  --max-width: 1120px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Textura sutil de grano — separa "web plana de IA" de "algo con textura real" */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Accesibilidad: foco visible siempre, nunca oculto */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--cream);
  padding: 12px 20px; z-index: 100; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
}

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--burgundy);
  margin-bottom: 16px; display: block;
}

.lede { font-size: 18px; color: #4a4a45; max-width: 540px; }

/* -------------------------------------------------------------------- */
/* Header + mobile menu                                                  */
/* -------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 236, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grey-line);
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 30px; height: 28px; }
.brand-word {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: .2px; color: var(--navy);
}
.brand-word span { color: var(--burgundy); }

.nav-links { display: flex; gap: 30px; font-size: 14.5px; font-weight: 500; }
.nav-links a { color: #55534d; transition: color .2s; position: relative; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--burgundy);
  transition: width .25s ease;
}
.nav-links a:hover { color: var(--burgundy); }
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 16px; }

.btn {
  display: inline-block; font-weight: 700; font-size: 14.5px;
  padding: 12px 22px; border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease;
  cursor: pointer; border: none; font-family: var(--font-body);
}
.btn-primary { background: var(--burgundy); color: var(--cream); }
.btn-primary:hover { background: var(--navy); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(27,26,46,.18); }
.btn-ghost { border: 1px solid var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px 28px 22px; background: var(--cream);
  border-bottom: 1px solid var(--grey-line);
}
.mobile-menu a { padding: 12px 0; font-size: 15.5px; color: var(--navy); border-bottom: 1px solid var(--grey-line); }
.mobile-menu .btn { margin-top: 14px; text-align: center; }
.mobile-menu.open { display: flex; }

@media (max-width: 860px) {
  .nav-links, .nav-cta-desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* -------------------------------------------------------------------- */
/* Hero                                                                  */
/* -------------------------------------------------------------------- */

.hero { padding: 88px 0 76px; border-bottom: 1px solid var(--grey-line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .7fr; gap: 56px; align-items: center; }

.hero h1 { font-size: clamp(32px, 5vw, 50px); margin-bottom: 20px; letter-spacing: -.5px; }
.hero h1 em { font-style: italic; color: var(--burgundy); }
.hero .lede { margin-bottom: 28px; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.trust-line { font-size: 13px; color: var(--grey); }
.trust-line strong { color: var(--navy); }

.lock-stage { display: flex; align-items: center; justify-content: center; padding: 20px; }
.lock-svg {
  width: 300px; height: 300px;
  filter: drop-shadow(0 24px 40px rgba(27,26,46,.28));
}
.lock-body { animation: lockBreathe 4.5s ease-in-out infinite; transform-origin: 100px 71px; }
@keyframes lockBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
/* El gancho pivota desde su base izquierda, como una bisagra real */
.lock-shackle {
  transform-origin: 78px 53px;
  transition: transform 1.3s cubic-bezier(.22,1.4,.36,1);
}
.lock-shackle.open { transform: rotate(-38deg) translateY(-2px); }
.lock-flash { opacity: 0; transition: opacity .6s ease; }
.lock-flash.show { opacity: 1; }
.lock-shadow { opacity: .18; }

/* -------------------------------------------------------------------- */
/* Video section                                                        */
/* -------------------------------------------------------------------- */

.video-section { text-align: center; }
.video-frame {
  max-width: 720px; margin: 0 auto;
  aspect-ratio: 16/9;
  background: var(--navy);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: 0 30px 70px rgba(27,26,46,.25);
}
.video-frame iframe { width: 100%; height: 100%; border: none; }
.video-placeholder { color: #9997ac; font-size: 14px; }
.video-placeholder .play-dot {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; color: var(--gold); font-size: 22px;
}

/* -------------------------------------------------------------------- */
/* Section rhythm                                                       */
/* -------------------------------------------------------------------- */

section { padding: 80px 0; }
section + section { border-top: 1px solid var(--grey-line); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(26px, 4vw, 34px); }
.section-head p { color: #4a4a45; margin-top: 14px; font-size: 16px; }

/* -------------------------------------------------------------------- */
/* Problem — stat list                                                  */
/* -------------------------------------------------------------------- */

.stat-list { border-top: 1px solid var(--grey-line); }
.stat-row {
  display: grid; grid-template-columns: 110px 1fr; gap: 28px;
  padding: 26px 0; border-bottom: 1px solid var(--grey-line); align-items: baseline;
}
.stat-num { font-family: var(--font-display); font-size: 36px; color: var(--burgundy); font-weight: 700; }
.stat-copy h3 { font-size: 18px; margin-bottom: 6px; font-family: var(--font-body); font-weight: 700; }
.stat-copy p { color: #4a4a45; font-size: 15px; max-width: 520px; }

@media (max-width: 600px) {
  .stat-row { grid-template-columns: 1fr; gap: 6px; }
}

/* -------------------------------------------------------------------- */
/* Steps                                                                 */
/* -------------------------------------------------------------------- */

.steps { counter-reset: step; }
.step {
  display: grid; grid-template-columns: 60px 1fr; gap: 22px;
  padding: 24px 0; border-bottom: 1px solid var(--grey-line);
}
.step:first-child { border-top: 1px solid var(--grey-line); }
.step-index { counter-increment: step; font-family: var(--font-display); font-size: 15px; color: var(--grey); }
.step-index::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 19px; margin-bottom: 6px; font-family: var(--font-body); font-weight: 700; }
.step p { color: #4a4a45; font-size: 15px; max-width: 560px; }
.step .highlight {
  display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border: 1px solid var(--gold); color: #7a5e34; border-radius: 3px;
}

@media (max-width: 600px) {
  .step { grid-template-columns: 1fr; gap: 6px; }
}

/* -------------------------------------------------------------------- */
/* Train your bot                                                       */
/* -------------------------------------------------------------------- */

.train-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.config-card {
  background: #fff; border: 1px solid var(--grey-line); border-radius: 6px; overflow: hidden;
}
.config-row { padding: 16px 20px; border-bottom: 1px solid var(--grey-line); font-size: 14px; }
.config-row:last-child { border-bottom: none; }
.config-row .k { color: var(--grey); display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.config-row .v { color: var(--navy); font-weight: 600; }

/* -------------------------------------------------------------------- */
/* Trust block: security / payments / about                             */
/* -------------------------------------------------------------------- */

.trust-block { background: var(--navy); color: var(--cream); }
.trust-block .section-head h2, .trust-block .eyebrow { color: var(--cream); }
.trust-block .eyebrow { color: var(--gold); }
.trust-block .section-head p { color: #c8c7d6; }

.trust-inner { display: flex; flex-direction: column; gap: 64px; }

.audit-report { background: var(--navy-soft); border: 1px solid #3a3950; border-radius: 6px; overflow: hidden; }
.audit-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 22px; border-bottom: 1px solid #3a3950; font-size: 14.5px; }
.audit-row:last-child { border-bottom: none; }
.audit-row .label { color: #d6d5e0; }
.audit-row .status { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .5px; color: var(--gold); }
.audit-footer { padding: 14px 22px; font-size: 12px; color: #9997ac; border-top: 1px solid #3a3950; }

.audit-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #3a3950; border: 1px solid #3a3950; border-radius: 6px; overflow: hidden; }
.audit-stat { background: var(--navy-soft); padding: 22px 16px; text-align: center; }
.audit-stat-num { display: block; font-family: var(--font-display); font-size: 26px; color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.audit-stat-label { display: block; font-size: 11.5px; color: #9997ac; }
@media (max-width: 700px) { .audit-stats { grid-template-columns: repeat(2, 1fr); } }

.payments-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.flow-diagram { background: var(--navy-soft); border: 1px solid #3a3950; border-radius: 6px; padding: 6px; }
.flow-step { display: flex; align-items: center; gap: 14px; padding: 16px; }
.flow-step:not(:last-child) { border-bottom: 1px dashed #3a3950; }
.flow-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.flow-dot.blocked { background: #5a5870; position: relative; }
.flow-dot.blocked::after {
  content: '×'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-soft); font-size: 9px; font-weight: 700; line-height: 1;
}
.flow-label { font-size: 14.5px; color: #d6d5e0; }
.flow-label strong { color: var(--cream); }
.flow-label small { display: block; color: #9997ac; font-size: 12px; margin-top: 2px; }

.about-card { max-width: 640px; }
.about-card p { color: #c8c7d6; font-size: 16px; }
.about-card strong { color: var(--cream); }

@media (max-width: 860px) {
  .train-grid, .payments-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------- */
/* Pricing                                                               */
/* -------------------------------------------------------------------- */

.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--grey-line); border-radius: 6px; overflow: hidden;
}
.price-card { padding: 32px 26px; border-right: 1px solid var(--grey-line); position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.price-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px rgba(27,26,46,.16); z-index: 2; }
.price-card:last-child { border-right: none; }
.price-card.featured { background: var(--navy); color: var(--cream); }
.price-card.featured .price-name, .price-card.featured .price-desc { color: var(--cream); }
.price-card.featured .price-amount { color: var(--gold); }

.price-badge { position: absolute; top: 22px; right: 22px; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; color: var(--gold); text-transform: uppercase; }
.price-name { font-family: var(--font-display); font-size: 20px; margin-bottom: 6px; }
.price-desc { color: var(--grey); font-size: 13.5px; margin-bottom: 20px; }
.price-amount { font-family: var(--font-display); font-size: 34px; color: var(--burgundy); margin-bottom: 20px; }
.price-amount span { font-size: 14px; color: var(--grey); font-family: var(--font-body); }
.price-card.featured .price-amount span { color: #a9a7bd; }

.price-features { list-style: none; margin-bottom: 24px; }
.price-features li { font-size: 14px; padding: 9px 0; border-top: 1px solid var(--grey-line); }
.price-card.featured .price-features li { border-top-color: #3a3950; }
.price-features li::before { content: '— '; color: var(--gold); }

.pricing-note { text-align: center; margin-top: 26px; color: var(--grey); font-size: 13.5px; }

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card { border-right: none; border-bottom: 1px solid var(--grey-line); }
}

/* -------------------------------------------------------------------- */
/* AI disclosure                                                        */
/* -------------------------------------------------------------------- */

.disclosure { background: var(--cream-warm); padding: 30px 0; }
.disclosure .wrap { display: flex; gap: 16px; align-items: flex-start; }
.disclosure p { font-size: 13.5px; color: #55534d; max-width: 820px; }
.disclosure strong { color: var(--navy); }
.disclosure-mark {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--burgundy); border: 1px solid var(--burgundy); border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* -------------------------------------------------------------------- */
/* Footer                                                                */
/* -------------------------------------------------------------------- */

footer { padding: 60px 0 36px; background: var(--navy); color: #c8c7d6; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand .brand-word { color: var(--cream); }
.footer-brand .brand-word span { color: var(--gold); }
.footer-brand p { margin-top: 14px; font-size: 13px; max-width: 280px; color: #9997ac; }
.footer-col h5 { font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: #7d7b92; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; margin-bottom: 10px; color: #c8c7d6; transition: color .2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid #34334a; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #7d7b92; }

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .lock-stage { order: -1; padding: 10px 10px 24px; } .lock-svg { width: 190px; height: 190px; } }

/* -------------------------------------------------------------------- */
/* Back to top                                                          */
/* -------------------------------------------------------------------- */

.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: var(--cream);
  border: none; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  box-shadow: 0 8px 20px rgba(27,26,46,.25);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--burgundy); }

/* -------------------------------------------------------------------- */
/* Scroll reveal                                                        */
/* -------------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
