/* ============================================================
   mocha — about.css
   プロフィール ｜ もかって、だれ？
   Manga-panel halftone layout, page-specific only. Every value
   rides the shared tokens (colors / type scale / spacing).
   ============================================================ */

/* ---------- HEADER ---------- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9995;
  padding-block: clamp(0.85rem, 1.8vw, 1.5rem);
}
.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
/* NOTE: mix-blend-mode:difference can't be used on these children — the
   fixed .site-head (z-index) is an isolated stacking context, so a blended
   child has nothing behind it and renders as its own colour (invisible on
   the light paper). Interior pages sit over light content, so solid ink
   is the reliable, legible choice. */
.head-logo {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 0.8;
  letter-spacing: -0.03em;
  color: var(--color-ink);
}
.head-nav {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.6rem);
  align-items: center;
  color: var(--color-ink);
}
.head-nav a {
  font-family: var(--font-sfx);
  font-size: var(--step-0);
}
.head-nav a.is-current { position: relative; }
.head-nav a.is-current::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -0.28em;
  height: 2px;
  background: currentColor;
}
.nav-toggle { display: none; }

/* ---------- shared section scaffolding ---------- */
section { position: relative; }
.numbers, .story, .favorites { padding-block: var(--space-7); }
.sec-head { margin-bottom: var(--space-5); max-width: 40ch; }
.sec-kicker { display: inline-block; margin-bottom: var(--space-2); color: var(--color-muted); }
.sec-title { font-size: var(--step-3); }
.sec-lead { margin-top: var(--space-3); color: color-mix(in srgb, var(--color-ink) 78%, transparent); }

/* panels: clip the ink-in scale + halftone overlay */
.panel { overflow: clip; }
.panel-inner { position: relative; z-index: 1; will-change: transform; }
.panel-ink {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background-size: 6px 6px;
}

/* ---------- 01 HERO ---------- */
.profile-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: clip;
  padding-block: clamp(7rem, 16vh, 11rem) var(--space-6);
}
.hero-ghost {
  position: absolute;
  top: 6%;
  left: -2%;
  font-size: clamp(7rem, 30vw, 26rem);
  line-height: 0.7;
  z-index: 0;
}
.hero-lines {
  position: absolute;
  inset: -20% -20% -20% 20%;
  z-index: 0;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(circle at 68% 46%, transparent 0, transparent 20%, #000 60%);
  mask-image: radial-gradient(circle at 68% 46%, transparent 0, transparent 20%, #000 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: center;
}
.hero-copy { grid-column: 1 / 8; }
.hero-eyebrow { display: inline-block; margin-bottom: var(--space-3); color: var(--color-accent); }
.hero-title {
  font-family: var(--font-sfx);
  font-size: clamp(2.8rem, 11vw, 7rem);
  line-height: 1.0;
  letter-spacing: 0.01em;
  max-width: 12ch;
}
.hero-body {
  margin-top: var(--space-4);
  font-size: var(--step-1);
  line-height: 1.95;
  max-width: 34ch;
}
.hero-portrait {
  grid-column: 8 / 13;
  align-self: center;
  padding: var(--space-3);
  background: var(--color-surface);
}
.hero-portrait .panel-inner { display: grid; justify-items: center; gap: var(--space-2); }
.hero-pageno {
  align-self: start;
  justify-self: start;
  font-size: var(--step-2);
  color: var(--color-accent);
}
.portrait-art { width: min(100%, 320px); height: auto; }
.portrait-cap { color: var(--color-muted); }

.hero-sfx {
  position: absolute;
  left: clamp(1rem, 6vw, 7rem);
  bottom: clamp(4rem, 12vh, 9rem);
  z-index: 2;
  font-size: clamp(3rem, 11vw, 7rem);
  color: var(--color-accent);
  -webkit-text-stroke: 2.5px var(--color-accent);
  text-shadow: 4px 4px 0 var(--color-bg);
}
.hero-side {
  position: absolute;
  top: 42%;
  right: clamp(0.6rem, 2vw, 1.6rem);
  z-index: 2;
  letter-spacing: 0.16em;
  color: var(--color-muted);
}
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: var(--space-4);
  transform: translateX(-50%);
  z-index: 2;
  letter-spacing: 0.16em;
  color: var(--color-ink);
  animation: hero-bob 2.4s var(--ease-in-out-quart) infinite;
}
@keyframes hero-bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- 02 NUMBERS ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gutter);
  align-items: stretch;
}
.stat { grid-column: span 3; padding: var(--space-4); background: var(--color-bg); }
.stat--sm { grid-column: span 2; }
.stat-inner { display: flex; flex-direction: column; gap: var(--space-2); }
.stat-figure { display: flex; align-items: baseline; gap: 0.3em; line-height: 0.8; }
.stat-num {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 0.78;
  letter-spacing: -0.03em;
}
.stat-num--text { font-size: var(--step-3); color: var(--color-accent); }
.stat-unit { font-family: var(--font-sfx); font-size: var(--step-1); }
.stat-label { color: var(--color-muted); }
.stat-note { font-family: var(--font-sfx); font-size: var(--step-0); color: var(--color-ink); }
.stat--end .stat-figure { color: var(--color-accent); }

