/* ==========================================================================
   A Boy's Dream — Issue #1 newspaper experiences
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@700&family=Special+Elite&family=Archivo+Black&display=swap");

:root {
  --paper: #ebe4d4;
  --paper-deep: #d9d0bc;
  --ink-p: #12100c;
  --muted-p: rgba(18, 16, 12, 0.55);
  --rule: rgba(18, 16, 12, 0.22);
  --red-p: #c42021;
  --desk: #2a2620;
}

/* When newspaper is showing, soften the specimen chrome */
body:has(.paper-spread) {
  overflow: hidden;
}

.dir-paper {
  background: var(--paper);
  color: var(--ink-p);
  font-family: "Special Elite", "Courier New", monospace;
}
.dir-paper .site-foot {
  display: none;
}
.dir-paper .site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: transparent;
  border-bottom: 0;
  color: var(--ink-p);
  font-family: var(--sans);
}
.dir-paper .site-head .brand,
.dir-paper .capricho,
.dir-paper .site-nav a,
.dir-paper .cart {
  color: var(--ink-p);
}
.dir-paper .brand-sub,
.dir-paper .brand-slash {
  color: rgba(18, 16, 12, 0.5);
}
.dir-paper .site-nav a.nav-press,
.dir-paper .site-nav a.nav-press.active {
  color: var(--red-p);
}
.dir-paper .site-nav a.nav-press.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dir-paper .site-main {
  padding: 0;
}
.dir-paper .frame {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* ---------- Chooser ---------- */
.paper-chooser {
  min-height: 100vh;
  padding: 48px 28px 80px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.35), transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(18, 16, 12, 0.015) 2px,
      rgba(18, 16, 12, 0.015) 3px
    ),
    var(--paper);
  color: var(--ink-p);
}
.paper-meta {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-p);
  margin: 0 0 28px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.paper-chooser-title {
  font-family: "Libre Bodoni", Georgia, serif;
  font-size: clamp(42px, 9vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-weight: 700;
}
.paper-chooser-tag {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  border-top: 2px solid var(--ink-p);
  border-bottom: 1px solid var(--ink-p);
  padding: 8px 0;
  display: inline-block;
  margin: 0 0 28px;
}
.paper-chooser-lead {
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 40px;
  color: rgba(18, 16, 12, 0.78);
}
.paper-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1100px;
}
.paper-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px 20px;
  border: 1.5px solid var(--ink-p);
  background: rgba(255, 252, 245, 0.65);
  text-decoration: none !important;
  color: inherit;
  min-height: 280px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.paper-card:hover {
  transform: translateY(-4px) rotate(-0.3deg);
  box-shadow: 6px 10px 0 rgba(18, 16, 12, 0.12);
  background: #fffdf7;
  text-decoration: none !important;
}
.paper-card-en {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--red-p);
}
.paper-card h2 {
  font-family: "Archivo Black", "Helvetica Neue", sans-serif;
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.paper-card-wow {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.paper-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(18, 16, 12, 0.72);
  flex: 1;
}
.paper-card-go {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-top: 8px;
}
.paper-chooser-foot {
  margin: 36px 0 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  .paper-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- Shared shell ---------- */
.paper-shell {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink-p);
}
.paper-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(235, 228, 212, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.paper-mast {
  font-family: "Archivo Black", "Helvetica Neue", sans-serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--red-p);
  text-decoration: none !important;
}
.paper-mast:hover {
  color: var(--red-p);
  text-decoration: none !important;
}
.paper-shop {
  justify-self: end;
}
.paper-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.paper-tab {
  padding: 6px 10px;
  border: 1px solid transparent;
  color: var(--muted-p);
  text-decoration: none !important;
}
.paper-tab.on,
.paper-tab:hover {
  border-color: var(--ink-p);
  color: var(--ink-p);
  background: rgba(255, 255, 255, 0.45);
}
.paper-mode-line {
  margin: 0;
  padding: 10px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 252, 245, 0.5);
}
.paper-mode-line b {
  font-family: "Archivo Black", sans-serif;
  letter-spacing: 0.04em;
}

