/* ==========================================================================
   granadosai.com: shared foundation of the "Dictamen" identity.
   Loaded by every page, before the page stylesheet (home.css or pages.css).
   Design source: design/landing-pro/04-dictamen-opus.html (plan in its top comment).
   Fonts are self-hosted in css/fonts.css: Newsreader (serif voice), DM Sans (UI).
   ========================================================================== */

:root {
    --papel: #F4F6F7;        /* page ground, cool neutral */
    --hoja: #FFFFFF;         /* sheets, bands, fields */
    --tinta: #161A1E;        /* text */
    --grafito: #505B64;      /* secondary text: 6.6:1 on papel, 7.1:1 on hoja */
    --regla: #D3D9DD;        /* rules and table lines */
    --campo: #7D8890;        /* field borders: 3.5:1 on hoja (WCAG 1.4.11) */
    --azul: #1E4D6E;         /* actions and links: white on azul 8.8:1 */
    --azul-hondo: #153A54;   /* hover */
    --lapiz: #B3261E;        /* the reviewer's red pen: only in the sample proposal */
    --ok: #2E6B3F;
    --aclarar: #8A5A00;

    --serif: 'Newsreader', 'Sitka Text', Charter, Cambria, Georgia, serif;
    --sans: 'DM Sans', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

    --ancho: 1200px;
    --seccion: 104px;
}

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

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

body {
    margin: 0;
    background: var(--papel);
    color: var(--tinta);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--azul); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--azul-hondo); }

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

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

p { margin: 0 0 1em; }

.contenedor { width: min(100% - 48px, var(--ancho)); margin-inline: auto; }
.secundario { color: var(--grafito); }

.salto {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 30;
    background: var(--azul);
    color: #fff;
    padding: 10px 14px;
    font-family: var(--sans);
    font-size: 15px;
}
.salto:focus { top: 12px; color: #fff; }

/* Buttons --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    padding: 14px 22px;
    border-radius: 4px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primario { background: var(--azul); color: #fff; }
.btn-primario:hover { background: var(--azul-hondo); color: #fff; }
.btn-secundario { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.btn-secundario:hover { background: var(--hoja); color: var(--tinta); }
.btn[disabled] { opacity: .7; cursor: progress; }

/* Header: the "JOHN JAIRO" lockup is the one brand asset carried over ---- */
.cabecera {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--papel);
    border-bottom: 1px solid var(--regla);
}
.cabecera .contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.marca {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: var(--tinta);
    font-family: var(--sans);
    line-height: 1;
}
.marca:hover { color: var(--tinta); }
.marca-nombre { font-size: 17px; font-weight: 700; letter-spacing: .08em; }
/* "AI" is the brand's key: white on a solid azul block, like a stamp inside the name.
   Ink-on-ink colour alone (azul next to tinta) disappeared at logo size. */
.marca-ai {
    display: inline-block;
    background: var(--azul);
    color: #fff;
    /* The name's .08em tracking would leave extra air after the I inside the block:
       tighter tracking here and padding that compensates keep both sides even, and
       the right margin matches the gap the J's own tracking leaves on the left. */
    letter-spacing: .05em;
    padding: 2px 3px 2px 4px;
    margin: 0 .1em 0 0;
    border-radius: 2px;
    line-height: 1;
}
.marca-apellido { font-size: 10.5px; font-weight: 500; letter-spacing: .34em; color: var(--grafito); }

.menu { display: flex; align-items: center; gap: 28px; font-family: var(--sans); font-size: 15px; }
.menu a { color: var(--grafito); text-decoration: none; padding: 6px 0; white-space: nowrap; }
.menu a:hover { color: var(--tinta); text-decoration: underline; }
.menu a[aria-current="page"] { color: var(--tinta); text-decoration: underline; }
/* .menu a (0,1,1) outranks .btn-primario (0,1,0): restate the button inside the menu. */
.menu a.btn-primario { color: #fff; padding: 10px 16px; text-decoration: none; }

/* Sections -------------------------------------------------------------- */
.seccion { padding: var(--seccion) 0; }
.banda { background: var(--hoja); border-top: 1px solid var(--regla); border-bottom: 1px solid var(--regla); }
.seccion h2 { font-size: clamp(2rem, 3.1vw, 2.65rem); max-width: 22ch; margin-bottom: 16px; }
.intro { color: var(--grafito); max-width: 38rem; margin-bottom: 56px; }

/* Lists with a short rule as marker; .lista-no marks what is excluded --- */
.lista { margin: 0; padding: 0; }
.lista li { list-style: none; position: relative; padding-left: 22px; font-size: 16.5px; line-height: 1.5; margin-bottom: 8px; }
.lista li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 10px; height: 1.5px; background: var(--tinta); }
.lista-no li { color: var(--grafito); }
.lista-no li::before { content: "\00d7"; background: none; width: auto; height: auto; top: 0; left: 1px; font-family: var(--sans); font-size: 17px; color: var(--grafito); }

/* Forms ----------------------------------------------------------------- */
.campo { margin-bottom: 20px; }
.campo label { display: block; font-family: var(--sans); font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.campo label span { font-weight: 400; color: var(--grafito); }
.campo input,
.campo select,
.campo textarea {
    width: 100%;
    font-family: var(--sans);
    font-size: 16px;
    color: var(--tinta);
    background: var(--hoja);
    border: 1px solid var(--campo);
    border-radius: 3px;
    padding: 12px 14px;
}
.campo textarea { min-height: 128px; resize: vertical; }
.campo input::placeholder,
.campo textarea::placeholder { color: #6B767E; }
.campo input:focus-visible,
.campo select:focus-visible,
.campo textarea:focus-visible { outline: 3px solid var(--azul); outline-offset: 1px; border-color: var(--azul); }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Honeypot: off-screen, out of the accessibility tree via aria-hidden in the markup. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consentimiento {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-family: var(--sans);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--grafito);
    margin: 4px 0 24px;
}
.consentimiento input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--azul); cursor: pointer; }
.legal { font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--grafito); margin-top: 16px; }

/* Status message after a form submit (js/main.js showToast) -------------- */
.form-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 40;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: min(100% - 32px, 34rem);
    padding: 14px 18px;
    background: var(--hoja);
    color: var(--tinta);
    border: 1px solid var(--regla);
    border-left: 4px solid var(--ok);
    border-radius: 4px;
    box-shadow: 0 18px 40px -24px rgba(22, 26, 30, .45);
    font-family: var(--sans);
    font-size: 15.5px;
    line-height: 1.45;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .25s, transform .25s;
}
.form-toast.show { opacity: 1; transform: translate(-50%, 0); }
.form-toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ok); }
.form-toast-error { border-left-color: var(--lapiz); }
.form-toast-error svg { color: var(--lapiz); }
.form-toast button {
    margin-left: auto;
    border: 0;
    background: none;
    color: var(--grafito);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

/* Footer ---------------------------------------------------------------- */
.pie { border-top: 1px solid var(--regla); padding: 32px 0 40px; }
.pie .contenedor {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--grafito);
}
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pie a { color: var(--grafito); }
.pie a:hover { color: var(--tinta); }
.pie p { margin: 0; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 860px) {
    :root { --seccion: 72px; }
    .cabecera .contenedor { flex-wrap: wrap; gap: 4px 24px; padding: 12px 0; }
    .menu { order: 3; width: 100%; gap: 22px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
    .menu a.btn-primario { display: none; }
}

@media (max-width: 560px) {
    body { font-size: 17px; }
    .contenedor { width: min(100% - 32px, var(--ancho)); }
    .par { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .form-toast { transition: none; }
}
