/* =============================================================
   GOODSHAPE — Centro de ayuda (landing.goodshapemx.com)
   1. Tokens
   ============================================================= */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f6f7fb;
  --color-bg-soft-2: #eef0f7;
  --color-border: #e6e8f0;
  --color-border-strong: #d8dbe8;

  --color-text: #171923;
  --color-text-secondary: #5b6072;
  --color-text-tertiary: #8b90a3;

  --color-accent: #4f46e5;
  --color-accent-dark: #4338ca;
  --color-accent-soft: #eef0ff;
  --color-red: #dc2626;
  --color-red-soft: #fef2f2;
  --color-green: #059669;

  --display: "Sora", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --container: 1160px;
  --shadow-sm: 0 1px 2px rgba(23, 25, 35, .06), 0 1px 1px rgba(23, 25, 35, .04);
  --shadow-md: 0 8px 24px -8px rgba(23, 25, 35, .14);
  --shadow-lg: 0 20px 48px -12px rgba(23, 25, 35, .18);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.16; font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
ul, ol { list-style: none; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--color-bg-soft-2);
  border: 1px solid var(--color-border-strong);
  padding: 0.1em 0.5em;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--color-accent-dark);
}
mark {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  border-radius: 3px;
  padding: 0 .1em;
}
::selection { background: var(--color-accent-soft); color: var(--color-accent-dark); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.wrap { max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--color-accent); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.link-accent { color: var(--color-accent); font-weight: 600; border-bottom: 1px solid rgba(79,70,229,.35); }
.link-accent:hover { border-bottom-color: var(--color-accent); }

.role-tag {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-soft);
}

/* =============================================================
   4. Reveal-on-scroll
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; } /* defensive: never hide split headline */

/* =============================================================
   5. Header / Nav
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--color-border); box-shadow: var(--shadow-sm); }
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: rgba(255,255,255,.98); }
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.85rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand__mark { width: 32px; height: 32px; border-radius: 8px; }
.brand__name {
  font-family: var(--display); letter-spacing: -0.01em;
  font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: .5rem;
}
.brand__tag {
  font-family: var(--sans); font-weight: 600; font-size: 0.72rem;
  color: var(--color-accent); background: var(--color-accent-soft);
  padding: .18rem .55rem; border-radius: 999px; letter-spacing: 0;
}
.nav { display: none; align-items: center; gap: 1.75rem; }
.nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--color-text-secondary);
  transition: color .25s var(--ease-out);
}
.nav a:hover { color: var(--color-text); }
.header-cta { display: none; align-items: center; gap: 0.75rem; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; }
body.js-nav-ready .nav-toggle { display: flex; }

/* No-JS fallback: mobile-nav is a plain static block right under the header. */
.mobile-nav {
  padding: 0.25rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.mobile-nav a {
  display: block; padding: 0.9rem 0; font-size: 1rem; font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.mobile-nav .header-cta { display: flex; flex-direction: column; margin-top: 1.25rem; gap: 0.75rem; }
.mobile-nav .header-cta .btn { width: 100%; text-align: center; }

/* JS-enhanced: mobile-nav becomes a collapsible fixed overlay */
body.js-nav-ready .mobile-nav {
  display: none;
  position: fixed; inset: 0; top: 64px; z-index: 90;
  background: var(--color-bg);
  padding: 2rem 1.5rem;
  overflow-y: auto;
  border-bottom: none;
}
body.js-nav-ready .mobile-nav.is-open { display: block; }

/* =============================================================
   6. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s var(--ease-out), border-color .25s var(--ease-out);
  white-space: nowrap;
}
.btn-lg { padding: 0.9rem 1.8rem; font-size: 0.98rem; }
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79,70,229,.55);
}
.btn-accent:hover { background: var(--color-accent-dark); transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(79,70,229,.6); }
.btn-outline {
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-ghost { color: var(--color-text-secondary); padding-inline: 0.9rem; }
.btn-ghost:hover { color: var(--color-text); }

/* =============================================================
   7. Hero + Buscador
   ============================================================= */
.hero { position: relative; padding-block: 3.5rem 2.5rem; text-align: center; background: var(--color-bg-soft); border-bottom: 1px solid var(--color-border); }
.hero__inner { max-width: 720px; margin-inline: auto; }
.hero__title {
  font-size: clamp(2rem, 5.6vw, 3.2rem);
  line-height: 1.12;
}
.hero__title--accent { color: var(--color-accent); }
.hero__lead {
  margin-top: 1rem;
  font-size: 1.06rem;
  color: var(--color-text-secondary);
  max-width: 46ch;
  margin-inline: auto;
}

.search-box {
  margin-top: 2rem;
  position: relative;
  display: flex; align-items: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding-inline: 1rem;
  transition: box-shadow .25s var(--ease-out), border-color .25s var(--ease-out);
}
.search-box:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.search-box__icon { width: 20px; height: 20px; flex: none; color: var(--color-text-tertiary); }
.search-box__input {
  flex: 1; border: 0; background: none; outline: none;
  padding: 1rem 0.75rem; font-size: 1rem; font-family: var(--sans); color: var(--color-text);
}
.search-box__input::placeholder { color: var(--color-text-tertiary); }
.search-box__clear {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--color-text-tertiary); background: var(--color-bg-soft-2);
}
.search-box__clear:hover { color: var(--color-text); }

.chip-row {
  margin-top: 1.25rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
}
.chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  font-size: 0.86rem; font-weight: 600; color: var(--color-text-secondary);
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out), background .2s var(--ease-out);
}
.chip:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }

.search-status {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--color-text-tertiary);
}

/* =============================================================
   8. Content shell: sidebar TOC + main content
   ============================================================= */
.content-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: 3rem 4rem;
  align-items: start;
}
.toc { display: none; }
.toc__label {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1.2px;
  font-size: 0.72rem; font-weight: 700; color: var(--color-text-tertiary);
  margin-bottom: 0.9rem;
}
.toc nav { display: flex; flex-direction: column; gap: 0.15rem; }
.toc nav a {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem; font-weight: 500; color: var(--color-text-secondary);
  border-left: 2px solid transparent;
  transition: color .2s var(--ease-out), background .2s var(--ease-out), border-color .2s var(--ease-out);
}
.toc nav a:hover { color: var(--color-text); background: var(--color-bg-soft); }
.toc nav a.is-active { color: var(--color-accent); background: var(--color-accent-soft); border-left-color: var(--color-accent); font-weight: 600; }
.toc__callout {
  margin-top: 1.75rem; padding: 1.1rem;
  border: 1px solid var(--color-border); border-radius: 12px;
  background: var(--color-bg-soft);
}
.toc__callout p { font-size: 0.88rem; color: var(--color-text-secondary); margin-bottom: 0.4rem; }
.toc__callout .link-accent { font-size: 0.9rem; }

.content { min-width: 0; display: flex; flex-direction: column; gap: 4rem; }

/* =============================================================
   9. Block heads
   ============================================================= */
.block__head { max-width: 62ch; }
.block__head h2 { font-size: clamp(1.6rem, 4vw, 2.15rem); margin-top: 0.1rem; }
.block__lead { margin-top: 0.75rem; color: var(--color-text-secondary); font-size: 1.02rem; }

/* =============================================================
   10. Checklist
   ============================================================= */
.checklist { margin-top: 2rem; }
.checklist__progress {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.checklist__bar {
  flex: 1 1 180px; height: 8px; border-radius: 999px; background: var(--color-bg-soft-2);
  overflow: hidden; min-width: 120px;
}
.checklist__fill {
  height: 100%; width: 0%; background: var(--color-accent);
  border-radius: 999px; transition: width .4s var(--ease-out);
}
.checklist__progress span {
  font-size: 0.86rem; font-weight: 600; color: var(--color-text-secondary); white-space: nowrap;
}
.checklist__reset {
  font-size: 0.82rem; font-weight: 600; color: var(--color-text-tertiary);
  border: 1px solid var(--color-border); border-radius: 8px; padding: 0.35rem 0.7rem;
  margin-left: auto;
}
.checklist__reset:hover { color: var(--color-text); border-color: var(--color-border-strong); }

.checklist__list { display: grid; gap: 0.85rem; }
.check-item {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem;
  padding: 1.25rem; border: 1px solid var(--color-border); border-radius: 14px;
  background: var(--color-bg);
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.check-item:hover { border-color: var(--color-border-strong); }
.check-item__box {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  border: 2px solid var(--color-border-strong);
  position: relative; margin-top: 0.1rem;
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out);
}
.check-item__box::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background:
    linear-gradient(45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%),
    linear-gradient(-45deg, transparent 60%, #fff 60%, #fff 76%, transparent 76%);
  transition: opacity .15s var(--ease-out);
}
.check-item.is-done .check-item__box { background: var(--color-accent); border-color: var(--color-accent); }
.check-item.is-done .check-item__box::after { opacity: 1; }
.check-item__body h3 { font-size: 1.06rem; margin-bottom: 0.35rem; }
.check-item__body p { color: var(--color-text-secondary); font-size: 0.96rem; }
.check-item.is-done .check-item__body h3 { color: var(--color-text-tertiary); text-decoration: line-through; text-decoration-color: var(--color-border-strong); }
.check-item.is-done .check-item__body p { color: var(--color-text-tertiary); }

.callout {
  margin-top: 1.75rem;
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.1rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-accent-soft);
}
.callout__icon {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 0.8rem;
}
.callout p { color: var(--color-text-secondary); font-size: 0.94rem; }
.callout strong { color: var(--color-text); }

