/* ============================================================
   ShibaInuChan — AI Architect
   Portfolio / sole-proprietor site
   Design: ink dark × shiba orange, "structure" motif
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0d12;
  --bg-elev: #0f141c;
  --card: #121823;
  --card-2: #161d2a;
  --line: rgba(232, 228, 220, 0.09);
  --line-strong: rgba(232, 228, 220, 0.18);
  --text: #ece7de;
  --muted: #9aa4b0;
  --faint: #6b7682;
  --accent: #e8954a;        /* shiba orange */
  --accent-soft: rgba(232, 149, 74, 0.14);
  --accent-2: #5fb8bf;      /* teal */
  --accent-3: #e87a90;      /* warm pink */
  --ok: #7ec97e;
  --glow: rgba(232, 149, 74, 0.35);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --radius-sm: 10px;
  --font-body: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif;
  --font-disp: "Space Grotesk", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #faf6ef;
  --bg-elev: #f3eee4;
  --card: #ffffff;
  --card-2: #fdfaf4;
  --line: rgba(26, 29, 34, 0.1);
  --line-strong: rgba(26, 29, 34, 0.22);
  --text: #1d2129;
  --muted: #5b6470;
  --faint: #8a93a0;
  --accent: #d97c2b;
  --accent-soft: rgba(217, 124, 43, 0.12);
  --accent-2: #2f8d95;
  --accent-3: #d05e77;
  --glow: rgba(217, 124, 43, 0.28);
  --shadow: 0 24px 60px -28px rgba(60, 42, 18, 0.28);
  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: #14100a; }

/* custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--faint) 45%, transparent);
  border-radius: 99px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #14100a;
  border-radius: 8px;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

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

.container {
  width: min(1140px, 100% - 48px);
  margin-inline: auto;
}

.section { padding: clamp(88px, 12vw, 140px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- Section headers ---------- */
.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.sec-label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.sec-title {
  font-family: var(--font-disp);
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.sec-title em {
  font-style: normal;
  color: var(--accent);
}

.sec-intro {
  max-width: 720px;
  color: var(--muted);
  margin-bottom: clamp(36px, 5vw, 56px);
}

/* ---------- Buttons / chips / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #14100a;
  border: 1px solid var(--accent);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.25s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px var(--glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}
.btn svg { width: 17px; height: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 60%, transparent);
  white-space: nowrap;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.05em;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: gap 0.25s var(--ease), border-color 0.25s ease;
}
.link-arrow:hover { gap: 13px; border-color: var(--accent); }
.link-arrow svg { width: 14px; height: 14px; flex: none; }

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  z-index: 120;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 17.5px;
  letter-spacing: 0.02em;
}
.logo-mark { width: 32px; height: 32px; flex: none; transition: transform 0.3s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.16em;
  display: block;
  line-height: 1;
  margin-top: 3px;
}

.nav-list { display: flex; align-items: center; gap: 6px; }
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after, .nav-link:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }

.lang-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  width: auto;
  padding: 0 13px;
}

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: none; }

.nav-toggle { display: none; }
.nav-toggle .bar {
  display: block;
  width: 17px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  margin: 2px auto;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

/* mobile nav */
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; flex-direction: column; }
  .main-nav {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    right: 16px;
    left: 16px;
    background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav-open .main-nav { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 12px 14px; font-size: 15px; }
  .nav-link::after { display: none; }
  .nav-link.active { color: var(--accent); background: var(--accent-soft); }
  .nav-open .nav-toggle .bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle .bar:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 56px) 0 72px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 0%, transparent 72%);
  opacity: 0.5;
}

.hero-glow {
  position: absolute;
  z-index: 0;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  pointer-events: none;
}
.hero-glow.g1 { background: var(--accent); top: -180px; right: -120px; }
.hero-glow.g2 { background: var(--accent-2); bottom: -260px; left: -180px; opacity: 0.1; }

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
  padding: 7px 15px;
  border-radius: 99px;
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2.2s ease infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.hero-title {
  font-family: var(--font-disp);
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.005em;
  margin-bottom: 26px;
}
.hero-title .accent { color: var(--accent); }

