/* Luis Eduardo Castro Galindo, asesor CSC */

@font-face { font-family: 'Newsreader'; src: url('../fonts/newsreader-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('../fonts/newsreader-latin-wght-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
    --paper: #f7f5f0;
    --paper-2: #efece4;
    --ink: #11304f;        /* azul del logo oficial */
    --ink-2: #3d4f63;
    --ink-3: #5f6d7d;
    --line: #dad7cf;
    --green: #1d64a0;      /* acento: azul de la cinta del logo */
    --celeste: #5aa9e0;
    --gold: #efc12a;
    --red: #c8322b;
    --navy: #0f2a47;

    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --wrap: 1180px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
    accent-color: var(--green);
}
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    caret-color: var(--green);
}
::selection { background: #cfe3f5; color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }

.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 100;
    background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: 6px;
    text-decoration: none; transition: top 160ms var(--ease);
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.i { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    font: 500 1rem/1 var(--sans);
    padding: 0.95rem 1.35rem;
    border-radius: 6px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background-color 180ms var(--ease), border-color 180ms var(--ease), transform 140ms var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-line { border-color: #b9b3a4; color: var(--ink); }
.btn .i { transition: transform 200ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover { background: #1a4670; }
    .btn-line:hover { border-color: var(--ink); }
    .btn-primary:hover .i { transform: translateX(3px); }
}

/* ---------- Encabezado ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247, 245, 240, 0.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header::before {    /* franja tricolor del logo oficial */
    content: ""; display: block; height: 4px;
    background: linear-gradient(90deg, var(--celeste) 0 33.3%, var(--gold) 33.3% 66.6%, var(--red) 66.6% 100%);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4.75rem; gap: 1rem; }
.brand img { height: 50px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 0.25rem; font-size: 0.9375rem; font-weight: 500; }
.site-nav a { padding: 0.5rem 0.8rem; color: var(--ink-2); text-decoration: none; border-radius: 6px; transition: color 160ms var(--ease); }
@media (hover: hover) { .site-nav a:hover { color: var(--ink); } }
.site-nav .nav-cta { color: var(--ink); border: 1px solid var(--line); margin-left: 0.4rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem); }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: end;
}
.hero h1 {
    font-size: clamp(3rem, 7.2vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.025em;
    font-weight: 500;
}
.hero h1 span { display: block; font-style: italic; color: var(--green); }
.hero-role {
    margin-top: 2rem;
    font-size: clamp(1.2rem, 1.8vw, 1.4rem);
    line-height: 1.45;
    max-width: 30ch;
    color: var(--ink);
}
.hero-role strong { font-weight: 600; }
.hero-lead { margin-top: 1.1rem; color: var(--ink-2); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

.portrait { position: relative; margin: 0; }
.portrait::before {       /* banda de color de la marca detrás de la foto */
    content: ""; position: absolute; inset: 8% -6% -5% 12%; z-index: -1;
    background: linear-gradient(160deg, var(--celeste), var(--green) 70%);
    border-radius: 4px;
}
.portrait img {
    width: 100%; height: auto; aspect-ratio: 460 / 660; object-fit: cover; object-position: 50% 20%;
    border-radius: 4px;
    box-shadow: 0 24px 50px -24px rgba(15, 29, 56, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-text > * { animation: up 900ms var(--ease) both; }
    .hero-text > *:nth-child(2) { animation-delay: 80ms; }
    .hero-text > *:nth-child(3) { animation-delay: 140ms; }
    .hero-text > *:nth-child(4) { animation-delay: 200ms; }
    .portrait { animation: up 1000ms 120ms var(--ease) both; }
}
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(4.5rem, 10vw, 7.5rem); border-top: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: start; }
.section h2, .contact h2 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); line-height: 1.05; letter-spacing: -0.02em; }
.section-lead { margin-top: 1.25rem; color: var(--ink-2); max-width: 40ch; }

.prose p + p { margin-top: 1.1rem; }
.prose p { color: var(--ink-2); max-width: 62ch; }
.prose strong { color: var(--ink); font-weight: 600; }

.areas { margin-top: 2.75rem; border-top: 1px solid var(--line); }
.areas > div { padding: 1.4rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0.5rem 2rem; }
.areas dt { display: flex; align-items: center; gap: 0.7rem; font-weight: 600; }
.areas dt .i { color: var(--green); width: 1.35em; height: 1.35em; }
.areas dd { color: var(--ink-2); }

/* Cita */
.quote-band { background: var(--navy); color: #eef0f4; padding-block: clamp(4.5rem, 10vw, 7.5rem); }
.quote-band blockquote { font-family: var(--serif); }
.quote-band blockquote p {
    font-size: clamp(1.9rem, 4.2vw, 3.25rem);
    line-height: 1.15; letter-spacing: -0.015em; font-weight: 400;
    max-width: 24ch;
}
.quote-band blockquote p::before { content: "“"; color: var(--gold); margin-right: 0.05em; }
.quote-band blockquote p::after { content: "”"; color: var(--gold); }
.quote-band footer { margin-top: 1.75rem; font-family: var(--sans); font-size: 0.9375rem; color: #aeb6c6; }
.quote-band footer::before { content: ""; display: inline-block; width: 2rem; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 0.8rem; }

/* Trayectoria */
.timeline { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.timeline li {
    display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.25rem 1.5rem;
    padding: 1.15rem 0; border-bottom: 1px solid var(--line);
}
.t-years { font-size: 0.9375rem; font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; padding-top: 0.2rem; }
.timeline h3 { font-size: 1.3rem; line-height: 1.25; }
.timeline p { color: var(--ink-3); font-size: 0.9375rem; margin-top: 0.15rem; }
@media (max-width: 600px) {
    .timeline li { grid-template-columns: 1fr; }
}

/* Pasos */
.steps { list-style: none; padding: 0; counter-reset: paso; }
.steps li {
    counter-increment: paso;
    position: relative;
    padding: 0 0 2.25rem 3.75rem;
}
.steps li::before {
    content: counter(paso);
    position: absolute; left: 0; top: 0.1rem;
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    display: grid; place-items: center;
    font: 600 0.9375rem/1 var(--sans);
    color: var(--green); border: 1px solid #bcd4ea; background: #eaf2fa;
}
.steps li:not(:last-child)::after {
    content: ""; position: absolute; left: 1.125rem; top: 2.6rem; bottom: 0.3rem; width: 1px; background: var(--line);
}
.steps h3 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.35rem; }
.steps p { color: var(--ink-2); max-width: 52ch; }

/* ---------- Contacto ---------- */
.contact { padding-block: clamp(4.5rem, 10vw, 7.5rem); border-top: 1px solid var(--line); background: var(--paper-2); }
.contact-list { list-style: none; padding: 0; margin-top: 2.5rem; border-top: 1px solid #cfc9bb; }
.contact-list a {
    display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; align-items: center; gap: 1rem;
    padding: 1.6rem 0; border-bottom: 1px solid #cfc9bb;
    text-decoration: none;
    transition: padding-left 260ms var(--ease), color 180ms var(--ease);
}
.c-label { font-size: 0.875rem; color: var(--ink-3); }
.c-value { font-family: var(--serif); font-size: clamp(1.35rem, 3vw, 2.1rem); line-height: 1.2; overflow-wrap: anywhere; }
.contact-list .i { width: 1.6rem; height: 1.6rem; color: var(--green); }
@media (hover: hover) and (pointer: fine) {
    .contact-list a:hover { padding-left: 0.75rem; }
    .contact-list a:hover .c-value { color: var(--green); }
}

/* ---------- Pie ---------- */
.site-footer { background: var(--paper); color: var(--ink-3); padding-block: 2.5rem; font-size: 0.875rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.footer-inner img { height: 48px; width: auto; }
.footer-text { display: grid; gap: 0.35rem; text-align: right; }
.footer-note { font-size: 0.8125rem; }
.footer-note a { color: var(--ink-2); }
@media (max-width: 600px) { .footer-text { text-align: left; } }

/* Aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 800ms var(--ease), transform 800ms var(--ease); transition-delay: var(--d, 0ms); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .portrait { max-width: 380px; order: -1; }
    .two-col { grid-template-columns: 1fr; }
    .areas > div { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .brand img { height: 40px; }
    .site-nav a:not(.nav-cta) { display: none; }
    .portrait { max-width: 70%; }
    .actions .btn { flex: 1 1 auto; }
    .contact-list a { grid-template-columns: minmax(0, 1fr) auto; }
    .c-label { grid-column: 1 / -1; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}
