/*
 * Estilos de las páginas públicas de Fausto: la portada, los legales y la ayuda. Toman los colores y las letras del
 * sistema (web/src/index.css) y siguen el modo claro u oscuro del dispositivo. Sin dependencias: las fuentes están en
 * fuentes/.
 *
 * Clases para reusar en cualquier página:
 *   .skip-link            "Saltar al contenido", primer elemento del body; apunta al <main id="contenido">.
 *   .site-header          encabezado. Adentro, .container.site-header-row con la marca y .site-nav.
 *   .brand, .brand-mark   la marca: el cuadrado verde y "Fausto" (el cuadrado va con aria-hidden).
 *   .site-nav             enlaces del encabezado; aria-current="page" marca la sección en la que se está.
 *   .container            ancho máximo con margen a los costados; .container-narrow, para texto largo.
 *   .page-header          cabecera de una página interior: h1.page-title, p.page-lead y p.page-meta.
 *   .prose                texto largo (legales, ayuda): títulos, párrafos, listas, tablas, código y citas.
 *   .table-scroll         envoltorio de una tabla ancha: se desplaza ella sola, no la página.
 *   .note                 recuadro de aclaración.
 *   .button               botón o enlace con forma de botón; .button-primary el principal; .button-large y
 *                         .button-block para el tamaño.
 *   .section              franja de la página; .section-alt con el fondo alternativo; .section-title y .section-lead.
 *   .faq                  preguntas con <details> y <summary>.
 *   .site-footer          pie. Adentro, .container.site-footer-row con .site-footer-links y .site-footer-withdrawal.
 *   .visually-hidden      texto sólo para lectores de pantalla.
 */

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fuentes/fraunces-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fuentes/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f6f3ec;
  --surface: #ffffff;
  --surface-alt: #efebe2;
  --ink: #1c2320;
  --muted: #5d6762;
  --line: #e2ddd1;
  --brand: #1f6f5c;
  --brand-strong: #17584a;
  --brand-soft: #e1efe9;
  --brand-text: #ffffff;
  --brand-ink: #1f6f5c;
  --heading: #1c2320;
  --side: #17241f;
  --side-text: #e9eee9;
  --side-muted: #9fb0a8;
  --accent: #b5532a;
  --accent-soft: #f8e7dd;
  --focus: #1f6f5c;
  --shadow: 0 1px 2px rgb(23 36 31 / 6%), 0 8px 24px rgb(23 36 31 / 8%);
  --radius: 12px;
  --font-display: "Fraunces Variable", Georgia, serif;
  --font-body: "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* la marca: el mismo cuadrado con el libro abierto que usa el sistema */
  --brand-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%231f6f5c'/%3E%3Cpath d='M18 16h10a4 4 0 0 1 4 4v28a4 4 0 0 0-4-4H18zM46 16H36a4 4 0 0 0-4 4v28a4 4 0 0 1 4-4h10z' fill='%23f6f1e7'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111614;
    --surface: #18201d;
    --surface-alt: #1f2925;
    --ink: #e9eeeb;
    --muted: #9eaaa4;
    --line: #2b3632;
    --brand: #4fb393;
    --brand-strong: #6cc9a9;
    --brand-soft: #1c3a30;
    --brand-text: #0b1512;
    --brand-ink: #4fb393;
    --heading: #e9eeeb;
    --side: #0c110f;
    --side-text: #e9eee9;
    --side-muted: #8a9a93;
    --accent: #f08a5d;
    --accent-soft: #3a2318;
    --focus: #6cc9a9;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand-ink);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-text);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Contenedor */

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.container-narrow {
  max-width: 48rem;
}

@media (min-width: 48rem) {
  .container {
    padding-inline: 2rem;
  }
}

/* La marca */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 7px;
  background: var(--brand) var(--brand-mark) center / cover;
}

/* Encabezado */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 3.75rem;
  padding-block: 0.5rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
}

