/* ==========================================================================
   Notebook PDF — Hoja de estilos editorial «Colina»
   100 % local, sin dependencias externas.
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Paleta maestra «Colina» (coincidente con src/styles.css) */
  --paper: #FAF9F6;
  --bg: #FFFFFF;
  --ink: #111827;
  --soft: #5B6472;
  --line: #E4E7EC;
  --line-soft: #EEF0F3;
  --side: #F8F9FB;
  --brand: #2A8244;
  --brand-hover: #236D39;
  --brand-text: #2A8244;
  --mark: #8FD14F;
  --mark-soft: #CDEAB0;

  /* Superficie oscura contrastada para la sección de privacidad */
  --dark-bg: #121417;
  --dark-surface: #181B20;
  --dark-ink: #F1F5F9;
  --dark-soft: #9CA3AF;
  --dark-line: #2A303A;
  --dark-brand: #4EAD68;
  --dark-brand-text: #7AD394;

  /* Tipografía y ritmo */
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --container-max: 1080px;
  --shadow-subtle: 0 1px 2px rgba(17, 24, 39, 0.04), 0 12px 32px -12px rgba(17, 24, 39, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

kbd {
  display: inline-block;
  padding: 0.1em 0.42em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 1px 0 var(--line);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background-color: var(--line-soft);
  border-radius: 4px;
}

/* Enlace accesible para saltar al contenido */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background-color: var(--brand);
  color: var(--bg);
  font-weight: 500;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* Trazo de subrayador editorial «Colina» */
.highlight-stroke {
  display: inline;
  background: linear-gradient(
    180deg,
    transparent 52%,
    var(--mark-soft) 52%,
    var(--mark-soft) 92%,
    transparent 92%
  );
  padding-inline: 0.12em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ==========================================================================
   Barra superior sticky
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand-link {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--soft);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
}

/* Botones */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background-color: var(--brand);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.72rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--brand);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary-sm {
  font-size: 0.88rem;
  padding: 0.56rem 0.95rem;
}

.btn-primary-lg {
  font-size: 1rem;
  padding: 0.88rem 1.55rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background-color: transparent;
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.44rem 0.78rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand-text);
  background-color: var(--bg);
}

.btn-secondary:active {
  transform: translateY(1px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 1.85rem 0 3rem;
}

.hero-header {
  max-width: 44rem;
  margin: 0 auto 1.65rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--soft);
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.45rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}

.hero-subtitle {
  margin: 0 auto 1.4rem;
  max-width: 37rem;
  font-size: clamp(1.02rem, 1.8vw, 1.14rem);
  line-height: 1.62;
  color: var(--soft);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.hero-micro {
  margin: 0;
  font-size: 0.84rem;
  color: var(--soft);
}

.hero-shot {
  width: 100%;
  margin: 0;
  padding-top: 0.35rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.hero-shot img {
  width: 114%;
  max-width: none;
  margin-left: -14%;
  display: block;
}

/* ==========================================================================
   Secciones comunes
   ========================================================================== */

.section {
  padding: 4.75rem 0;
  border-top: 1px solid var(--line);
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 3rem;
}

.section-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-text);
}

.section-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--soft);
}

/* ==========================================================================
   Sección #funciones
   ========================================================================== */

.features-stack {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 2.5rem;
}

.feature-row--reverse .feature-copy {
  order: 2;
}

.feature-row--reverse .feature-media {
  order: 1;
}

.feature-row--mobile {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.feature-row--stacked {
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.feature-row--stacked .feature-copy {
  max-width: 640px;
}

.feature-row--stacked .feature-media,
.feature-row--stacked .media-frame {
  width: 100%;
  padding: 0;
}

/* Bloques editoriales 03 (Estudio conectado) y 04 (Exporta y guarda copias) */
.feature-editorial {
  border-top: 1px solid var(--line);
  padding-top: 3.25rem;
}

.feature-export {
  border-bottom: 1px solid var(--line);
  padding-bottom: 3.25rem;
}

.editorial-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 2.5rem;
}

/* Control deslizante de niveles de subrayado */
.levels-demo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.levels-control-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.levels-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft);
}

.levels-count {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-text);
}

.levels-slider {
  width: 100%;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.levels-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-soft);
}

.level-item {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.level-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.level-sample {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--soft);
}

.level-mark {
  background-color: transparent;
  color: var(--ink);
  padding: 0.06em 0.2em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.level-mark--1 {
  background-color: #FBC4BC;
}

.level-mark--2 {
  background-color: #FDE68A;
}

.level-mark--3 {
  background-color: #C3E3C8;
}

.level-mark--4 {
  background-color: #BFE3FA;
}

.level-mark--5 {
  background-color: #DECFFA;
}

.level-mark--6 {
  background-color: #FAD0AE;
}

.level-mark--7 {
  background-color: #B7EAE4;
}

.level-mark--8 {
  background-color: #DCE0E5;
}

/* Pilares inferiores de Estudio conectado */
.study-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.pillar-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}

.pillar-text {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--soft);
}

/* Lista editorial tabular de exportación y copias */
.export-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.export-row {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1.15rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.export-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--brand-text);
}

