/* ==========================================================================
   Ciber en Tacones — estilos de la landing
   Paleta oficial (únicos colores permitidos):
     #FFFFFF · #F2E8E1 · #D0B59B · #A6BBBC · #1E1A17 (oscuro funcional)
   Las transparencias se aplican solo sobre estos mismos colores.
   ========================================================================== */

/* ---------- Fuentes (alojadas localmente, licencia OFL) ---------- */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/bodoni-moda-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/bodoni-moda-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --white: #FFFFFF;
  --paper: #F2E8E1;
  --sand:  #D0B59B;
  --sage:  #A6BBBC;
  --ink:   #1E1A17;

  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala tipográfica (fluida entre móvil y escritorio) */
  --fs-display-xl: clamp(2.75rem, 1.6rem + 4.2vw, 4.5rem);
  --fs-display-lg: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);
  --fs-headline-lg: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  --fs-headline-md: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-headline-sm: 1.375rem;
  --fs-body-lg: 1.125rem;
  --fs-body-md: 0.9375rem;
  --fs-body-sm: 0.8125rem;
  --fs-label: 0.6875rem;

  /* Espaciado */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --margin: 1.25rem;
  --gutter: 1.5rem;
  --section-y: clamp(4.5rem, 3rem + 5vw, 7rem);
  --max: 80rem;

  --hairline: 1px solid var(--sage);
  --header-h: 4.5rem;
}

@media (min-width: 64em) {
  :root {
    --margin: 4rem;
    --gutter: 2.5rem;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  font-weight: 400;
  line-height: 1.73;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }
strong { font-weight: 600; }
.italic { font-style: italic; }

::selection { background: var(--sage); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--margin);
}

/* ---------- Componentes comunes ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-lg);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-title--xl { font-size: var(--fs-display-lg); }

.lead {
  font-size: var(--fs-body-lg);
  line-height: 1.67;
  font-weight: 400;
}

.rule-pair { display: flex; align-items: center; gap: 0.75rem; }
.rule-pair span:first-child { width: 3rem; height: 2px; background: var(--sage); }
.rule-pair span:last-child { width: 1.5rem; height: 1px; background: var(--sand); }

.rule-single { width: 4rem; height: 2px; background: var(--sage); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.875rem 2rem;
  border: 1px solid var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.btn__arrow { font-size: 0.9rem; letter-spacing: 0; }

.pdf-link {
  display: inline-block;
  padding-block: 0.5rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--sand);
  transition: text-decoration-color .2s ease;
}
.pdf-link:hover { text-decoration-color: currentColor; }
.pdf-link__meta { font-weight: 400; letter-spacing: 0.08em; text-transform: none; }

.report-id {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.question { font-size: var(--fs-body-lg); line-height: 1.6; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--hairline);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.brand {
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
}
.site-nav a {
  display: inline-block;
  padding-block: 0.75rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
}
.site-nav a:hover,
.site-nav a[aria-current] {
  text-decoration-line: underline;
  text-decoration-color: var(--sage);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.375rem;
  height: 1px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Pantallas muy estrechas: la marca y el botón de menú caben en una línea */
@media (max-width: 23.75em) {
  .brand { font-size: 1.0625rem; }
  .site-header__inner { gap: 0.75rem; }
  .nav-toggle { gap: 0.5rem; letter-spacing: 0.12em; }
}

/* Menú móvil (solo con JavaScript; sin JS el menú queda visible y envuelto) */
@media (max-width: 56.24em) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: var(--hairline);
    padding: 0.5rem var(--margin) 1.5rem;
  }
  .js .site-nav[hidden] { display: none; }
  .js .site-nav__list { flex-direction: column; gap: 0; }
  .js .site-nav__list li + li { border-top: 1px solid var(--sage); }
  .js .site-nav a { display: block; padding-block: 1rem; }
  html:not(.js) .site-header__inner { flex-direction: column; align-items: flex-start; padding-block: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  min-height: max(36rem, calc(100svh - var(--header-h)));
  background: var(--paper);
  overflow: hidden;
  border-bottom: var(--hairline);
}
.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__media { z-index: -2; }
.hero__media img {
  object-fit: cover;
  object-position: var(--hero-focus-desktop, 60% 50%);
}
/* Velo de legibilidad: arena claro de la paleta, solo en la zona del texto */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgb(242 232 225 / 0.92) 0%,
    rgb(242 232 225 / 0.82) 34%,
    rgb(242 232 225 / 0.3) 54%,
    rgb(242 232 225 / 0) 66%);
}
.hero__content { padding-block: clamp(3rem, 8vh, 6rem); }
.hero__text {
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-xl);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero__title .italic { display: block; }
.hero__subtitle {
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  font-weight: 500;
  max-width: 30rem;
}
.hero__context {
  font-size: var(--fs-body-sm);
  line-height: 1.7;
  letter-spacing: 0.01em;
  max-width: 26rem;
  padding-left: 1rem;
  border-left: 2px solid var(--sage);
}
.hero__cta { padding-top: 0.5rem; }

