/* cesarhoyos.com — «cuaderno de campo». Sin fuentes externas: serifas y sans del sistema. */
:root {
  --paper: #f6f1e7;
  --paper-2: #efe7d8;
  --card: #fbf8f2;
  --ink: #1f1d1a;
  --ink-2: #4a453d;
  --muted: #8a8172;
  --line: #d9cfbd;
  --accent: #E8613C;
  --accent-ink: #b5401f;      /* naranja oscurecido para texto: contraste AA sobre papel */
  --sea: #dfe7e6;
  --land: #ece2cd;
  --teal: #2f6f66;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1a17;
    --paper-2: #23211d;
    --card: #26241f;
    --ink: #ece6da;
    --ink-2: #c7bfb0;
    --muted: #9a9183;
    --line: #3a362f;
    --accent-ink: #f08a68;
    --sea: #22302f;
    --land: #2e2a22;
    --teal: #7fb8ae;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper) url(/img/contours.svg) repeat 0 0 / 700px 600px;
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

.wrap { width: min(100% - 2.5rem, 62rem); margin-inline: auto; }
@media (max-width: 400px) { .wrap { width: calc(100% - 1.75rem); } }

/* Cabecera */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(4px); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; padding-block: .7rem; }
.brand { font: 600 1.15rem/1.2 var(--serif); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand span { color: var(--accent); }
.menu { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: 0; padding: 0; list-style: none; font-size: .92rem; }
.menu a { color: var(--ink-2); text-decoration: none; }
.menu a:hover { color: var(--accent-ink); text-decoration: underline; }
.lang { font-size: .85rem; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; text-decoration: none; color: var(--ink); }
@media (max-width: 640px) { .menu { order: 3; width: 100%; font-size: .88rem; } }

/* Secciones */
main { padding-bottom: 3rem; }
section { padding-block: 2.6rem; border-bottom: 1px dashed var(--line); scroll-margin-top: 5rem; }
section:last-of-type { border-bottom: 0; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; margin: 0 0 .6rem; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h2::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .45em; border: 2px solid var(--accent); border-radius: 50%; vertical-align: .08em; }
h3 { font-size: 1.15rem; }
.intro { color: var(--ink-2); max-width: 44rem; margin-top: 0; }
p { margin: 0 0 1rem; }

.hero { padding-block: 3.4rem 2.6rem; }
.hero h1 { font-size: clamp(2.1rem, 1.6rem + 2.6vw, 3.4rem); margin-bottom: .3rem; }
.hero .role { font: 600 1.2rem/1.4 var(--serif); color: var(--accent-ink); margin: 0 0 .4rem; }
.hero .lead { font: 1.35rem/1.45 var(--serif); max-width: 40rem; margin-bottom: 1.2rem; }
.hero .sub { color: var(--ink-2); max-width: 40rem; }
.hero-links { margin: 1.4rem 0 0; }
.btn-quiet { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: .4rem .95rem; text-decoration: none; font-size: .98rem; }
.btn-quiet:hover { border-color: var(--accent); }

.now ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-width: 44rem; }
.now li { padding-left: 1.4rem; position: relative; }
.now li::before { content: "→"; position: absolute; left: 0; color: var(--accent-ink); }
.meta { font-size: .85rem; color: var(--muted); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); margin-block: 1.2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; }
.card p { margin: 0; color: var(--ink-2); }
.card h3 { margin-bottom: .35rem; }

figure { margin: 1.4rem 0; }
figure svg { display: block; width: 100%; max-width: 40rem; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; max-width: 40rem; }