/* ---------- PRESS ---------- */
.press-intro {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 24px 64px;
  max-width: 720px;
  margin: 0 auto;
}
.press-intro h1 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(40px, 10vw, 88px);
  margin: 0 0 16px;
  line-height: 0.95;
}
.press-intro p {
  font-size: 18px;
  max-width: 36ch;
  line-height: 1.45;
}
.press-hint {
  margin-top: 40px !important;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0.2em;
  font-size: 12px !important;
  animation: press-pulse 1.6s ease-in-out infinite;
}
@keyframes press-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.press-sheet {
  position: relative;
  max-width: 820px;
  margin: 0 auto 18vh;
  padding: 0 16px;
}
.press-ink {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(18, 16, 12, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 18px 40px rgba(18, 16, 12, 0.18);
  background: #f4efe3;
  /* Blank plate before ink */
  filter: contrast(0.15) brightness(1.35) saturate(0);
  opacity: 0.35;
  transform: translateY(28px) scale(0.985);
  transition:
    filter 1.1s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.press-ink::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(18, 16, 12, 0.04) 3px,
    rgba(18, 16, 12, 0.04) 4px
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 1s ease;
}
.press-sheet.inked .press-ink {
  filter: none;
  opacity: 1;
  transform: none;
}
.press-sheet.inked .press-ink::after {
  opacity: 0.25;
}
.press-ink img {
  width: 100%;
  height: auto;
  display: block;
}
.press-caption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 12px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease 0.35s, transform 0.6s ease 0.35s;
}
.press-sheet.inked .press-caption {
  opacity: 1;
  transform: none;
}
.press-caption span {
  color: var(--red-p);
  font-weight: 700;
}
.press-caption em {
  color: var(--muted-p);
  font-style: normal;
}
.press-end {
  text-align: center;
  padding: 40px 24px 100px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.press-end a {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  background: var(--ink-p);
  color: var(--paper);
  letter-spacing: 0.1em;
  font-size: 12px;
  text-decoration: none !important;
}

/* ---------- SPREAD (torn issue) ---------- */
.paper-spread {
  background: #0a0a0a;
  color: var(--ink-p);
  min-height: 100vh;
  overflow: hidden;
}
.paper-spread .paper-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
  color: var(--ink-p);
  z-index: 20;
}
.paper-spread .paper-mast {
  color: var(--red-p);
}
.paper-spread .paper-shop {
  color: var(--ink-p);
  text-decoration: none !important;
}
.paper-spread .paper-mode-line {
  display: none;
}

.spread {
  position: relative;
  height: 100vh;
  overflow: hidden;
  opacity: 0;
  background: #0a0a0a;
  transition: opacity 0.55s ease;
}
.spread.is-on {
  opacity: 1;
}

.spread-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 48%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.spread-crest {
  position: absolute;
  right: -2vw;
  top: 1vh;
  width: min(42vw, 480px);
  height: min(42vw, 480px);
  object-fit: cover;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 2;
}
.spread-title {
  position: absolute;
  left: 50%;
  top: 9vh;
  transform: translateX(-50%);
  margin: 0;
  z-index: 10;
  font-family: "Archivo Black", "Helvetica Neue", sans-serif;
  font-size: clamp(36px, 6.8vw, 76px);
  letter-spacing: -0.035em;
  line-height: 0.85;
  font-weight: 400;
  color: #111;
  text-align: center;
  pointer-events: none;
}