/* Hero en pantallas estrechas: foto a sangre, texto arriba sobre velo vertical */
@media (max-width: 56.24em) {
  .hero {
    align-items: flex-start;
    min-height: max(40rem, calc(100svh - var(--header-h)));
  }
  .hero__media img { object-position: var(--hero-focus-mobile, 60% 100%); }
  .hero__veil {
    background: linear-gradient(180deg,
      rgb(242 232 225 / 0.97) 0%,
      rgb(242 232 225 / 0.94) 48%,
      rgb(242 232 225 / 0.4) 62%,
      rgb(242 232 225 / 0) 74%);
  }
  .hero__content { padding-block: 2.5rem; }
  .hero__text { gap: 1.25rem; }
  /* Botón del hero en móvil: más compacto y centrado (táctil ≥ 44 px) */
  .hero__cta { align-self: stretch; text-align: center; padding-top: 0.25rem; }
  .hero__cta .btn {
    min-height: 2.75rem;
    padding: 0.75rem 1.375rem;
    gap: 0.5rem;
    letter-spacing: 0.16em;
  }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.section--white { background: var(--white); }
.section--paper { background: var(--paper); }
.section--sage  { background: var(--sage); }
.section + .section { border-top: var(--hairline); }
.section--sage + .section,
.section + .section--sage { border-top: 0; }

.section-head { margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head--wide { max-width: 56rem; }
.section-head--split {
  display: grid;
  gap: 1.5rem var(--gutter);
  padding-bottom: 2rem;
  border-bottom: var(--hairline);
}
.section-head__intro { display: grid; gap: 1rem; max-width: 34rem; }

@media (min-width: 56.25em) {
  .section-head--split {
    grid-template-columns: 7fr 5fr;
    align-items: end;
  }
}

.grid { display: grid; gap: var(--space-lg) var(--gutter); }
@media (min-width: 56.25em) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .grid__aside { grid-column: 1 / span 5; }
  .grid__main  { grid-column: 6 / span 7; }
  .grid__half  { grid-column: span 6; }
}

/* Sección 01 */
#enfoque .grid__aside { margin-bottom: 0; }
@media (min-width: 56.25em) {
  #enfoque .grid__aside { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}
.essay {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  background: var(--white);
  border: var(--hairline);
}
.callout {
  margin-top: 0.5rem;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  background: var(--paper);
  border-left: 3px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  line-height: 1.45;
}
.callout strong { font-weight: 500; }
.callout--white { background: var(--white); border-left-color: var(--sage); }

/* Sección 02 (bloque sage completo) */
.caso { margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.caso .grid__half { display: grid; gap: 1.25rem; align-content: start; }
.caso__turn {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-headline-md);
  line-height: 1.3;
}
.statement {
  padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  background: var(--ink);
  color: var(--white);
  border-left: 4px solid var(--white);
}
.statement p {
  max-width: 52rem;
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  line-height: 1.4;
}
.statement strong { font-weight: 500; }

/* Sección 03 · informes protagonistas */
.feature-list { display: grid; gap: clamp(2rem, 1.5rem + 2vw, 4rem); }
.feature {
  position: relative;
  display: grid;
  gap: 2rem var(--gutter);
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  padding-left: calc(clamp(1.75rem, 1rem + 3vw, 3rem) + 0.5rem);
  background: var(--paper);
  border: var(--hairline);
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.5rem;
  background: var(--sage);
}
.feature__aside { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.feature__num {
  font-family: var(--font-display);
  font-size: var(--fs-display-xl);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.feature__tag,
.card__tag,
.index__tag {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
}
.feature__tag {
  padding: 0.875rem 1rem;
  background: var(--white);
  border: var(--hairline);
}
.feature__body { display: grid; gap: 1.15rem; max-width: 46rem; }
.feature__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-headline-lg);
  line-height: 1.2;
  text-wrap: balance;
}
.takeaway {
  margin-top: 0.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-left: 3px solid var(--ink);
}

@media (min-width: 56.25em) {
  .feature { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .feature__aside { grid-column: 1 / span 3; position: sticky; top: calc(var(--header-h) + 2rem); }
  .feature__body  { grid-column: 4 / span 9; }
}

/* Informe 06 · bloque de contraste oscuro */
.feature--dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.feature--dark::before { background: var(--sand); }
.feature--dark .feature__num { color: var(--sand); }
.feature--dark .feature__tag {
  background: transparent;
  border-color: var(--sand);
  color: var(--white);
}
.feature--dark .takeaway {
  background: transparent;
  border-left-color: var(--sand);
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
  border-right: 1px solid var(--sand);
}
.feature--dark .takeaway strong { color: var(--sand); }
.feature--dark .pdf-link { text-decoration-color: var(--sage); }
.feature--dark :focus-visible { outline-color: var(--white); }

/* Sección 04 · informes complementarios */
.cards { display: grid; gap: var(--gutter); }
@media (min-width: 56.25em) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  background: var(--white);
  border: var(--hairline);
  border-top: 4px solid var(--sage);
}
.card:nth-child(2) { border-top-color: var(--sand); }
.card:nth-child(3) { border-top-color: var(--ink); }
.card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: var(--hairline);
}
.card__num {
  font-family: var(--font-display);
  font-size: var(--fs-headline-lg);
  line-height: 1;
}
.card__tag { text-align: right; max-width: 15rem; }
.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-headline-sm);
  line-height: 1.3;
}
.card .question { font-size: var(--fs-body-md); line-height: 1.65; }
.card__takeaway {
  padding: 1rem 1.25rem;
  background: var(--paper);
  border-left: 2px solid var(--ink);
}
.card__link { margin-top: auto; padding-top: 1rem; align-self: flex-start; }

