/* ═══════════════════════════════════════════════
   ScanInvoice Landing — Design Tokens
   ═══════════════════════════════════════════════ */

:root {
  --black: hsl(0, 0%, 15%);
  --grey: hsl(30, 10%, 96%);
  --light-grey: hsl(60, 2%, 92%);
  --dark-grey: hsl(0, 0%, 50%);
  --white: white;
  --purple: hsl(264, 100%, 64%);
  --purple-hover: hsl(264, 100%, 74%);
  --purple-tint: #f3f0ff;
  --green-teal: hsl(174, 59%, 56%);

  --text-color: var(--black);
  --mute-color: var(--dark-grey);

  --font-family: "Open Sans", sans-serif;
  --font-size-12: 12px;
  --font-size-14: 14px;
  --font-size-16: 16px;
  --font-size-18: 18px;
  --font-size-20: 20px;
  --font-size-24: 24px;
  --font-size-32: 32px;
  --font-size-40: 40px;
  --font-size-48: 48px;

  --space-10: 10px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-120: 120px;
  --padding-20: 20px;
  --pagewidth: 1248px;
}

/* ═══ Skip Link ═══ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 0 0 5px 5px;
  font-size: var(--font-size-14);
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* ═══ Reset ═══ */

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-16);
  line-height: 1.6;
  color: var(--text-color);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ═══ Layout ═══ */

.container {
  max-width: var(--pagewidth);
  margin: 0 auto;
  padding: 0 var(--padding-20);
}

/* ═══ Button ═══ */

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--purple);
  color: var(--white);
  font-size: var(--font-size-16);
  font-weight: 700;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: var(--purple-hover); text-decoration: none; }

.btn--small {
  padding: 8px 20px;
  font-size: var(--font-size-14);
}

/* ═══ Badge ═══ */

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: var(--font-size-12);
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-tint);
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 8px;
}

/* ═══ Placeholder ═══ */

.placeholder {
  background: var(--purple-tint);
  border: 2px dashed var(--purple);
  border-radius: 5px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: var(--font-size-14);
  font-weight: 600;
  width: 100%;
}

.hero__image {
  position: relative;
}

.hero__image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.features__image {
  position: relative;
}

.features__image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.features__bg:after {
  content: "";
  width: 500px;
  height: 500px;
  background-color: var(--purple);
  opacity: 0.2;
  display: block;
  border-radius: 100%;
  position: absolute;
  inset: 0 0 0 0;
  transform: translate(15%, -15%);
  z-index: -1;
}

.hero__bg:after {
  content: "";
  width: 500px;
  height: 500px;
  background-color: var(--purple);
  opacity: 0.2;
  display: block;
  border-radius: 100%;
  position: absolute;
  inset: 0 0 0 0;
  transform: translate(-15%, -15%);
  z-index: -1;
}

/* ═══ Nav ═══ */

.nav {
  border-bottom: 1px solid var(--light-grey);
  background: var(--white);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__brand {
  font-size: var(--font-size-20);
  font-weight: 700;
  color: var(--text-color);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav__link {
  font-size: var(--font-size-14);
  font-weight: 500;
  color: var(--mute-color);
}
.nav__link:hover { color: var(--text-color); text-decoration: none; }

/* ═══ Hero ═══ */

.hero {
  padding: var(--space-120) 0 var(--space-64);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-64);
  align-items: center;
}
.hero h1 {
  font-size: var(--font-size-48);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-color);
  margin-bottom: var(--space-20);
}
.hero h2 {
  font-size: var(--font-size-18);
  font-weight: 400;
  color: var(--mute-color);
  line-height: 1.5;
  margin-bottom: var(--space-32);
}
.hero__sub {
  margin-top: var(--space-10);
  font-size: var(--font-size-14);
  color: var(--mute-color);
}

/* ═══ Sections ═══ */

