/* Recurrente Help Center — brand tokens from recurrente-mktg (globals.css). */

/* Vendored Inter variable font (latin subset): the Vercel CSP only allows
   font-src 'self', so Google Fonts would be blocked in production. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.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 {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --primary-light: #8B7EF0;
  --primary-50: #F3F1FE;
  --primary-100: #E8E5FD;
  --primary-200: #D1CCFB;
  --primary-900: #2D2460;
  --surface: #FAFBFF;
  --surface-alt: #F0F2FF;
  --text: #0A1628;
  --text-secondary: #4A5568;
  --text-tertiary: #64748B;
  --border: #E2E8F0;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-lift: 0 20px 40px rgba(108, 92, 231, 0.10), 0 8px 16px rgba(0, 0, 0, 0.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--primary-100);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

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

/* Purple gradient wash behind header + hero, adapted from the homepage
   gradient-mesh. Fades to white so content sits on a clean background. */
.page-wash {
  position: absolute;
  inset: 0 0 auto 0;
  height: 480px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(108, 92, 231, 0.14), transparent),
    radial-gradient(ellipse 50% 40% at 85% 10%, rgba(139, 126, 240, 0.10), transparent),
    radial-gradient(ellipse 45% 45% at 10% 25%, rgba(99, 179, 237, 0.08), transparent);
}

.shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  flex: 1;
  position: relative;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.site-header .container {
  max-width: 1120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}

.brand__mark {
  height: 24px;
  width: auto;
  display: block;
}

.brand__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.brand__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-link:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.32);
}

.app-link svg {
  width: 13px;
  height: 13px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 40px;
}

.hero__greeting {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--primary);
}

