/* =========================================================================
   Edición web — base compartida para las webs de ejemplo
   100% local, sin dependencias externas. Cada página de ejemplo enlaza
   este archivo y luego define sus propios colores (tema) por encima.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
/* La barra de cambio de ejemplo + el navbar del sitio quedan fijos encima
   del contenido: sin este hueco, saltar a una sección con el menú o con un
   enlace #ancla la dejaría tapada detrás de esas barras. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--switcher-h) + var(--site-nav-h) + 1rem); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* -------------------------------------------------------------------------
   Tokens por defecto — cada tema los sobrescribe
   ------------------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f4f5f7;
  --surface-dark: #14151c;
  --border: #e4e6eb;
  --text: #1a1b20;
  --text-body: #4a4d57;
  --text-muted: #7c8091;
  --text-on-dark: #f3f4f8;
  --text-on-dark-muted: #a6a9ba;

  --accent: #6d5bff;
  --accent-strong: #4c3adb;
  --accent-soft-bg: #efecff;
  --on-accent: #ffffff;

  --font-display: "Segoe UI Semibold", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: .5rem;
  --radius-md: .75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;

  --shadow-card: 0 1px 2px rgba(10, 10, 20, .04), 0 12px 28px -16px rgba(10, 10, 20, .22);
  --switcher-h: 48px;
  --site-nav-h: 68px;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  padding-top: var(--switcher-h);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--text); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1rem; color: var(--text-body); }
p:last-child { margin-bottom: 0; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section--tight { padding: 2.5rem 0; }
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .6rem; }
.section-head p { font-size: 1rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 700; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--accent-strong);
  margin-bottom: .6rem;
}
.eyebrow .dot { width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }

/* -------------------------------------------------------------------------
   Barra fija para cambiar de ejemplo (idéntica en las tres páginas)
   ------------------------------------------------------------------------- */
