/* ============================================================
   WS Editore — Sistema de diseño "Papel cálido editorial"
   Paleta oficial WaltSuare Group (tokens de la web madre)
   ============================================================ */

:root {
  /* Papel y tinta */
  --paper: #f6f3ee;
  --paper-2: #eae3d7;
  --card: #fbf9f4;
  --ink: #1f252c;
  --ink-2: #3c4650;
  --muted: #56606b;
  --faint: #8f98a3;
  --line: #d6cec2;
  --line-soft: rgba(214, 206, 194, .55);

  /* Institucional */
  --teal: #0e5a6f;
  --gold: #b68c4a;
  --gold-strong: #96733a;

  /* WS Editore (cálido editorial) */
  --amber: #a55a3b;
  --amber-strong: #8a4a30;
  --amber-soft: #f8f1e7;
  --amber-panel: #f5ecdd;
  --amber-sec: #c79a52;
  --ink-ed: #3e3128;

  /* WhatsApp CTA */
  --wa: #25d366;
  --wa-dark: #1eb356;

  /* Tipografía */
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --section-pad: clamp(4rem, 8vw, 6.5rem);
  --container: 1180px;
  --ease: cubic-bezier(.22,.61,.21,1);
  --shadow: 0 18px 44px -18px rgba(31,37,44,.18);
  --shadow-sm: 0 8px 22px -12px rgba(31,37,44,.14);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-strong); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink-ed); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }

section { padding: var(--section-pad) 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before { content: "//"; color: var(--gold); }

.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.lead strong { color: var(--ink-ed); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .98rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }

.btn-amber { background: var(--amber); color: #fff7ea; }
.btn-amber:hover { background: var(--amber-strong); box-shadow: 0 14px 30px -12px rgba(165,90,59,.55); color: #fff7ea; }

.btn-gold { background: var(--gold); color: #2a2118; }
.btn-gold:hover { background: var(--gold-strong); color: #fff; box-shadow: 0 14px 30px -12px rgba(182,140,74,.5); }

.btn-ghost { border-color: var(--amber); color: var(--amber); background: transparent; }
.btn-ghost:hover { background: var(--amber); color: #fff7ea; }

.btn-ghost-light { border-color: rgba(255,247,234,.55); color: #fff7ea; background: transparent; }
.btn-ghost-light:hover { background: #fff7ea; color: var(--amber-strong); }

.btn-wa { background: var(--wa); color: #08270f; }
.btn-wa:hover { background: var(--wa-dark); color: #fff; box-shadow: 0 14px 30px -12px rgba(37,211,102,.5); }

.btn-light { background: #fff7ea; color: var(--amber-strong); }
.btn-light:hover { background: #fff; color: var(--amber-strong); box-shadow: 0 14px 30px -12px rgba(0,0,0,.35); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,243,238,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .7rem;
  padding-bottom: .7rem;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { height: 44px; width: auto; }
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink-ed);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name small {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
}

.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--amber); }
.main-nav a.is-active { color: var(--amber); border-bottom-color: var(--amber); }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .45rem .6rem;
  cursor: pointer;
  color: var(--ink-ed);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 520px at 88% -10%, rgba(199,154,82,.28), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(255,247,234,.12), transparent 55%),
    linear-gradient(135deg, var(--amber-strong) 0%, var(--amber) 68%, var(--amber-sec) 130%);
  color: #fff7ea;
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "IMAGINA · IMPRIME · IMPACTA";
  position: absolute;
  right: -1rem;
  bottom: -1.2rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 5rem);
  color: rgba(255,247,234,.07);
  white-space: nowrap;
  letter-spacing: .02em;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero .eyebrow { color: var(--gold); }
.hero .eyebrow::before { color: #fff7ea; }

.h-display {
  font-size: clamp(2.2rem, 5.2vw, 3.55rem);
  font-weight: 600;
  color: #fff7ea;
  margin: 1rem 0 1.1rem;
}
.h-display em { font-style: italic; color: var(--gold); }

.hero-sub { font-size: 1.12rem; color: rgba(255,247,234,.88); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero-note {
  margin-top: 1.4rem;
  font-size: .88rem;
  color: rgba(255,247,234,.72);
  font-family: var(--mono);
  letter-spacing: .02em;
}

/* Panel visual del hero — "libro abierto" */
.hero-visual { display: flex; justify-content: center; }
.book-panel {
  width: min(100%, 380px);
  background: var(--amber-panel);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  box-shadow: 0 30px 60px -22px rgba(61,28,14,.55);
  border: 1px solid rgba(255,247,234,.35);
  transform: rotate(1.6deg);
  position: relative;
}
.book-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.35), transparent 42%);
  pointer-events: none;
}
.book-tag {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  padding: .28rem .7rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: .9rem;
}
.book-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--ink-ed);
  line-height: 1.2;
}
.book-rule { height: 3px; width: 52px; background: var(--gold); border-radius: 3px; margin: .8rem 0 1rem; }
.book-lines { display: grid; gap: .5rem; }
.book-lines span { height: 9px; border-radius: 5px; background: rgba(62,49,40,.16); }
.book-lines span:nth-child(2) { width: 88%; }
.book-lines span:nth-child(3) { width: 72%; }
.book-lines span:nth-child(4) { width: 94%; }
.book-cover {
  margin-top: 1.1rem;
  background: linear-gradient(135deg, var(--amber-strong), var(--amber));
  color: #fff7ea;
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
}
.book-cover span { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }

/* ---------- Hero interno (páginas interiores) ---------- */
.hero-inner { padding: clamp(3rem, 6.5vw, 4.8rem) 0; }
.hero-inner .h-display { font-size: clamp(1.9rem, 4.2vw, 2.8rem); max-width: 24ch; }
.hero-inner .hero-grid { grid-template-columns: 1fr; }
.hero-inner .hero-visual { display: none; }

/* ---------- Franja marquee ---------- */
.word-strip {
  background: var(--ink-ed);
  color: #f6f3ee;
  overflow: hidden;
  padding: .85rem 0;
  border-top: 1px solid rgba(255,247,234,.08);
}
.word-track {
  display: flex;
  gap: 2.4rem;
  white-space: nowrap;
  animation: marquee 26s linear infinite;
  width: max-content;
}
.word-track span {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(246,243,238,.72);
}
.word-track span::after { content: " ✦"; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones alternas ---------- */
.section-paper-2 { background: var(--paper-2); }
.section-amber-soft { background: var(--amber-soft); }
.section-ink {
  background: var(--ink-ed);
  color: #f6f3ee;
}
.section-ink h2, .section-ink h3 { color: #fff7ea; }
.section-ink .lead { color: rgba(246,243,238,.8); }
.section-ink .eyebrow { color: var(--gold); }
.section-ink .eyebrow::before { color: #f6f3ee; }

.sec-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: .7rem 0 .8rem; }
.sec-head .lead { margin: 0 auto; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.22rem; margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card .card-ico { font-size: 1.7rem; margin-bottom: .7rem; display: block; }
.card .card-cta { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; font-weight: 700; font-size: .92rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.grid-var { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1.4rem; }

/* ---------- Retos ---------- */
.problems { display: grid; gap: 1rem; }
.problem {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.problem .p-ico { font-size: 1.4rem; line-height: 1.4; }
.problem strong { color: var(--ink-ed); display: block; }
.problem p { color: var(--muted); font-size: .97rem; }
.problems-close {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--amber-strong);
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  max-width: 60ch;
}

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; counter-reset: step; }
.t-step {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.t-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .6rem;
  display: inline-block;
  margin-bottom: .7rem;
}
.t-step h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.t-step p { font-size: .9rem; color: var(--muted); }

/* ---------- Tabla ---------- */
.compare { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare th, .compare td { padding: .95rem 1.1rem; text-align: left; font-size: .95rem; border-bottom: 1px solid var(--line-soft); }
.compare th { background: var(--amber-strong); color: #fff7ea; font-family: var(--sans); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.compare tr:last-child td { border-bottom: none; }
.compare td:first-child { font-weight: 700; color: var(--ink-ed); }
.compare td:nth-child(2) { color: var(--faint); text-decoration: line-through; }
.compare td:last-child { color: var(--ink-2); font-weight: 600; }

/* ---------- Formulario ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.form-card .f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-card label { display: block; font-weight: 700; font-size: .88rem; color: var(--ink-ed); margin-bottom: .35rem; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: .98rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .75rem .95rem;
  transition: border-color .2s;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.form-card textarea { min-height: 110px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-ed); color: rgba(246,243,238,.75); padding: 3.2rem 0 2.2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.4rem; }
.footer-brand img { height: 52px; width: auto; margin-bottom: .9rem; }
.footer-brand p { font-size: .92rem; max-width: 34ch; }
.footer-brand .tagline {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: .8rem;
}
.footer-col h4 { font-family: var(--sans); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: #fff7ea; margin-bottom: 1rem; }
.footer-col a { display: block; color: rgba(246,243,238,.7); font-size: .95rem; padding: .3rem 0; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(246,243,238,.12);
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: space-between;
  font-size: .85rem;
  color: rgba(246,243,238,.55);
}
.footer-bottom a { color: rgba(246,243,238,.7); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .word-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .grid-3, .grid-var { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.4rem 1.4rem;
    gap: .2rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .6rem 0; width: 100%; }
  .timeline { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-card .f-row { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