.hero-lead {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 16.5px);
  margin-bottom: 26px;
}
.hero-lead strong { color: var(--text); font-weight: 700; }

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 38px;
}
.hero-roles .x { color: var(--accent); margin: 0 7px; font-weight: 600; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* terminal */
.hero-terminal {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, #0b0f16 88%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
[data-theme="light"] .hero-terminal { background: #1d2129; color: #ece7de; }

.term-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(232, 228, 220, 0.08);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot:nth-child(1) { background: #f26d6d; }
.term-dot:nth-child(2) { background: #f2c46d; }
.term-dot:nth-child(3) { background: #7ec97e; }
.term-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #8b96a4;
  letter-spacing: 0.06em;
}

.term-body {
  padding: 18px 18px 22px;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 2.05;
  min-height: 264px;
  color: #c4cdd8;
}
.term-line { white-space: pre-wrap; word-break: break-word; min-height: 1em; }
.term-line .p { color: var(--accent); }
.term-line .ok { color: #7ec97e; }
.term-line .dim { color: #6b7682; }
.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--faint);
}
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--accent), transparent);
  animation: drip 2s var(--ease) infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 920px) {
  .hero { min-height: auto; padding-bottom: 96px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-terminal { max-width: 560px; }
  .scroll-hint { display: none; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

.about-text p { color: var(--muted); margin-bottom: 20px; }
.about-text p strong { color: var(--text); }
.about-text p .hl { color: var(--accent); font-weight: 700; }

.about-quote {
  position: relative;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 26px 26px 22px;
  margin-top: 30px;
}
.about-quote .q-en {
  font-family: var(--font-disp);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 10px;
}
.about-quote .q-ja {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.about-quote::before {
  content: "\201C";
  position: absolute;
  top: -26px;
  left: 14px;
  font-family: var(--font-disp);
  font-size: 72px;
  color: var(--accent);
  opacity: 0.85;
}

.stats { display: grid; gap: 16px; }
.stat {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 22px 24px 18px;
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}
.stat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.stat-num {
  font-family: var(--font-disp);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.stat-num .suffix { font-size: 26px; margin-left: 2px; }
.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

@media (min-width: 921px) {
  /* the numbers follow you while the story scrolls */
  .about-grid .stats { position: sticky; top: calc(var(--header-h) + 28px); }
}
@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:last-child { grid-column: 1 / -1; }
}

/* ---------- Method ---------- */
.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: clamp(48px, 6vw, 72px);
}

.step-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 26px 26px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.step-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: var(--shadow);
}
.step-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.step-card:hover::after { transform: scaleX(1); }

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
}
.step-title {
  font-family: var(--font-disp);
  font-size: 19.5px;
  font-weight: 700;
  margin-bottom: 12px;
}
.step-desc { font-size: 14px; color: var(--muted); }

/* pipeline */
.pipeline-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 60% 120% at 50% 0%, var(--accent-soft), transparent 60%),
    var(--bg-elev);
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
}
.pipeline-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 30px;
}
.pipeline-title b { color: var(--accent); font-weight: 600; }

.pipeline {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
}

.pipe-node {
  flex: 1;
  position: relative;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 18px 10px 16px;
  min-width: 0;
}
.pipe-node .pn-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--faint);
  margin-bottom: 8px;
}
.pipe-node .pn-en {
  font-family: var(--font-disp);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 5px;
  word-break: keep-all;
}
.pipe-node .pn-ja { font-size: 11px; color: var(--muted); line-height: 1.5; }

.pipe-node.io {
  flex: 0.9;
  border-style: dashed;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pipe-node.io .pn-en { font-size: 12.5px; }
.pipe-node.io .pn-en { color: var(--accent); }

.pipe-node.phase { animation: nodePulse 6s ease infinite; }
.pipe-node.phase:nth-of-type(2) { animation-delay: 0.6s; }
.pipe-node.phase:nth-of-type(3) { animation-delay: 1.6s; }
.pipe-node.phase:nth-of-type(4) { animation-delay: 2.6s; }
.pipe-node.phase:nth-of-type(5) { animation-delay: 3.6s; }
@keyframes nodePulse {
  0%, 24%, 100% { border-color: var(--line); box-shadow: none; }
  8% {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 26px -10px var(--glow);
  }
}

.pipe-arrow {
  align-self: center;
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 14px;
}

.pipe-track {
  margin-top: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.pipe-track::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 30%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: beam 6s linear infinite;
}
@keyframes beam {
  from { transform: translateX(-110%); }
  to { transform: translateX(420%); }
}

@media (max-width: 920px) {
  .method-steps { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; }
  .pipe-arrow { transform: rotate(90deg); padding: 2px 0; }
  .pipe-node.io { padding: 14px 10px; }
}

/* ---------- Full-bleed dividers ---------- */
/* object-fit: cover lets the artwork fill any screen; the centered mono
   label floats over it and is scrubbed by ScrollTrigger (or the vanilla
   fallback) while the background parallaxes underneath. */
.divider {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.divider-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.divider-bg {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  will-change: transform;
}
.divider-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 75% 90% at 50% 50%, rgba(5, 7, 10, 0.42), transparent 75%),
    linear-gradient(180deg, var(--bg) 0%, transparent 24%, transparent 76%, var(--bg) 100%);
}

