/* ============================================================
   VICAPITALS — Sitio institucional público (Fase 12A)
   Investment management website. Monocromo, recto, editorial.
   ============================================================ */

:root {
    --ink: #000000;
    --paper: #ffffff;
    --line: #d8d8d8;
    --line-soft: #ebebeb;
    --muted: #5c5c5c;
    --faint: #f6f6f6;
    --serif: Georgia, 'Times New Roman', Times, serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    --measure: 66ch;
    --maxw: 1200px;
    --pad: clamp(20px, 4vw, 48px);

    /* Motion tokens (12C) */
    --dur-fast: 0.28s;
    --dur-base: 0.6s;
    --dur-slow: 1.1s;
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --header-h: 72px;
    --header-h-scrolled: 60px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: 3px; }

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

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 16px;
    font-size: 13px;
    text-decoration: none;
}

.skip-link:focus { left: 0; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

/* ---------- Tipografía ---------- */

.serif { font-family: var(--serif); }

.display {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.5rem, 7vw, 5.25rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
    margin: 0 0 24px;
}

.headline {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 18px;
}

.lede {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    color: var(--muted);
    max-width: var(--measure);
    margin: 0 0 28px;
}

.muted { color: var(--muted); }

.small { font-size: 0.8125rem; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.eyebrow {
    display: block;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 14px;
}

.editorial h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    line-height: 1.2;
    margin: 2.2rem 0 0.9rem;
}

.editorial h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.05rem;
    margin: 1.8rem 0 0.6rem;
    letter-spacing: 0.01em;
}

.editorial p { max-width: var(--measure); }

.editorial blockquote {
    margin: 1.6rem 0;
    padding: 0 0 0 22px;
    border-left: 2px solid var(--ink);
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.55;
}

.editorial ul, .editorial ol { max-width: var(--measure); padding-left: 1.4rem; }

.editorial li { margin: 0.35rem 0; }

/* ---------- Layout ---------- */

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.section { padding: clamp(56px, 9vw, 120px) 0; }

.section--tight { padding: clamp(40px, 6vw, 80px) 0; }

.section--faint { background: var(--faint); }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(28px, 5vw, 64px);
}

@media (min-width: 860px) {
    .grid-2 { grid-template-columns: 1.15fr 1fr; align-items: start; }
}

/* ---------- Header ---------- */

.site-header {
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--paper);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand .brand-logo {
    display: block;
    height: 26px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    aspect-ratio: 1051 / 177;
}

.site-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: clamp(16px, 2.4vw, 30px);
}

.site-nav a {
    display: inline-block;
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--ink);
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible { border-bottom-color: var(--ink); }

.site-nav a[aria-current='page'] { border-bottom-color: var(--ink); }

.nav-cta { margin-left: auto; }

/*
 * El botón de acceso del navbar se declara con el contexto `.site-nav` para
 * que su especificidad (0,2,1) gane a los estilos genéricos de enlace
 * `.site-nav a` (0,1,1). Sin este alcance, el navegador aplica `padding:
 * 6px 0` y `border-bottom` del enlace de menú y el botón queda sin padding
 * horizontal: una caja apretada pegada al texto.
 *
 * Proporción más compacta que el CTA del hero (que usa .btn / .btn--ghost),
 * con aire horizontal generoso y altura armónica con los enlaces del navbar.
 */
.site-nav .nav-cta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 22px;
    border: 1px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color var(--dur-fast, 0.28s) var(--ease-out, ease-out),
        color var(--dur-fast, 0.28s) var(--ease-out, ease-out);
}

.site-nav .nav-cta-link:hover { background: var(--ink); color: var(--paper); }

.site-nav .nav-cta-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--ink);
    padding: 8px 12px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--ink);
}

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

@media (max-width: 859px) {
    .menu-toggle { display: inline-block; }

    .site-header__nav {
        position: absolute;
        inset: 100% 0 auto 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        display: none;
        max-height: calc(100svh - var(--header-h, 72px));
        overflow-y: auto;
    }

    .site-header__nav.is-open { display: block; }

    .site-nav ul { flex-direction: column; gap: 0; padding: 8px 0 20px; }

    .site-nav a { display: block; padding: 12px 0; border-bottom: none; font-size: 1rem; }

    .site-nav a[aria-current='page'] { text-decoration: underline; }

    .nav-cta { margin: 8px 0 0; }

    .site-nav .nav-cta-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 8px 20px;
        border: 1px solid var(--ink);
        border-radius: 0;
        font-size: 0.72rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }
}