.section {
  padding: var(--space-120) 0;
}
.section--grey {
  background: var(--grey);
}
.section--cta {
  background: var(--purple-tint);
}
.section__title {
  font-size: var(--font-size-32);
  font-weight: 700;
  color: var(--text-color);
  text-align: center;
  margin-bottom: var(--space-48);
}
.section__text {
  font-size: var(--font-size-18);
  color: var(--mute-color);
  max-width: 560px;
  margin: 0 auto var(--space-32);
  line-height: 1.6;
}

/* ═══ Benefits ═══ */

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-32);
}
.benefit-card {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 5px;
  padding: var(--space-32);
}
.benefit-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--purple-tint);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-20);
}
.benefit-card h3 {
  font-size: var(--font-size-18);
  font-weight: 700;
  margin-bottom: var(--space-10);
}
.benefit-card p {
  font-size: var(--font-size-14);
  color: var(--mute-color);
  line-height: 1.6;
}

/* ═══ GEO paragraph ═══ */

.section--geo { padding: var(--space-48) 0; }
.geo-paragraph {
  max-width: 720px;
  margin: 0 auto;
  font-size: var(--font-size-16);
  color: var(--mute-color);
  line-height: 1.7;
  text-align: center;
}

/* ═══ Steps ═══ */

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-24);
}
.step {
  flex: 1;
  max-width: 320px;
  text-align: center;
}
.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: var(--font-size-18);
  font-weight: 700;
  margin-bottom: var(--space-20);
}
.step h3 {
  font-size: var(--font-size-18);
  font-weight: 700;
  margin-bottom: var(--space-10);
}
.step p {
  font-size: var(--font-size-14);
  color: var(--mute-color);
  line-height: 1.6;
}
.step__arrow {
  font-size: var(--font-size-24);
  color: var(--light-grey);
  padding-top: 8px;
  flex-shrink: 0;
}

