/* ==========================================================================
   CCPCH — Base: tokens, reset, tipografía, layout y utilidades
   ========================================================================== */

:root {
  --rojo:         #B8232F;
  --rojo-dark:    #8C1A23;
  --rojo-soft:    rgba(184, 35, 47, .08);
  --dorado:       #C9973A;
  --dorado-light: #E8B85A;
  --dorado-soft:  rgba(201, 151, 58, .12);
  --navy:         #1A1F2E;
  --navy-mid:     #252B3D;
  --navy-deep:    #0F121C;
  --gris:         #F5F3EF;
  --gris-borde:   #E4E0D8;
  --blanco:       #FFFFFF;
  --texto:        #2C2C2C;
  --texto-suave:  #6B6B6B;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container:      1200px;
  --container-slim: 820px;
  --nav-height:     70px;
  --radius:         10px;
  --radius-sm:      6px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, .06);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .10);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .18);

  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 20px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--texto);
  background: var(--blanco);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
img { border-style: none; }

a { color: var(--rojo); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--rojo-dark); }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }

blockquote {
  margin: 1.6em 0;
  padding: .2em 0 .2em 1.4em;
  border-left: 3px solid var(--dorado);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--navy);
}

hr { border: none; border-top: 1px solid var(--gris-borde); margin: 2.4em 0; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; }
th, td { padding: .7em .9em; border-bottom: 1px solid var(--gris-borde); text-align: left; }
th { background: var(--gris); font-weight: 600; color: var(--navy); }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
code { background: var(--gris); padding: .15em .4em; border-radius: 3px; }

/* ── Layout ───────────────────────────────────────────────────────────── */

.site-main { display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 5vw;
}
.container-narrow { max-width: var(--container-slim); }

section { padding: 100px 0; }
section.alignfull, .alignfull { width: 100%; }

/* Fondos de sección */
.bg-blanco   { background: var(--blanco); }
.bg-gris     { background: var(--gris); }
.bg-navy     { background: var(--navy); }
.bg-navy-mid { background: var(--navy-mid); }
.bg-rojo     { background: var(--rojo); }

.bg-navy h1, .bg-navy h2, .bg-navy h3,
.bg-navy-mid h1, .bg-navy-mid h2, .bg-navy-mid h3 { color: var(--blanco); }

/* ── Cabeceras de sección ─────────────────────────────────────────────── */

.section-header { margin-bottom: 56px; max-width: 720px; }
.section-header-inline {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.section-tag { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-tag::before { content: ''; width: 28px; height: 2px; background: var(--rojo); flex-shrink: 0; }
.section-tag span {
  font-family: var(--font-sans);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--rojo);
}
.section-tag.gold::before { background: var(--dorado); }
.section-tag.gold span { color: var(--dorado-light); }
.section-tag.center { justify-content: center; width: 100%; }

.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.8rem);
  margin-bottom: 20px;
}
.section-title.light { color: var(--blanco); }

.section-lead {
  font-size: 1.03rem;
  line-height: 1.85;
  color: var(--texto-suave);
  max-width: 620px;
  margin-bottom: 0;
}
.section-lead.light { color: rgba(255, 255, 255, .68); }
.section-lead p:last-child { margin-bottom: 0; }

.text-center { text-align: center; }
.text-center .section-lead { margin-inline: auto; }

/* ── Botones ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--dorado); outline-offset: 3px; }
.btn-sm { padding: 10px 20px; font-size: .74rem; }

.btn-primary { background: var(--rojo); color: #fff; box-shadow: 0 8px 24px rgba(184, 35, 47, .32); }
.btn-primary:hover { background: var(--rojo-dark); color: #fff; box-shadow: 0 12px 32px rgba(184, 35, 47, .42); }

.btn-outline { background: transparent; color: var(--dorado); border-color: rgba(201, 151, 58, .5); }
.btn-outline:hover { background: var(--dorado-soft); border-color: var(--dorado); color: var(--dorado-light); }

.btn-white { background: #fff; color: var(--rojo); }
.btn-white:hover { background: rgba(255, 255, 255, .9); color: var(--rojo-dark); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

.btn-red-outline { background: transparent; color: var(--rojo); border-color: rgba(184, 35, 47, .4); white-space: nowrap; }
.btn-red-outline:hover { background: var(--rojo-soft); border-color: var(--rojo); color: var(--rojo-dark); }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-mid); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ── Animación de entrada ─────────────────────────────────────────────── */

.fade-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.fade-up.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── Accesibilidad ────────────────────────────────────────────────────── */

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden;
  position: absolute !important; word-wrap: normal !important;
  margin: -1px; padding: 0;
}
.screen-reader-text:focus {
  clip: auto !important; clip-path: none;
  background: #fff; color: var(--rojo);
  display: block; height: auto; width: auto;
  padding: 14px 22px; left: 6px; top: 6px;
  font-size: .9rem; font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
}

.skip-link { position: absolute; }

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

/* ── Utilidades ───────────────────────────────────────────────────────── */

.alignwide { max-width: 1320px; margin-inline: auto; }
.aligncenter { margin-inline: auto; }

.ccpch-flash {
  margin: 0 0 28px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  border-left: 4px solid;
}
.ccpch-flash-ok    { background: #eef8f1; border-color: #2e9e5b; color: #1d6b3c; }
.ccpch-flash-error { background: #fdeeee; border-color: var(--rojo); color: var(--rojo-dark); }