.spread-stage {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.spread-leaf {
  position: absolute;
  top: 28vh;
  left: 50%;
  width: min(20vw, 220px);
  margin: 0;
  transform: translateX(-50%) scale(0.4);
  transform-origin: 50% 0;
  opacity: 0;
  filter: grayscale(0.15) brightness(0.9);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease,
    filter 0.45s ease,
    width 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  z-index: 1;
  pointer-events: auto;
}
.spread-leaf picture,
.spread-leaf img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
}
.spread-leaf figcaption {
  display: none;
}
.spread-leaf[data-slot="0"] {
  width: calc(72vh * 0.666);
  height: 72vh;
  top: 18vh;
  transform: translateX(-50%) scale(1);
  opacity: 1;
  filter: none;
  z-index: 8;
  cursor: zoom-in;
}
.spread-leaf[data-slot="0"] picture,
.spread-leaf[data-slot="0"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}
.spread-leaf[data-slot="-1"] {
  top: 34vh;
  height: auto;
  transform: translateX(calc(-50% - 32vw)) rotate(-1.5deg) scale(0.78);
  opacity: 0.95;
  z-index: 5;
}
.spread-leaf[data-slot="1"] {
  top: 32vh;
  transform: translateX(calc(-50% + 28vw)) rotate(1deg) scale(0.76);
  opacity: 0.95;
  z-index: 5;
}
.spread-leaf[data-slot="2"] {
  top: 30vh;
  transform: translateX(calc(-50% + 46vw)) rotate(2.5deg) scale(0.74);
  opacity: 0.92;
  z-index: 4;
}
.spread-leaf[data-slot="-2"] {
  opacity: 0;
  pointer-events: none;
}

.spread-wordmark {
  position: absolute;
  left: 3.2vw;
  bottom: 7vh;
  z-index: 5;
  margin: 0;
  font-family: "Archivo Black", "Helvetica Neue", sans-serif;
  font-size: clamp(28px, 6.4vw, 68px);
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: #c9a227;
  max-width: 11ch;
  pointer-events: none;
}

.spread-nav {
  position: absolute;
  z-index: 12;
  top: 46vh;
  width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  appearance: none;
  border: 1px solid rgba(17, 15, 12, 0.35);
  border-radius: 50%;
  background: rgba(239, 230, 212, 0.92);
  color: #111;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.spread-nav svg {
  width: 22px;
  height: 22px;
  display: block;
}
.spread-nav.prev {
  left: calc(50% - (72vh * 0.333) - 76px);
}
.spread-nav.next {
  left: calc(50% + (72vh * 0.333) + 24px);
}
.spread-nav:hover,
.spread-nav:focus-visible {
  background: #c9a227;
  border-color: #c9a227;
  color: #080808;
  outline: none;
}
.spread.is-viewing .spread-nav {
  visibility: hidden;
}

