
/* ─────────────────────────────────────────────────────────
   MINA KUMAGAI — Web Designer Portfolio
   Editorial / quiet / photography-led
   Palette: cream paper, ink, muted, hairline rule. No accent.
   ───────────────────────────────────────────────────────── */

:root {
  --paper:   #F7F4EF;   /* base */
  --paper-2: #F1ECE3;   /* faintly deeper tone for rhythm */
  --ink:     #1C1C1A;   /* text */
  --muted:   #8C8880;   /* sub text */
  --line:    #E0DAD2;   /* hairline */
  --ink-soft: #4A4845;

  --max:     1320px;
  --gutter:  clamp(24px, 6vw, 96px);

  --serif:   "Cormorant Garamond", "Times New Roman", serif;
  --serif-jp:"Noto Serif JP", serif;
  --sans-jp: "Noto Sans JP", system-ui, sans-serif;

  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-deep: cubic-bezier(.66, 0, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans-jp);
  font-weight: 400;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--ink); color: var(--paper); }

/* ─── shared type helpers ─── */
.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.kicker {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--sans-jp);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .idx {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--ink);
}
.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0;
}
.display em { font-style: italic; font-weight: 400; }

.jp-head {
  font-family: var(--serif-jp);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.9;
  color: var(--ink);
}
.body-jp {
  font-family: var(--sans-jp);
  font-weight: 400;
  font-size: 14.5px;
  line-height: 2.4;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ─────────────────────────────────────────────────────────
   Header / Nav
   ───────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .5s var(--ease-out), border-color .5s, padding .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(247, 244, 239, 0.82);
  backdrop-filter: saturate(120%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: padding .5s var(--ease-out);
}
.site-header.scrolled .header-inner { padding-top: 20px; padding-bottom: 20px; }

.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  gap: 6px;
}
.brand .name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand .role {
  font-family: var(--sans-jp);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 48px;
  align-items: center;
}
.nav-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--sans-jp);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.nav-list a .n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease-out);
}
.nav-list a:hover::after { transform: scaleX(1); }

@media (max-width: 880px) {
  .nav-list { gap: 24px; }
  .nav-list a .n { display: none; }
}
@media (max-width: 600px) {
  .nav-list { display: none; }
}

/* ─────────────────────────────────────────────────────────
   First View / Hero
   ───────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: clamp(140px, 19vh, 220px) 0 clamp(60px, 8vh, 110px);
}
.hero-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
.hero-copy { align-self: center; }
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 38px;
}
.hero-eyebrow::before {
  content: "";
  width: 54px; height: 1px;
  background: var(--ink);
  display: inline-block;
  transform-origin: left;
  animation: drawLine 1.3s var(--ease-out) .2s both;
}
.hero-eyebrow span {
  font-family: var(--sans-jp);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}
@keyframes drawLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7.6vw, 116px);
  line-height: 0.98;
  letter-spacing: 0.004em;
  margin: 0;
  color: var(--ink);
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span {
  display: block;
  transform: translateY(105%);
  animation: rise 1.15s var(--ease-deep) forwards;
}
.hero-title .line.l2 > span { animation-delay: .12s; }
.hero-title em { font-style: italic; font-weight: 400; }
@keyframes rise { to { transform: none; } }

.hero-sub {
  margin: 36px 0 0;
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: clamp(15px, 1.7vw, 20px);
  letter-spacing: 0.16em;
  line-height: 2;
  color: var(--ink-soft);
  opacity: 0;
  animation: fadeUp 1.1s var(--ease-out) .7s forwards;
}
.hero-meta {
  margin: 46px 0 0;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease-out) .9s forwards;
}
.hero-meta .item { display: flex; flex-direction: column; gap: 6px; }
.hero-meta .item .l {
  font-family: var(--sans-jp);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta .item .v {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-figure {
  position: relative;
  aspect-ratio: 3 / 4;
  opacity: 0;
  animation: fadeUp 1.3s var(--ease-out) .45s forwards;
}
.hero-figure .media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-figure .cap {
  position: absolute;
  top: 20px; left: -14px;
  writing-mode: vertical-rl;
  font-family: var(--sans-jp);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 360px; }
}

/* ─────────────────────────────────────────────────────────
   Section scaffolding
   ───────────────────────────────────────────────────────── */

.section { position: relative; padding: clamp(90px, 13vw, 170px) 0; }
.section-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.section-head { margin-bottom: clamp(56px, 7vw, 96px); }
.section-head .kicker { margin-bottom: 30px; }
.section-head .display {
  font-size: clamp(40px, 5.4vw, 76px);
}
.section-head .lead {
  margin: 30px 0 0;
  max-width: 52ch;
}
.section-head.center { text-align: center; }
.section-head.center .kicker { justify-content: center; }

/* divider rule */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ─────────────────────────────────────────────────────────
   Works
   ───────────────────────────────────────────────────────── */

.works { background: var(--paper); }