/* Sección 05 · recorrido (índice compacto) */
.index {
  background: var(--white);
  border: var(--hairline);
  counter-reset: none;
}
.index__item {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.5rem 1.25rem;
  padding: 1.5rem clamp(1.25rem, 1rem + 1vw, 2rem);
  border-left: 4px solid transparent;
}
.index__item + .index__item { border-top: var(--hairline); }
.index__item--key { background: var(--paper); border-left-color: var(--sage); }
.index__num {
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  font-weight: 600;
  line-height: 1.3;
}
.index__text { display: grid; gap: 0.35rem; }
.index__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.35;
}
.index__title .report-id { margin-bottom: 0.25rem; }
@media (min-width: 56.25em) {
  .index__title .report-id { display: inline; margin: 0 0.75rem 0 0; }
}
.index__text p:not(.index__tag) { font-size: var(--fs-body-sm); line-height: 1.65; max-width: 48rem; }
.index__tag { font-weight: 500; letter-spacing: 0.1em; }
.index__link { grid-column: 2; justify-self: start; }

@media (min-width: 56.25em) {
  .index__item {
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 2rem;
  }
  .index__link { grid-column: 3; justify-self: end; white-space: nowrap; }
}

/* Sección 06 · personal */
.personal { align-items: center; row-gap: 3rem; }
.personal__photo { position: relative; max-width: 30rem; }
.personal__frame {
  position: relative;
  z-index: 1;
  border: 2px solid var(--sage);
  background: var(--white);
}
.personal__photo::after {
  content: "";
  position: absolute;
  right: -1rem;
  bottom: -1rem;
  z-index: 0;
  width: 8rem;
  height: 8rem;
  border: 1px solid var(--sage);
  background: var(--paper);
}
.personal { isolation: isolate; }
.personal__frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; }
.personal__text { display: grid; gap: 1.25rem; justify-items: start; }
.personal__text > * { max-width: 40rem; }
.personal__text .rule-single { margin-block: 0.25rem 0.5rem; }
/* Conclusión editorial de la sección:
   filete fino superior, raya editorial y cita en cursiva al cuerpo del texto */
.personal__closing {
  justify-self: stretch;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sand);
}
.personal__closing-mark {
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  line-height: 1.2;
  color: var(--ink);
  user-select: none;
}
.personal__closing p {
  font-size: var(--fs-body-md);
  font-style: italic;
  font-weight: 300;
  line-height: 1.73;
}
.personal__closing strong { font-weight: inherit; }
.personal__closing p::before { content: "«"; }
.personal__closing p::after { content: "»"; }

@media (min-width: 56.25em) {
  .personal__photo { grid-column: 1 / span 5; }
  .personal__text  { grid-column: 7 / span 6; }
}
@media (max-width: 56.24em) {
  .personal__photo { order: 2; margin-inline: auto; width: calc(100% - 1rem); }
}

/* ---------- Footer oscuro ---------- */
.site-footer {
  background: var(--ink);
  color: var(--white);
  border-top: 4px solid var(--sage);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2rem;
  padding-block: clamp(3rem, 2.5rem + 2vw, 4.5rem);
}
.site-footer__brand {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  line-height: 1.2;
}
.site-footer__tagline {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-body-lg);
  color: var(--sage);
}
.site-footer :focus-visible { outline-color: var(--white); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header, .hero__media, .hero__veil, .nav-toggle, .skip-link { display: none !important; }
  .hero { min-height: 0; }
  .section, .feature--dark, .statement, .site-footer { background: none !important; color: #1E1A17 !important; }
}
