/* Documentación de Darjee Sport: mismos colores y tipografía que la app y la web. */

@font-face {
  font-family: 'Montserrat';
  src: url('montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #110c12;
  --ink-700: #4f4c50;
  --ink-500: #827f82;
  --ink-200: #dfdddf;
  --brand-950: #22004c;
  --brand-900: #380374;
  --brand-800: #4c1496;
  --brand-700: #5923aa;
  --brand-600: #6e3fc5;
  --brand-300: #c8b8fe;
  --brand-100: #efebff;
  --brand-50: #f7f5ff;
  --lime: #aeef31;
  --lime-100: #e9fcc8;
  --lime-700: #456609;
  --page: #f8f6fc;
  --shadow: 0 1px 2px rgb(17 12 18 / 0.04), 0 12px 32px -16px rgb(76 20 150 / 0.28);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-700);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

.wrap {
  width: min(1100px, 100% - 32px);
  margin-inline: auto;
}

/* Encabezado */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(17 12 18 / 0.96);
  color: #fff;
}
.top-in {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.28em;
  line-height: 1;
}
.brand img {
  width: 26px;
  height: 36px;
  object-fit: contain;
}
.brand small {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: 0.55em;
  color: var(--lime);
}
.top nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}
.top nav a {
  color: rgb(255 255 255 / 0.78);
  text-decoration: none;
}
.top nav a:hover,
.top nav a[aria-current='page'] {
  color: var(--lime);
}

/* Portada */
.cover {
  position: relative;
  overflow: hidden;
  padding: 64px 0 88px;
  color: #fff;
  background:
    radial-gradient(60% 90% at 92% 0%, rgb(110 63 197 / 0.85), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgb(76 20 150 / 0.9), transparent 62%),
    #150021;
}
.cover::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-600), var(--lime));
}
.cover-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.cover img.cover-logo {
  width: 150px;
  filter: drop-shadow(0 20px 40px rgb(0 0 0 / 0.5));
}
.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
}
.cover h1 {
  margin: 10px 0 14px;
  font-size: clamp(2.3rem, 5.4vw, 3.8rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.035em;
}
.cover h1 em {
  font-style: normal;
  color: var(--lime);
}
.cover .lead {
  max-width: 44em;
  margin: 0;
  font-size: 1.12rem;
  color: rgb(255 255 255 / 0.84);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: rgb(255 255 255 / 0.7);
}

/* Índice */
.toc {
  position: relative;
  margin-top: -44px;
  padding: 22px 26px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.toc h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding-left: 22px;
  font-weight: 600;
}
.toc li {
  margin: 4px 0;
  break-inside: avoid;
}
.toc a {
  text-decoration: none;
}

/* Secciones */
.doc {
  padding: 56px 0 8px;
}
.doc > .wrap > h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.025em;
}
.doc > .wrap > h2 .num {
  font-size: 0.7em;
  color: var(--brand-600);
}
.doc .intro {
  max-width: 50em;
  margin: 0 0 18px;
  font-size: 1.06rem;
  color: var(--ink-700);
}
h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.feature {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin: 18px 0;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.feature.wide {
  grid-template-columns: minmax(0, 1fr);
}
.feature p {
  margin: 8px 0;
}
.feature ul {
  margin: 8px 0;
  padding-left: 20px;
}
.feature li {
  margin: 5px 0;
}
figure {
  margin: 0;
}
figcaption {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  color: var(--ink-500);
}
.phone img {
  width: 100%;
  border: 7px solid var(--ink);
  border-radius: 28px;
  box-shadow: 0 18px 40px -18px rgb(17 12 18 / 0.55);
}
.screen img {
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: 14px;
  box-shadow: 0 18px 40px -22px rgb(17 12 18 / 0.45);
}
.screen + .text {
  margin-top: 18px;
}
.tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-800);
  font-size: 12px;
  font-weight: 700;
}

/* Cuadros destacados */
.callout {
  margin: 14px 0;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.97rem;
}
.callout > strong:first-child {
  display: block;
  margin-bottom: 2px;
}
.rule {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
.rule > strong:first-child {
  color: var(--brand-800);
}
.tip {
  background: #f5fee6;
  border: 1px solid #d3f78f;
}
.tip > strong:first-child {
  color: var(--lime-700);
}
.warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.warn > strong:first-child {
  color: #92400e;
}

/* Pasos numerados */
.steps {
  counter-reset: paso;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  counter-increment: paso;
  margin: 10px 0;
  padding-left: 40px;
}
.steps li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--brand-700);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* Roles */
.roles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.roles--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.role {
  padding: 20px;
  border-radius: 18px;
  background: #fff;
  border-top: 6px solid var(--c, var(--brand-600));
  box-shadow: var(--shadow);
}
.role h3 {
  font-size: 1.1rem;
}
.role p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--ink-700);
}

/* Tablas */
.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
}
th,
td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ink-200);
}
th {
  background: var(--brand-950);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
}
tr:last-child td {
  border-bottom: 0;
}

/* Preguntas frecuentes */
details {
  margin: 10px 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
summary {
  cursor: pointer;
  font-weight: 700;
}
details p,
details ol {
  margin: 10px 0 0;
}

/* Portada del índice general */
.hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: -44px 0 40px;
  position: relative;
}
.hub a {
  display: block;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.hub a:hover {
  transform: translateY(-2px);
}
.hub .pics {
  display: flex;
  margin-bottom: 14px;
}
.hub .pics img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-100);
}
.hub .pics img + img {
  margin-left: -14px;
}
.hub .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--ink-200);
  border-radius: 14px;
}
.hub h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
}
.hub p {
  margin: 0;
  color: var(--ink-700);
}
.hub .go {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--brand-700);
}

/* Pie */
.foot {
  margin-top: 56px;
  padding: 28px 0;
  background: var(--ink);
  color: rgb(255 255 255 / 0.7);
  font-size: 14px;
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.foot a {
  color: #fff;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature .phone {
    max-width: 300px;
    margin-inline: auto;
  }
  .roles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toc ol {
    columns: 1;
  }
  .hub {
    grid-template-columns: minmax(0, 1fr);
  }
  .cover-in {
    grid-template-columns: minmax(0, 1fr);
  }
  .cover img.cover-logo {
    display: none;
  }
}
@media (max-width: 560px) {
  .roles {
    grid-template-columns: minmax(0, 1fr);
  }
  .top nav {
    gap: 12px;
    font-size: 13px;
  }
  .brand span {
    display: none;
  }
  .feature {
    padding: 18px;
  }
}

/* Impresión (Guardar como PDF) */
@media print {
  @page {
    size: A4;
    margin: 14mm;
  }
  body {
    background: #fff;
    font-size: 11pt;
  }
  .top,
  .foot {
    display: none;
  }
  .cover {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    padding: 28px 0 40px;
  }
  .toc,
  .feature,
  .role,
  .table-wrap,
  .hub a {
    box-shadow: none;
    border: 1px solid var(--ink-200);
  }
  .feature,
  .callout,
  figure,
  tr,
  details {
    break-inside: avoid;
  }
  .doc {
    padding-top: 24px;
  }
  /* Captura de celular al lado del texto, para ahorrar hojas. */
  .feature {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
    margin: 12px 0;
    padding: 16px;
  }
  .feature.wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature .phone {
    max-width: none;
  }
  .phone img {
    border-width: 5px;
    border-radius: 20px;
  }
  .toc ol {
    columns: 2;
  }
  details {
    display: block;
  }
  details > *:not(summary) {
    display: block !important;
  }
}
