/* ---------------------------------------------------------------
   bip — Shinnosuke Moriuchi
   白地。Appleの製品ページの見え方に寄せる。
   フォントはシステムフォント（Mac/iPhoneでは SF Pro ＋ ヒラギノ角ゴシック）。
   apple-design スキルの考え方:
   - 字間は大きさごとに変える（見出しは詰め、小さい字は0付近）。和文には負の字間をかけない
   - 上の帯は半透明の素材。罫線ではなくぼかしで区切る
   - 押した瞬間に反応する。拡大表示は押した写真から出て、同じ場所へ戻る
   - 動きを減らす・透明を減らす・高コントラストの設定に従う
   --------------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --rule: #d2d2d7;
  /* Obsidian テーマ Ui Ice（ライト）の薄い青 */
  --ice: #a8c8d8;          /* 塗り */
  --ice-hover: #8fb8ca;
  --link: #5f93a8;         /* 白地の上の文字 */
  --link-hover: #4d7f94;
  --ice-ink: #1d3a47;      /* 塗りの上の文字 */

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue",
          "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;

  --gutter: max(22px, env(safe-area-inset-left));
  --max: 980px;          /* 本文の幅 */
  --max-wide: 1260px;    /* 写真の幅 */
  --gap: 20px;
  --radius: 18px;
  --nav-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
}
:lang(en) { letter-spacing: -0.022em; font-feature-settings: normal; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ice-hover); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(168, 200, 216, .45); }

/* ---------- 一番上の細い帯 ---------- */

.globalbar {
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: rgba(0,0,0,.8);
  background: rgba(250,250,252,.8);
}

/* ---------- 作品名の帯（半透明、上に残る） ---------- */

.localnav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.localnav-inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.localnav .product { font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: .011em; }
.localnav .product:hover { text-decoration: none; }
.localnav nav { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.localnav nav a { color: var(--ink); opacity: .88; letter-spacing: -0.01em; }
.localnav nav a:hover { color: var(--link); opacity: 1; text-decoration: none; }
.localnav nav a.on { color: var(--link); opacity: 1; }
.localnav nav a:active { opacity: .5; }

/* ---------- 1. トップ ---------- */

/* 文字は左寄せ。左端を下の写真・各見出しの左端に揃える */
.hero { max-width: var(--max-wide); margin: 0 auto; padding: 64px var(--gutter) 0; text-align: left; }
.byline { margin: 8px 0 0; font-size: clamp(21px, 2.4vw, 28px); font-weight: 600; color: var(--ink-2); letter-spacing: .007em; }
.headline {
  margin: 0; font-weight: 600;
  font-size: clamp(64px, 11vw, 120px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.links { margin: 22px 0 0; display: flex; justify-content: flex-start; gap: 32px; font-size: 19px; }
.hero-media { margin: 48px 0 0; }
.hero-media img {
  width: 100%; border-radius: var(--radius);
  opacity: 0; transform: scale(.985);
  animation: arrive 1.4s cubic-bezier(.22,1,.36,1) .1s forwards;
}
@keyframes arrive { to { opacity: 1; transform: none; } }

/* ---------- 共通ブロック ---------- */

.block { max-width: var(--max-wide); margin: 0 auto; padding: 120px var(--gutter) 0; }
.section-title {
  margin: 0 0 32px; font-weight: 600;
  font-size: clamp(32px, 4.5vw, 48px); line-height: 1.08; letter-spacing: -0.003em;
}

/* ---------- 2. 映像 ---------- */

.frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 3. 写真グリッド ---------- */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.cell {
  display: block; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--bg-alt); border-radius: 12px;
  transition: transform 160ms ease-out;
}
.cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,1,.36,1); }
.cell:hover img { transform: scale(1.025); }
.cell:active { transform: scale(.985); transition-duration: 80ms; }   /* 押した瞬間に応える */
.cell.is-source img { opacity: 0; }

/* 最終段：1列目に作品名、2〜3列目に解説 */
.text-cap { grid-column: 1; align-self: end; font-size: 12px; color: var(--ink-3); padding-top: 40px; }
.text-cap p { margin: 0; }
.text {
  grid-column: 2 / 4; align-self: end;
  padding: 40px 0 0 var(--gap);
  border-left: 1px solid var(--rule);
}
.text p { margin: 0; max-width: 40em; }
.text p + p { margin-top: 1.2em; }
.text .medium { font-size: 17px; font-weight: 600; line-height: 1.6; margin-bottom: 1.6em; }
.text .medium span { display: block; font-weight: 400; color: var(--ink-2); letter-spacing: -0.022em; }
.text p:not(.medium):not([lang]) { font-size: 17px; line-height: 1.9; text-align: justify; }
.text p[lang="en"] { font-size: 17px; line-height: 1.47; color: var(--ink-2); }

/* ---------- 4. 作品情報（仕様表） ---------- */

.specs dl { margin: 0; border-top: 1px solid var(--rule); }
.specs .row {
  display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--gap);
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.specs dt { grid-column: 1; font-size: 17px; font-weight: 600; }
.specs dd { grid-column: 2 / 4; margin: 0; }
.specs .en { display: block; color: var(--ink-2); margin-top: 2px; }

/* ---------- フッター ---------- */

.foot { margin-top: 120px; background: var(--bg-alt); }
.foot-inner {
  max-width: var(--max-wide); margin: 0 auto; padding: 20px var(--gutter) max(24px, env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-2);
}
.foot-inner p { margin: 0; }

/* ---------- 拡大表示 ---------- */

.lightbox { position: fixed; inset: 0; z-index: 50; }
.lightbox[hidden] { display: none; }
.lightbox .scrim {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  opacity: 0; transition: opacity .3s ease;
}
.lightbox.open .scrim { opacity: 1; }
.lightbox img {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0; will-change: transform;
  border-radius: 12px; cursor: zoom-out;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  user-select: none; -webkit-user-drag: none;
}
.lightbox .close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(232,232,237,.9); color: #424245;
  opacity: 0; transition: opacity .3s ease, background-color .15s ease, transform .1s ease;
}
.lightbox.open .close { opacity: 1; }
.lightbox .close:hover { background: #dcdce1; }
.lightbox .close:active { transform: scale(.92); }

/* ---------- 画面幅ごと ---------- */

@media (max-width: 1068px) {
  .block { padding-top: 96px; }
}
@media (max-width: 834px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .text-cap { display: none; }
  .text { grid-column: 1 / -1; border-left: 0; padding-left: 0; padding-top: 32px; }
  .specs .row { grid-template-columns: 8rem 1fr; }
  .specs dd { grid-column: 2; }
}
@media (max-width: 600px) {
  :root { --gap: 12px; --radius: 14px; }
  body { font-size: 16px; }
  .hero { padding-top: 40px; }
  .byline { font-size: 19px; }
  .links { font-size: 17px; gap: 24px; }
  .hero-media { margin-top: 32px; }
  .localnav nav { gap: 14px; }
  .grid { grid-template-columns: 1fr; }
  .block { padding-top: 72px; }
  .specs .row { grid-template-columns: 1fr; row-gap: 4px; padding: 16px 0; }
  .specs dt, .specs dd { grid-column: 1; }
  .specs dt { font-size: 14px; color: var(--ink-2); font-weight: 400; }
}

/* ---------- 利用者の設定に従う ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none; opacity: 1; transform: none; }
  .cell, .cell:active, .cell:hover img { transform: none; transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .localnav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .lightbox .scrim { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: #3a3a3c; --ink-3: #48484a; --rule: #8e8e93; }
  .localnav { background: #fff; border-bottom-color: #8e8e93; }
}