body.is-locked { overflow: hidden; }

/* ---------- Botones / acciones ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 0;
    padding: 11px 22px;
    font-family: var(--sans);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { opacity: 0.82; }

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

.btn--ghost { background: var(--paper); color: var(--ink); }

.text-link {
    color: var(--ink);
    text-underline-offset: 3px;
    text-decoration: underline;
}

/* ---------- Hero (preparado para 12C, sin comportamiento) ---------- */

.hero { padding: clamp(72px, 12vw, 170px) 0 clamp(56px, 8vw, 120px); }

.hero .eyebrow { margin-bottom: 26px; }

.hero .display { max-width: 20ch; }

.hero .lede { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Secciones homepage ---------- */

.execution-list, .process-list { list-style: none; margin: 0; padding: 0; }

.execution-list li { padding: 26px 0; border-top: 1px solid var(--line); }

.execution-list li:last-child { border-bottom: 1px solid var(--line); }

.execution-list .word {
    font-family: var(--serif);
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    display: block;
    margin-bottom: 6px;
}

.execution-list .note { color: var(--muted); max-width: 52ch; }

.process-steps {
    display: grid;
    grid-template-columns: 1fr;
    counter-reset: process;
}

@media (min-width: 900px) {
    .process-steps { grid-template-columns: repeat(4, 1fr); }
}

.process-step {
    padding: 26px 0 26px 0;
    border-top: 1px solid var(--line);
    position: relative;
}

@media (min-width: 900px) {
    .process-step { border-top: 0; padding-top: 0; }
    .process-step + .process-step { border-left: 1px solid var(--line); padding-left: 24px; }
}

.process-step::before {
    counter-increment: process;
    content: counter(process, decimal-leading-zero);
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    display: block;
    margin-bottom: 18px;
}

.process-step .step-title {
    font-family: var(--serif);
    font-size: 1.45rem;
    margin: 0 0 8px;
}

.flow-arrow { display: none; }

@media (min-width: 900px) {
    .flow-arrow { display: block; font-family: var(--serif); font-size: 1.2rem; }
}

/* ---------- Estrategias / insights listas ---------- */

.list-row {
    display: block;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.list-row:last-of-type { border-bottom: 1px solid var(--line); }

.list-row:hover .list-row__title { text-decoration: underline; }

.list-row__meta {
    display: flex;
    gap: 14px;
    align-items: baseline;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.list-row__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    line-height: 1.2;
    margin: 0 0 10px;
    text-underline-offset: 3px;
}

.list-row__summary { color: var(--muted); max-width: var(--measure); margin: 0; }

/* ---------- Statement editorial ---------- */

.statement {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3.4vw, 2.7rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
    max-width: 24ch;
    margin: 0 0 30px;
}

/* ---------- Track Record foundation (slots para 12B) ---------- */

.track-placeholder {
    border: 1px dashed var(--line-strong, var(--line));
    padding: clamp(24px, 4vw, 48px);
    margin: 40px 0 0;
}

.track-placeholder .eyebrow { margin-bottom: 10px; }

.track-placeholder p { max-width: var(--measure); color: var(--muted); margin: 0 0 16px; }

.track-slots { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 24px; }

@media (min-width: 800px) { .track-slots { grid-template-columns: repeat(3, 1fr); } }

.track-slot { background: var(--paper); padding: 22px; min-height: 140px; }

.track-slot .slot-title { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }

/* ---------- Track Record read model (12B) ---------- */

.track-selector { margin: 34px 0 8px; }

.track-selector ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 10px 0 0; }

.track-selector a { display: inline-block; border: 1px solid var(--line); padding: 7px 14px; font-size: 0.86rem; color: var(--ink); text-decoration: none; }

.track-selector a:hover { border-color: var(--ink); }

.track-selector a.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.perf-summary { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 28px 0; }

@media (min-width: 640px) { .perf-summary { grid-template-columns: repeat(3, 1fr); } }

.perf-stat { background: var(--paper); padding: 18px 20px; }

.perf-stat .eyebrow { margin: 0 0 8px; }

.perf-stat__value { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }

.perf-chart { margin: 34px 0 10px; }

.perf-chart figure { margin: 0; }

.perf-chart__svg { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }

.track-card { border-top: 1px solid var(--line); margin: 40px 0 0; padding: 26px 0 8px; }

.track-card__stat { display: flex; align-items: baseline; gap: 14px; font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin: 10px 0; }

.track-card__stat .muted { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--sans); }

