@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,0..100,0..1&family=JetBrains+Mono:wght@400;500;700&family=Archivo:wght@400;500;600;700;800;900&display=swap');

:root {
  --paper: #f1ece4;
  --paper-2: #e8e2d6;
  --ink: #15110d;
  --ink-2: #2a241c;
  --accent: #e23d18;
  --accent-2: #ffb800;
  --rule: rgba(21, 17, 13, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--paper); }

.serif { font-family: 'Fraunces', serif; font-variation-settings: 'opsz' 144, 'SOFT' 30; letter-spacing: -0.02em; }
.serif-wonk { font-family: 'Fraunces', serif; font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.sans { font-family: 'Archivo', sans-serif; }

.rule { border-top: 1px solid var(--rule); }
.rule-b { border-bottom: 1px solid var(--rule); }

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

a { color: inherit; text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  background: var(--paper);
  color: var(--ink);
  transition: all 0.2s ease;
  cursor: pointer;
  text-transform: uppercase;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-accent { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn-accent:hover { background: var(--ink); border-color: var(--ink); }

.btn .arrow {
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: currentColor;
  position: relative;
}
.btn .arrow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--paper);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'><path d='M6 5l5 4-5 4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 70% no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'><path d='M6 5l5 4-5 4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 70% no-repeat;
}
.btn-primary .arrow::after, .btn-accent .arrow::after { background: var(--ink); }
.btn:hover .arrow::after { background: var(--ink); }
.btn-primary:hover .arrow::after, .btn-accent:hover .arrow::after { background: var(--paper); }

/* tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }

/* placeholder image */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(21,17,13,0.06) 0 8px, transparent 8px 16px),
    var(--paper-2);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}
.ph::before, .ph::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--ink);
}
.ph::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.ph::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* marquee */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  padding: 14px 0;
  animation: scroll 40s linear infinite;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 28px;
  font-style: italic;
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 48px; }
.marquee-track .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); display: inline-block; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* rotating label */
.rot-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* hero blob */
.blob {
  width: 100%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-2), var(--accent) 60%, #8a1a00);
  filter: blur(0.3px);
  animation: morph 12s ease-in-out infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 56% 44% 60% 40% / 50% 55% 45% 50%; transform: rotate(0deg); }
  33% { border-radius: 40% 60% 45% 55% / 60% 40% 60% 40%; transform: rotate(120deg); }
  66% { border-radius: 60% 40% 55% 45% / 40% 60% 40% 60%; transform: rotate(240deg); }
}

/* number badges */
.num-badge {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-size: 96px;
  line-height: 0.85;
  color: var(--accent);
}

/* underline link */
.ulink {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
}
.ulink:hover { color: var(--accent); }

/* checkbox tick */
.tick {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tick svg { width: 12px; height: 12px; }

/* package card */
.pkg {
  border: 1px solid var(--ink);
  border-radius: 24px;
  padding: 28px;
  background: var(--paper);
  display: flex; flex-direction: column;
  position: relative;
  transition: transform 0.3s ease, background 0.3s ease;
}
.pkg:hover { transform: translateY(-4px); }
.pkg.featured { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pkg.featured .ulink { border-color: var(--paper); }

/* slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 2px;
  background: var(--ink);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid var(--ink);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid var(--ink);
  cursor: pointer;
}

/* nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(241, 236, 228, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

/* logo */
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.logo-mark {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.logo-mark::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.7); }
  50% { transform: scale(1); }
}

/* Section headers */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 56px;
}
.section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 18px;
}

/* WhatsApp mockup */
.wa {
  background: #e7e0d3;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid var(--ink);
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
}
.wa-msg {
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px 12px 12px 2px;
  margin-bottom: 8px;
  max-width: 80%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.wa-msg.out {
  background: #d4f5c4;
  border-radius: 12px 12px 2px 12px;
  margin-left: auto;
}
.wa-time { font-size: 9px; color: #888; margin-left: 6px; }

/* doc card */
.doc {
  border: 1px solid var(--ink);
  border-radius: 14px;
  padding: 14px;
  background: var(--paper);
  font-size: 12px;
}
.doc .row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--rule); }
.doc .row:last-child { border-bottom: none; }

/* ========================================================
   RESPONSIVE
   ======================================================== */