.examples article { display: grid; gap: .3rem 2rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.examples article:first-of-type { border-top: 0; }
@media (min-width: 820px) {
  .examples article.has-fig { grid-template-columns: 1fr 1fr; align-items: start; }
  .examples article.has-fig figure { margin: 0; }
}
.examples p { color: var(--ink-2); max-width: 40rem; }

/* Mapa */
.maps { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-block: 1.2rem; }
.maps figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; }
.maps svg { max-width: none; }
.legend { columns: 2 16rem; padding-left: 2.1rem; margin: .8rem 0; }
.legend li { break-inside: avoid; margin-bottom: .2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.tags li { font-size: .88rem; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .1rem .7rem; color: var(--ink-2); }
.m-land { fill: var(--land); stroke: var(--ink-2); stroke-width: 1.2; stroke-linejoin: round; }
.m-area { fill: var(--accent); fill-opacity: .3; stroke: var(--accent-ink); stroke-width: 1.2; stroke-dasharray: 4 2; stroke-linejoin: round; }
.area-key, .kinds { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .45rem; max-width: 46rem; }
.area-key li, .kinds li { display: flex; gap: .55rem; align-items: baseline; }
.k-ico { flex: none; width: 16px; height: 16px; transform: translateY(2px); }
.area-key span, .kinds span { min-width: 0; }
.kinds strong { font-weight: 600; }
.k-building { fill: var(--accent); }
.k-civil { fill: var(--ink-2); }
.k-land { fill: var(--teal); }
.m-pt { fill: var(--accent); stroke: var(--card); stroke-width: 1.5; }
.m-num { fill: #1f1d1a; font: 700 9px/1 var(--sans); }
.m-lbl { fill: var(--ink-2); font: 11px/1 var(--sans); }

/* Laboratorio, notas, publicaciones */
.badge { display: inline-block; font-size: .78rem; border-radius: 999px; padding: .05rem .6rem; margin: 0 .3rem .4rem 0; border: 1px solid var(--line); color: var(--ink-2); }
.badge.status { border-color: var(--accent); color: var(--accent-ink); }
.lab .tagline { font: 1.15rem/1.45 var(--serif); margin-bottom: .6rem; }
.lab .soon { font-weight: 600; color: var(--accent-ink); }
.tools { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); margin-block: 1.2rem; }
.card.tool { padding: 1.4rem 1.5rem; border-left: 4px solid var(--accent); }
.card.tool h3 { font-size: 1.35rem; margin-top: .2rem; }
.card.tool dl { margin: .9rem 0 0; display: grid; gap: .15rem; }
.card.tool dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: .5rem; }
.card.tool dd { margin: 0; color: var(--ink-2); }
.list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .9rem; }
.list li { max-width: 46rem; }
.list .venue { display: block; color: var(--ink-2); font-size: .95rem; }

/* Trayectoria */
.timeline { list-style: none; margin: 1.2rem 0; padding: 0 0 0 1.2rem; border-left: 2px solid var(--line); max-width: 46rem; }
.timeline li { position: relative; padding: 0 0 1.2rem .8rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.2rem - 7px); top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline .years { font: .85rem var(--mono); color: var(--muted); display: block; }
.timeline p { color: var(--ink-2); margin: .2rem 0 0; }

.contact .links { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 1rem 0; }
.contact .links a { display: inline-block; border: 1px solid var(--accent); border-radius: 6px; padding: .35rem .9rem; text-decoration: none; }
/* Formulario (parte B) */
.form-box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem 1.3rem; max-width: 40rem; margin-block: 1.2rem; }
.form-box h3 { margin-bottom: .5rem; }
.field { display: grid; gap: .25rem; margin-bottom: .9rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.req { color: var(--accent-ink); }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .65rem; }
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--accent-ink) !important; box-shadow: 0 0 0 1px var(--accent-ink); }
.field.check { grid-template-columns: auto 1fr; align-items: start; gap: .6rem; }
.field.check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; accent-color: var(--accent); }
.field.check label { font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ts:empty { display: none; }
.ts { margin-bottom: .8rem; }
.btn { font: 600 1rem/1.2 var(--sans); background: var(--accent-ink); color: #fff; border: 0; border-radius: 6px; padding: .6rem 1.2rem; cursor: pointer; }
.btn:hover { background: var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.alert { border-left: 4px solid var(--accent-ink); background: var(--paper-2); padding: .55rem .8rem; color: var(--ink); }
.ok { font: 1.1rem/1.5 var(--serif); border-left: 4px solid var(--teal); padding: .4rem .9rem; margin: 0; }
@media (prefers-color-scheme: dark) { .btn { color: #1b1a17; } .btn:hover { background: var(--ink); } }

/* Artículos (notas y legales) */
.prose { max-width: 42rem; padding-block: 2.4rem; }
.prose h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose h2::before { display: none; }
.prose li { margin-bottom: .35rem; }

footer { border-top: 1px solid var(--line); padding-block: 1.4rem 2rem; font-size: .9rem; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
footer a { color: var(--ink-2); }

/* Ilustraciones (SVG en línea) */
.il-paper { fill: var(--card); stroke: var(--line); }
.il-ink { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.il-inkf { fill: var(--ink); }
.il-thick { stroke-width: 2.2; }
.il-mut { fill: none; stroke: var(--muted); stroke-width: 1; stroke-linecap: round; }
.il-dot { fill: var(--ink-2); }
.il-acc { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.il-accf { fill: var(--accent); }
.il-ray { stroke: var(--accent); stroke-width: .8; stroke-opacity: .7; }
.il-dash { stroke-dasharray: 5 4; }
.il-shot { fill: var(--accent); fill-opacity: .08; stroke: var(--accent); stroke-opacity: .45; stroke-width: .7; }
.il-land { fill: var(--land); }
.il-sea { fill: var(--sea); }
.il-txt { fill: var(--accent-ink); font: 10px var(--mono); }

@media print {
  body { background: #fff; }
  .top { position: static; }
  .skip, .lang { display: none; }
}