.works-group { margin-top: clamp(56px, 7vw, 92px); }
.works-group:first-of-type { margin-top: clamp(40px, 5vw, 64px); }

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 26px;
  margin-bottom: clamp(36px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.group-head .gh-l { display: flex; align-items: baseline; gap: 18px; }
.group-head .g-title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(26px, 3vw, 38px);
  color: var(--ink);
}
.group-head .g-jp {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.group-head .g-count {
  font-family: var(--sans-jp);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--muted);
}

/* large grid for HP / LP */
.grid-lg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(36px, 4vw, 64px) clamp(28px, 3.4vw, 52px);
}
/* compact grid for banners / others */
.grid-sm {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(30px, 3vw, 48px) clamp(24px, 2.6vw, 40px);
}

.work {
  display: block;
  cursor: pointer;
}
.work .thumb {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.work .thumb .media {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  transition: transform 1.1s var(--ease-out);
}
.grid-lg .work .thumb { aspect-ratio: 4 / 3; }
.grid-sm .work .thumb { aspect-ratio: 1 / 1; }
.work:hover .thumb .media { transform: scale(1.045); }

.work .meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 20px;
}
.work .meta .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  flex: none;
  min-width: 1.6em;
}
.work .meta .title {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: 15.5px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--ink);
  transition: color .3s;
}
.grid-sm .work .meta { margin-top: 16px; gap: 11px; }
.grid-sm .work .meta .title { font-size: 13.5px; line-height: 1.55; }
.work .tag {
  display: block;
  margin: 7px 0 0 calc(1.6em + 14px);
  font-family: var(--sans-jp);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.grid-sm .work .tag { margin-left: calc(1.6em + 11px); }

@media (max-width: 880px) {
  .grid-sm { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-lg { grid-template-columns: 1fr; }
  .group-head { flex-direction: column; gap: 10px; }
}

/* ─────────────────────────────────────────────────────────
   About
   ───────────────────────────────────────────────────────── */

.about { background: var(--paper-2); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(44px, 6vw, 104px);
  align-items: start;
}
.about-figure { position: relative; aspect-ratio: 4 / 5; }
.about-figure .media { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-figure .cap {
  position: absolute;
  bottom: 18px; right: -14px;
  writing-mode: vertical-rl;
  font-family: var(--sans-jp);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-copy .kicker { margin-bottom: 28px; }
.about-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 1.04;
  margin: 0 0 6px;
  color: var(--ink);
}
.about-name em { font-style: italic; font-weight: 400; }
.about-role {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 36px;
}
.about-copy p.bio { margin: 0; max-width: 60ch; }

.about-detail {
  margin-top: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 3.4vw, 56px);
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.detail-block h4 {
  font-family: var(--sans-jp);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.detail-block h4 .jp {
  font-family: var(--serif-jp);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--ink-soft);
}
.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.detail-list li::before {
  content: "—";
  color: var(--muted);
  font-family: var(--serif);
}
.detail-list li:last-child { border-bottom: 0; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-figure { max-width: 380px; }
  .about-detail { grid-template-columns: 1fr; gap: 36px; }
}

/* ─────────────────────────────────────────────────────────
   Contact (dark close)
   ───────────────────────────────────────────────────────── */

.contact {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(110px, 16vw, 200px) 0 clamp(64px, 8vw, 110px);
  position: relative;
}
.contact .section-wrap { text-align: center; }
.contact .kicker { color: rgba(247,244,239,0.55); justify-content: center; margin-bottom: 40px; }
.contact .kicker .idx { color: var(--paper); }
.contact-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(46px, 7.2vw, 108px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--paper);
}
.contact-title em { font-style: italic; font-weight: 400; }
.contact-sub {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.16em;
  line-height: 2.1;
  color: rgba(247,244,239,0.72);
  margin: 38px auto 0;
  max-width: 46ch;
}
.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 56px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3vw, 40px);
  color: var(--paper);
  position: relative;
  padding-bottom: 10px;
}
.contact-mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: rgba(247,244,239,0.4);
  transform-origin: left;
  transition: transform .6s var(--ease-out), background .3s;
}
.contact-mail:hover::after { background: var(--paper); transform: scaleX(1.0) translateY(-1px); }
.contact-mail .arr {
  display: inline-block;
  font-size: 0.6em;
  transition: transform .45s var(--ease-out);
}
.contact-mail:hover .arr { transform: translate(4px, -4px); }

.contact-socials {
  margin-top: 64px;
  display: flex;
  justify-content: center;
  gap: 38px;
  flex-wrap: wrap;
}
.contact-socials a {
  font-family: var(--sans-jp);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.7);
  position: relative;
  padding: 4px 0;
  transition: color .3s;
}
.contact-socials a:hover { color: var(--paper); }
.contact-socials a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease-out);
}
.contact-socials a:hover::after { transform: scaleX(1); }

/* ─────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────── */