.site-nav a:not(.button) {
  padding: 0.5rem 0.15rem;
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current="page"] {
  color: var(--brand-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-nav .button {
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
}

@media (min-width: 48rem) {
  .site-nav {
    gap: 0.25rem 1.6rem;
  }
}

/* Botones: un <a> o un <button> */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  background: transparent;
  color: var(--brand-ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.button:hover {
  background: var(--brand-soft);
}

.button-primary {
  background: var(--brand);
  color: var(--brand-text);
}

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

.button-large {
  min-height: 3.25rem;
  padding: 0.8rem 1.5rem;
  font-size: 1.0625rem;
}

.button-block {
  display: flex;
  width: 100%;
}

/* Franjas de la página */

.section {
  padding-block: 3rem;
}

.section-alt {
  background: var(--surface-alt);
}

.section-title {
  font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section-lead {
  max-width: 42rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.125rem;
}

@media (min-width: 48rem) {
  .section {
    padding-block: 5rem;
  }
}

/* Página interior: título y texto largo */

.page-header {
  padding-block: 2.5rem 0.5rem;
}

.page-title {
  font-size: clamp(2rem, 1.55rem + 2vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.page-lead {
  color: var(--muted);
  font-size: 1.125rem;
}

.page-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.prose {
  padding-bottom: 4rem;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.6rem;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 2rem 0 0.5rem;
}

.prose h4 {
  font-size: 1rem;
  font-weight: 650;
  margin: 1.5rem 0 0.4rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose li > ul,
.prose li > ol {
  margin: 0.4rem 0 0;
}

.prose strong {
  font-weight: 650;
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose table {
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 650;
  background: var(--surface-alt);
}

.table-scroll {
  max-width: 100%;
  margin: 0 0 1.25rem;
  overflow-x: auto;
}

.table-scroll table {
  margin: 0;
  min-width: 32rem;
}

.note {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

.note > :last-child {
  margin-bottom: 0;
}

/* Preguntas con <details> */

.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

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

.faq summary::after {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.2rem;
  border: solid var(--brand-ink);
  border-width: 0 2px 2px 0;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.15s;
}

.faq details[open] summary::after {
  transform: translateY(25%) rotate(-135deg);
}

.faq summary:focus-visible {
  outline-offset: -3px;
  border-radius: var(--radius);
}

.faq .faq-answer {
  padding: 0 1.25rem 1.1rem;
}

.faq .faq-answer > :last-child {
  margin-bottom: 0;
}

/* Pie */

.site-footer {
  padding-block: 2.5rem;
  background: var(--side);
  color: var(--side-text);
}

.site-footer a {
  color: var(--side-text);
}

.site-footer :focus-visible {
  outline-color: var(--side-text);
}

.site-footer .brand {
  color: var(--side-text);
  margin-bottom: 0.9rem;
}

.site-footer p {
  margin: 0 0 0.4rem;
  color: var(--side-muted);
}

.site-footer-row {
  display: grid;
  gap: 2rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.site-footer-links a {
  display: inline-block;
  padding-block: 0.25rem;
}

.site-footer-links a[aria-current="page"] {
  font-weight: 650;
  text-decoration-thickness: 2px;
}

/* El acceso a la baja tiene que estar a la vista desde la portada (Resolución 424/2020) */
.site-footer-withdrawal {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--side-text);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.site-footer-withdrawal:hover {
  background: color-mix(in srgb, var(--side-text) 12%, transparent);
}

@media (min-width: 48rem) {
  .site-footer-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .site-footer-nav {
    text-align: right;
  }

  .site-footer-links {
    justify-content: flex-end;
  }
}

/* Portada */

.hero {
  padding-block: 2.25rem 0.5rem;
  background: radial-gradient(60rem 32rem at 90% -10%, var(--brand-soft), transparent 70%);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  max-width: 14ch;
  font-size: clamp(2.35rem, 1.5rem + 4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.hero-lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-actions .button {
  flex: 1 1 12rem;
}

.hero-note {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-art {
  display: none;
}

@media (min-width: 40rem) {
  .hero-actions .button {
    flex: 0 0 auto;
  }
}

@media (min-width: 56rem) {
  .hero {
    padding-block: 4rem 2.5rem;
  }

  /* lo que sigue a la portada arranca cerca: el ticket ya deja aire abajo */
  .hero + .section {
    padding-top: 2.5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }

  .hero-art {
    display: grid;
    justify-items: center;
    position: relative;
  }
}

/* Un ticket de ejemplo, de adorno: el papel queda claro también en modo oscuro */
.ticket-paper {
  filter: drop-shadow(0 10px 24px rgb(23 36 31 / 16%)) drop-shadow(0 1px 2px rgb(23 36 31 / 10%));
  transform: rotate(2deg);
}

.ticket {
  --zigzag: 0.8rem;
  width: 20rem;
  padding: 1.5rem 1.4rem 2.5rem;
  background: #fffdf8;
  color: #1c2320;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zigzag) 100%;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zigzag) 100%;
}

.ticket p {
  margin: 0;
}

.ticket-shop {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  text-align: center;
}

.ticket-muted {
  color: #5d6762;
}

.ticket-center {
  text-align: center;
}

.ticket-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.9rem 0 0.6rem;
}

.ticket-letter {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid #1c2320;
  font-size: 1.2rem;
  font-weight: 700;
}

.ticket-lines {
  margin: 0.8rem 0;
  padding: 0.6rem 0;
  border-block: 1px dashed #b9b2a3;
  list-style: none;
}

.ticket-lines li,
.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.ticket-total {
  font-size: 0.95rem;
  font-weight: 700;
}

.ticket-cae {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.ticket-cae svg {
  flex: none;
  width: 4rem;
  height: 4rem;
}

.hero-art-stack {
  position: relative;
}

.hero-badge {
  position: absolute;
  right: -2.5rem;
  bottom: -0.9rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  transform: rotate(-2deg);
}

.hero-badge svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--brand-ink);
}

/* Qué resuelve */

.features {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.9rem;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.feature-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.feature h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.feature p {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0;
  color: var(--muted);
}

/* en el celular el ícono va al lado del título; con dos columnas o más, arriba */
@media (min-width: 40rem) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature {
    display: block;
    padding: 1.35rem 1.25rem 1.4rem;
  }

  .feature-icon {
    margin-bottom: 1rem;
  }

  .feature h3 {
    margin-bottom: 0.4rem;
  }

  .feature p {
    margin-top: 0;
  }
}

@media (min-width: 68rem) {
  .features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Cómo se empieza */

.steps {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 2px solid var(--line);
}

.step::before {
  content: counter(step);
  content: counter(step) / "";
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 500;
  line-height: 1;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

/* Precio */

.pricing-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.pricing-intro .section-lead {
  margin-bottom: 1rem;
}

.price-card {
  padding: 1.75rem 1.4rem;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.price-name {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.price-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin-bottom: 0.4rem;
}

.price-amount {
  color: var(--heading);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2.1rem + 2vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.price-period {
  color: var(--muted);
  font-size: 1.05rem;
}

.price-alt {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.price-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.price-trial {
  display: inline-block;
  margin: 0.25rem 0 1.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--heading);
  font-weight: 600;
}

.check-list {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1.75rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.8rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.3em;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--brand-ink);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

@media (min-width: 56rem) {
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
    gap: 4rem;
  }

  .price-card {
    padding: 2.25rem 2rem;
  }
}