/* ---------- 03 STORY ---------- */
.story { overflow: clip; }
.story-ghost {
  position: absolute;
  right: -4%;
  top: 8%;
  font-size: clamp(8rem, 34vw, 28rem);
  line-height: 0.7;
  z-index: 0;
}
.story-band1, .story-band2 { position: relative; z-index: 1; }
.story-head { grid-column: 1 / 8; }
.story-title { max-width: 14ch; }
.story-band2 { margin-top: var(--space-5); align-items: start; }
.story-panel {
  grid-column: 6 / 13;
  background: var(--color-surface);
  padding: clamp(1.75rem, 4vw, 3.25rem);
}
.story-copy { display: grid; gap: var(--space-3); }
.story-copy p { font-size: var(--step-1); line-height: 1.98; max-width: 44ch; }
.hl {
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.02em 0.22em;
  font-weight: 700;
  border-radius: 3px;
}
.story-bubble {
  grid-column: 1 / 5;
  grid-row: 1;
  align-self: start;
  margin-top: calc(var(--space-6) * -1);
  z-index: 3;
  background: var(--color-bg);
  text-align: center;
  font-family: var(--font-sfx);
  font-size: var(--step-1);
  line-height: 1.25;
}
.story-bubble .index-num--meta { display: block; margin-top: var(--space-2); color: var(--color-muted); }

/* ---------- 04 FAVORITES ---------- */
.fav-list { border-top: 1px solid var(--hairline); }
.fav-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: clamp(1rem, 2.4vw, 1.7rem) var(--space-2);
  border-bottom: 1px solid var(--hairline);
  transition: transform 0.4s var(--ease-out-expo);
}
.fav-dot {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-ink);
  background-size: 5px 5px;
}
.fav-name {
  position: relative;
  font-family: var(--font-sfx);
  font-size: var(--step-1);
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.08em;
  transition: background-size 0.45s var(--ease-out-expo);
}
.fav-no {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--color-muted);
  letter-spacing: -0.02em;
}
@media (hover: hover) {
  .fav-row:hover { transform: translateX(clamp(0.4rem, 1.4vw, 1.3rem)); }
  .fav-row:hover .fav-name { background-size: 100% 3px; }
}
.fav-row--end { justify-content: space-between; border-bottom: 0; }
.fav-name--end { background: none; padding-bottom: 0; }
.fav-name--end b { color: var(--color-accent); }
.fav-sfx {
  font-size: clamp(2rem, 7vw, 4rem);
  text-shadow: 3px 3px 0 var(--color-bg);
}

