:root {
  --paper: #e6e9ec;
  --paper-2: #d7dbe0;
  --ink: #15181c;
  --muted: #5a616b;
  --line: #c3c8cf;
  --display: "Unbounded", "Zen Kaku Gothic New", sans-serif;
  --text: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.8;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- header ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  color: var(--ink);
  pointer-events: none;
  transition: color .3s, background-color .3s;
}
.bar.is-plain { background: rgba(230, 233, 236, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.bar a { pointer-events: auto; text-decoration: none; }
.bar-home { display: block; font-family: var(--display); font-weight: 500; font-size: 20px; line-height: .9; letter-spacing: -0.045em; }
.bar-home span { display: block; opacity: 0; transition: opacity .2s; }
.bar.is-signed .bar-home span { opacity: 1; }

/* ---------- logo (marker) ---------- */
.sign { display: block; overflow: visible; aspect-ratio: 12400 / 4050; }
.sign .glyphs { fill: currentColor; fill-opacity: 0; stroke: currentColor; stroke-width: 1.4px; stroke-dasharray: 1; stroke-dashoffset: 1; }
.sign.is-drawn .glyphs { animation: ink 1.1s cubic-bezier(.55, .1, .35, 1) forwards, fill .35s .85s forwards; }
.sign.is-drawn { animation: pop .45s .85s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes ink { to { stroke-dashoffset: 0; } }
@keyframes fill { to { fill-opacity: 1; stroke-width: 0; } }
@keyframes pop { from { transform: scale(.94) rotate(-2deg); } to { transform: none; } }
.bar-nav { display: flex; gap: 22px; font-family: var(--display); font-size: 13px; }
.bar-nav a { opacity: .75; }
.bar-nav a:hover, .bar-nav a.is-on { opacity: 1; }

/* ---------- intro ---------- */
.intro {
  min-height: 100svh;
  padding: 120px var(--gutter) 64px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
}
.intro-name {
  position: relative;
  z-index: 49;
  width: max-content;
  margin: 0;
  transform-origin: 0 0;
  will-change: transform;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(64px, 17vw, 300px);
  line-height: .9;
  letter-spacing: -0.045em;
}
.intro-lead {
  margin: 18px 0 0;
  font-family: var(--display);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 300;
  letter-spacing: -0.01em;
}
.intro-name .ch { display: inline-block; overflow: clip; padding: .06em 0 .1em; margin: -.06em 0 -.1em; vertical-align: top; }
/* z は右上へ昇るので、上と右の見切りを広げる (下は登場のときに文字を隠すので広げない) */
.intro-name .ch.z { padding: .34em .16em .1em 0; margin: -.34em -.16em -.1em 0; }
.intro-name .ch > span { display: inline-block; transform: translateY(110%); }
.intro-name.is-in .ch > span { transform: none; transition: transform 1s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms); }
.intro-name.is-in .ch.z > span > span { display: inline-block; transform-origin: 50% 90%; animation: snooze 3.2s cubic-bezier(.45, 0, .3, 1) infinite; animation-delay: calc(1.4s + var(--j) * 160ms); }
@keyframes snooze {
  0%, 100% { transform: none; }
  40%, 60% { transform: translate(calc(.02em + var(--j) * .035em), calc(-.05em - var(--j) * .085em)); }
}

.intro-shelf {
  list-style: none;
  margin: 0;
  padding: 48px 0;
  display: flex;
  align-items: end;
  gap: clamp(14px, 3vw, 40px);
  flex-wrap: wrap;
}
.intro-shelf li { animation: drop .9s cubic-bezier(.2, .9, .25, 1.2) both; animation-delay: calc(var(--i) * 90ms + 200ms); }
.intro-shelf a { display: block; width: clamp(64px, 11vw, 150px); transition: transform .25s; transform: rotate(var(--r)); }
.intro-shelf a:hover { transform: rotate(0deg) translateY(-6px); }
@keyframes drop {
  from { opacity: 0; transform: translateY(-60px); }
  to { opacity: 1; transform: none; }
}
.intro-index {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.intro-index a { text-decoration: none; }
.intro-index a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.intro-index small { font-family: var(--text); font-size: .4em; font-weight: 700; color: var(--muted); margin-left: 6px; vertical-align: super; }

/* トップの背景 (bg.js) */
.intro { position: relative; isolation: isolate; }
.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }


/* ---------- icons ---------- */
.icon { width: 100%; aspect-ratio: 1; object-fit: cover; }
.icon.ios { border-radius: 22.4%; }
.icon.free { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .18)); }