/* Tablet ≤ 1024 */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .grid-12 { gap: 14px; }

  /* Nav: hide center nav links on tablet */
  .nav nav { display: none !important; }

  /* Sections: tighter padding */
  section { padding-left: 0; padding-right: 0; }

  /* Hero: collapse left rail and right column under headline */
  [data-screen-label="01 Hero"] .grid-12 > div:nth-child(1) { grid-column: 1 / 13 !important; margin-bottom: 24px; }
  [data-screen-label="01 Hero"] .grid-12 > div:nth-child(2) { grid-column: 1 / 13 !important; }
  [data-screen-label="01 Hero"] .grid-12 > div:nth-child(3) { grid-column: 1 / 13 !important; text-align: left !important; margin-top: 16px; }
  [data-screen-label="01 Hero"] .grid-12:last-child > div:nth-child(1) { grid-column: 1 / 13 !important; }
  [data-screen-label="01 Hero"] .grid-12:last-child > div:nth-child(2) { grid-column: 1 / 13 !important; margin-top: 32px; }

  /* Problema */
  [data-screen-label="02 Problema"] .grid-12 > div:nth-child(1),
  [data-screen-label="02 Problema"] .grid-12 > div:nth-child(2) { grid-column: 1 / 13 !important; }
  [data-screen-label="02 Problema"] .grid-12 > div:nth-child(2) { margin-top: 32px; }

  /* Solucion */
  [data-screen-label="03 Solución"] .grid-12 > div:nth-child(1),
  [data-screen-label="03 Solución"] .grid-12 > div:nth-child(2) { grid-column: 1 / 13 !important; }
  [data-screen-label="03 Solución"] .grid-12 > div:nth-child(2) { margin-top: 32px; }

  /* Por qué — 5 cols → 2 cols then 1 */
  [data-screen-label="04 PorQue"] > div > div:last-child {
    grid-template-columns: 1fr 1fr !important;
  }
  [data-screen-label="04 PorQue"] > div > div:last-child > div {
    border-right: none !important;
    border-bottom: 1px solid var(--rule) !important;
  }
  [data-screen-label="04 PorQue"] > div > div:last-child > div:nth-child(odd) {
    border-right: 1px solid var(--rule) !important;
  }

  /* Paquetes — 4 → 2 */
  [data-screen-label="05 Paquetes"] .grid-12 > div { grid-column: span 6 !important; }

  /* ROI — stack */
  [data-screen-label="06 ROI"] .grid-12 > div:nth-child(1),
  [data-screen-label="06 ROI"] .grid-12 > div:nth-child(2) { grid-column: 1 / 13 !important; }
  [data-screen-label="06 ROI"] .grid-12 > div:nth-child(2) { margin-top: 16px; }

  /* Casos — 2 → 1 */
  [data-screen-label="07 Casos"] .grid-12 > div { grid-column: 1 / 13 !important; margin-bottom: 16px; }

  /* CTA */
  [data-screen-label="08 CTA"] .grid-12 > div:nth-child(1),
  [data-screen-label="08 CTA"] .grid-12 > div:nth-child(2) { grid-column: 1 / 13 !important; }
  [data-screen-label="08 CTA"] .grid-12 > div:nth-child(2) { justify-content: flex-start !important; margin-top: 24px; }

  /* Footer */
  [data-screen-label="09 Footer"] .grid-12 > div:nth-child(1) { grid-column: 1 / 13 !important; margin-bottom: 32px; }
  [data-screen-label="09 Footer"] .grid-12 > div { grid-column: span 6 !important; }
  [data-screen-label="09 Footer"] > div > div:last-child {
    flex-wrap: wrap; gap: 12px; text-align: left;
  }
}

