/* =========================================================================
   Design tokens
   アクセント色を変えるときは --accent だけ書き換える
   ========================================================================= */
:root {
  --accent: #2563eb;
  --on-accent: #ffffff;

  --bg: #ffffff;
  --text: #000000;
  --sub: #555555;
  --muted: #949494;
  --line: #efefef;
  --band-a: #eff1f4;
  --band-b: #f1f3f5;
  --deco: #e3e6ea;
  --deco-soft: #f3f3f3;
  --card: #ffffff;
  --card-gray: #f3f3f3;
  --tag-bg: #f0f0f0;
  --tag-text: #333333;
  --footer-link: #757575;
  --sep: #d9d9d9;

  --header-solid: #ffffff;
  --header-scrolled: rgba(255, 255, 255, 0.9);
  --header-text: #000000;
  --pill-bg: #2a2a2a;
  --pill-text: #ffffff;
  --theme-bg: #2a2a2a;
  --theme-fg: #ffffff;
  --btn-bg: #000000;
  --btn-text: #ffffff;
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

  --display: "Outfit", "M PLUS 1p", "Noto Sans JP", sans-serif;
  --body: "Noto Sans JP", sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 89px;
  --hero-h: 690px;
  color-scheme: light;
}

html.dark {
  --bg: #000000;
  --text: #ffffff;
  --sub: #b3b3b3;
  --muted: #949494;
  --line: #333333;
  --band-a: #1b1c1e;
  --band-b: #1e1f21;
  --deco: #2a2b2e;
  --deco-soft: #161616;
  --card: #000000;
  --card-gray: #1a1a1a;
  --tag-bg: #333333;
  --tag-text: #cccccc;
  --footer-link: #a3a3a3;
  --sep: #444444;

  --header-solid: #000000;
  --header-scrolled: rgba(0, 0, 0, 0.9);
  --header-text: #ffffff;
  --pill-bg: #ffffff;
  --pill-text: #000000;
  --theme-bg: #d4d4d4;
  --theme-fg: #000000;
  --btn-bg: #ffffff;
  --btn-text: #000000;
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* 言語切り替え：表示中でない言語を隠す */
html[lang="ja"] body [lang="en"],
html[lang="en"] body [lang="ja"] { display: none !important; }

/* =========================================================================
   Base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================================================================
   Header
   ========================================================================= */
.gh {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  padding: 0 32px;
  color: #fff;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}
.gh:hover,
.gh.is-scrolled,
.gh.is-open,
.gh.is-page {
  color: var(--header-text);
  background: var(--header-solid);
  border-bottom-color: var(--line);
}
.gh.is-scrolled:not(:hover):not(.is-open) { background: var(--header-scrolled); }

.gh-inner { display: flex; align-items: center; height: 100%; }

.gh-logo {
  flex-shrink: 0;
  margin-right: 56px;
  font: 800 21px/1 var(--display);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.gh-nav { display: flex; height: 100%; }
.gh-item { height: 100%; }
.gh-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  font: 700 17px/28px var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s var(--ease);
}
.gh-link::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 28px;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transition: opacity .15s var(--ease);
}
.gh-item:hover .gh-link::after,
.gh-link:focus-visible::after { opacity: 1; }

/* メガメニュー */
.mega {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--header-h) - 1px);
  background: var(--header-solid);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--header-text);
  visibility: hidden;
  opacity: 0;
  transition: opacity .15s var(--ease), visibility .15s;
}
.has-menu:hover .mega,
.has-menu:focus-within .mega { visibility: visible; opacity: 1; }

