/* El Expediente — white page v2 (архивное досье, один экран + доступ) */
:root {
  --ink: #191b1e;
  --paper: #f4efe4;
  --card: #fffdf8;
  --muted: #625f56;
  --line: #d9d2c2;
  --accent: #b8342a;
  --accent-dark: #93261e;
  --navy: #16324a;
  --stamp: #b8342a;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", "Courier New", monospace;
  --sans: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---------- top strip ---------- */
.topline {
  background: var(--ink); color: #cfc9ba;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
}
.topline .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 12px; }
.topline .l { display: flex; align-items: center; gap: 8px; }
.topline .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; animation: blink 1.8s infinite; }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

/* ---------- header ---------- */
.sitehead { padding: 22px 0 0; }
.sitehead .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 27px; letter-spacing: -.3px;
  text-decoration: none; color: inherit;
}
.brand b { color: var(--accent); }
.brand small {
  display: block; font-family: var(--mono); font-weight: 400; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.sitehead .tagline {
  font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; letter-spacing: .04em;
}
hr.rule { border: 0; border-top: 3px solid var(--ink); margin: 14px 0 0; }

/* ---------- document card ---------- */
.doc { position: relative; margin: 26px auto 0; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(60, 50, 20, .08); }
.doc-inner { padding: 34px 40px 30px; }
.doc .fileline {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 20px;
  padding-right: 170px;
}
.badge {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--accent);
  padding: 4px 10px;
}
h1.title {
  font-family: var(--serif); font-size: 38px; line-height: 1.16; letter-spacing: -.4px;
  margin: 14px 0 12px; text-wrap: balance;
}
.standfirst { font-size: 17.5px; color: #3d3b35; line-height: 1.55; margin-bottom: 16px; }
.byline {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 10px 0; margin-bottom: 20px;
}
.byline b { color: var(--ink); }

/* faded preview */
.preview { position: relative; }
.preview p { font-family: var(--serif); font-size: 17px; line-height: 1.7; color: #2c2a25; margin-bottom: 14px; }
.preview .fadebox { position: relative; max-height: 150px; overflow: hidden; }
.preview .fadebox::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 84px;
  background: linear-gradient(180deg, rgba(255,253,248,0), var(--card) 92%);
}
.hidden-note {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px dashed var(--line); padding: 9px 12px; margin: 4px 0 0;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center;
}
.hidden-note .lock { color: var(--accent); font-weight: 700; }
.btn-sm { font-size: 15.5px; padding: 11px 22px; }
.hidden-note .btn-sm { box-shadow: 0 5px 16px rgba(184, 52, 42, .32); }
.minicta {
  font-family: var(--mono); font-size: 12.5px; color: var(--accent); font-weight: 700;
  text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px;
}
.minicta:hover { color: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- what's inside ---------- */
.inside { margin: 24px 0 6px; counter-reset: ins; }
.inside h2 { font-family: var(--serif); font-size: 20px; margin-bottom: 12px; }
.inside ul { list-style: none; }
.inside li {
  position: relative; padding: 9px 0 9px 44px; border-bottom: 1px dashed var(--line);
  font-size: 15.5px; color: #2e2c26;
}
.inside li:last-child { border-bottom: 0; }
.inside li::before {
  counter-increment: ins; content: counter(ins, decimal-leading-zero);
  position: absolute; left: 0; top: 11px; font-family: var(--mono);
  font-size: 12px; font-weight: 700; color: #fff; background: var(--navy);
  width: 28px; height: 22px; display: flex; align-items: center; justify-content: center;
  border-radius: 2px; letter-spacing: .04em;
}

/* why removed */
.why { margin: 20px 0 4px; background: #fbf7ee; border: 1px solid var(--line); padding: 18px 20px; }
.why h2 { font-family: var(--serif); font-size: 19px; margin-bottom: 8px; }
.why p { font-size: 14.5px; color: #47443c; margin-bottom: 8px; }
.why p:last-child { margin-bottom: 0; }
.why .ver { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { margin: 26px 0 6px; text-align: center; padding: 26px 20px 30px; background: var(--navy); }
.cta .k { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #ffd98a; }
.cta h2 { font-family: var(--serif); color: #fff; font-size: 26px; margin: 8px 0 6px; line-height: 1.25; }
.cta .sub { color: #c7d3de; font-size: 14.5px; margin-bottom: 20px; }
.btn {
  display: inline-block; background: var(--accent); color: #fff !important; text-decoration: none;
  font-weight: 700; font-size: 18px; padding: 16px 34px; border-radius: 3px;
  transition: transform .12s ease, background .12s ease; letter-spacing: .01em;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.cta .fine { font-family: var(--mono); font-size: 11.5px; color: #9fb0c0; margin-top: 14px; letter-spacing: .03em; }
.cta .warn { font-family: var(--mono); font-size: 11px; color: #ffd98a; margin-top: 8px; }

/* stamp */
.stamp {
  position: absolute; top: 14px; right: 18px; transform: rotate(6deg);
  border: 3px double var(--stamp); color: var(--stamp);
  font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .12em;
  padding: 6px 12px; text-transform: uppercase; opacity: .85; pointer-events: none;
  background: rgba(255,253,248,.7);
}
.stamp small { display: block; font-size: 9px; letter-spacing: .18em; font-weight: 400; text-align: center; margin-top: 2px; }

/* ---------- subsection pages (acceso, gracias, sobre...) ---------- */
.subhead { text-align: center; padding: 8px 0 2px; }
.subhead .b { display: inline-block; margin-bottom: 10px; }
.subhead h1 { font-family: var(--serif); font-size: 32px; line-height: 1.2; margin: 10px 0 8px; text-wrap: balance; }
.subhead p { color: #4a473f; font-size: 16px; max-width: 560px; margin: 0 auto 6px; }
.formbox { max-width: 480px; margin: 22px auto 0; }
.formbox label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.formbox input[type=email] {
  width: 100%; font-size: 17px; padding: 14px 16px; border: 2px solid var(--ink);
  background: #fff; border-radius: 3px; font-family: var(--sans);
}
.formbox input[type=email]:focus { outline: none; border-color: var(--accent); }
.formbox .hp { position: absolute; left: -9999px; }
.formbox button {
  width: 100%; margin-top: 12px; border: 0; cursor: pointer; border-radius: 3px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 700;
  padding: 15px 20px; font-family: var(--sans); transition: background .12s ease;
}
.formbox button:hover { background: var(--accent-dark); }
.formbox .note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 12px; }
.steps { display: flex; justify-content: center; gap: 10px; margin: 4px 0 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.steps span.on { color: var(--accent); font-weight: 700; }
.steps span.done { color: #8a877e; }

.checkmark {
  width: 64px; height: 64px; border-radius: 50%; background: #1e7d46; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
  margin: 8px auto 16px; box-shadow: 0 8px 20px rgba(30,125,70,.25);
}

.pagebox { background: var(--card); border: 1px solid var(--line); padding: 32px 38px; margin-top: 26px; }
.pagebox h1 { font-family: var(--serif); font-size: 30px; margin-bottom: 14px; }
.pagebox h3 { font-family: var(--serif); font-size: 20px; margin: 22px 0 8px; }
.pagebox p, .pagebox li { font-size: 15px; color: #33312b; margin-bottom: 10px; line-height: 1.7; }
.pagebox ul { margin-left: 20px; }

/* ---------- footer ---------- */
footer { margin-top: 40px; padding: 26px 0 34px; border-top: 3px solid var(--ink); }
footer .frow { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer .fbrand { font-family: var(--serif); font-weight: 700; font-size: 18px; }
footer .fbrand b { color: var(--accent); }
footer p { font-size: 12px; color: var(--muted); max-width: 460px; line-height: 1.6; }
footer .links { font-family: var(--mono); font-size: 11.5px; display: flex; gap: 14px; flex-wrap: wrap; }
footer .links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
footer .discl { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.55; }
footer .copyline { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 16px; }

/* ---------- cookie bar ---------- */
#cookiebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #191b1e; color: #e8e4d8; font-size: 13px;
  padding: 12px 18px; display: flex; gap: 14px; justify-content: center;
  align-items: center; flex-wrap: wrap;
  transform: translateY(110%); transition: transform .25s ease;
}
#cookiebar.show { transform: translateY(0); }
body.has-cookies { padding-bottom: 64px; }
#cookiebar a { color: #fff; text-decoration: underline; padding: 4px 0; display: inline-block; }
#cookiebar .cbbtns { display: flex; gap: 8px; }
#cookiebar button { border: 0; cursor: pointer; padding: 8px 14px; font-size: 12.5px; font-weight: 600; border-radius: 2px; font-family: var(--sans); }
#cookiebar #cbOk { background: var(--accent); color: #fff; }
#cookiebar #cbNo { background: #4a4e54; color: #fff; }

/* pulsing main button */
.btn.pulse { animation: btnpulse 2.6s ease-in-out infinite; }
@keyframes btnpulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,.25), 0 0 0 0 rgba(184, 52, 42, .40); }
  50% { box-shadow: 0 6px 18px rgba(0,0,0,.25), 0 0 0 14px rgba(184, 52, 42, 0); }
}
@media (prefers-reduced-motion: reduce) { .btn.pulse { animation: none; } }

/* small extras */
.proof { font-family: var(--mono); font-size: 11.5px; color: #c7d3de; margin-top: 9px; letter-spacing: .02em; }
.alt { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 18px; }
.alt a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
.mobilebar { display: none; }
@media (max-width: 700px) {
  .topline { font-size: 10px; }
  .topline .wrap { height: auto; min-height: 34px; padding: 7px 20px; flex-wrap: wrap; row-gap: 2px; }
  .topline .wrap > span:last-child { white-space: nowrap; }
  .doc-inner { padding: 24px 20px 22px; }
  h1.title { font-size: 28px; }
  .doc .fileline { padding-right: 0; }
  .stamp { position: static; display: block; width: max-content; margin: 14px 14px 0 auto; transform: rotate(-3deg); font-size: 10px; padding: 4px 9px; }
  .cta h2 { font-size: 22px; }
  .btn { width: 100%; padding: 16px 20px; font-size: 17px; }
  .sitehead .wrap { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sitehead .tagline { text-align: left; }
  .pagebox { padding: 24px 20px; }
  .byline { row-gap: 4px; }
  .hidden-note { flex-direction: column; align-items: stretch; gap: 10px; }
  .hidden-note .btn-sm { width: 100%; text-align: center; }
  .mobilebar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom, 0px));
    background: rgba(244, 239, 228, .96);
    box-shadow: 0 -8px 22px rgba(40, 30, 10, .12);
    backdrop-filter: blur(6px);
  }
  .mobilebar .btn { width: 100%; text-align: center; font-size: 15.5px; padding: 12px 16px; }
  body:has(.mobilebar) { padding-bottom: 78px; }
  #cookiebar { font-size: 12px; padding: 10px 14px; gap: 8px; justify-content: flex-start; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  #cookiebar .cbbtns { width: 100%; }
  #cookiebar .cbbtns button { flex: 1; }
  body.has-cookies { padding-bottom: 165px; }
}