/* ═══ Features ═══ */

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-64);
  align-items: center;
}
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--font-size-16);
  line-height: 1.5;
}
.check {
  color: var(--green-teal);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ═══ Beta CTA ═══ */

.cta__login {
  margin-top: var(--space-20);
  font-size: var(--font-size-14);
  color: var(--mute-color);
}
.cta__login a {
  font-weight: 600;
}

/* ═══ FAQ ═══ */

.faq {
  max-width: 720px;
  margin: 0 auto;
}
.faq__item {
  border-bottom: 1px solid var(--light-grey);
}
.faq__item summary {
  padding: var(--space-20) 0;
  font-size: var(--font-size-16);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq__item summary::after {
  content: "+";
  font-size: var(--font-size-20);
  color: var(--mute-color);
  font-weight: 400;
  transition: transform 0.2s;
}
.faq__item[open] summary::after {
  content: "-";
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item p {
  padding: 0 0 var(--space-20);
  font-size: var(--font-size-14);
  color: var(--mute-color);
  line-height: 1.6;
}

/* ═══ Footer ═══ */

.footer {
  border-top: 1px solid var(--light-grey);
  padding: var(--space-32) 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__brand {
  font-size: var(--font-size-14);
  font-weight: 700;
  color: var(--text-color);
}
.footer__links {
  display: flex;
  gap: 16px;
}
.footer__links a {
  font-size: var(--font-size-12);
  color: var(--mute-color);
}
.footer__links a:hover { color: var(--text-color); text-decoration: none; }
.footer__copy {
  font-size: var(--font-size-12);
  color: var(--mute-color);
}

/* ═══ Blog ═══ */

.blog-article {
  max-width: 896px;
  margin: 0 auto;
  padding: var(--space-64) var(--padding-20) var(--space-48);
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-14);
  color: var(--mute-color);
  margin-bottom: var(--space-32);
}
.blog-back:hover { color: var(--purple); text-decoration: none; }

.blog-article header { margin-bottom: var(--space-32); }

.blog-article h1 {
  font-size: var(--font-size-40);
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.2;
  margin-bottom: var(--space-20);
}

.blog-intro {
  font-size: var(--font-size-18);
  color: var(--mute-color);
  line-height: 1.7;
}

.blog-quick-summary {
  background: var(--purple-tint);
  border-left: 4px solid var(--purple);
  border-radius: 5px;
  padding: var(--space-20) var(--space-24);
  margin-bottom: var(--space-48);
  color: var(--text-color);
  line-height: 1.7;
}
.blog-quick-summary strong { color: var(--purple); }

.blog-article h2 {
  font-size: var(--font-size-24);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--space-24);
}

.blog-article h3 {
  font-size: var(--font-size-20);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 12px;
}

.blog-section { margin-bottom: var(--space-48); }

.blog-text {
  color: var(--mute-color);
  line-height: 1.7;
}
.blog-text p { margin-bottom: 1em; }
.blog-text p:last-child { margin-bottom: 0; }

.blog-meta {
  font-size: var(--font-size-14);
  color: var(--mute-color);
  margin-bottom: var(--space-20);
}

.blog-faq-item {
  background: var(--grey);
  border-radius: 5px;
  padding: var(--space-24);
  margin-bottom: var(--space-20);
}

.blog-resources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
}

.blog-resource-link {
  display: block;
  padding: var(--space-20);
  background: var(--purple-tint);
  border-radius: 5px;
  color: var(--purple);
  font-weight: 600;
  font-size: var(--font-size-14);
  transition: background 0.15s;
}
.blog-resource-link:hover { background: #e6dcff; text-decoration: none; }

.blog-cta {
  background: var(--purple-tint);
  border-radius: 5px;
  padding: var(--space-48) var(--space-32);
  text-align: center;
  margin-top: var(--space-48);
}
.blog-cta h2 { text-align: center; }
.blog-cta p {
  color: var(--mute-color);
  max-width: 480px;
  margin: 0 auto var(--space-24);
  font-size: var(--font-size-16);
}

/* Blog index */
.blog-hero {
  padding: var(--space-64) 0 var(--space-48);
  text-align: center;
}
.blog-hero h1 {
  font-size: var(--font-size-40);
  font-weight: 700;
  margin-bottom: var(--space-20);
}
.blog-hero p {
  font-size: var(--font-size-18);
  color: var(--mute-color);
  max-width: 560px;
  margin: 0 auto;
}

.blog-list {
  display: grid;
  gap: var(--space-24);
  padding-bottom: var(--space-64);
}

.blog-card {
  display: block;
  border: 1px solid var(--light-grey);
  border-radius: 5px;
  padding: var(--space-32);
  transition: box-shadow 0.15s;
  color: inherit;
}
.blog-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); text-decoration: none; }
.blog-card h2 {
  font-size: var(--font-size-18);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--space-10);
}
.blog-card p {
  font-size: var(--font-size-14);
  color: var(--mute-color);
  line-height: 1.6;
}
.blog-card-meta {
  font-size: var(--font-size-12);
  color: var(--mute-color);
  margin-top: 12px;
}

.caso-card-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

/* ── Casos de éxito — article ── */

.caso-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-20);
  background: var(--grey);
  border-radius: 8px;
  padding: var(--space-32);
  margin: var(--space-48) 0;
}
.caso-metric { text-align: center; }
.caso-metric__value {
  display: block;
  font-size: var(--font-size-40);
  font-weight: 700;
  color: var(--purple);
  line-height: 1.1;
}
.caso-metric__label {
  display: block;
  font-size: var(--font-size-14);
  color: var(--mute-color);
  line-height: 1.4;
  margin-top: 6px;
}

.caso-quote {
  border-left: 4px solid var(--purple);
  padding: var(--space-20) var(--space-24);
  background: var(--purple-tint);
  border-radius: 0 5px 5px 0;
  margin: var(--space-32) 0;
}
.caso-quote p { font-size: var(--font-size-18); font-style: italic; margin-bottom: 10px; }
.caso-quote cite { font-size: var(--font-size-14); color: var(--mute-color); font-style: normal; }

