/* Páginas legales y 404 · Oscar Leal */
:root {
  --white: #fff; --paper: #f7f6f3; --line: #e7e5e0; --gray-500: #807c75; --gray-700: #4f4c46; --ink: #141414; --black: #0b0b0b;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem); --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--white); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; padding: 0 var(--pad); background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { height: 26px; width: auto; }
.brand span { white-space: nowrap; font-family: var(--serif); font-weight: 500; font-size: 1.2rem; letter-spacing: .28em; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.3rem; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: var(--white); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; transition: transform .25s var(--ease), background .25s; }
.btn:hover { background: #2b2b2b; transform: translateY(-2px); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--white); }

.hero { background: var(--black); color: var(--white); padding: clamp(3rem, 8vw, 5.5rem) var(--pad) clamp(2.5rem, 6vw, 4rem); }
.hero__in { max-width: 54rem; margin: 0 auto; }
.crumbs { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: #a29e96; list-style: none; margin-bottom: 1.4rem; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--white); }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.02; }
.hero p { margin-top: 1rem; color: #c9c6bf; max-width: 40rem; }

.layout { max-width: 72rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) var(--pad) 5rem; display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
.toc { position: sticky; top: 92px; align-self: start; font-size: .84rem; }
.toc p { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gray-500); margin-bottom: .8rem; }
.toc ol { list-style: none; display: grid; gap: .15rem; border-left: 1px solid var(--line); }
.toc a { display: block; padding: .3rem 0 .3rem 1rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--gray-700); text-decoration: none; transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.is-current { color: var(--ink); border-color: var(--ink); }

.doc { max-width: 46rem; }
.doc section { padding: 0 0 2.2rem; margin-bottom: 2.2rem; border-bottom: 1px solid var(--line); }
.doc section:last-child { border: 0; }
.doc h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.15; margin-bottom: .9rem; }
.doc h2 small { display: block; font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gray-500); margin-bottom: .4rem; }
.doc h3 { font-size: .95rem; font-weight: 600; margin: 1.3rem 0 .4rem; }
.doc p, .doc li { color: var(--gray-700); }
.doc p + p { margin-top: .8rem; }
.doc ul { margin: .6rem 0 0 1.1rem; display: grid; gap: .35rem; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { text-decoration: underline; text-underline-offset: 2px; }
.note { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.2rem; font-size: .92rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; }
.card strong { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: .2rem; }
.card p { font-size: .9rem; }
.updated { font-size: .8rem; color: var(--gray-500); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }

.foot { background: var(--black); color: #807c75; text-align: center; padding: 2.5rem var(--pad) 3rem; font-size: .82rem; display: grid; gap: .7rem; }
.foot nav { display: flex; justify-content: center; gap: .4rem 1.4rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); }

/* 404 */
.lost { min-height: calc(100svh - 68px); display: grid; place-items: center; text-align: center; padding: 3rem var(--pad); background: radial-gradient(circle at 50% 30%, var(--paper), var(--white) 60%); }
.lost__n { font-family: var(--serif); font-size: clamp(6rem, 26vw, 12rem); line-height: .9; font-weight: 500; letter-spacing: -.02em; }
.lost h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 5vw, 2.4rem); margin-top: .6rem; }
.lost p { color: var(--gray-700); margin: .7rem auto 0; max-width: 28rem; }
.lost .actions { justify-content: center; margin-top: 1.8rem; }
.lost img { width: 90px; margin: 0 auto 1rem; opacity: .9; animation: volar 3.2s ease-in-out infinite; }
@keyframes volar { 50% { transform: translateY(-8px) rotate(-3deg); } }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; background: var(--paper); border-radius: 10px; padding: 1rem 1.1rem; }
  .grid2 { grid-template-columns: 1fr; }
  .brand span { font-size: 1.05rem; }
  .top .btn { padding: .6rem .9rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, .toc, .foot, .actions { display: none; } .hero { background: none; color: var(--ink); } .hero p { color: var(--gray-700); } .layout { display: block; } }