.hero__title {
  margin: 2px 0 0;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

/* ---------- Search ---------- */

.search {
  position: relative;
}

.search--hero {
  margin-top: 28px;
}

.search--header {
  flex: 1;
  max-width: 420px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  box-shadow: 0 6px 24px rgba(10, 22, 40, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100), 0 6px 24px rgba(10, 22, 40, 0.06);
}

.search__icon {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  padding: 16px 0;
  min-width: 0;
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

.search-box input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-box--header {
  border-radius: 10px;
  padding: 0 12px;
  gap: 8px;
  box-shadow: none;
  background: var(--surface);
}

.search-box--header input {
  font-size: 14px;
  padding: 9px 0;
}

.search-box--header .search__icon {
  width: 15px;
  height: 15px;
}

.search__kbd {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  background: var(--surface);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(10, 22, 40, 0.12), 0 8px 16px rgba(10, 22, 40, 0.06);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}

.search-results[hidden] {
  display: none;
}

.search-result {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-alt);
  color: var(--text);
  cursor: pointer;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result span {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.search-result small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.search-result mark {
  background: var(--primary-100);
  color: var(--primary-dark);
  border-radius: 3px;
  padding: 0 1px;
}

.search-result[aria-selected="true"],
.search-result:hover {
  background: var(--surface);
}

.search-result[aria-selected="true"] span {
  color: var(--primary);
}

.search-empty {
  padding: 20px 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.search-hint {
  margin: 0;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-tertiary);
}

.search-empty p {
  margin: 0 0 6px;
}

.search-empty a {
  font-weight: 600;
}

/* ---------- Home topic sections (Luma-style) ---------- */

.topics {
  padding: 8px 0 72px;
}

.topic-section {
  margin-top: 44px;
}

.topic-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.topic-section__header h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.topic-section__header p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.topic-section__header > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding-bottom: 2px;
}

.topic-section__header > a:hover {
  color: var(--primary-dark);
}

.topic-section__header > a svg {
  width: 14px;
  height: 14px;
}

.article-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.article-list--home {
  grid-template-columns: 1fr 1fr;
}

.article-link {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s ease;
}

.article-link:hover {
  transform: translateY(-3px);
  border-color: var(--primary-200);
  box-shadow: var(--shadow-lift);
}

.article-link span {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.article-link small {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Breadcrumbs, topic pages ---------- */

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 40px;
  font-size: 13.5px;
  color: var(--text-tertiary);
}

.breadcrumbs a {
  color: var(--text-secondary);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs .separator {
  opacity: 0.6;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.page-heading {
  padding: 20px 0 8px;
}

.page-heading h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-heading p {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--text-secondary);
}

.page-heading + .article-list,
.developer-callout + .article-list {
  margin-top: 20px;
}

main > .container > .article-list:last-child,
main > .container > section.article-list {
  padding-bottom: 72px;
}

.developer-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 20px;
  padding: 14px 20px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
}

.developer-callout strong {
  color: var(--text);
}

.developer-callout a {
  font-weight: 600;
}

/* ---------- Article page ---------- */

.article {
  padding: 40px 0 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-100);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip:hover {
  background: var(--primary-200);
  color: var(--primary-900);
}

.article__header h1 {
  margin: 14px 0 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.article__summary {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.article__updated {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

.article__header::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 28px;
  background: linear-gradient(to right, var(--border), transparent);
}

.article__body {
  margin-top: 28px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text);
}

.article__body h2 {
  margin: 40px 0 12px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article__body h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.article__body h4,
.article__body h5,
.article__body h6 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.article__body p {
  margin: 0 0 16px;
}

.article__body a {
  font-weight: 500;
  border-bottom: 1px solid var(--primary-200);
}

.article__body a:hover {
  border-bottom-color: var(--primary);
}

.article__body ul,
.article__body ol {
  margin: 0 0 16px;
  padding-left: 26px;
}

.article__body li {
  margin-bottom: 6px;
}

.article__body img {
  display: block;
  margin: 24px auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.06);
  /* Portrait phone screenshots would otherwise dominate the reading flow. */
  max-height: 480px;
  width: auto;
}

.article__body figure {
  margin: 24px 0;
}

.article__body figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

.article__body blockquote {
  margin: 20px 0;
  padding: 12px 20px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  color: var(--text-secondary);
}

.article__body blockquote p:last-child {
  margin-bottom: 0;
}

.article__body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--primary-900);
}

.article__body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 0 0 16px;
}

.article__body pre code {
  background: transparent;
  padding: 0;
}

.article__body table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14.5px;
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.article__body th,
.article__body td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

/* Intercom exports header rows as plain <td>s without <thead>. */
.article__body thead th,
.article__body table tr:first-child td {
  background: var(--surface-alt);
  font-weight: 600;
}

.article__body tbody tr:last-child td {
  border-bottom: 0;
}

.article__body .intercom-align-center {
  text-align: center;
}

.article__body .intercom-align-right {
  text-align: right;
}

.article__body .no-margin {
  margin: 0;
}

.article__body hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ---------- Related articles ---------- */

.related-articles {
  padding: 8px 0 64px;
}

.related-articles h2 {
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Not-found page ---------- */

.not-found {
  padding: 72px 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer .container {
  max-width: 1120px;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.footer-cta p {
  margin: 0;
}

.footer-cta__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.footer-cta__hint {
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-cta__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-primary,
.button-secondary,
.button-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  border-color: var(--text-tertiary);
  color: var(--text);
}

/* WhatsApp brand green; dark text keeps the label AA-readable on it. */
.button-whatsapp {
  background: #25D366;
  color: #063826;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.button-whatsapp:hover {
  background: #1EC15A;
}

.button-whatsapp svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 32px;
  font-size: 13.5px;
  color: var(--text-tertiary);
}

.footer-meta__links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-meta__links img {
  height: 18px;
  display: block;
  opacity: 0.9;
}

.footer-meta__links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-meta__links a:hover {
  color: var(--primary);
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .article-list--home {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .hero__greeting {
    font-size: 27px;
  }

  .hero__title {
    font-size: 29px;
  }

  .brand__name,
  .brand__label,
  .brand__divider,
  .search__kbd {
    display: none;
  }

  .article__header h1,
  .page-heading h1 {
    font-size: 27px;
  }

  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-link,
  .button-primary,
  .button-secondary,
  .button-whatsapp {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .topic-section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Novedades ---------- */
.changelog {
  display: grid;
  gap: 20px;
  padding: 24px 0 8px;
}

.changelog-entry {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.changelog-entry--full {
  display: block;
  padding: 0;
  overflow: hidden;
}

.changelog-entry__hero {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  background: var(--primary-50);
}

.changelog-entry--full .changelog-entry__hero {
  border-radius: 0;
}

.changelog-entry__hero img {
  display: block;
  width: 100%;
  height: auto;
}

.changelog-entry--full .changelog-entry__body {
  padding: 28px;
}

.changelog-entry__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.chip--quiet {
  background: var(--surface-alt);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 3px 10px;
}

.changelog-entry h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.changelog-entry--full h1 {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.changelog-entry h2 a {
  color: var(--text);
  text-decoration: none;
}

.changelog-entry h2 a:hover {
  color: var(--primary-dark);
}

.changelog-entry p {
  margin: 0 0 10px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.changelog-entry p:last-child {
  margin-bottom: 0;
}

.changelog-entry__help {
  margin-top: 18px;
  font-weight: 600;
}

.changelog-back {
  padding: 20px 0 8px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .changelog-entry {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .changelog-entry--full .changelog-entry__body {
    padding: 20px;
  }

  .changelog-entry--full h1 {
    font-size: 24px;
  }
}
