/* =========================================================
   backslash tokyo — style
   blue    : #0189EF
   magenta : #F428CE
   bg      : #EBFFFE -> #CFFBFC -> #FFFFFF
   display : Cormorant Garamond SemiBold (+Italic)
   body jp : Noto Serif JP Light
========================================================= */

:root {
  --blue: #0189EF;
  --magenta: #F428CE;
  --bg-top: #EBFFFE;
  --bg-mid: #CFFBFC;
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --serif-jp: "Noto Serif JP Palt", "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --pad-x: clamp(20px, 6.8vw, 98px);
}

/* palt(約物・かな詰め)を保持した自前サブセット。
   Google Fonts版はpaltが削除されているため、詰め組み用に先頭へ。 */
@font-face {
  font-family: "Noto Serif JP Palt";
  src: url("../fonts/NotoSerifJP-Light-palt.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif-jp);
  font-weight: 300;
  color: var(--blue);
  background: linear-gradient(180deg,
    var(--bg-top) 0%,
    #DFFCFD 40%,
    var(--bg-mid) 66%,
    #FFFFFF 78%,
    #FFFFFF 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* デザインは約物・かな詰め(プロポーショナルメトリクス) */
  font-feature-settings: "palt" 1;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--pad-x) 10px;
  border-bottom: 1px solid var(--blue);
  background: rgba(235, 255, 254, 0.82);
  backdrop-filter: blur(6px);
}
.header-logo img { height: 15px; width: auto; }
.header-nav {
  display: contents;
}
.header-nav a,
.header-nav button {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: 18px;
  color: var(--blue);
  letter-spacing: 0.02em;
}
.nav-about { position: absolute; left: 50%; transform: translateX(-50%); }
.nav-contact:hover, .nav-about:hover { opacity: 0.65; }

/* ===== Hero ===== */
.hero { padding: clamp(28px, 5vw, 64px) var(--pad-x) 0; position: relative; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  align-items: start;
}
.hero-logo { margin-top: clamp(4px, 1vw, 16px); }
.hero-wordmark { width: clamp(260px, 32vw, 470px); height: auto; }
.hero-tokyo { width: clamp(76px, 9.4vw, 138px); height: auto; margin-top: clamp(8px, 1vw, 14px); }
.hero-en {
  margin-top: clamp(28px, 4vw, 56px);
  font-family: var(--serif-en);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(11px, 1vw, 14px);
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.hero-jp {
  margin-top: clamp(20px, 2.4vw, 34px);
  font-size: clamp(14px, 1.35vw, 19px);
  letter-spacing: 0.06em;
}
.hero-balloon {
  justify-self: center;
  width: clamp(300px, 40vw, 620px);
  margin-top: clamp(-10px, -1vw, 0px);
  pointer-events: none;
  will-change: transform;
}
.hero-arrow {
  display: none;
  text-align: center;
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: 34px;
  margin: 18px 0 6px;
  animation: arrowNudge 2.6s ease-in-out infinite;
}
@keyframes arrowNudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ===== Culture Collection ===== */
.collection { padding: clamp(56px, 8vw, 120px) var(--pad-x) clamp(40px, 6vw, 90px); }
.collection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.collection-title {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: clamp(38px, 5.7vw, 82px);
  letter-spacing: normal;
  line-height: 1.05;
}
.title-toggle { display: flex; align-items: center; gap: 12px; }
.title-toggle-label {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: clamp(15px, 1.4vw, 21px);
}
.toggle-pill {
  position: relative;
  width: 46px;
  height: 22px;
  background: var(--blue);
  transition: background 0.25s ease;
}
.toggle-knob {
  position: absolute;
  top: 3px;
  right: 3px;
  left: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s ease;
}
.toggle-pill.is-on { background: var(--magenta); }
.toggle-pill.is-on .toggle-knob { transform: translateX(-24px); }

.filters { display: flex; gap: clamp(26px, 6vw, 96px); margin-top: clamp(14px, 1.6vw, 22px); }
.filter-btn {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: clamp(14px, 1.45vw, 21px);
  min-width: clamp(64px, 6.4vw, 96px);
  padding: 3px 14px 5px;
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn i { font-style: italic; }
.filter-all.is-active { background: #fff; }
.filter-report.is-active { background: var(--blue); color: #fff; }
.filter-podcast.is-active { background: var(--magenta); border-color: var(--magenta); color: #fff; }

/* --- Grid --- */
.collection-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(16px, 3vw, 56px);
  row-gap: clamp(64px, 7vw, 120px);
  margin-top: clamp(56px, 6vw, 96px);
  padding-bottom: 40px;
}
.card { position: relative; }
/* scattered rhythm: middle column floats higher, sides lower */
.card:nth-child(3n+1) { transform: translateY(clamp(30px, 4vw, 70px)); }
.card:nth-child(3n+2) { transform: translateY(0); }
.card:nth-child(3n)   { transform: translateY(clamp(44px, 5.4vw, 96px)); }

.card-link { display: block; }
.card-obj {
  width: clamp(150px, 17vw, 250px);
  margin: 0 auto;
  will-change: transform;
}
.card-obj img { width: 100%; height: auto; transition: transform 0.45s cubic-bezier(.2,.7,.2,1); }
.card-link:hover .card-obj img { transform: scale(1.06) rotate(-2deg); }

.card-chip {
  display: inline-block;
  font-family: var(--serif-en);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(13px, 1.05vw, 15px);
  color: #fff;
  padding: 2px 14px 4px;
  margin-bottom: 10px;
}
.card--report .card-chip { background: var(--blue); }
.card--podcast .card-chip { background: var(--magenta); }

.card-meta { margin-top: 12px; }
.card-title { font-size: clamp(14px, 2.05vw, 30px); letter-spacing: 0.01em; }
.card-date {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: clamp(12px, 1.28vw, 18.5px);
  margin-top: 2px;
}

.card-new {
  font-family: var(--serif-en);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(18px, 1.9vw, 27px);
  color: var(--magenta);
  line-height: 1;
  margin-bottom: 2px;
}
.card-num {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: clamp(17px, 1.7vw, 24px);
  line-height: 1.2;
}
.card-tag { position: absolute; z-index: 2; }
/* number/NEW! wander around objects, corner cycling */
.card:nth-child(4n+1) .card-tag--num { right: -2%; bottom: 8%; }
.card:nth-child(4n+2) .card-tag--num { left: 2%; top: -12%; }
.card:nth-child(4n+3) .card-tag--num { left: -2%; top: 30%; }
.card:nth-child(4n)   .card-tag--num { right: 0; top: -10%; }
.card-tag--chip { left: 0; top: -6%; }

/* title-mode vs number-mode visibility (PC) */
.collection.titles-off .card-chip,
.collection.titles-off .card-meta { display: none; }
.collection.titles-on .card-tag--num { display: none; }

.grid-sentinel { height: 2px; }

/* 投稿が無いときの表示 */
.grid-empty {
  font-family: var(--serif-en);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(30px, 3.6vw, 52px);
  color: var(--blue);
  text-align: center;
  padding: clamp(70px, 9vw, 140px) 0 clamp(50px, 7vw, 110px);
  animation: floatBreath 7s ease-in-out infinite;
}
.grid-empty::after { content: ""; }

/* ===== About ===== */
.about {
  padding: clamp(70px, 9vw, 150px) var(--pad-x) clamp(80px, 10vw, 160px);
}
.about-title {
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: clamp(44px, 5.7vw, 82px);
  letter-spacing: normal;
}
.about-body {
  /* 設計実測: 本文はfs比 約4.5vw(SP)、行送り1.6、字間ほぼゼロ+palt */
  margin: clamp(56px, 5vw, 76px) auto 0;
  max-width: 680px;
  text-align: left;
  font-size: clamp(17px, 1.28vw, 18.5px);
  line-height: 1.9;
  letter-spacing: 0.01em;
}
.about-body p + p { margin-top: 1.55em; }

/* ===== Footer ===== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--pad-x) 40px;
  background: #fff;
}
.footer-tbwa { height: 20px; width: auto; }
.back-to-top img { height: 19px; width: auto; }
.back-to-top:hover { opacity: 0.65; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 10px 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 99;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Floating / breathing ===== */
.float-obj { animation: floatBreath var(--dur, 8s) ease-in-out var(--del, 0s) infinite; }
@keyframes floatBreath {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  30%      { transform: translate3d(4px, -12px, 0) rotate(1.6deg) scale(1.015); }
  62%      { transform: translate3d(-5px, 7px, 0) rotate(-1.4deg) scale(0.99); }
}
@media (prefers-reduced-motion: reduce) {
  .float-obj, .hero-arrow { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== SP ===== */
@media (max-width: 760px) {
  .header-nav a, .header-nav button { font-size: 15px; }
  .header-logo img { height: 12px; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-wordmark { width: min(76vw, 340px); }
  .hero-tokyo { width: min(22vw, 100px); }
  .hero-en { font-size: 10.5px; margin-top: 26px; }
  .hero-jp { font-size: 14px; }
  .hero-balloon { width: min(74vw, 360px); margin: 8px auto 0; }
  .hero-arrow { display: block; }

  .collection-head { justify-content: center; }
  .collection-title { text-align: center; }
  .title-toggle { display: none; } /* SPは常時タイトル表示 */
  .filters { justify-content: center; gap: 7vw; }

  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 6vw;
    row-gap: 72px;
  }
  .card:nth-child(n) { transform: none; }
  .card:nth-child(2n)   { transform: translateY(-34px); }
  .card:nth-child(2n+1) { transform: translateY(0); }
  .card-obj { width: min(38vw, 200px); }
  .card-title { font-size: 13px; }
  .card-date { font-size: 11.5px; }
  /* SP always titles-on */
  .collection.titles-off .card-meta { display: block; }
  .collection.titles-off .card-chip { display: inline-block; }
  .collection .card-tag--num { display: none; }
  .card-chip { font-size: 12px; padding: 1px 10px 3px; margin-bottom: 8px; }

  .about { padding-left: 14px; padding-right: 14px; }
  .about-title { text-align: center; font-size: 10.9vw; letter-spacing: normal; }
  .about-body {
    text-align: center;
    font-size: 3.55vw;          /* 設計の改行位置が保たれる最大サイズ */
    line-height: 2.0;           /* 行送り 28px@390(設計実測72px相当) */
    letter-spacing: -0.03em;
    max-width: none;
  }
  .about-body p + p { margin-top: 1.95em; }
}