/* Viewer */
.spread-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(8, 8, 8, 0.92);
  padding: 24px 16px;
}
.spread-viewer[hidden] {
  display: none !important;
}
.spread-viewer-page {
  margin: 0;
  max-height: 92vh;
  max-width: min(92vw, 720px);
}
.spread-viewer-page img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 88vh;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  background: #efe6d4;
}
.spread-viewer-page figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(242, 239, 233, 0.55);
}
.spread-viewer-close {
  position: absolute;
  top: 16px;
  right: 18px;
  appearance: none;
  border: 1px solid rgba(242, 239, 233, 0.35);
  background: transparent;
  color: #f2efe9;
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
}
.spread-viewer-nav {
  appearance: none;
  border: 1px solid rgba(242, 239, 233, 0.35);
  background: transparent;
  color: #f2efe9;
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.spread-viewer-close:hover,
.spread-viewer-nav:hover {
  background: #c9a227;
  border-color: #c9a227;
  color: #080808;
}

.spread.is-viewing .spread-leaf {
  pointer-events: none;
}

@media (max-width: 800px) {
  .spread-leaf[data-slot="2"],
  .spread-leaf[data-slot="-2"] {
    opacity: 0;
    pointer-events: none;
  }
  .spread-leaf[data-slot="-1"] {
    transform: translateX(calc(-50% - 38vw)) scale(0.62);
  }
  .spread-leaf[data-slot="1"] {
    transform: translateX(calc(-50% + 38vw)) scale(0.62);
  }
  .spread-leaf[data-slot="0"] {
    width: calc(64vh * 0.666);
    height: 64vh;
    top: 20vh;
  }
  .spread-title {
    top: 8.5vh;
    font-size: clamp(28px, 10vw, 52px);
  }
  .spread-crest {
    width: 52vw;
    height: 52vw;
    right: -10vw;
  }
  .spread-viewer-nav {
    display: none;
  }
  .spread-nav {
    top: auto;
    bottom: 5.5vh;
    width: 48px;
    height: 48px;
    background: rgba(201, 162, 39, 0.95);
    border-color: #c9a227;
  }
  .spread-nav.prev {
    left: auto;
    right: calc(3.2vw + 56px);
  }
  .spread-nav.next {
    left: auto;
    right: 3.2vw;
  }
}

/* ---------- ALIVE ---------- */
/* newspaper photos are wrapped in <picture> */
.alive-toc {
  position: sticky;
  top: 49px;
  z-index: 30;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 14px;
  background: rgba(235, 228, 212, 0.95);
  border-bottom: 1px solid var(--rule);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.alive-toc a {
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid transparent;
  text-decoration: none !important;
  color: var(--muted-p);
}
.alive-toc a:hover {
  border-color: var(--rule);
  color: var(--ink-p);
}
.alive-toc b {
  color: var(--red-p);
  margin-right: 4px;
}
.alive-page {
  padding: 28px 16px 48px;
  max-width: 920px;
  margin: 0 auto;
  scroll-margin-top: 110px;
}
.alive-head {
  margin-bottom: 14px;
}
.alive-head span {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--red-p);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.alive-head h2 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(26px, 5vw, 42px);
  margin: 4px 0;
  line-height: 1;
}
.alive-head p {
  margin: 0;
  color: var(--muted-p);
  font-size: 14px;
}
.alive-plate {
  position: relative;
  border: 1px solid rgba(18, 16, 12, 0.35);
  box-shadow: 0 16px 40px rgba(18, 16, 12, 0.14);
  background: #f7f1e4;
}
.alive-plate img {
  width: 100%;
  display: block;
}
/* Newspaper photos are wrapped in <picture> for WebP; keep wrappers block-level. */
.press-ink picture,
.spread-leaf picture,
.alive-plate picture {
  display: block;
}
.press-ink picture[data-zoom],
.alive-plate picture[data-zoom] {
  cursor: zoom-in;
}
.alive-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  margin: 0;
  padding: 8px 10px;
  background: rgba(18, 16, 12, 0.82);
  color: #f2efe9;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  pointer-events: none;
  animation: press-pulse 2s ease-in-out infinite;
}
.alive-spot {
  position: absolute;
  display: block;
  border: 1.5px dashed transparent;
  text-decoration: none !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.alive-spot:hover,
.alive-spot:focus-visible {
  border-color: var(--red-p);
  background: rgba(196, 32, 33, 0.08);
  z-index: 3;
}
.alive-lift {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px);
  min-width: 180px;
  max-width: 240px;
  padding: 10px 12px;
  background: #fffdf8;
  border: 1.5px solid var(--ink-p);
  box-shadow: 4px 6px 0 rgba(18, 16, 12, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.alive-spot:hover .alive-lift,
.alive-spot:focus-visible .alive-lift {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(-1deg);
}
.alive-label {
  display: block;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.alive-note {
  display: block;
  font-size: 12px;
  color: var(--muted-p);
}
.alive-year {
  color: var(--red-p);
  font-family: "Archivo Black", sans-serif;
}
.alive-end {
  text-align: center;
  padding: 24px 24px 90px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.alive-end a {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  background: var(--red-p);
  color: #fff;
  letter-spacing: 0.1em;
  font-size: 12px;
  text-decoration: none !important;
}