.divider-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(72px, 12vw, 130px) 24px;
}
.divider-label {
  font-family: var(--font-mono);
  font-size: clamp(14px, 2.4vw, 24px);
  font-weight: 600;
  letter-spacing: 0.3em;
  color: #f3efe7;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
  will-change: letter-spacing, transform;
}
.divider-sub {
  margin-top: 18px;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  color: rgba(236, 231, 222, 0.78);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.6);
}

/* small caption card that hangs over the next section (grid + z-index depth) */
.divider-caption {
  position: absolute;
  z-index: 5;
  left: clamp(16px, 6vw, 84px);
  bottom: -24px;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.divider.cool .divider-caption { border-left-color: var(--accent-2); }

/* ---------- Products ---------- */
/* Cards stack with position:sticky — each product pins below the header
   while the page (and the next card) scrolls over it. */
.product-card {
  --pa: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 360px at var(--mx, 20%) var(--my, 0%), color-mix(in srgb, var(--pa) 7%, transparent), transparent 60%),
    var(--card);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(26px, 4vw, 48px);
  margin-bottom: 26px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  border-color: color-mix(in srgb, var(--pa) 45%, transparent);
  box-shadow: var(--shadow);
}
.product-card.alt { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
.product-card.alt .product-media { order: 2; }

.product-card.terrain { --pa: var(--accent-2); }
.product-card.katachi { --pa: var(--accent-3); }

/* editorial depth: huge outlined index number behind each card */
.product-card::before {
  content: attr(data-num);
  position: absolute;
  top: -0.18em;
  right: 22px;
  z-index: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(88px, 11vw, 156px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--pa) 38%, transparent);
  opacity: 0.65;
  pointer-events: none;
  user-select: none;
}
.product-media, .product-body { position: relative; z-index: 1; }

@media (min-width: 921px) {
  .product-card {
    position: sticky;
    margin-bottom: 56px;
    box-shadow: 0 -18px 50px -30px rgba(0, 0, 0, 0.65), var(--shadow);
    will-change: transform;
    transform-origin: center top;
  }
  .product-card.axis    { top: calc(var(--header-h) + 18px); }
  .product-card.terrain { top: calc(var(--header-h) + 34px); }
  .product-card.katachi { top: calc(var(--header-h) + 50px); }
}

.product-media {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--pa) 9%, transparent), transparent 55%),
    var(--bg-elev);
  padding: 26px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-media svg { width: 100%; height: auto; max-height: 280px; }
.product-media .media-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--pa);
  border: 1px solid color-mix(in srgb, var(--pa) 45%, transparent);
  background: color-mix(in srgb, var(--pa) 10%, transparent);
  padding: 5px 13px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.product-title {
  font-family: var(--font-disp);
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 7px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.product-title .emoji { font-size: 0.85em; }
.product-title .jp-sub { font-size: 15px; font-weight: 500; color: var(--muted); }

.product-tagline {
  font-weight: 700;
  font-size: 16.5px;
  color: var(--pa);
  margin-bottom: 14px;
}

.product-desc { font-size: 14.5px; color: var(--muted); margin-bottom: 20px; }
.product-desc b { color: var(--text); font-weight: 700; }

.product-card .chips { margin-bottom: 22px; }
.product-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }

.mini-pipe {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-bottom: 14px;
}
.mini-pipe b { color: var(--pa); font-weight: 600; }

@media (max-width: 920px) {
  .product-card, .product-card.alt { grid-template-columns: 1fr; }
  .product-card.alt .product-media { order: 0; }
  .product-media { min-height: 220px; }
}

