/* ポスター型サイトの土台。色・文字・写真は index.html 側で差し替える（このファイルは基本そのまま）。
   動きは transform と opacity だけ。英字は同梱の書体（MP Display・SIL OFL 1.1）で、幅を自動で伸び縮みさせる */
@font-face {
  font-family: "MP Display";
  src: url("fonts/mp-display.woff2") format("woff2");
  font-weight: 500 1000;
  font-stretch: 50% 151%;
  font-display: swap;
}

:root {
  /* ここから3色は index.html の <style> で上書きする */
  --main: #f82d78;
  --ink: #0a0d13;
  --paper: #ffffff;

  --muted: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --f-display: "MP Display", "Avenir Next", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --f-jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;

  /* 写真の縦横比（横÷縦）。枠をこの比率に合わせるので、写真の端が切れない */
  --photo-ratio: 0.47;

  --pad: 10px;
  --line-h: 34px;
  --gap: 6px;
  --frame-h: clamp(380px, calc(100svh - 2 * var(--pad) - 2 * var(--line-h)), calc((68vw - 32px) / var(--photo-ratio)));
  --hero-h: calc(var(--frame-h) + 2 * var(--line-h) + 2 * var(--pad));
  --big: min(21vw, calc(var(--frame-h) / 4.8));
  --pin: 50svh;
}

@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  :root {
    --pad: 20px;
    --line-h: 44px;
    --gap: 16px;
    --frame-h: max(340px, calc(100svh - 2 * var(--pad) - 2 * var(--line-h)));
    --big: min(10.5vw, calc(var(--frame-h) / 4.8));
    --pin: 60svh;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-jp);
  font-size: 16px;
  line-height: 1.9;
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: auto-phrase;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- 冒頭｜元の1枚と同じ骨格（色の面・左右の巨大な英字・まん中の写真） ---------- */

.ps-hero { background: var(--main); }
/* 縦に長い画面では、ポスターを画面のまん中に置いて、上下を色の面で埋める */
.js .ps-hero { height: calc(max(var(--hero-h), 100svh) + var(--pin)); }
.js.ps-still .ps-hero { height: auto; }

.ps-stage {
  position: sticky;
  top: 0;
  height: max(var(--hero-h), 100svh);
  padding: var(--pad);
  display: grid;
  align-content: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: var(--line-h) var(--frame-h) var(--line-h);
  grid-template-areas: "top top top" "wl frame wr" "foot foot foot";
  column-gap: var(--gap);
  overflow: clip;
  background: var(--main);
}

.ps-line {
  grid-area: top;
  align-self: center;
  text-align: center;
  white-space: nowrap;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(10px, 0.5vw + 8.4px, 14px);
  line-height: 1;
  letter-spacing: 0.12em;
}
/* 縦長の画面では右下に「動きを止める」ボタンが来るので、下の1行は左に寄せる */
.ps-line--foot { grid-area: foot; text-align: left; line-height: 1.35; letter-spacing: 0.07em; white-space: normal; max-width: calc(100% - 150px); }

.ps-col { display: flex; justify-content: center; align-items: flex-start; height: var(--frame-h); }
.ps-col--l { grid-area: wl; }
.ps-col--r { grid-area: wr; }
/* 巨大な英字。幅（font-stretch）は、枠の高さにぴったり合うよう poster-site.js が決める */
.ps-word {
  display: block;
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-family: var(--f-display);
  font-weight: 1000;
  font-stretch: 106%;
  font-size: var(--big);
  line-height: 0.76;
  will-change: transform;
}

.ps-frame { grid-area: frame; position: relative; height: var(--frame-h); overflow: hidden; background: color-mix(in srgb, var(--ink) 12%, var(--paper)); }
.ps-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--focus, 50% 40%);
  will-change: transform;
}

.ps-title { grid-area: frame; align-self: end; justify-self: start; z-index: 2; margin-bottom: clamp(14px, 3svh, 40px); }
.ps-kicker { width: fit-content; padding: 5px 9px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: 0.04em; }
.ps-title h1 { font-size: clamp(19px, 5.9vw, 34px); font-weight: 800; line-height: 1.25; letter-spacing: 0.01em; }
.ps-title h1 span { display: block; width: fit-content; margin-top: 4px; padding: 0.14em 0.42em 0.16em; background: var(--main); white-space: nowrap; }
.ps-lead, .ps-note { display: none; }

@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  .ps-stage { grid-template-columns: auto minmax(0, calc(var(--frame-h) * var(--photo-ratio))) auto; justify-content: center; }
  .ps-line--foot { text-align: center; line-height: 1; letter-spacing: 0.12em; max-width: none; white-space: nowrap; }
}