/* =============================================================
   11. Cards (errores / faq) shared
   ============================================================= */
.card-list { margin-top: 1.75rem; display: grid; gap: 0.75rem; }
.card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-bg);
  overflow: hidden;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), opacity .2s var(--ease-out);
}
.card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
.card[open] { border-color: var(--color-accent); }
.card.is-hidden { display: none; }
.card.is-flash { animation: flashPulse 1.1s var(--ease-out); }
@keyframes flashPulse {
  0% { box-shadow: 0 0 0 0 rgba(79,70,229,.4); }
  100% { box-shadow: 0 0 0 14px rgba(79,70,229,0); }
}
.card summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.card summary::-webkit-details-marker { display: none; }
.card-title { font-weight: 600; font-size: 0.98rem; }
.error-card .card-title { color: var(--color-red); }
.faq-card .card-title { color: var(--color-text); }
.chevron {
  flex: none; width: 20px; height: 20px; position: relative;
  transition: transform .25s var(--ease-out);
}
.chevron::before, .chevron::after {
  content: ""; position: absolute; background: var(--color-text-tertiary);
  width: 10px; height: 2px; top: 50%; border-radius: 2px;
}
.chevron::before { left: 0; transform: rotate(45deg); transform-origin: right center; }
.chevron::after { right: 0; transform: rotate(-45deg); transform-origin: left center; }
details[open] .chevron { transform: rotate(180deg); }
.card-body p {
  padding: 0 1.3rem 1.3rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}
.card-body code { color: var(--color-accent-dark); }

.empty-state {
  margin-top: 1.5rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-tertiary);
  border: 1px dashed var(--color-border-strong);
  border-radius: 14px;
  font-size: 0.94rem;
}

/* FAQ tabs */
.faq-tabs { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.faq-tab {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.85rem; font-weight: 600; color: var(--color-text-secondary);
  transition: all .2s var(--ease-out);
}
.faq-tab:hover { border-color: var(--color-border-strong); }
.faq-tab.is-active { background: var(--color-text); color: #fff; border-color: var(--color-text); }

/* =============================================================
   12. CTA final
   ============================================================= */
.cta-final {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--color-accent-soft), var(--color-bg-soft));
  border: 1px solid var(--color-border);
}
.cta-final h2 { font-size: clamp(1.5rem, 4vw, 2rem); max-width: 20ch; margin-inline: auto; }
.cta-final p { margin-top: 0.85rem; color: var(--color-text-secondary); }
.cta-final__actions { margin-top: 1.75rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.9rem; }

/* =============================================================
   13. Footer
   ============================================================= */
.footer { border-top: 1px solid var(--color-border); padding-block: 2.5rem; background: var(--color-bg-soft); }
.footer__inner { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.footer__brand { display: flex; align-items: center; gap: 0.6rem; }
.footer__brand img { width: 26px; height: 26px; border-radius: 6px; }
.footer__brand span { font-family: var(--display); font-weight: 700; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.footer__links a { color: var(--color-text-secondary); font-size: 0.9rem; }
.footer__links a:hover { color: var(--color-accent); }
.footer__note { color: var(--color-text-tertiary); font-size: 0.85rem; }

/* =============================================================
   14. Responsive
   ============================================================= */
@media (min-width: 640px) {
  .checklist__progress { flex-wrap: nowrap; }
}
@media (min-width: 720px) {
  .card-list { gap: 0.85rem; }
}
@media (min-width: 900px) {
  .content-shell { grid-template-columns: 220px 1fr; gap: 3rem; }
  .toc { display: block; position: sticky; top: 5.5rem; align-self: start; }
}
@media (min-width: 960px) {
  .nav { display: flex; }
  .header-cta { display: flex; }
  .nav-toggle { display: none !important; }
  .mobile-nav { display: none !important; }
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .hero { padding-block: 4.5rem 3rem; }
}
@media (min-width: 1280px) {
  .content-shell { grid-template-columns: 240px 1fr; }
}

/* =============================================================
   15. Reduced motion (intrusive effects only)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eyebrow::before { box-shadow: none; }
}