/* ---------- stage ---------- */
.platform { position: relative; }
.stage-wrap { height: 280vh; position: relative; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.word {
  position: absolute;
  left: 0;
  bottom: -0.16em;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(160px, 38vw, 720px);
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px var(--line);
  will-change: transform;
  user-select: none;
}

.flood {
  position: absolute;
  inset: 0;
  background: var(--bg);
  color: var(--fg);
  clip-path: circle(0% at 78% 50%);
  will-change: clip-path;
  transition: background-color .6s, color .6s;
}
.flood .word { -webkit-text-stroke-color: var(--pop); opacity: .55; }

.sweep {
  position: absolute;
  top: 50%;
  left: 0;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(120px, 24vw, 420px);
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--fg);
  transform: translate(100vw, -55%);
  will-change: transform;
}

.hero-icon {
  position: absolute;
  z-index: 3;
  left: 9vw;
  top: 50%;
  width: min(30vw, 46vh, 360px);
  margin-top: calc(min(30vw, 46vh, 360px) / -2);
  will-change: transform;
}
.hero-icon .icon.ios { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }

.hero-copy {
  position: absolute;
  z-index: 2;
  left: calc(9vw + min(30vw, 46vh, 360px) + 6vw);
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  max-width: 34em;
  opacity: 0;
}
.hero-copy h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.hero-sub { margin: 10px 0 0; font-weight: 700; font-size: clamp(16px, 1.5vw, 20px); }
.hero-desc { margin: 18px 0 0; font-size: 16px; line-height: 1.9; max-width: 32em; }
.meta { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; opacity: .8; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 14px 22px;
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .2s;
}
.cta:hover { transform: translateY(-2px); }
.cta svg { width: 14px; height: 14px; }

.cast {
  position: absolute;
  z-index: 4;
  left: var(--gutter);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}
.cast ol { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cast li { width: 30px; opacity: .45; transition: opacity .3s, transform .3s; }
.cast li.is-on { opacity: 1; transform: translateY(-4px); }
.cast li .icon.ios { border-radius: 7px; }

/* ---------- list under the stage ---------- */
.list {
  padding: 96px var(--gutter) 120px;
  border-top: 1px solid var(--line);
}
.list-head { display: flex; align-items: baseline; gap: 16px; margin: 0 0 56px; }
.list-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.035em; line-height: 1; }
.list-head span { color: var(--muted); font-weight: 700; }

.list-head, .row { max-width: 1120px; margin-left: auto; margin-right: auto; }
.row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 32px 56px;
  align-items: start;
  padding: 40px 0;
}
.row + .row { border-top: 1px solid var(--line); }
.row-icon { width: 120px; }
.row h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.03em; line-height: 1.15; }
.row h3 a { text-decoration: none; }
.row h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.row .hero-sub { color: var(--muted); }
.row .hero-desc { margin-top: 12px; }
.row .meta { color: var(--muted); opacity: 1; }
.row .cta { --fg: var(--ink); --bg: var(--paper); margin-top: 20px; }

.media { width: 230px; margin: 0; }
.media video, .media img.shot {
  width: 100%;
  border-radius: 26px;
  border: 6px solid var(--ink);
  background: var(--ink);
  cursor: pointer;
}
.media img.shot { cursor: default; }
.media.wide { width: 440px; }
.media.wide video { border-radius: 12px; border-width: 0; aspect-ratio: 16 / 9; object-fit: cover; }
.media.wide img.shot { border-radius: 12px; border-width: 0; aspect-ratio: 16 / 9; object-fit: cover; cursor: default; }
.media figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }

.row-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; }
.row .row-links .cta { margin-top: 0; }
.support { font-weight: 700; font-size: 14px; color: var(--muted); text-underline-offset: 4px; }
.support:hover { color: var(--ink); }

/* スクショの横並び */
.shots {
  display: flex;
  gap: 14px;
  margin: 28px 0 0;
  padding: 4px 0 14px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
}
.shots li { flex: none; scroll-snap-align: start; }
.shots li:last-child { padding-right: 64px; }
.shots button { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; }
.shots img { display: block; height: 240px; width: auto; aspect-ratio: auto 598 / 1300; border-radius: 14px; background: var(--line); transition: transform .25s; }
.shots.wide img { height: 150px; aspect-ratio: auto 16 / 10; border-radius: 10px; }
.shots button:hover img { transform: translateY(-4px); }
.shots button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* 拡大表示 */
.lightbox { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }
.lightbox::backdrop { background: rgba(10, 12, 14, .86); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 440px); max-height: 88dvh; border-radius: 18px; object-fit: contain; }
.lightbox.wide img { max-width: 92vw; border-radius: 10px; }
.lightbox button {
  position: fixed; width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lb-prev { left: 20px; top: 50%; margin-top: -26px; }
.lb-next { right: 20px; top: 50%; margin-top: -26px; }
.lb-close { right: 20px; top: 20px; }

/* ---------- footer ---------- */
.foot {
  padding: 56px var(--gutter) 72px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--muted);
}
.foot { align-items: end; color: var(--ink); }
.foot-sign { width: clamp(180px, 24vw, 320px); }
.foot-meta { display: grid; gap: 4px; justify-items: end; color: var(--muted); }
.foot p { margin: 0; }

/* ---------- narrow screens ---------- */
@media (max-width: 760px) {
  .bar-nav { gap: 14px; }
  .intro { min-height: 0; padding-top: 104px; grid-template-rows: auto; }
  .intro-name { font-size: 25vw; }
  .intro-shelf { gap: 3vw; flex-wrap: nowrap; padding: 40px 0 36px; }
  .intro-shelf a { width: 15vw; }
  .hero-icon {
    left: 50%;
    top: 13vh;
    top: 13svh;
    width: min(44vw, 30vh);
    margin-left: calc(min(44vw, 30vh) / -2);
    margin-top: 0;
  }
  .hero-copy {
    left: var(--gutter);
    right: var(--gutter);
    top: auto;
    bottom: 76px;
    transform: none;
  }
  .hero-copy h3 { font-size: clamp(30px, 9vw, 44px); }
  .hero-desc { font-size: 15px; line-height: 1.8; margin-top: 12px; }
  .meta { margin-top: 12px; }
  .cta { margin-top: 16px; padding: 12px 18px; }
  .sweep { top: 30%; }
  .cast { bottom: 20px; }

  .row { grid-template-columns: 72px minmax(0, 1fr); gap: 20px; }
  .row-icon { width: 72px; }
  .media, .media.wide { grid-column: 1 / -1; width: 100%; max-width: 280px; }
  .media.wide { max-width: none; }
  .shots { margin-right: calc(var(--gutter) * -1); }
  .shots img { height: 240px; }
  .shots.wide img { height: 150px; }
  .lb-prev, .lb-next { top: auto; bottom: 24px; margin-top: 0; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .hero-desc { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .stage-wrap { height: auto; }
  .stage { position: relative; height: 100svh; min-height: 640px; }
  .intro-shelf li { animation: none; }
  .intro-name .ch > span { transform: none; }
  .intro-name.is-in .ch.z > span > span { animation: none; }
  .sign .glyphs { fill-opacity: 1; stroke-width: 0; }
  .sign.is-drawn, .sign.is-drawn .glyphs { animation: none; }
  .flood { clip-path: none; transition: none; }
}

/* 言語の切り替え */
.bar-nav .lang { padding-left: 22px; border-left: 1px solid currentColor; opacity: .55; }