/* product SVG animation bits */
.spin-slow { animation: spin 26s linear infinite; transform-origin: center; transform-box: fill-box; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse-dot { animation: pulseDot 2.6s ease infinite; transform-origin: center; transform-box: fill-box; }
.pulse-dot.d2 { animation-delay: 0.65s; }
.pulse-dot.d3 { animation-delay: 1.3s; }
.pulse-dot.d4 { animation-delay: 1.95s; }
@keyframes pulseDot {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  18% { opacity: 1; transform: scale(1.35); }
}
.float-soft { animation: floatSoft 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.dash-flow { stroke-dasharray: 6 7; animation: dashFlow 1.6s linear infinite; }
@keyframes dashFlow { to { stroke-dashoffset: -26; } }

/* ---------- Tools ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tool-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.tool-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: var(--shadow);
}

.tool-head { display: flex; align-items: center; gap: 13px; }
.tool-icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 21px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
}
.tool-title {
  font-family: var(--font-disp);
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.45;
}
.tool-title small {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.tool-desc { font-size: 13.5px; color: var(--muted); flex: 1; }
.tool-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

@media (max-width: 700px) {
  .tools-grid { grid-template-columns: 1fr; }
}

/* ---------- Experiment ---------- */
.exp-card {
  border: 1px dashed var(--line-strong);
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(130, 71, 229, 0.1), transparent 60%),
    var(--card);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(26px, 4vw, 44px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  transition: border-color 0.3s ease;
}
.exp-card:hover { border-color: var(--accent); }
.exp-icon { font-size: 38px; line-height: 1; }
.exp-title {
  font-family: var(--font-disp);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 4px;
}
.exp-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 50%, transparent);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 14px;
}
.exp-desc { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
@media (max-width: 640px) { .exp-card { grid-template-columns: 1fr; } }

/* ---------- Profile / lenses ---------- */
.lenses {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.lens-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}
.lens-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.lens-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.lens-icon svg { width: 21px; height: 21px; }
.lens-title {
  font-family: var(--font-disp);
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 4px;
}
.lens-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.lens-desc { font-size: 13px; color: var(--muted); }

@media (max-width: 920px) { .lenses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .lenses { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-box {
  position: relative;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(ellipse 70% 120% at 50% -20%, var(--accent-soft), transparent 60%),
    var(--card);
  padding: clamp(48px, 7vw, 88px) clamp(24px, 5vw, 72px);
  overflow: hidden;
}
.contact-box .sec-label { justify-content: center; }
.contact-box .sec-label::before { display: none; }
.contact-title {
  font-family: var(--font-disp);
  font-size: clamp(27px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 18px;
}
.contact-text {
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 15px;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.contact-note {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--bg-elev);
}
.footer-quote {
  max-width: 680px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 40px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand .logo-mark { width: 30px; height: 30px; }
.footer-brand b { font-family: var(--font-disp); font-size: 16px; }
.footer-brand span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.12em;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); }
.copyright {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.04em;
}
.copyright .made b { color: var(--accent); font-weight: 600; }

/* ---------- Toast / back to top / paws ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 80px);
  z-index: 150;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 99px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-elev) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease), visibility 0.3s, color 0.2s, border-color 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.to-top svg { width: 17px; height: 17px; }

.paw-fall {
  position: fixed;
  top: -40px;
  z-index: 160;
  font-size: 22px;
  pointer-events: none;
  animation: pawFall linear forwards;
}
@keyframes pawFall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.1; }
}

/* ---------- Reveal animations ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--rd, 0s);
}
html.js .reveal.in-view { opacity: 1; transform: none; }

html.js .reveal-l { opacity: 0; transform: translateX(-30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js .reveal-r { opacity: 0; transform: translateX(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js .reveal-l.in-view, html.js .reveal-r.in-view { opacity: 1; transform: none; }

/* opacity-only reveal: for elements whose transform is owned by scroll scrubbing */
html.js .reveal-fade { opacity: 0; transition: opacity 0.9s var(--ease); }
html.js .reveal-fade.in-view { opacity: 1; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html.js .reveal, html.js .reveal-l, html.js .reveal-r, html.js .reveal-fade { opacity: 1; transform: none; }
  .hero-canvas { display: none; }
}

/* ---------- Print ---------- */
@media print {
  :root {
    --bg: #ffffff; --bg-elev: #ffffff; --card: #ffffff; --card-2: #ffffff;
    --text: #111111; --muted: #444444; --faint: #777777;
    --line: #dddddd; --line-strong: #bbbbbb;
  }
  .site-header, .hero-canvas, .hero-grid-overlay, .hero-glow, .scroll-hint,
  .to-top, .toast, .progress-bar, .hero-terminal, .pipe-track, .divider { display: none !important; }
  .hero { min-height: auto; padding-top: 24px; }
  .section { padding: 32px 0; }
  .product-card { position: static !important; }
  html.js .reveal, html.js .reveal-l, html.js .reveal-r, html.js .reveal-fade { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #777; }
}