.site-footer {
  background: var(--ink);
  color: rgba(247,244,239,0.6);
  border-top: 1px solid rgba(247,244,239,0.12);
  padding: 44px var(--gutter);
}
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner .fname {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--paper);
}
.footer-inner .copy {
  font-family: var(--sans-jp);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.45);
}
.to-top {
  font-family: var(--sans-jp);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.7);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color .3s;
}
.to-top:hover { color: var(--paper); }
.to-top .up { transition: transform .4s var(--ease-out); }
.to-top:hover .up { transform: translateY(-3px); }

/* ─────────────────────────────────────────────────────────
   Contact Form
   ───────────────────────────────────────────────────────── */

.contact-form {
  margin: 56px auto 0;
  max-width: 680px;
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.form-label {
  font-family: var(--sans-jp);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.7);
}
.form-label .req { color: rgba(247,244,239,0.5); font-style: italic; }
.form-input {
  background: rgba(247,244,239,0.07);
  border: 1px solid rgba(247,244,239,0.2);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: var(--sans-jp);
  font-size: 14px;
  color: var(--paper);
  outline: none;
  transition: border-color .3s, background .3s;
  -webkit-appearance: none;
}
.form-input::placeholder { color: rgba(247,244,239,0.3); }
.form-input:focus {
  border-color: rgba(247,244,239,0.6);
  background: rgba(247,244,239,0.1);
}
.form-select { cursor: pointer; }
.form-select option { background: var(--ink); color: var(--paper); }
.form-textarea { resize: vertical; min-height: 160px; line-height: 1.8; }
.form-error {
  font-size: 11px;
  color: rgba(255,160,140,0.9);
  letter-spacing: 0.04em;
  min-height: 1em;
}

.form-privacy {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.privacy-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.privacy-label input[type="checkbox"] { display: none; }
.checkbox-custom {
  width: 18px; height: 18px;
  border: 1px solid rgba(247,244,239,0.4);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
  position: relative;
}
.privacy-label input:checked + .checkbox-custom {
  background: rgba(247,244,239,0.9);
  border-color: transparent;
}
.privacy-label input:checked + .checkbox-custom::after {
  content: "";
  position: absolute;
  width: 5px; height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translate(-1px, -1px);
}
.privacy-text {
  font-family: var(--sans-jp);
  font-size: 13px;
  color: rgba(247,244,239,0.75);
  line-height: 1.6;
}
.privacy-link {
  color: rgba(247,244,239,0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(247,244,239,0.4);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: text-decoration-color .3s;
}
.privacy-link:hover { text-decoration-color: rgba(247,244,239,0.9); }

.form-submit { text-align: center; }
.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 56px;
  border: 1px solid rgba(247,244,239,0.5);
  border-radius: 2px;
  font-family: var(--sans-jp);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  transition: background .35s, border-color .35s, color .35s;
}
.submit-btn:hover {
  background: rgba(247,244,239,0.95);
  border-color: transparent;
  color: var(--ink);
}
.btn-arr {
  font-size: 0.85em;
  transition: transform .35s var(--ease-out);
}
.submit-btn:hover .btn-arr { transform: translate(3px, -3px); }

.form-success {
  display: none;
  margin-top: 32px;
  padding: 24px;
  border: 1px solid rgba(247,244,239,0.25);
  border-radius: 4px;
  text-align: center;
}
.form-success p {
  font-family: var(--serif-jp);
  font-size: 15px;
  color: rgba(247,244,239,0.85);
  line-height: 2;
  margin: 0;
}
.form-success.show { display: block; }

/* ─────────────────────────────────────────────────────────
   Privacy Modal
   ───────────────────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn .35s var(--ease-out) both;
}
@keyframes modalIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform:none; } }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--ink);
}
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--muted);
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--paper-2); color: var(--ink); }

.modal-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
  font-family: var(--sans-jp);
  font-size: 13.5px;
  line-height: 2;
  color: var(--ink-soft);
}
.modal-intro { margin: 0 0 24px; }
.modal-body h4 {
  font-family: var(--sans-jp);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 8px;
}
.modal-body h4:first-of-type { margin-top: 0; }
.modal-body p { margin: 0 0 4px; }
.modal-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.modal-foot {
  padding: 20px 28px 24px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  text-align: right;
}
.modal-agree-btn {
  padding: 12px 32px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  font-family: var(--sans-jp);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .25s;
}
.modal-agree-btn:hover { opacity: 0.82; }

/* ─────────────────────────────────────────────────────────
   .media toning — quiet, paper-warm
   ───────────────────────────────────────────────────────── */

.media {
  --is-bg: #E7E0D6;
  --is-fg: rgba(28,28,26,0.5);
  --is-border: transparent;
  background: #E7E0D6;
}
.media img {
  filter: saturate(0.92) contrast(1.01);
}

/* ─────────────────────────────────────────────────────────
   Reveal on scroll
   ───────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-title .line > span, .hero-sub, .hero-meta, .hero-figure {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
}

' + stylesheet + '

/* ── media (real image / placeholder) replacing the canvas image-slot ── */
.media { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(0.92) contrast(1.01); }
.media .ph {
  font-family: var(--sans-jp); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase; color: rgba(28,28,26,0.42);
  text-align: center; padding: 14px; line-height: 1.9;
}