/* Mobile ≤ 768 */
@media (max-width: 768px) {
  html, body { font-size: 15px; }
  .container { padding: 0 18px; }

  section { padding-top: 64px !important; padding-bottom: 48px !important; }

  /* Nav: compact */
  .nav .container { padding: 12px 18px !important; flex-wrap: wrap; gap: 8px; }
  .nav .container > div:last-child > .mono { display: none; }
  .nav .container > div:last-child .btn { padding: 12px 16px; font-size: 12px; }
  .logo { font-size: 18px; }
  .logo-mark { width: 22px; height: 22px; }

  /* Buttons full-width-ish, wrap properly */
  .btn { padding: 13px 18px; font-size: 12px; }
  .btn .arrow { width: 16px; height: 16px; }

  /* Hero meta row stack */
  [data-screen-label="01 Hero"] > div > div:first-child {
    flex-direction: column; align-items: flex-start !important; gap: 10px;
  }
  /* Hero headline blob inline → smaller */
  [data-screen-label="01 Hero"] h1 span span.blob,
  [data-screen-label="01 Hero"] h1 span span[style*="display: inline-block"] {
    width: 64px !important; height: 64px !important;
  }

  /* Hero side cards: stack */
  [data-screen-label="01 Hero"] .grid-12:last-child > div:nth-child(2) > div {
    grid-template-columns: 1fr !important;
  }
  [data-screen-label="01 Hero"] .grid-12:last-child > div:nth-child(2) > div > div:first-child {
    grid-column: 1 / 2 !important;
  }

  /* Hero CTA buttons stack */
  [data-screen-label="01 Hero"] .grid-12:last-child > div:nth-child(1) > div:nth-of-type(1) {
    flex-direction: column; align-items: stretch;
  }
  [data-screen-label="01 Hero"] .grid-12:last-child > div:nth-child(1) > div:nth-of-type(1) .btn {
    justify-content: center;
  }

  /* Section heads */
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 16px; padding-bottom: 12px; margin-bottom: 32px; }
  .section-head > div { flex-wrap: wrap; gap: 10px !important; }
  .section-title { font-size: 14px; }

  /* Problema channel grid → 1 col */
  [data-screen-label="02 Problema"] .grid-12 > div:nth-child(2) > div:first-child {
    grid-template-columns: 1fr !important;
  }
  [data-screen-label="02 Problema"] .grid-12 > div:nth-child(2) > div:first-child > div {
    border-right: none !important;
    border-bottom: 1px solid var(--rule) !important;
    min-height: 140px !important;
    padding: 20px !important;
  }
  [data-screen-label="02 Problema"] .grid-12 > div:nth-child(2) > div:first-child > div:last-child {
    border-bottom: none !important;
  }

  /* Solución: WhatsApp + flow stack */
  [data-screen-label="03 Solución"] .grid-12 > div:nth-child(2) > div:first-child {
    grid-template-columns: 1fr !important;
  }

  /* Solución feature ul → 1 col */
  [data-screen-label="03 Solución"] ul[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Por qué → 1 col */
  [data-screen-label="04 PorQue"] > div > div:last-child {
    grid-template-columns: 1fr !important;
  }
  [data-screen-label="04 PorQue"] > div > div:last-child > div {
    border-right: none !important;
    min-height: 280px !important;
  }
  [data-screen-label="04 PorQue"] > div > div:last-child > div:nth-child(odd) {
    border-right: none !important;
  }

  /* Paquetes 1 col */
  [data-screen-label="05 Paquetes"] .grid-12 > div { grid-column: 1 / 13 !important; }
  .pkg { padding: 22px; }

  /* ROI inputs full width, smaller padding */
  [data-screen-label="06 ROI"] .grid-12 > div:nth-child(1) { padding: 28px 22px !important; }
  [data-screen-label="06 ROI"] .grid-12 > div:nth-child(2) { padding: 28px 22px !important; }
  [data-screen-label="06 ROI"] .grid-12 > div:nth-child(2) > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  /* Casos quote font */
  [data-screen-label="07 Casos"] p[class*="serif"] { font-size: 22px !important; }
  [data-screen-label="07 Casos"] .grid-12 > div { padding: 28px 22px !important; }

  /* CTA buttons stack */
  [data-screen-label="08 CTA"] .grid-12 > div:nth-child(2) {
    flex-direction: column; align-items: stretch !important;
  }
  [data-screen-label="08 CTA"] .grid-12 > div:nth-child(2) .btn {
    justify-content: center; width: 100%;
  }

  /* Footer cols */
  [data-screen-label="09 Footer"] .grid-12 > div { grid-column: 1 / 13 !important; margin-bottom: 24px; }
  [data-screen-label="09 Footer"] > div > div:last-child {
    flex-direction: column; align-items: flex-start; gap: 8px;
  }

  /* Marquee smaller */
  .marquee-track { font-size: 20px; gap: 28px; padding: 10px 0; }
  .marquee-track > span { gap: 28px; }

  /* Solución pills wrap nicer */
  [data-screen-label="03 Solución"] div[style*="flex-wrap: wrap"] span {
    font-size: 14px !important; padding: 6px 12px !important;
  }

  /* Hide rotated/decorative */
  .rot-label { display: none; }

  /* Big footer wordmark — keep but cap */
  [data-screen-label="09 Footer"] > div > div:last-of-type {
    margin-top: 32px !important;
  }
}

/* Small mobile ≤ 480 */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  /* Hide secondary nav button label */
  .nav .container > div:last-child .btn { padding: 10px 14px; }

  .section-head { font-size: 11px; }

  /* Hero: tighten meta tags */
  [data-screen-label="01 Hero"] .tag { font-size: 9px; }

  /* Hero KPI cards smaller display numbers */
  [data-screen-label="01 Hero"] .grid-12:last-child .serif[style*="font-size: 64px"],
  [data-screen-label="01 Hero"] .grid-12:last-child .serif[style*="font-size: 56px"] {
    font-size: 44px !important;
  }

  /* Quote mark smaller */
  [data-screen-label="07 Casos"] span[class*="serif"][style*="font-size: 120px"] {
    font-size: 80px !important;
  }

  /* Marquee even smaller */
  .marquee-track { font-size: 16px; }

  /* Tag letter spacing tight */
  .tag { font-size: 9px; padding: 5px 8px; }

  /* Por qué big numbers */
  [data-screen-label="04 PorQue"] span[style*="font-size: 64px"] {
    font-size: 48px !important;
  }
}
