/* ===== トップページ ===== */

/* ---------- ヒーロー ---------- */
.hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: -4%; z-index: -2; will-change: transform; transition: transform 1.2s var(--ease); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 40%; animation: heroIn 2.4s var(--ease) both; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.12); filter: blur(10px) brightness(1.6); } to { opacity: 1; transform: scale(1); filter: none; } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.92) 0%, rgba(2, 5, 9, 0.55) 38%, rgba(2, 5, 9, 0.05) 70%),
    linear-gradient(0deg, var(--void) 0%, rgba(2, 5, 9, 0.2) 35%, transparent 60%),
    linear-gradient(180deg, rgba(2, 5, 9, 0.6), transparent 20%);
}
.hero::after { /* 走査線 */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.25;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 3px);
}
.hero-sweep { position: absolute; left: 0; right: 0; height: 120px; top: -120px; z-index: -1; pointer-events: none; background: linear-gradient(transparent, rgba(142, 240, 255, 0.07), transparent); animation: sweep 7s linear infinite 2s; }
@keyframes sweep { to { transform: translateY(calc(100vh + 240px)); } }

.hero-copy { position: relative; width: 100%; padding-bottom: clamp(56px, 10vh, 120px); padding-top: 120px; }
.hero h1 {
  font-size: clamp(2.05rem, 6.6vw, 6rem); line-height: 1.14; word-break: keep-all; overflow-wrap: anywhere; letter-spacing: -0.01em; font-weight: 700;
  margin: 22px 0 26px; max-width: 12em; text-shadow: 0 0 40px rgba(142, 240, 255, 0.18);
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: inline-block; animation: lineUp 1.3s var(--ease) both; animation-delay: calc(0.5s + var(--i) * 0.14s); }
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(100deg, #fff 10%, var(--glow) 45%, var(--glow-2) 90%); -webkit-background-clip: text; background-clip: text; }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
.hero .lead { max-width: 34em; color: var(--text-2); animation: fadeUp 1.2s var(--ease) both 1s; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; animation: fadeUp 1.2s var(--ease) both 1.15s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; color: var(--text-2); }
.hud > div { position: absolute; display: grid; gap: 4px; animation: fadeUp 1s var(--ease) both 1.4s; }
.hud .tl { top: 28px; left: var(--gutter); }
.hud .tr { top: 28px; right: var(--gutter); text-align: right; }
.hud .br { bottom: 28px; right: var(--gutter); text-align: right; }
.hud b { color: var(--glow); font-weight: 500; }
.hud .live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); margin-right: 8px; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.hud .frame { position: absolute; inset: 16px; border: 1px solid rgba(142, 240, 255, 0.08); }
.hud .frame::before, .hud .frame::after { content: ""; position: absolute; width: 22px; height: 22px; border: 1px solid var(--glow); opacity: 0.6; }
.hud .frame::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.hud .frame::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.scroll-hint { display: inline-flex; align-items: center; gap: 10px; }
.scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--glow), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ポインターを追う照準 */
.reticle { position: absolute; left: 0; top: 0; z-index: 2; width: 120px; height: 120px; margin: -60px 0 0 -60px; pointer-events: none; opacity: 0; transition: opacity .5s; }
.reticle.on { opacity: 1; }
.reticle svg { width: 100%; height: 100%; animation: spin 14s linear infinite; }
.reticle span { position: absolute; left: 100%; top: 0; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em; color: var(--glow); white-space: nowrap; padding-left: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (pointer: coarse) { .reticle { display: none; } }
@media (max-width: 760px) { .hud .tr, .hud .tl { display: none; } .hero-media img { object-position: 62% 40%; } }

/* ---------- 見出しの番号 ---------- */
.sec-no { font-family: var(--font-display); font-weight: 300; font-size: clamp(3rem, 6vw, 5.2rem); line-height: 0.8; margin: 0 0 18px; color: transparent; -webkit-text-stroke: 1px rgba(142, 240, 255, 0.35); }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1.25; }

