@font-face {
  font-family:"Cover Han"; src:url("fonts/cover-han.woff2") format("woff2"); font-weight:900; font-display:swap;
}
@font-face {
  font-family:"Cover Latin"; src:url("fonts/geist-latin.woff2") format("woff2"); font-weight:100 900; font-display:swap;
}
/* The phone is a black mat. Only the landscape frame holds the artwork. */
.portrait-cover {
  display:grid; place-items:center; box-sizing:border-box; width:100%;
  min-height:100vh; min-height:100svh; padding:12px 0; background:#000; color:#fff;
}
.cover-frame {
  --line-inset:4%;
  --lower-line-inset:4%;
  --portrait-top:14.5cqw;
  --portrait-bottom:calc(65% - var(--en-size) * .08);
  --center-shift:calc((100% - var(--lower-line-inset) - var(--portrait-top) - var(--portrait-bottom)) / 2);
  position:relative; isolation:isolate; overflow:hidden; container-type:inline-size;
  width:min(100%,126svh,1200px); aspect-ratio:7 / 5; box-sizing:border-box;
  background:radial-gradient(ellipse 49% 48% at 50% 50%,#242321 0%,#141413 44%,#060606 76%,#000 100%);
}
.cover-stage {
  position:absolute; inset:0;
  transform:translateY(var(--stage-shift, 0px));
}
.cover-subject-window {
  position:absolute; inset:var(--center-shift) 0 auto; height:var(--portrait-bottom);
  z-index:1; pointer-events:none; overflow:hidden;
  -webkit-mask-image:linear-gradient(#000 89%,transparent 99%);
  mask-image:linear-gradient(#000 89%,transparent 99%);
}
.cover-subject {
  position:absolute;
  left:calc(50% + var(--bust-shift-x, 0cqw));
  top:var(--bust-center, 27.5cqw);
  width:var(--bust-width, 40%);
  height:auto;
  max-height:var(--bust-max-height, 41cqw);
  transform:translate(-50%, -50%) rotate(var(--bust-rotate, 0deg));
  object-fit:contain; object-position:center;
  filter:grayscale(1) contrast(1.13) brightness(.8);
  -webkit-mask-image:linear-gradient(#000 88%,transparent 97%);
  mask-image:linear-gradient(#000 88%,transparent 97%);
}
.cover-frame .cover-name {
  margin:0; padding:0; border:0; text-align:center;
  text-wrap:nowrap; color:#f7f6f2;
}

.cover-zh {
  position:absolute; inset-inline:2%;
  bottom:calc(var(--chinese-bottom, 74%) - var(--center-shift) + var(--zh-lift, 0px));
  z-index:0;
  font:900 48px/1.04 "Cover Han","PingFang SC",sans-serif;
  letter-spacing:-.055em;
}
.cover-en {
  position:absolute; inset-inline:2%;
  top:calc(var(--english-top, 65%) - .45em + var(--center-shift) + var(--en-shift, 0cqw));
  transform:scale(var(--english-width-scale, 1), var(--english-scale, 1));
  z-index:0;
  font:790 48px/.9 "Cover Latin",Arial,sans-serif;
  letter-spacing:-.068em;
}
.cover-frame .cover-zh { font-size:var(--chinese-size, min(var(--zh-size), calc(var(--en-size) * .58))); }
.cover-frame .cover-en { font-size:var(--en-size); }

.cover-frame::before,
.cover-frame::after {
  content:""; position:absolute; z-index:2; inset-inline:0; height:6px; pointer-events:none;
  background:radial-gradient(circle at center,#bcb9b2 1.6px,transparent 2.2px),
    radial-gradient(ellipse 50% 1.35px at center,#aba8a2 0%,#888580 38%,#474643 72%,transparent 100%);
}
.cover-frame::before { top:var(--line-inset); }
.cover-frame::after { bottom:var(--line-inset); }

/* Single-row composition (approved Socrates benchmark). */
.cover-frame[data-zh-rows="1"][data-en-rows="1"] {
  --portrait-top:10.5cqw;
  --portrait-bottom:66%;
  --chinese-bottom:77%;
  --chinese-size:min(var(--single-zh-size), calc(var(--en-size) * .72));
  --english-top:48%;
  --english-scale:1.10;
  --english-width-scale:var(--single-en-stretch, 1);
}

/* Two-row English composition: deeper chest-level crop below shoulders, sleeker 2-row English. */
.cover-frame[data-en-rows="2"] {
  --portrait-top:10.5cqw;
  --portrait-bottom:80%;
  --bust-max-height:54cqw;
  --chinese-bottom:82%;
  --chinese-size:min(var(--zh-size), 7.5cqw);
  --english-top:55.5%;
  --english-scale:1;
  --english-width-scale:1;
}
.cover-en[data-rows="2"] {
  line-height:.9;
  top:min(calc(var(--english-top, 55.5%) - .35em + var(--center-shift) + var(--en-shift, 0cqw)), calc(100% - var(--lower-line-inset) - 1.9em - 3.5cqw));
}

/* Two-row Chinese (Hegel): keep both Chinese lines legible above the crown. */
.cover-frame[data-zh-rows="2"] {
  --chinese-bottom:82.5%;
  --chinese-size:6.2cqw;
  --bust-center:32cqw;
  --bust-width:37%;
  --bust-max-height:36cqw;
  --en-shift:1.2cqw;
}

/* Approved sculptural bust (Socrates) with soft bottom fade. */
#cover-socrates .cover-subject {
  left:50%; top:var(--portrait-top); width:35%; max-height:none;
  transform:translateX(-50%);
  -webkit-mask-image:linear-gradient(#000 84%,transparent 99%);
  mask-image:linear-gradient(#000 84%,transparent 99%);
}

/* Per-philosopher fine-tuning for the final 20-philosopher roster:
   crown gently overlaps only the bottom edge of Chinese lettering; portraits balanced in scale & angle. */
#cover-zhuangzi { --zh-lift:3.4cqw; --bust-center:29.5cqw; --bust-width:41%; }
#cover-wang { --zh-lift:4.8cqw; --bust-center:30.5cqw; --bust-width:39%; }
#cover-descartes { --zh-lift:4.7cqw; }
#cover-aristotle { --zh-lift:6.3cqw; }
#cover-hume { --zh-lift:4.2cqw; --bust-center:29.5cqw; --bust-width:55%; --bust-max-height:45cqw; --bust-rotate:-1deg; }
#cover-kant { --zh-lift:2.4cqw; --bust-center:28.5cqw; }
#cover-rousseau { --zh-lift:3.8cqw; --bust-center:33cqw; --bust-width:50%; }
#cover-hegel { --zh-lift:3.2cqw; --bust-center:28.5cqw; --bust-width:41%; }
#cover-marx { --zh-lift:3.7cqw; --bust-width:42%; }
#cover-nietzsche { --zh-lift:4.6cqw; --bust-center:33.5cqw; --bust-width:46%; }
#cover-sartre { --zh-lift:4.2cqw; --bust-center:33.5cqw; --bust-width:48%; }
#cover-camus { --zh-lift:6cqw; }
#cover-beauvoir { --zh-lift:4.6cqw; --bust-center:33.5cqw; --bust-width:44%; }
#cover-arendt { --zh-lift:2.6cqw; --bust-center:29cqw; --bust-width:44%; --bust-rotate:1deg; }
#cover-russell { --zh-lift:4.4cqw; --bust-center:33cqw; --bust-width:51%; }
#cover-wittgenstein { --zh-lift:3.8cqw; --bust-center:33cqw; --bust-width:54%; --bust-rotate:-1deg; }
#cover-rawls { --zh-lift:6.3cqw; }
#cover-foucault { --zh-lift:6.3cqw; }
#cover-berlin { --zh-lift:6.3cqw; --bust-shift-x:1cqw; }

.cover-name-row { display:block; white-space:nowrap; }
.cover-word { display:inline-block; }
@keyframes cover-word-in { from { opacity:0; filter:blur(12px); } to { opacity:1; filter:blur(0); } }
@keyframes report-basic-in { from { opacity:0; transform:translateY(44px); filter:blur(4px); } to { opacity:1; transform:translateY(0); filter:blur(0); } }
@media (prefers-reduced-motion:no-preference) {
  .cover-frame.await-view, .report-section.await-view { opacity:0; }
  .cover-frame.in-view, .report-section.in-view { animation:report-basic-in .68s cubic-bezier(.22,1,.36,1) both; }
  .cover-frame.in-view .cover-word { animation:cover-word-in .52s ease-out both; animation-delay:calc(120ms + var(--word)*85ms); }
}