.export-detail {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.export-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
}

.export-desc {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--soft);
}

.feature-number {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--brand-text);
}

.feature-heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.feature-text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--soft);
}

.media-frame {
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.media-frame img {
  width: 100%;
  display: block;
}

/* Marco móvil elegante */
.mobile-stage {
  display: flex;
  justify-content: center;
}

.mobile-frame {
  width: 100%;
  max-width: 310px;
  padding: 0.6rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-subtle);
}

.mobile-frame img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
}

/* ==========================================================================
   Sección #privacidad (bloque oscuro contrastado)
   ========================================================================== */

.section-privacy {
  background-color: var(--dark-bg);
  color: var(--dark-ink);
  border-top: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
}

.section-privacy .section-eyebrow {
  color: var(--dark-brand-text);
}

.section-privacy .section-title {
  color: var(--dark-ink);
}

.section-privacy .section-lead {
  color: var(--dark-soft);
}

.comparison-card {
  background-color: var(--dark-surface);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.96rem;
}

.comparison-table th,
.comparison-table td {
  padding: 1.05rem 1.35rem;
  border-bottom: 1px solid var(--dark-line);
  vertical-align: top;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table thead th {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--dark-soft);
  background-color: rgba(255, 255, 255, 0.02);
}

.comparison-table thead th.col-local {
  color: var(--dark-brand-text);
}

.comparison-table tbody th {
  font-weight: 500;
  color: var(--dark-ink);
  width: 24%;
}

.comparison-table td.col-local {
  color: var(--dark-ink);
  font-weight: 500;
}

.comparison-table td.col-cloud {
  color: var(--dark-soft);
}

/* ==========================================================================
   Sección #preguntas (FAQ con <details> / <summary>)
   ========================================================================== */

.faq-list {
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 1.35rem;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: #CBD2DC;
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  color: var(--soft);
  transition: transform 0.15s ease;
}

.faq-item[open] .faq-summary::after {
  content: "−";
  color: var(--brand-text);
}

.faq-answer {
  margin: 0;
  padding: 0 0 1.25rem;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--soft);
}

/* ==========================================================================
   CTA final y pie de página
   ========================================================================== */

.section-cta {
  text-align: center;
  background-color: var(--bg);
}

.cta-box {
  max-width: 36rem;
  margin: 0 auto;
}

.cta-box .section-title {
  margin-bottom: 0.7rem;
}

.cta-box .section-lead {
  margin-bottom: 1.85rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background-color: var(--paper);
  padding: 2.5rem 0;
  font-size: 0.88rem;
  color: var(--soft);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
}

.footer-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
}

.footer-signature {
  display: inline-block;
  height: 28px;
  width: auto;
  vertical-align: middle;
  margin-left: 5px;
  transform: translateY(-3px);
  mix-blend-mode: multiply;
}

.footer-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.footer-link:hover {
  color: var(--brand-text);
  text-decoration-color: var(--brand-text);
}

/* ==========================================================================
   Página legal (privacy.html)
   ========================================================================== */

.legal-page {
  padding: 3rem 0 4.5rem;
}

.legal-card {
  max-width: 740px;
  margin: 0 auto;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-subtle);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--brand-text);
}

.legal-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-card h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.legal-meta {
  margin: 0 0 1.85rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--soft);
}

.legal-card h2 {
  margin: 1.85rem 0 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

.legal-card p,
.legal-card ul {
  margin: 0.5rem 0 1rem;
  color: var(--soft);
}

.legal-card ul {
  padding-left: 1.25rem;
}

.legal-card li {
  margin-bottom: 0.4rem;
}

.legal-card a:not(.legal-back) {
  color: var(--brand-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Diseño responsive
   ========================================================================== */

@media (max-width: 860px) {
  .feature-row,
  .feature-row--mobile,
  .editorial-split,
  .study-pillars {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .feature-row--reverse .feature-copy,
  .feature-row--reverse .feature-media {
    order: initial;
  }
}

@media (max-width: 680px) {
  .container {
    padding-inline: 1.15rem;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 1.75rem 0 2.5rem;
  }

  .hero-break {
    display: none;
  }

  .level-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .feature-editorial {
    padding-top: 2.5rem;
  }

  .feature-export {
    padding-bottom: 2.5rem;
  }

  .legal-card {
    padding: 1.5rem;
  }

  /* Tabla comparativa adaptada a fichas legibles en móvil sin cortes */
  .comparison-table thead {
    display: none;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table tr {
    padding: 1.1rem 1.15rem;
    border-bottom: 1px solid var(--dark-line);
  }

  .comparison-table tbody tr:last-child {
    border-bottom: none;
  }

  .comparison-table tbody th,
  .comparison-table tbody td {
    padding: 0;
    border: none;
  }

  .comparison-table tbody th {
    width: 100%;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dark-soft);
    margin-bottom: 0.55rem;
  }

  .comparison-table tbody td {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.55rem;
  }

  .comparison-table tbody td:last-child {
    margin-bottom: 0;
  }

  .comparison-table tbody td::before {
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--dark-soft);
  }

  .comparison-table tbody td.col-local::before {
    color: var(--dark-brand-text);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