/* ---------- ジェスチャーで回す画面の壁 ---------- */
.wall-section { overflow: hidden; padding-bottom: clamp(48px, 6vw, 96px); }
.wall-section .section-head { margin-bottom: 0; }
.wall { position: relative; height: clamp(440px, 58vw, 600px); margin: 0 auto; perspective: 1400px; perspective-origin: 50% 40%; touch-action: pan-y; user-select: none; }
.wall-ring { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; }
.wall-panel {
  position: absolute; width: var(--pw, 300px); height: calc(var(--pw, 300px) * 1.18); left: calc(var(--pw, 300px) / -2); top: calc(var(--pw, 300px) * -0.59);
  display: block; color: var(--text); text-decoration: none; border: 1px solid var(--line-strong); background: rgba(6, 14, 22, 0.55);
  backface-visibility: hidden; transform-style: preserve-3d; overflow: hidden;
  box-shadow: 0 0 60px -20px rgba(142, 240, 255, 0.5), inset 0 0 40px -20px rgba(142, 240, 255, 0.5);
  transition: border-color .4s, box-shadow .4s, opacity .4s;
}
.wall-panel .wp-img { position: absolute; inset: 0 0 38% 0; overflow: hidden; mask-image: linear-gradient(#000 55%, transparent); }
.wall-panel img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.wall-panel .wp-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 20px; }
.wall-panel .wp-code { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em; color: var(--glow); display: flex; justify-content: space-between; }
.wall-panel h3 { font-size: 1.18rem; margin: 8px 0 6px; }
.wall-panel p { font-size: 0.9rem; color: var(--text-2); margin: 0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wall-panel .wp-meta { margin-top: 10px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; color: var(--muted); }
.wall-panel .wp-meta b { color: var(--text); font-weight: 500; }
.wall-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.08) 45%, transparent 60%); transform: translateX(-100%); transition: transform 1s var(--ease); pointer-events: none; }
.wall-panel:hover, .wall-panel:focus-visible, .wall-panel.front { border-color: var(--glow); box-shadow: 0 0 90px -16px rgba(142, 240, 255, 0.75), inset 0 0 50px -18px rgba(142, 240, 255, 0.7); }
.wall-panel:hover::after, .wall-panel.front::after { transform: translateX(100%); }
.wall-floor { position: absolute; left: 50%; bottom: 2%; width: 140%; height: 220px; transform: translateX(-50%) rotateX(72deg); background: radial-gradient(closest-side, rgba(142, 240, 255, 0.22), transparent), repeating-linear-gradient(90deg, rgba(142, 240, 255, 0.12) 0 1px, transparent 1px 48px), repeating-linear-gradient(0deg, rgba(142, 240, 255, 0.12) 0 1px, transparent 1px 48px); mask-image: radial-gradient(closest-side, #000 30%, transparent); pointer-events: none; }
.wall-ui { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.wall-ui .mono { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--muted); }
.wall-ui .ctl { display: flex; gap: 8px; }
.wall-ui button { width: 48px; height: 48px; border: 1px solid var(--line-strong); background: rgba(6, 12, 19, 0.6); color: var(--glow); font-family: var(--font-mono); cursor: pointer; transition: background .3s, border-color .3s; }
.wall-ui button:hover { background: var(--glass-strong); border-color: var(--glow); }
.wall-progress { flex: 1; min-width: 120px; max-width: 360px; height: 1px; background: var(--line); position: relative; }
.wall-progress i { position: absolute; top: -1px; height: 3px; width: 12.5%; background: var(--glow); box-shadow: 0 0 10px var(--glow); transition: left .5s var(--ease); }
/* JSなし・動きを減らす設定のとき：横スクロールの一覧 */
.wall:not(.is-3d) { height: auto; perspective: none; }
.wall:not(.is-3d) .wall-ring { position: static; width: auto; height: auto; display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.wall:not(.is-3d) .wall-panel { position: relative; left: auto; top: auto; flex: 0 0 260px; height: 320px; scroll-snap-align: start; }
.wall:not(.is-3d) .wall-floor { display: none; }
.wall:not(.is-3d) + .wall-ui .ctl, .wall:not(.is-3d) + .wall-ui .wall-progress { display: none; }

/* ---------- CMS ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.stat { padding: 26px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--font-display); font-weight: 300; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; color: var(--text); }
.stat span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); } }

.cms-feature { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .cms-feature { grid-template-columns: 1fr; } }
.cms-card { padding: 0; display: flex; flex-direction: column; min-height: 420px; transition: transform .6s var(--ease), border-color .4s; will-change: transform; }
.cms-card .cc-top { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; color: var(--muted); }
.cms-card .cc-top b { color: var(--glow); font-weight: 500; }
.cms-card .cc-body { padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.cms-card h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3vw, 2.6rem); letter-spacing: -0.01em; margin: 0; line-height: 1; }
.cms-card .cc-hook { font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 0; }
.cms-card .cc-text { font-size: 0.98rem; color: var(--text-2); margin: 0; }
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: auto; }
.dots span { position: relative; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em; color: #4f6371; border: 1px solid rgba(140, 225, 255, 0.1); padding: 6px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots span.on { color: var(--void); background: var(--glow); border-color: var(--glow); box-shadow: 0 0 12px -2px var(--glow-soft); }
.dots span.half { color: var(--warn); border-color: rgba(255, 210, 122, 0.4); }
.cms-card .cc-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--text-2); }
.cms-card .cc-foot::after { content: "→"; font-family: var(--font-mono); color: var(--glow); transition: transform .4s var(--ease); }
.cms-card:hover .cc-foot::after { transform: translateX(6px); }

/* ---------- 用途（写真の編集レイアウト） ---------- */
.cases { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(150px, 16vw, 210px); gap: 14px; }
.case { position: relative; overflow: hidden; display: block; color: var(--text); text-decoration: none; border: 1px solid var(--line); isolation: isolate; }
.case:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.case:nth-child(2) { grid-column: span 5; grid-row: span 2; }
.case:nth-child(3) { grid-column: span 5; grid-row: span 2; }
.case:nth-child(4) { grid-column: span 7; grid-row: span 2; }
.case img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease), filter .8s; filter: saturate(0.85) brightness(0.8); }
.case::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 35%, rgba(2, 5, 9, 0.92)); }
.case:hover img { transform: scale(1.06); filter: saturate(1.05) brightness(0.95); }
.case .case-body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(16px, 2.4vw, 28px); }
.case .case-no { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.22em; color: var(--glow); }
.case h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); margin: 6px 0 6px; }
.case p { margin: 0; font-size: 0.96rem; color: var(--text-2); max-width: 30em; }
.case .case-corner { position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em; color: var(--text-2); padding: 4px 8px; border: 1px solid var(--line-strong); background: rgba(2, 5, 9, 0.5); backdrop-filter: blur(4px); }
@media (max-width: 760px) { .cases { grid-auto-rows: 200px; } .case:nth-child(n) { grid-column: span 12; grid-row: span 1; } }

/* ---------- 設置の相談（LEDの帯） ---------- */
.install { position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.install-bg { position: absolute; inset: -20% 0; z-index: -1; }
.install-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.3; filter: saturate(1.1); }
.install::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--void) 18%, rgba(2, 5, 9, 0.78) 55%, rgba(2, 5, 9, 0.35)), linear-gradient(var(--void), transparent 25%, transparent 75%, var(--void)); }
.install .lead { margin-top: 22px; }
.install .card { background: rgba(2, 5, 9, 0.72); }
.install h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.2; max-width: 12em; }
.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 16px; margin-top: 36px; }
@media (max-width: 760px) { .install-grid { grid-template-columns: 1fr; } }