.mega-inner {
  display: flex;
  max-width: 1000px;
  min-height: 270px;
  margin: 0 auto;
  padding: 50px 0;
}
.mega-title {
  flex: 0 0 168px;
  padding-right: 32px;
  border-right: 1px solid var(--line);
  font: 800 24px/1.3 var(--display);
}
.mega-list { display: flex; flex-wrap: wrap; gap: 8px 4px; padding-left: 32px; align-content: flex-start; }
.mega-list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 138px;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.mega-list a:hover { color: var(--header-text); }
.mega-list svg {
  width: 32px; height: 32px;
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

.gh-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.gh-icon-btn {
  display: flex; align-items: center; gap: 4px;
  height: 36px; padding: 0 8px;
  background: none; border: 0; border-radius: 4px;
  cursor: pointer;
  transition: opacity .15s var(--ease);
}
.gh-icon-btn:hover { opacity: .6; }

.lang { position: relative; }
.lang-menu {
  position: absolute;
  top: 44px; right: 0;
  min-width: 140px;
  padding: 6px;
  background: var(--header-solid);
  color: var(--header-text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--menu-shadow);
  display: none;
}
.lang-menu.is-open { display: block; }
.lang-menu button {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  text-align: left;
  background: none; border: 0; border-radius: 4px;
  cursor: pointer;
}
.lang-menu button:hover { background: var(--tag-bg); }
.lang-menu button[aria-current="true"] { font-weight: 700; }

.gh-pill {
  display: flex; align-items: center;
  height: 36px; padding: 0 24px;
  border-radius: 999px;
  font: 700 14px/20px var(--display);
  white-space: nowrap;
  text-decoration: none;
  background: #fff; color: #000;
  transition: background-color .15s var(--ease), color .15s var(--ease), opacity .15s var(--ease);
}
.gh-pill:hover { opacity: .8; }

.gh-theme {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 0; border-radius: 999px;
  background: #fff; color: #000;
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), opacity .15s var(--ease);
}
.gh-theme:hover { opacity: .8; }
.i-moon { display: none; }
html.dark .i-sun { display: none; }
html.dark .i-moon { display: block; }

.gh:hover .gh-pill, .gh.is-scrolled .gh-pill, .gh.is-open .gh-pill, .gh.is-page .gh-pill { background: var(--pill-bg); color: var(--pill-text); }
.gh:hover .gh-theme, .gh.is-scrolled .gh-theme, .gh.is-open .gh-theme, .gh.is-page .gh-theme { background: var(--theme-bg); color: var(--theme-fg); }
.gh-link.is-current::after { opacity: 1; }

.gh-burger { display: none; }

/* モバイルメニュー */
.mnav {
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  padding: 8px 20px 32px;
  background: var(--header-solid);
  color: var(--header-text);
}
.mnav[hidden] { display: none; }
.mnav-list a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font: 700 18px/1.4 var(--display);
  text-decoration: none;
}
.mnav-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.mnav-chip {
  padding: 8px 16px;
  font-size: 14px;
  background: var(--tag-bg);
  border: 0; border-radius: 999px;
  cursor: pointer;
}

/* =========================================================================
   First View
   ========================================================================= */