.caso-problem-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: var(--space-20);
}
.caso-problem-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--mute-color); line-height: 1.6; }
.caso-problem-list li::before { content: "→"; color: var(--purple); flex-shrink: 0; font-weight: 600; margin-top: 1px; }

.caso-card {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  padding: var(--space-24);
}
.caso-card__badge {
  display: inline-block;
  font-size: var(--font-size-12);
  font-weight: 600;
  color: var(--green-teal);
  background: #edfaf7;
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 12px;
}
.caso-card h3 { font-size: var(--font-size-16); font-weight: 700; margin-bottom: 8px; }
.caso-card p { font-size: var(--font-size-14); color: var(--mute-color); line-height: 1.6; }

.caso-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-24);
  font-size: var(--font-size-14);
}
.caso-table th {
  background: var(--grey);
  font-size: var(--font-size-12);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mute-color);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid var(--light-grey);
}
.caso-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--light-grey);
  color: var(--mute-color);
  line-height: 1.5;
  vertical-align: top;
}
.caso-table td:first-child { font-weight: 600; color: var(--text-color); white-space: nowrap; }
.caso-table tr:last-child td { border-bottom: none; }

.caso-learnings { display: flex; flex-direction: column; gap: var(--space-24); margin-top: var(--space-24); }
.caso-learning { display: flex; gap: var(--space-20); align-items: flex-start; }
.caso-learning__number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: var(--font-size-14);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.caso-learning__body h3 { font-size: var(--font-size-16); font-weight: 700; margin-bottom: 6px; }
.caso-learning__body p { font-size: var(--font-size-14); color: var(--mute-color); line-height: 1.6; }

.btn--outline {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  color: var(--purple);
  font-size: var(--font-size-16);
  font-weight: 700;
  border-radius: 5px;
  border: 2px solid var(--purple);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn--outline:hover { background: var(--purple-tint); text-decoration: none; }

.caso-author {
  margin-top: var(--space-48);
  padding-top: var(--space-32);
  border-top: 1px solid var(--light-grey);
  font-size: var(--font-size-14);
  color: var(--mute-color);
}

.blog-cta__buttons { display: flex; gap: var(--space-20); justify-content: center; flex-wrap: wrap; }

/* ═══ Responsive ═══ */

@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-48);
  }
  .hero { padding: var(--space-64) 0 var(--space-48); }
  .hero h1 { font-size: var(--font-size-32); }
  .hero h2 { font-size: var(--font-size-16); }

  .benefits { grid-template-columns: 1fr; }

  .steps { flex-direction: column; align-items: center; }
  .step__arrow { transform: rotate(90deg); }

  .features { grid-template-columns: 1fr; }

  .section { padding: var(--space-64) 0; }

  .blog-article h1 { font-size: var(--font-size-32); }
  .blog-hero h1 { font-size: var(--font-size-32); }
  .blog-resources { grid-template-columns: 1fr; }
  .blog-cta { padding: var(--space-32) var(--space-20); }
  .caso-metrics { grid-template-columns: repeat(2, 1fr); }
  .caso-table td:first-child { white-space: normal; }
}

/* ── Páginas legales (privacy / terms / cookies) ───────────────── */
.legal {
  max-width: 760px;
  padding-top: var(--space-48, 48px);
  padding-bottom: var(--space-48, 48px);
}
.legal__header { margin-bottom: 2rem; }
.legal__header h1 { font-size: 1.75rem; margin: 0 0 .5rem; }
.legal__updated { font-size: .8rem; color: #64748b; margin: 0 0 1rem; }
.legal__intro { color: #334155; line-height: 1.6; }
.legal__section { margin-bottom: 1.75rem; }
.legal__section h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.legal__section p { color: #334155; line-height: 1.6; margin: 0; }