/* 広い画面｜左右の余白に、題名と小さい英文を置く */
@media (min-width: 1100px) and (min-aspect-ratio: 5/4) {
  .ps-stage {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, calc(var(--frame-h) * var(--photo-ratio))) auto minmax(0, 1fr);
    grid-template-areas: "top top top top top" "side wl frame wr note" "foot foot foot foot foot";
    column-gap: clamp(16px, 2vw, 32px);
  }
  .ps-title { grid-area: side; justify-self: start; margin: 0 0 4px 8px; }
  .ps-kicker { font-size: 13px; padding: 6px 11px; }
  .ps-title h1 { margin-top: 14px; font-size: clamp(30px, 3.3vw, 54px); line-height: 1.22; }
  .ps-title h1 span { margin: 0; padding: 0; background: none; }
  .ps-lead { display: block; max-width: 19em; margin-top: 18px; font-size: 15px; font-weight: 600; line-height: 1.9; }
  .ps-note {
    display: block;
    grid-area: note;
    align-self: start;
    justify-self: end;
    margin: 4px 8px 0 0;
    text-align: right;
    font-family: var(--f-display);
    font-weight: 900;
    font-stretch: 112%;
    font-size: clamp(13px, 1.2vw, 18px);
    line-height: 1.3;
    letter-spacing: 0.06em;
    white-space: pre-line;
  }
}

/* ---------- 本文 ---------- */

.ps-sec { padding: clamp(72px, 12vw, 144px) 0; }
.ps-wrap { width: min(100% - 40px, 1040px); margin-inline: auto; }
.ps-eyebrow { font-family: var(--f-display); font-weight: 900; font-stretch: 120%; font-size: 13px; line-height: 1.2; letter-spacing: 0.14em; }
.ps-sec h2 { margin-top: 16px; font-size: clamp(28px, 6.6vw, 60px); font-weight: 800; line-height: 1.3; letter-spacing: 0.01em; text-wrap: balance; }
.ps-sec h2 + p { max-width: 34em; margin-top: 24px; font-size: clamp(16px, 1.2vw + 12px, 19px); }

.js .ps-reveal { opacity: 0; transform: translate3d(0, 20px, 0); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .ps-reveal.is-in, .js.ps-still .ps-reveal { opacity: 1; transform: none; }
.js.ps-still .ps-reveal { transition: none; }

/* 流れる英字の帯 */
.ps-marquee { overflow: hidden; padding: 14px 0; background: var(--ink); color: var(--main); }
.ps-marquee-track { display: flex; width: max-content; font-family: var(--f-display); font-weight: 1000; font-stretch: 125%; font-size: clamp(22px, 5vw, 44px); line-height: 1; white-space: nowrap; }
.ps-marquee-track span { padding-right: 0.9em; }
.ps-marquee.is-in .ps-marquee-track { animation: ps-marquee 26s linear infinite; }
.ps-still .ps-marquee-track { animation: none !important; }
@keyframes ps-marquee { to { transform: translate3d(-50%, 0, 0); } }

/* 3つの要点 */
.ps-points { background: var(--ink); color: var(--paper); }
.ps-points ol { margin-top: 44px; }
.ps-points li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 20px; align-items: start; padding: 26px 0; border-top: 1px solid color-mix(in srgb, var(--paper) 26%, transparent); }
.ps-points li::before { content: attr(data-n); grid-row: span 2; min-width: 1.1em; font-family: var(--f-display); font-weight: 1000; font-stretch: 130%; font-size: clamp(48px, 9vw, 104px); line-height: 0.8; color: var(--main); }
.ps-points h3 { font-size: clamp(19px, 1.2vw + 15px, 26px); font-weight: 800; line-height: 1.5; }
.ps-points li p { font-size: 15px; line-height: 1.85; color: color-mix(in srgb, var(--paper) 80%, var(--ink)); }

/* 最後の呼びかけ */
.ps-cta { background: var(--main); text-align: center; overflow: hidden; }
/* 幅いっぱいの英字。文字の大きさは poster-site.js が幅に合わせる */
.ps-shout { font-family: var(--f-display); font-weight: 1000; font-stretch: 151%; font-size: 22vw; line-height: 0.82; white-space: nowrap; }
.ps-cta h2 { margin-top: 28px; font-size: clamp(22px, 4.6vw, 40px); }
.ps-btn { display: inline-flex; align-items: center; justify-content: center; width: min(100%, 420px); min-height: 66px; margin-top: 32px; padding: 12px 24px; background: var(--ink); color: var(--paper); font-size: 17px; font-weight: 800; line-height: 1.4; text-decoration: none; transition: transform 0.2s; }
.ps-btn:hover { transform: translate3d(0, -3px, 0); }
.ps-still .ps-btn { transition: none; }

.ps-foot { padding: 40px 20px 96px; background: var(--ink); color: var(--paper); text-align: center; font-family: var(--f-display); font-weight: 900; font-stretch: 120%; font-size: 12px; letter-spacing: 0.14em; }

.ps-motion {
  position: fixed;
  z-index: 50;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--paper) 55%, transparent);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 700 13px/1 var(--f-jp);
  cursor: pointer;
}
.ps-motion[hidden], .ps-embedded .ps-motion { display: none; }
/* ほかのページの中に小さく見せる時は、スクロールバーを出さない */
.ps-embedded { scrollbar-width: none; }
.ps-embedded::-webkit-scrollbar { display: none; }
.ps-motion i { width: 10px; height: 12px; border-inline: 3px solid currentColor; }
.ps-motion[aria-pressed="true"] i { width: 0; height: 0; border: 6px solid transparent; border-left: 10px solid currentColor; border-right: 0; }
