/* ==========================================================================
   Classified — the leaked document the snail is holding.
   A typed page on a dark desk. Redaction bars declassify on click.
   ========================================================================== */

@font-face {
  font-family: "Special Elite";
  src: url("../fonts/special-elite-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page-classified {
  --paper: #efe8d6;
  --paper-edge: #d9cfb6;
  --type: #262320;
  --type-dim: #5d564c;
  --stamp: #b3261e;
  --font-type: "Special Elite", "Courier New", Courier, monospace;

  background:
    radial-gradient(120% 80% at 50% 0%, rgba(80, 64, 48, 0.28), transparent 60%),
    repeating-linear-gradient(95deg, rgba(255, 255, 255, 0.012) 0 2px, rgba(0, 0, 0, 0.03) 2px 5px),
    #17130f;
}

.desk {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 28px var(--gutter) 40px;
}
.desk__note {
  max-width: 62ch;
  color: #b9ad97;
  font-size: 15px;
  text-align: center;
}
.desk__note strong {
  color: #f1e6cf;
}

/* ---------- The page ---------- */
.doc {
  position: relative;
  width: min(780px, 100%);
  padding: clamp(28px, 6vw, 64px) clamp(22px, 6vw, 72px) clamp(32px, 6vw, 60px);
  color: var(--type);
  font-family: var(--font-type);
  font-size: 17px;
  line-height: 1.7;
  background:
    radial-gradient(circle at 82% 88%, transparent 38px, rgba(120, 78, 40, 0.16) 40px, rgba(120, 78, 40, 0.08) 44px, transparent 47px),
    linear-gradient(90deg, transparent 49.6%, rgba(0, 0, 0, 0.05) 50%, rgba(255, 255, 255, 0.35) 50.4%, transparent 51%),
    radial-gradient(140% 100% at 50% 40%, var(--paper) 55%, var(--paper-edge) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 6px 16px rgba(0, 0, 0, 0.4);
  transform: rotate(-0.6deg);
}
.doc::before {
  /* paper grain */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.doc__head {
  position: relative;
  margin-bottom: 30px;
  padding-top: 40px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--type);
  padding-right: 150px;
}
.doc__ref {
  color: var(--type-dim);
  font-size: 14px;
}
.doc__title {
  margin: 6px 0 10px;
  font-size: clamp(26px, 4.2vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.doc__class {
  font-size: 15px;
}

.doc__section {
  position: relative;
  margin-bottom: 26px;
}
.doc__section h2 {
  margin-bottom: 6px;
  font-size: 19px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.doc__section p {
  max-width: 60ch;
}
.doc__table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
}
.doc__table th,
.doc__table td {
  padding: 5px 0;
  border-bottom: 1px dashed rgba(38, 35, 32, 0.35);
  text-align: left;
  vertical-align: top;
}
.doc__table th {
  width: 36%;
  padding-right: 16px;
  font-weight: 400;
  color: var(--type-dim);
}
.doc__list {
  padding-left: 1.4em;
  list-style: "– ";
}
.doc__list li {
  margin-bottom: 2px;
}

/* ---------- Redactions ---------- */
.redact {
  position: relative;
  display: inline;
  padding: 0 2px;
  border-radius: 1px;
  background: #151311;
  color: transparent;
  cursor: pointer;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 0.35s ease, color 0.35s ease;
}
.redact:hover {
  background: #2b2723;
}
.redact:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 2px;
}
.redact.is-revealed {
  background: rgba(179, 38, 30, 0.12);
  color: var(--stamp);
  cursor: default;
}

/* ---------- Photo, stamps, signature ---------- */
.doc__photo {
  position: absolute;
  top: clamp(18px, 4vw, 40px);
  right: clamp(18px, 5vw, 56px);
  z-index: 2;
  width: 132px;
  margin: 0;
  padding: 8px 8px 10px;
  background: #fbf8f0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  transform: rotate(4deg);
}
.doc__photo::before {
  /* paper clip */
  content: "";
  position: absolute;
  top: -14px;
  left: 18px;
  width: 16px;
  height: 44px;
  border: 3px solid #8e959a;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #c9ced1;
}
.doc__photo img {
  width: 100%;
  height: auto;
}
.doc__photo figcaption {
  margin-top: 6px;
  color: var(--type-dim);
  font-size: 11px;
  line-height: 1.3;
}

.stamp {
  position: absolute;
  z-index: 1;
  padding: 4px 12px;
  border: 3px solid currentColor;
  border-radius: 4px;
  color: var(--stamp);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 1.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 1.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp--top {
  top: clamp(14px, 3vw, 26px);
  left: clamp(16px, 5vw, 60px);
  transform: rotate(-7deg);
}
.stamp--leaked {
  right: clamp(20px, 7vw, 90px);
  bottom: clamp(70px, 12vw, 120px);
  font-size: 44px;
  color: #c2185b;
  transform: rotate(-14deg);
}

.doc__sign {
  margin-top: 34px;
  color: var(--type-dim);
  font-size: 14px;
}
.doc__signature {
  margin-bottom: -4px;
  color: #1f3f7a;
  font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive;
  font-size: 30px;
  line-height: 1.2;
  transform: rotate(-4deg);
  transform-origin: left center;
}

/* ---------- Under the page ---------- */
.desk__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.btn--paper {
  border-color: rgba(239, 232, 214, 0.35);
  color: #f1e6cf;
}
.btn--paper:hover {
  border-color: rgba(239, 232, 214, 0.7);
  background: rgba(239, 232, 214, 0.08);
}
.desk__disclaimer {
  color: #8d8373;
  font-size: 13px;
  text-align: center;
}

.page-classified .site-footer {
  justify-content: center;
  color: #8d8373;
}
.page-classified .site-footer__note {
  margin-right: 0;
}

@media (max-width: 640px) {
  .doc {
    font-size: 16px;
    transform: none;
  }
  .doc__head {
    padding-right: 0;
    padding-top: 210px;
  }
  .doc__photo {
    width: 108px;
    right: 14px;
  }
  .stamp--top {
    font-size: 22px;
  }
  .stamp--leaked {
    font-size: 32px;
  }
}

@media print {
  .page-bar,
  .desk__actions,
  .site-footer,
  .desk__note {
    display: none;
  }
  .redact {
    color: var(--stamp);
    background: none;
  }
}