.track-card__meta { margin: 4px 0 14px; }

.table-scroll { overflow-x: auto; margin: 26px 0 18px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.tbl caption { caption-side: top; text-align: left; }

.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }

.tbl thead th { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }

.tbl tbody th { font-weight: 400; }

@media print { .tbl th, .tbl td { font-size: 8.5pt; } }

.track-slot .slot-note { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* ---------- Insight detail ---------- */

.article-hero { padding: clamp(56px, 8vw, 110px) 0 40px; border-bottom: 1px solid var(--line); }

.article-body { padding: clamp(40px, 6vw, 72px) 0 90px; }

.article-body .editorial { font-size: 1.06rem; }

.article-meta { font-size: 0.82rem; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--paper); }

.site-footer__top { padding: clamp(48px, 7vw, 88px) 0 40px; }

.footer-brand { font-size: 1.1rem; letter-spacing: 0.03em; }

.footer-brand .brand-mark { font-family: var(--serif); }

.footer-tagline { color: var(--muted); margin-top: 4px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    margin-top: 40px;
}

@media (min-width: 760px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-col h2 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }

.footer-col li { margin: 8px 0; }

.footer-col a { color: var(--ink); text-decoration: none; font-size: 0.92rem; }

.footer-col a:hover { text-decoration: underline; }

.social-row { display: flex; gap: 10px; margin-top: 18px; }

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.social-link:hover { background: var(--faint); }

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 22px 0 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--muted);
}

.footer-bottom a { color: var(--muted); text-decoration: underline; }

/* ---------- Contact form ---------- */

.field { margin-bottom: 22px; }

.field-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 7px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid var(--line-strong, #9a9a9a);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.98rem;
    padding: 11px 12px;
}

.field textarea { min-height: 150px; resize: vertical; }

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
}

.field .is-error { border-color: var(--ink); }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 12px 16px; border: 1px solid var(--line); margin-bottom: 24px; font-size: 0.92rem; }

.alert--error { border-color: var(--ink); background: var(--faint); }

.alert--ok { border: 1px solid var(--ink); background: var(--faint); }

.form-errors { margin: 0 0 18px; padding: 0; list-style: none; color: var(--ink); font-size: 0.92rem; }

.form-errors li { padding: 6px 12px; border-left: 2px solid var(--ink); background: var(--faint); margin-bottom: 6px; }

.form-grid { max-width: 620px; }

/* ---------- Legal review marker ---------- */

.legal-review {
    border: 1px solid var(--ink);
    padding: 18px 20px;
    margin: 0 0 34px;
    font-size: 0.88rem;
    background: var(--faint);
}

.legal-review strong { font-family: var(--sans); letter-spacing: 0.04em; }

/* ---------- Pagination / misc ---------- */

.pagination { display: flex; gap: 14px; align-items: center; margin-top: 30px; font-size: 0.88rem; }

.pagination a { color: var(--ink); }

.contact-methods { display: grid; gap: 18px; margin: 0 0 40px; }

@media (min-width: 640px) { .contact-methods { grid-template-columns: repeat(3, 1fr); } }

.contact-method { border-top: 1px solid var(--line); padding-top: 16px; }

.contact-method dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.contact-method dd { margin: 6px 0 0; font-family: var(--serif); font-size: 1.1rem; }

/* ---------- Accesibilidad ---------- */

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Print ---------- */

@media print {
    .site-header, .menu-toggle, .site-footer, .skip-link { display: none !important; }
    body { font-size: 11pt; }
}
