/* つくる 共通の見た目 */
:root {
  --bg: #f6f3ec;
  --bg2: #efeadf;
  --card: #fffdf8;
  --ink: #17182a;
  --sub: #5d5f70;
  --line: #e1dbcd;
  --pink: #ff6b8e;
  --indigo: #3442b8;
  --violet: #7b4fd6;
  --green: #1f9e74;
  --orange: #e8862a;
  --code: #17182a;
  --code-ink: #f1eee6;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --out3: cubic-bezier(.33, 1, .68, 1);
  --en: "Bricolage Grotesque", "Zen Kaku Gothic New", system-ui, sans-serif;
  --ja: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121320; --bg2: #191a2a; --card: #1c1d2e; --ink: #f2efe7; --sub: #a9aabb; --line: #2c2d42;
    --code: #0b0c15; --code-ink: #f1eee6;
  }
}
:root[data-theme="dark"] {
  --bg: #121320; --bg2: #191a2a; --card: #1c1d2e; --ink: #f2efe7; --sub: #a9aabb; --line: #2c2d42;
  --code: #0b0c15; --code-ink: #f1eee6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ja);
  line-height: 1.8; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---- スクロールの進み(プログレスバー) ---- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress i {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--indigo));
}

/* ---- ヘッダー(下にスクロールで隠れる) ---- */
.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: transform .45s var(--ease), background .3s, box-shadow .3s;
}
.head.hide { transform: translateY(-100%); }
.head.solid { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--en); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.logo-mark { position: relative; width: 30px; height: 22px; flex: none; }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; top: 2px; width: 18px; height: 18px; mix-blend-mode: multiply; }
.logo-mark::before { left: 0; border-radius: 50%; background: var(--pink); }
.logo-mark::after { right: 0; border-radius: 5px; background: var(--indigo); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-mark::before, :root:not([data-theme="light"]) .logo-mark::after { mix-blend-mode: screen; } }
.logo small { font-family: var(--ja); font-weight: 700; font-size: 12px; color: var(--sub); margin-left: 2px; }
.head nav { display: flex; gap: 4px; align-items: center; }
.head nav a { text-decoration: none; font-size: 14px; font-weight: 700; padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.head nav a:hover { background: var(--bg2); }
.head nav .hide-sm { display: none; }
@media (min-width: 720px) { .head nav .hide-sm { display: inline-flex; } }
/* つくる部へのリンクは、少しだけ目立たせる */
.head nav a.nav-club { background: var(--ink); color: var(--bg); }
.head nav a.nav-club:hover { background: var(--violet); }
@media (max-width: 440px) {
  .logo small { display: none; }
  .head nav { gap: 2px; }
  .head nav a { padding: 10px 9px; font-size: 13px; }
}

/* ---- ボタン ---- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--bg); font: inherit; font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: transform .35s var(--ease);
  will-change: transform;
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn .arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
/* 波紋 */
.ripple-dot {
  position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); opacity: .35;
  background: currentColor; animation: ripple .6s var(--out3) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---- スクロールで現れる ---- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--out3), transform .7s var(--out3); }
.rv.in { opacity: 1; transform: none; }
.rise { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; }
.rise > span { display: inline-block; transform: translateY(110%); transition: transform .65s var(--ease); }
.in .rise > span, .rise.in > span { transform: none; }

/* マーカー */
.mark { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--pink) 45%, transparent) 62%); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size .8s var(--out3) .2s; }
.in .mark, .mark.in { background-size: 100% 100%; }

/* 下線(左から伸びて右へ抜ける) */
.uline { position: relative; text-decoration: none; }
.uline::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.uline:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---- トップへ戻る ---- */
.totop {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: var(--ink); color: var(--bg); font-size: 20px; cursor: pointer;
  opacity: 0; transform: translateY(16px) scale(.8); transition: opacity .35s, transform .45s var(--ease); pointer-events: none;
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---- トースト ---- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, calc(100% + 60px));
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
  transition: transform .5s var(--ease); white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast.show { transform: translate(-50%, 0); }

/* ---- フッター ---- */
.foot { margin-top: 96px; background: #17182a; color: #f2efe7; padding: 56px 0 40px; }
.foot .wrap { display: grid; gap: 24px; }
.foot .logo { color: #f2efe7; }
.foot p { margin: 0; color: #b9bacb; font-size: 14px; }
.foot a { color: #f2efe7; }
.foot .links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.foot .links a { min-height: 44px; display: inline-flex; align-items: center; }
.foot small { color: #8d8ea3; font-size: 12px; }

/* ---- チップ(絞り込み) ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:active { transform: scale(.95); }

/* ---- 見本のカード ---- */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.scard {
  --mx: 50%; --my: 50%;
  position: relative; display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .4s, opacity .4s;
  will-change: transform;
}
.scard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(255,255,255,.35), transparent 60%);
}
.scard:hover { box-shadow: 0 24px 48px -24px rgba(23,24,42,.35); }
.scard:hover::after { opacity: 1; }
.scard .thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c); }
.scard .thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.scard:hover .thumb img { transform: scale(1.05); }
.scard .thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-family: var(--en); font-weight: 800; font-size: 28px; }
.scard .body { padding: 16px 18px 20px; }
.scard .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--sub); }
.scard .meta i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.scard h3 { margin: 6px 0 4px; font-size: 19px; line-height: 1.4; }
.scard p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.7; }
.scard.out { display: none; }

/* ---- 見出し ---- */
.eyebrow { font-family: var(--en); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); margin: 0 0 8px; }
.h2 { font-size: clamp(26px, 6vw, 40px); line-height: 1.35; margin: 0 0 16px; letter-spacing: .01em; }
section { scroll-margin-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rise > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .mark { transition: none; background-size: 100% 100%; }
  .scard, .btn, .head, .totop, .toast { transition: none !important; }
}