.ex-switcher {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--switcher-h);
  background: #14151c;
  color: #eef0f7;
  display: flex; align-items: center; gap: .25rem;
  padding: 0 .85rem;
  font-family: var(--font-body); font-size: .82rem;
  overflow-x: auto; white-space: nowrap;
  box-shadow: 0 2px 14px rgba(0,0,0,.28);
}
.ex-switcher__back { display: flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border-radius: var(--radius-full); color: #c7cbe0; font-weight: 600; flex-shrink: 0; }
.ex-switcher__back:hover { color: #fff; background: rgba(255,255,255,.08); }
.ex-switcher__back svg { width: 15px; height: 15px; }
.ex-switcher__sep { width: 1px; height: 20px; background: rgba(255,255,255,.14); margin: 0 .35rem; flex-shrink: 0; }
.ex-switcher__label { color: #7d8299; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-right: .2rem; flex-shrink: 0; }
.ex-switcher__link { display: flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: var(--radius-full); color: #c7cbe0; font-weight: 600; flex-shrink: 0; }
.ex-switcher__link:hover { color: #fff; background: rgba(255,255,255,.08); }
.ex-switcher__link.is-current { color: #14151c; background: #fff; }

/* -------------------------------------------------------------------------
   Botones
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: var(--radius-md);
  font-weight: 700; font-size: .92rem; font-family: var(--font-body);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, opacity .2s ease;
}
.btn--primary { color: var(--on-accent); background: var(--accent); box-shadow: 0 14px 26px -12px color-mix(in srgb, var(--accent) 65%, transparent); }
.btn--primary:hover { transform: translateY(-2px); background: var(--accent-strong); }
.btn--secondary { color: var(--text); background: var(--surface); border: 1.5px solid var(--border); }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn--on-dark { color: var(--surface-dark); background: #fff; }
.btn--on-dark:hover { transform: translateY(-2px); opacity: .92; }
.btn--ghost-on-dark { color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.btn--ghost-on-dark:hover { background: rgba(255,255,255,.08); }
.btn:focus-visible, a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* -------------------------------------------------------------------------
   Navbar del sitio (propio de cada ejemplo)
   ------------------------------------------------------------------------- */
.site-nav {
  position: sticky; top: var(--switcher-h); z-index: 90;
  background: var(--nav-bg, var(--surface));
  border-bottom: 1px solid var(--nav-border, var(--border));
  backdrop-filter: blur(8px);
}
.site-nav__inner { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-nav__brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--nav-text, var(--text)); flex-shrink: 0; }
.site-nav__brand-mark { width: 2.1rem; height: 2.1rem; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.site-nav__links { display: flex; align-items: center; gap: 1.6rem; font-size: .88rem; font-weight: 600; color: var(--nav-link, var(--text-muted)); }
.site-nav__links a:hover { color: var(--accent); }
.site-nav__actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.nav-toggle { display: none; width: 2.3rem; height: 2.3rem; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--nav-text, var(--text)); }
.nav-toggle:hover { background: var(--surface-alt); }

@media (max-width: 860px) {
  .site-nav__links { position: fixed; top: calc(var(--switcher-h) + 68px); left: 0; right: 0; bottom: 0; background: var(--surface); flex-direction: column; align-items: flex-start; gap: 0; padding: 1rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; overflow-y: auto; }
  .site-nav__links a { padding: .85rem .5rem; width: 100%; border-bottom: 1px solid var(--border); }
  body.nav-open .site-nav__links { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-toggle { display: flex; }
}

/* -------------------------------------------------------------------------
   Hero / header del sitio
   ------------------------------------------------------------------------- */
.hero { padding: 4.5rem 0; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); margin-bottom: 1rem; }
.hero p.lead { font-size: 1.08rem; max-width: 46ch; margin-bottom: 1.75rem; }
.hero__actions { display: flex; gap: .85rem; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 2rem; margin-top: 2.25rem; }
.hero__stats strong { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--text); }
.hero__stats span { font-size: .74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   Migas de pan
   ------------------------------------------------------------------------- */
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; }
.breadcrumb li { display: flex; align-items: center; gap: .5rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb [aria-current="page"] { color: var(--accent-strong); font-weight: 700; }

/* -------------------------------------------------------------------------
   Pestañas (tabs)
   ------------------------------------------------------------------------- */
.tabs__list { display: inline-flex; gap: .3rem; background: var(--surface-alt); padding: .3rem; border-radius: var(--radius-md); flex-wrap: wrap; margin-bottom: 1.75rem; }
.tabs__tab { padding: .6rem 1.1rem; border-radius: var(--radius-sm); font-size: .86rem; font-weight: 700; color: var(--text-muted); }
.tabs__tab[aria-selected="true"] { background: var(--surface); color: var(--accent-strong); box-shadow: var(--shadow-card); }
.tabs__panel[hidden] { display: none; }
.tabs__panel { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; }
.tabs__panel-icon { width: 3.75rem; height: 3.75rem; border-radius: var(--radius-lg); background: var(--accent-soft-bg); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tabs__panel-icon svg { width: 1.9rem; height: 1.9rem; }
.tabs__panel h4 { font-size: 1.05rem; margin-bottom: .35rem; }
.tabs__panel p { font-size: .92rem; }
@media (max-width: 640px) { .tabs__panel { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* -------------------------------------------------------------------------
   Acordeón / FAQ
   ------------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: .6rem; max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--surface-alt); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.faq-item__header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1.05rem 1.2rem; font-weight: 700; font-size: .96rem; color: var(--text); text-align: left; gap: 1rem; }
.faq-item__header svg { width: 1.2rem; height: 1.2rem; color: var(--accent-strong); transition: transform .3s ease; flex-shrink: 0; }
.faq-item.is-open .faq-item__header svg { transform: rotate(180deg); }
.faq-item__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-item.is-open .faq-item__panel { grid-template-rows: 1fr; }
.faq-item__panel-inner { overflow: hidden; }
.faq-item__panel p { padding: 0 1.2rem 1.1rem; font-size: .92rem; }

/* -------------------------------------------------------------------------
   Listas
   ------------------------------------------------------------------------- */
.req-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.req-card { background: var(--surface-alt); border-radius: var(--radius-md); padding: 1.4rem; border: 1px solid var(--border); }
.req-card h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-strong); margin-bottom: .9rem; }
.req-card ul, .req-card ol { list-style: none; display: flex; flex-direction: column; gap: .55rem; font-size: .9rem; color: var(--text-body); }
.req-card ul li { position: relative; padding-left: 1.25rem; }
.req-card ul li::before { content: ""; position: absolute; left: 0; top: .5em; width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }
.req-card ol { counter-reset: step; }
.req-card ol li { position: relative; padding-left: 1.6rem; }
.req-card ol li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -.05rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
@media (max-width: 640px) { .req-grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   Slider de imagen / información — un slide visible con puntos
   ------------------------------------------------------------------------- */
.slider { width: 100%; position: relative; }
.slider__viewport { overflow: hidden; border-radius: var(--radius-lg); }
.slider__track { display: flex; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.slider__slide { flex: 0 0 100%; min-width: 0; }
.slider__controls { display: flex; align-items: center; justify-content: space-between; margin-top: 1.1rem; }
.slider__btn { width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-alt); color: var(--text); flex-shrink: 0; }
.slider__btn:hover { background: var(--accent-soft-bg); color: var(--accent-strong); }
.slider__btn svg { width: 1.15rem; height: 1.15rem; }
.slider__dots { display: flex; align-items: center; gap: .5rem; }
.slider__dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--border); transition: background-color .2s ease, transform .2s ease; }
.slider__dot.is-active { background: var(--accent); transform: scale(1.25); }

.slide-visual { aspect-ratio: 16/8; border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; color: #fff; text-align: center; padding: 1.5rem; }
.slide-visual span.tag { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.slide-visual span.sub { font-size: .82rem; opacity: .85; }

.hero-visual-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

.step-slide { padding: 2.5rem 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .85rem; background: var(--surface-alt); border-radius: var(--radius-lg); }
.step-slide__num { width: 3.1rem; height: 3.1rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.step-slide h4 { font-size: 1.08rem; }
.step-slide p { max-width: 40ch; font-size: .92rem; }

/* -------------------------------------------------------------------------
   Tarjetas
   ------------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.6rem; display: flex; flex-direction: column; gap: .7rem; box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card__icon { width: 3rem; height: 3rem; border-radius: var(--radius-md); background: var(--accent-soft-bg); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; }
.card__icon svg { width: 1.55rem; height: 1.55rem; }
.card__title { font-size: 1.05rem; }
.card__text { font-size: .9rem; }
.card__list { list-style: none; display: flex; flex-direction: column; gap: .4rem; font-size: .84rem; color: var(--text-body); margin-top: .3rem; }
.card__list li { display: flex; align-items: center; gap: .5rem; }
.card__list svg { width: 1rem; height: 1rem; color: var(--accent-strong); flex-shrink: 0; }
.card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .78rem; color: var(--text-muted); }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   Slider de tarjetas (carrusel)
   ------------------------------------------------------------------------- */
.card-slider__viewport { display: flex; gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .3rem .3rem 1rem; }
.card-slider__viewport .card { scroll-snap-align: start; flex: 0 0 250px; }
.card-slider__controls { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .4rem; }

/* -------------------------------------------------------------------------
   CTA
   ------------------------------------------------------------------------- */
.cta { border-radius: var(--radius-lg); padding: 3.25rem 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .85rem; position: relative; overflow: hidden; }
.cta h2 { font-size: clamp(1.5rem, 3vw, 2rem); max-width: 28ch; }
.cta p { max-width: 48ch; }
.cta__actions { display: flex; gap: .85rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }

/* -------------------------------------------------------------------------
   Footer del sitio
   ------------------------------------------------------------------------- */
.site-footer { background: var(--surface-dark); color: var(--text-on-dark-muted); padding: 3.25rem 0 1.5rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.25rem; }
.site-footer__brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.05rem; margin-bottom: .75rem; }
.site-footer__brand-mark { width: 2rem; height: 2rem; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.site-footer h5 { color: var(--text-on-dark); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; font-size: .87rem; }
.site-footer a:hover { color: #fff; }
.site-footer__social { display: flex; gap: .6rem; margin-top: 1rem; }
.site-footer__social a { width: 2.15rem; height: 2.15rem; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.site-footer__social a:hover { background: var(--accent); color: #fff; }
.site-footer__social svg { width: 1rem; height: 1rem; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.4rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; font-size: .78rem; }
.site-footer__bottom a:hover { color: #fff; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   Utilidades
   ------------------------------------------------------------------------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-on-dark h1, .text-on-dark h2, .text-on-dark h3, .text-on-dark h4 { color: #fff; }
.text-on-dark p { color: var(--text-on-dark-muted); }
