@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

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

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --paper:       #faf7f0;
  --paper-2:     #f1ece0;
  --paper-3:     #e8e0d0;
  --ink:         #0d0d0d;
  --ink-soft:    #2a2a2a;
  --muted:       #8a8276;
  --accent:      #9c3a08;

  --line:        rgba(13,13,13,0.10);
  --line-strong: rgba(13,13,13,0.22);

  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;

  --ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ─── BASE ───────────────────────────────────────────────────── */
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain texture — applied via body::before on flow pages */
.with-grain::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%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");
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
.wordmark {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.wordmark em {
  font-style: italic;
  color: var(--ink);
}

/* Headings */
h1, .h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
h2, .h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h3, .h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.2;
}

.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.eyebrow-dots::before,
.eyebrow-dots::after {
  content: '·';
  margin: 0 0.6rem;
  color: var(--line-strong);
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── HORIZONTAL RULE ────────────────────────────────────────── */
hr, .rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}
.rule-short {
  width: 2.5rem;
  border-top: 1px solid var(--line-strong);
  margin: 1rem auto;
}

/* ─── LAYOUT: FLOW PAGE ──────────────────────────────────────── */
.page {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 2rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-narrow {
  max-width: 560px;
}

/* ─── LAYOUT: SPLIT SCREEN (landing) ────────────────────────── */
.stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative;
}
.stage::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
  z-index: 1;
}