/* ---------- FOOTER ---------- */
.site-foot {
  position: relative;
  overflow: clip;
  padding-top: var(--space-6);
  margin-top: var(--space-7);
}
.foot-top {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: var(--space-5) var(--gutter);
  align-items: end;
  padding-block: var(--space-5);
}
.foot-lead { grid-column: 1; }
.foot-title { font-size: var(--step-3); max-width: 16ch; }
.foot-body { margin-top: var(--space-3); font-size: var(--step-1); max-width: 34ch; }
.foot-nav {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-family: var(--font-sfx);
  font-size: var(--step-1);
  text-align: right;
}
.foot-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.2em;
  color: var(--color-muted);
}
.foot-copy { color: color-mix(in srgb, var(--color-muted) 80%, transparent); }
.foot-mark {
  line-height: 0.66;
  text-align: center;
  margin-top: var(--space-4);
  user-select: none;
}
.foot-mark .wordmark {
  display: inline-block;
  font-size: clamp(6rem, 26vw, 20rem);
  color: var(--color-ink);
}
.foot-marquee {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-block: var(--space-2);
}
.foot-marquee .sfx { font-size: clamp(1.6rem, 5vw, 3rem); text-shadow: 2px 2px 0 var(--color-bg); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero-copy { grid-column: 1 / 8; }
  .hero-portrait { grid-column: 8 / 13; }
  .stat { grid-column: span 3; }
  .stat--sm { grid-column: span 3; }
  .stat--end { grid-column: span 6; }
}

@media (max-width: 720px) {
  /* header → mobile fullscreen menu */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    color: var(--color-ink);
    z-index: 3;
  }
  /* when the fullscreen (dark) menu is open, flip the toggle bars light */
  body.nav-open .nav-toggle { color: var(--color-bg); }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: '';
    display: block;
    width: 26px; height: 2.6px;
    background: currentColor;
    transition: transform 0.3s var(--ease-out-quart), top 0.3s var(--ease-out-quart), background-color 0.2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -8px; }
  .nav-toggle-bars::after { top: 8px; }
  body.nav-open .nav-toggle-bars { background: transparent; }
  body.nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  body.nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

  .head-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    background: var(--color-ink);
    color: var(--color-bg);
    font-size: var(--step-2);
    transform: translateY(-100%);
    transition: transform 0.55s var(--ease-in-out-quart);
  }
  .head-nav.is-open { transform: none; }
  .head-nav a.is-current { color: var(--color-accent); }
  .head-nav a.is-current::after { display: none; }

  .hero-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero-copy { grid-column: 1; }
  .hero-portrait { grid-column: 1; max-width: 320px; margin-top: var(--space-3); }
  .hero-title { max-width: none; }
  .hero-side {
    position: static;
    display: inline-block;
    margin-top: var(--space-3);
    letter-spacing: 0.14em;
  }
  .hero-sfx { left: auto; right: var(--page-inline); bottom: 12vh; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat, .stat--sm, .stat--end { grid-column: span 1; }

  .story-head { grid-column: 1 / -1; }
  .story-band2 { grid-template-columns: 1fr; }
  .story-panel { grid-column: 1 / -1; }
  .story-bubble {
    grid-column: 1 / -1;
    grid-row: auto;
    margin-top: var(--space-3);
    justify-self: center;
    max-width: 22rem;
  }

  .foot-top { grid-template-columns: 1fr; align-items: start; }
  .foot-lead, .foot-nav, .foot-meta { grid-column: 1; }
  .foot-nav { text-align: left; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .fav-name { font-size: var(--step-0); }
  .story-copy p { max-width: none; }
}

@media (min-width: 2000px) {
  .numbers, .story, .favorites { padding-block: var(--space-8); }
  .sec-head { margin-bottom: var(--space-6); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll { animation: none; }
  .panel-ink { opacity: 0 !important; }
}