.hero {
  position: relative;
  min-height: var(--hero-h);
  height: var(--hero-h);
  overflow: hidden;
  pointer-events: none;
}
.hero-base, .hero-img, .hero-content {
  position: absolute;
  inset: 0;
  display: block;
}
.hero-base { background: #000; }
.hero-img { color: #fff; }
.hero-dim { position: absolute; inset: 0; z-index: 2; background: #000; opacity: .1; }

/* 写真レイヤー（2枚を交互に使う） */
.hero-layer { position: absolute; inset: 0; }
.hero-layer.is-hidden { display: none; }
.hero-layer img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, 65% 50%);
}
/* 切り替え時：120% から 100% へズームアウトしながらフェードイン */
.hero-layer.img-animation {
  animation-name: hero-img-fade-in;
  animation-duration: 2.5s;
  animation-timing-function: cubic-bezier(0.15, 0.1, 0.05, 1);
  animation-iteration-count: 1;
  animation-direction: normal;
}
@keyframes hero-img-fade-in {
  0%   { opacity: 0; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* スクロール連動のパララックス（対応ブラウザは CSS、それ以外は JS で同じ値を再現） */
@supports (animation-timeline: scroll()) {
  .hero-base, .hero-img, .hero-content {
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: scroll(root);
    animation-range: 0px 690px;
  }
  .hero-base    { animation-name: parallax-bg-base; }
  .hero-img     { animation-name: parallax-bg-img; }
  .hero-content { animation-name: parallax-contents; }
}
@keyframes parallax-bg-base  { 100% { transform: translateY(552px); } }
@keyframes parallax-bg-img   { 0% { opacity: 1; } 100% { opacity: .33; transform: translateY(489.9px); } }
@keyframes parallax-contents { 0% { opacity: 1; } 100% { opacity: .33; transform: translateY(462.3px); } }

.hero-content { z-index: 2; padding-top: 192px; color: #fff; pointer-events: auto; }

.hero-title {
  min-height: 200px;
  font: 800 72px/1.3 var(--display);
  letter-spacing: -0.01em;
  color: #fff;
}
.typed { white-space: pre; }

/* カーソル：打っている間は点灯、止まっている間だけ点滅 */
.typed-cursor { opacity: 1; }
.typed-cursor.typed-cursor--blink { animation: typedjsBlink .7s infinite; }
@keyframes typedjsBlink { 50% { opacity: 0; } }

.hero-cta-wrap { margin-top: 48px; }
.hero-cta {
  font: 800 24px/32px var(--display);
  color: #fff;
  text-decoration: none;
  transition: color .15s var(--ease);
}
.hero-cta:hover { color: var(--accent); }

/* ヒーローの上に重ねて流れるコンテンツ */
.page { position: relative; z-index: 3; background: var(--bg); }

/* =========================================================================
   Section heading
   ========================================================================= */
.sec-head { margin-bottom: 32px; }
.sec-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 48px;
}
.sec-title {
  font: 800 52px/1.3 var(--display);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.sec-sub { font-size: 16px; line-height: 1.5; }

.more-link {
  position: relative;
  z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 16px; font-weight: 500; line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.more-link::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.more-link:hover { text-decoration: underline; }

/* =========================================================================
   About（枠線グリッド）
   ========================================================================= */
.sec-about { padding: 160px 0 192px; }

.grid-cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 360px;
  padding: 80px 40px;
  text-align: center;
  background: var(--bg);
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.cell-icon { width: 90px; height: 90px; margin-bottom: 30px; }
.cell-icon svg {
  width: 100%; height: 100%;
  fill: none; stroke: var(--text); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .15s var(--ease);
}
.cell-icon svg .ac { stroke: var(--accent); }
.cell-title { margin-bottom: 12px; font-size: 18px; font-weight: 700; line-height: 1.5; }
.cell-text { font-size: 13px; line-height: 1.6; color: var(--sub); transition: color .15s var(--ease); }

.cell:hover { background: var(--accent); color: var(--on-accent); }
.cell:hover .cell-text { color: var(--on-accent); }
.cell:hover .cell-icon svg, .cell:hover .cell-icon svg .ac { stroke: var(--on-accent); }

/* =========================================================================
   Bands（グレー帯 / 白帯）
   ========================================================================= */
.band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(var(--band-a), var(--band-b));
}
.sec-band-white { position: relative; overflow: hidden; background: var(--bg); }
.band-inner { position: relative; z-index: 1; padding-top: 160px; padding-bottom: 176px; }

.deco { position: absolute; pointer-events: none; user-select: none; z-index: 0; }
.deco-code {
  top: 30px; right: -40px;
  font: 800 500px/1 var(--display);
  letter-spacing: -0.06em;
  color: var(--deco);
}
.deco-bubble {
  top: 90px; right: -70px;
  width: 440px; height: 440px;
  fill: none; stroke: var(--deco-soft); stroke-width: 34; stroke-linejoin: round;
}
.deco-at {
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  font: 800 440px/1 var(--display);
  color: var(--deco);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.works-note { margin-top: 32px; font-size: 14px; line-height: 1.7; color: var(--muted); }

.date { padding: 4px 0; font-size: 13px; line-height: 1.5; color: var(--muted); transition: color .15s var(--ease); }
.card-title { font-size: 18px; font-weight: 700; line-height: 1.5; }

.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags li {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.6;
  background: var(--tag-bg);
  color: var(--tag-text);
  transition: background-color .15s var(--ease), color .15s var(--ease);
}

/* ---- 写真カード（キャリア・実績） ---- */
.pcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border-radius: 12px;
}
.pcard-gray { background: var(--card-gray); }
.pcard-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.pcard-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.pcard-img-top img { object-position: 50% 20%; }
.pcard-gray .pcard-img img { object-position: 50% 0; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 32px 32px 36px; }
.pcard-body .date { margin-bottom: 4px; }
.pcard-body .card-title { margin-bottom: 12px; }
.card-text { font-size: 15px; line-height: 24px; color: var(--sub); }
.pcard-body .tags { margin-top: auto; padding-top: 20px; }

/* 詳細ページがあるカード：ホバーで LINE のカードと同じくアクセント色に */
a.pcard { color: inherit; text-decoration: none; }
a.pcard .pcard-body { transition: background-color .15s var(--ease), color .15s var(--ease); }
a.pcard:hover .pcard-body { background: var(--accent); color: var(--on-accent); }
a.pcard:hover .date { color: rgba(255, 255, 255, .78); }
a.pcard:hover .card-text { color: var(--on-accent); }
a.pcard:hover .tags li { background: rgba(255, 255, 255, .2); color: var(--on-accent); }
.pcard-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-size: 14px; font-weight: 700;
  color: var(--accent);
  transition: color .15s var(--ease);
}
.pcard-more::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}
a.pcard:hover .pcard-more { color: var(--on-accent); }

/* ---- ニュース・ブログカード ---- */
.ncard {
  position: relative;
  display: block;
  height: 480px;
  padding: 40px 40px 104px;
  background: var(--card);
  border-radius: 12px;
  text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.ncard-gray { background: var(--card-gray); }
.ncard-inner { position: relative; height: 100%; overflow: hidden; }
.ncard .card-title { margin-bottom: 24px; }
.ncard .date { margin-bottom: 8px; }
.ncard-text { font-size: 15px; line-height: 24px; }
html.dark .ncard-text { color: var(--sub); }
.fade {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 32px;
  background: linear-gradient(to top, var(--card), transparent);
  transition: background .15s var(--ease);
}
.ncard-gray .fade { background: linear-gradient(to top, var(--card-gray), transparent); }
.ncard .tags { position: absolute; left: 40px; right: 40px; bottom: 40px; }

a.ncard:hover { background: var(--accent); color: var(--on-accent); }
a.ncard:hover .date { color: rgba(255, 255, 255, .78); }
a.ncard:hover .ncard-text { color: var(--on-accent); }
a.ncard:hover .fade { background: linear-gradient(to top, var(--accent), transparent); }
a.ncard:hover .tags li { background: rgba(255, 255, 255, .2); color: var(--on-accent); }

/* =========================================================================
   Contact CTA
   ========================================================================= */
.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 16px 80px;
  text-align: center;
}
.cta-title {
  margin-bottom: 46px;
  font: 800 32px/1.3 var(--display);
  letter-spacing: -0.01em;
}
.btn-black {
  display: inline-flex; align-items: center; justify-content: center;
  width: 240px; height: 56px;
  border-radius: 8px;
  font-size: 16px; font-weight: 700; line-height: 24px;
  background: var(--btn-bg); color: var(--btn-text);
  text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.btn-black:hover { background: var(--accent); color: var(--on-accent); }

/* =========================================================================
   Footer
   ========================================================================= */
.ft-links { padding: 120px 0 112px; }
.ft-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ft-head { margin-bottom: 14px; font: 800 18px/1.5 var(--display); }
.ft-cols li { font-size: 13px; line-height: 29px; }
.ft-cols a { color: var(--footer-link); text-decoration: none; }
.ft-cols a:hover { color: var(--text); text-decoration: underline; }
.ext {
  width: 11px; height: 11px;
  margin-left: 4px;
  vertical-align: -1px;
  fill: none; stroke: currentColor; stroke-width: 1.2;
}

.ft-bottom {
  padding: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
.ft-bottom-inner { max-width: 1200px; margin: 0 auto; }
.ft-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 4px; }
.ft-legal { display: flex; flex-wrap: wrap; align-items: center; }
.ft-legal a { text-decoration: none; white-space: nowrap; }
.ft-legal a:hover { text-decoration: underline; }
.sep { display: inline-block; width: 1px; height: 12px; margin: 0 16px; background: var(--sep); }
.ft-side { display: flex; align-items: center; gap: 24px; }
.ft-gh { display: flex; }
.ft-gh:hover { opacity: .6; }

/* =========================================================================
   記事ページ（実績の詳細）— LINE Developers の記事ページと同じ構成
   ========================================================================= */
.article-page { padding-top: var(--header-h); }

.crumbs {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--sub);
}
.crumbs .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding-top: 14px; padding-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumb-sep {
  width: 6px; height: 6px;
  margin: 0 12px 0 10px;
  border-right: 1.2px solid currentColor; border-top: 1.2px solid currentColor;
  transform: rotate(45deg);
  opacity: .7;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 96px;
  padding-top: 72px;
  padding-bottom: 128px;
}

.article-title {
  font: 800 44px/1.35 var(--display);
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.article-date { margin-top: 14px; font-size: 13px; color: var(--muted); }
.article-lead { margin-top: 40px; font-size: 17px; line-height: 1.9; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 40px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.stat-cell { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 24px 24px 22px; background: var(--bg); }
.stat-cell dt { font-size: 13px; color: var(--sub); }
.stat-cell dd { margin: 0; font: 800 38px/1.1 var(--display); }
.stat-cell small { margin-left: 4px; font-size: 17px; font-weight: 700; color: var(--sub); }

.article h2 {
  margin: 72px 0 20px;
  font: 800 28px/1.4 var(--display);
  letter-spacing: -0.01em;
}
.article p { font-size: 15.5px; line-height: 1.95; }
.article div[lang] > p + p { margin-top: 1em; }

.bullets { padding-left: 1.3em; list-style: disc; }
.bullets li { font-size: 15.5px; line-height: 1.85; }
.bullets li + li { margin-top: 8px; }
.bullets li::marker { color: var(--accent); }

.fig { margin: 32px 0 0; }
.fig + .fig { margin-top: 40px; }
.fig img, .fig video {
  display: block;
  width: 100%; height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-gray);
}
.fig figcaption { margin-top: 12px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.fig-zoom { position: relative; display: block; cursor: zoom-in; }
.fig-zoom::after {
  content: "";
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 20px no-repeat;
  opacity: 0;
  transition: opacity .15s var(--ease);
}
.fig-zoom:hover::after, .fig-zoom:focus-visible::after { opacity: 1; }

.note-box {
  margin-top: 64px;
  padding: 24px 28px;
  border-radius: 12px;
  background: var(--card-gray);
}
.note-box-title { margin-bottom: 6px; font-size: 14px !important; font-weight: 700; }
.note-box p { font-size: 14px; line-height: 1.8; color: var(--sub); }

.talk {
  margin-top: 64px;
  padding: 36px 40px 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.talk h2 { margin-top: 0; font-size: 24px; }
.talk .bullets { margin-top: 16px; }
.talk .btn-black { margin-top: 28px; }

.article-tags { margin-top: 56px; }

.post-nav {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.post-nav a {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.post-nav a::before {
  content: "";
  width: 7px; height: 7px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.post-nav a:hover { text-decoration: underline; }

.sidebar { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.side-block + .side-block { margin-top: 48px; }
.side-title { margin-bottom: 16px; font: 800 18px/1.4 var(--display); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 14px; font-size: 14px; line-height: 1.7; }
.side-links li + li { margin-top: 14px; }
.side-links a { display: block; font-size: 14px; line-height: 1.6; text-decoration: none; }
.side-links a:hover { text-decoration: underline; }
.side-date { display: block; font-size: 12px; color: var(--muted); }

/* 拡大表示 */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 24px 24px;
  background: rgba(0, 0, 0, .88);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border: 0; border-radius: 999px;
  font-size: 28px; line-height: 44px;
  color: #fff; background: rgba(255, 255, 255, .15);
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .28); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1199px) {
  :root { --header-h: 64px; }
  .gh { padding: 0 20px; }
  .gh-nav, .lang, .gh-pill, .gh-theme { display: none; }
  .gh-logo { font-size: 19px; }
  .gh-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 36px; height: 36px; padding: 0 6px;
    background: none; border: 0; cursor: pointer;
  }
  .gh-burger span { display: block; height: 2px; background: currentColor; border-radius: 1px; transition: transform .2s var(--ease), opacity .2s; }
  .gh.is-open .gh-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .gh.is-open .gh-burger span:nth-child(2) { opacity: 0; }
  .gh.is-open .gh-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 1023px) {
  .article-layout { grid-template-columns: 1fr; gap: 64px; }
  .sidebar { position: static; }
  .hero-title { font-size: 60px; }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .grid-cells { grid-template-columns: repeat(2, 1fr); }
  .ft-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .hero-content { padding-top: 160px; }
  .hero-title { font-size: 48px; }
  .hero-cta-wrap { margin-top: 32px; }

  .wrap { padding: 0 16px; }
  .sec-about { padding: 80px 0 96px; }
  .band-inner { padding-top: 80px; padding-bottom: 96px; }
  .sec-title { font-size: 40px; }
  .sec-head-row { flex-direction: column; align-items: flex-start; margin-bottom: 32px; }

  .grid-cards, .grid-cells, .ft-cols { grid-template-columns: 1fr; }
  .cell { min-height: 0; padding: 56px 32px; }
  .ncard { height: 440px; padding: 32px 32px 96px; }
  .ncard .tags { left: 32px; right: 32px; bottom: 32px; }

  .deco-code { font-size: 300px; top: 20px; right: -60px; }
  .deco-bubble { width: 260px; height: 260px; top: 40px; right: -80px; }
  .deco-at { font-size: 300px; }
  .cta-inner { padding: 80px 16px; }
  .cta-title { font-size: 26px; margin-bottom: 36px; }

  .article-layout { padding-top: 40px; padding-bottom: 80px; }
  .article-title { font-size: 26px; }
  .article-lead { margin-top: 28px; font-size: 16px; }
  .stat-cell { padding: 16px 14px; }
  .stat-cell dd { font-size: 26px; }
  .stat-cell small { font-size: 13px; }
  .article h2 { margin-top: 56px; font-size: 22px; }
  .talk { padding: 28px 22px 30px; }
  .talk h2 { font-size: 20px; }
  .lightbox { padding: 68px 8px 8px; }

  .ft-links { padding: 72px 0 56px; }
  .ft-bottom { padding: 24px 16px; }
  .ft-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sep { margin: 0 12px; }
}

@media (max-width: 639px) {
  .hero-title { font-size: 36px; }
  /* LINE と同じく、スマホでは写真を等倍のまま切り抜く */
  .hero-layer img { object-fit: none; object-position: var(--pos-sm, 65% 50%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* ファーストビューは LINE Developers と同じく、この設定でも動かす */
  .pcard-img img { transition: none; }
}