/* ─── HEADER (flow pages) ────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.header-meta {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.6;
}
.header-meta strong {
  color: var(--ink);
  font-weight: 500;
  display: block;
}

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.25rem;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb-sep { color: var(--line-strong); }
.breadcrumb-current { color: var(--ink); }

/* ─── PROGRESS BAR ───────────────────────────────────────────── */
.progress {
  margin-bottom: 2.5rem;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.progress-track {
  height: 1px;
  background: var(--line);
  position: relative;
}
.progress-fill {
  height: 1px;
  background: var(--ink);
  transition: width 0.6s var(--ease-smooth);
}

/* ─── OPTIONS LIST (landing + flujo branching) ───────────────── */
.options {
  display: flex;
  flex-direction: column;
}
.option {
  display: grid;
  grid-template-columns: 3rem 1fr 1.5rem;
  align-items: center;
  padding: 1.5rem 0.25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: padding 0.5s var(--ease-smooth), color 0.3s;
  cursor: pointer;
}
.option:first-child { border-top: 1px solid var(--line); }
.option:hover { padding-left: 1rem; padding-right: 1rem; }
.option:hover .opt-arrow { transform: translateX(4px); color: var(--accent); }
.option:hover .opt-num { color: var(--accent); }

.opt-num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  font-weight: 400;
  transition: color 0.3s;
}
.opt-text {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.opt-arrow {
  font-size: 1rem;
  color: var(--muted);
  text-align: right;
  font-weight: 300;
  transition: transform 0.4s var(--ease-smooth), color 0.3s;
}

/* Compact variant for step-by-step branches */
.options-sm .option { padding: 1.1rem 0.25rem; }
.options-sm .opt-text { font-size: 1.25rem; }
.options-sm { grid-template-columns: 2.5rem 1fr 1.25rem; }

/* ─── YES/NO PAIR ────────────────────────────────────────────── */
.yesno {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 2rem 0;
}
.btn {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  padding: 1.1rem 1.5rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-yes { /* no special style by default, inherits .btn */ }
.btn-no  { color: var(--muted); border-color: var(--line); }
.btn-no:hover { background: var(--muted); color: var(--paper); border-color: var(--muted); }

/* Primary CTA */
.btn-primary {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  padding: 1rem 2rem;
  min-width: 11rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  transition: background 0.3s, color 0.3s;
}
.btn-primary:hover { background: var(--ink-soft); }

.btn-ghost {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

.btn-secondary {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s, border-color 0.3s;
}
.btn-secondary:hover { background: var(--paper-2); border-color: var(--ink); }

.btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}

/* ─── QUESTION BLOCK ─────────────────────────────────────────── */
.question-block {
  margin-bottom: 2.5rem;
}
.question {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.question em { font-style: italic; font-weight: 400; }
.question-hint {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ─── NUMERIC INPUT ──────────────────────────────────────────── */
.input-group {
  margin: 1.75rem 0;
}
.input-label {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.input-currency {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.5rem;
  transition: border-color 0.2s;
}
.input-currency:focus-within { border-color: var(--ink); }
.currency-symbol {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--muted);
}
.input-currency input {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  letter-spacing: -0.02em;
}
.input-currency input::placeholder { color: var(--line-strong); }
.input-hint {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

/* ─── RESULT SCREENS ─────────────────────────────────────────── */
.result-block {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 2rem 0;
  text-align: center;
}
.result-verdict {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}
.result-verdict em { font-style: italic; }
.result-explanation {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* Monto destacado (saldo a pagar / a favor) */
.monto-display {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
  margin: 0.5rem 0 1.5rem;
}
.monto-display small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 0.25rem;
}

/* Verdict color states */
.verdict-no    { color: var(--ink); }
.verdict-si    { color: var(--accent); }
.verdict-maybe { color: var(--muted); }

/* ─── INSTRUCTIVO (paso a paso MUISCA) ───────────────────────── */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}
.step:first-child { border-top: 1px solid var(--line); }
.step-num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  padding-top: 0.15rem;
}
.step-body {}
.step-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.step-text {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* Screenshot placeholder */
.screenshot {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  overflow: hidden;
  position: relative;
}
.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}
.screenshot-label {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.screenshot-placeholder {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ─── INFO / CALLOUT BOXES ───────────────────────────────────── */
.callout {
  background: var(--paper-2);
  border-left: 2px solid var(--ink);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.callout strong { color: var(--ink); font-weight: 500; }
.callout-warning { border-left-color: var(--accent); }
.callout-tip { border-left-color: var(--muted); }

/* ─── PAYWALL BLOCK ──────────────────────────────────────────── */
.paywall {
  border: 1px solid var(--line-strong);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  background: var(--paper-2);
}
.paywall-price {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0.75rem 0;
}
.paywall-price small {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.paywall-features {
  list-style: none;
  margin: 1rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 2;
}
.paywall-features li::before {
  content: '✓';
  margin-right: 0.5rem;
  color: var(--muted);
}

/* ─── AD SLOT (NYT style) ────────────────────────────────────── */
.ad-block {
  margin: 2rem auto;
  max-width: 728px;
  width: 100%;
  text-align: center;
}
.ad-label {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}
.ad-slot {
  min-height: 90px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
/* In production: replace .ad-slot content with <ins class="adsbygoogle"> */

/* ─── BYLINE / CREDIT ────────────────────────────────────────── */
.byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.byline-dot {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background-image: url('assets/IMG_0214.JPEG');
  background-size: 380% auto;
  background-position: 55% 22%;
  filter: grayscale(100%) contrast(1.1);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.byline-name {
  font-weight: 500;
  color: var(--ink);
  display: block;
  font-size: 0.72rem;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.2rem;
  transition: color 0.2s;
}
.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { color: var(--ink); }

/* Navigation between steps */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.step-nav-back {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.step-nav-back::before { content: '← '; }
.step-nav-back:hover { color: var(--ink); }

/* ─── ENTRANCE ANIMATIONS ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.anim-rise {
  animation: fadeUp 0.7s var(--ease-smooth) backwards;
}

/* Stagger helpers — add data-delay="1" through "6" */
[data-delay="1"] { animation-delay: 0.10s; }
[data-delay="2"] { animation-delay: 0.25s; }
[data-delay="3"] { animation-delay: 0.40s; }
[data-delay="4"] { animation-delay: 0.55s; }
[data-delay="5"] { animation-delay: 0.70s; }
[data-delay="6"] { animation-delay: 0.85s; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Split screen stacks */
  .stage {
    grid-template-columns: 1fr;
    grid-template-rows: 38vh 1fr;
    height: 100vh;
  }
  .stage::before { display: none; }
  .opt-text { font-size: 1.25rem; }
  .option { padding: 1.15rem 0.25rem; }
}

@media (max-width: 600px) {
  .page { padding: 2.5rem 1.25rem 2rem; }
  .question { font-size: 1.75rem; }
  .result-verdict { font-size: 2rem; }
  .yesno { grid-template-columns: 1fr !important; }
  .step { grid-template-columns: 2.5rem 1fr; }
  .site-footer { flex-direction: column; gap: 0.75rem; text-align: center; }
  .footer-links a:first-child { margin-left: 0; }
  .step-nav { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn-primary,
  .btn-row .btn-secondary { text-align: center; }
  .input-currency input { font-size: 1.8rem; }
  .monto-display { font-size: 2rem !important; }
}

@media (min-width: 1400px) {
  .opt-text { font-size: 1.75rem; }
  .page { padding: 5rem 2rem 4rem; }
}
