/* ==========================================================================
   チムワークス コーポレートサイト
   デザイントークン：日本的オフホワイト + 墨黒、アクセントに朱と藍
   ========================================================================== */

:root {
  /* Base palette — sumi (default) */
  --bg: oklch(0.968 0.008 80);
  --bg-2: oklch(0.945 0.012 80);
  --bg-paper: oklch(0.99 0.005 80);
  --ink: oklch(0.18 0.015 60);
  --ink-2: oklch(0.32 0.015 60);
  --ink-mute: oklch(0.55 0.012 60);
  --line: oklch(0.85 0.012 70);
  --line-soft: oklch(0.91 0.01 70);

  /* Accents */
  --shu: oklch(0.62 0.16 35);       /* 朱 vermillion */
  --ai: oklch(0.38 0.10 255);       /* 藍 indigo */
  --moegi: oklch(0.68 0.10 135);    /* 萌葱 */

  /* Type */
  --f-heading: "Shippori Mincho", "Noto Serif JP", "Zen Old Mincho", serif;
  --f-body: "Noto Sans JP", "Zen Kaku Gothic New", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 2px;
}

/* ----- Theme variants ----- */
body.t-sumi { /* default warm sumi */
  --bg: oklch(0.968 0.008 80);
  --bg-2: oklch(0.945 0.012 80);
  --ink: oklch(0.18 0.015 60);
  --shu: oklch(0.58 0.17 32);
  --ai: oklch(0.36 0.10 255);
}
body.t-matcha {
  --bg: oklch(0.965 0.012 120);
  --bg-2: oklch(0.94 0.016 120);
  --ink: oklch(0.20 0.02 150);
  --shu: oklch(0.55 0.14 40);
  --ai: oklch(0.42 0.09 180);
}
body.t-indigo {
  --bg: oklch(0.955 0.012 240);
  --bg-2: oklch(0.92 0.02 240);
  --ink: oklch(0.18 0.03 250);
  --shu: oklch(0.62 0.16 28);
  --ai: oklch(0.35 0.14 260);
}
body.t-night {
  --bg: oklch(0.16 0.015 60);
  --bg-2: oklch(0.21 0.018 60);
  --bg-paper: oklch(0.22 0.02 60);
  --ink: oklch(0.95 0.008 80);
  --ink-2: oklch(0.85 0.01 80);
  --ink-mute: oklch(0.65 0.015 60);
  --line: oklch(0.35 0.02 60);
  --line-soft: oklch(0.28 0.018 60);
  --shu: oklch(0.72 0.17 35);
  --ai: oklch(0.68 0.12 255);
}

/* ----- Heading font variants ----- */
body.f-shippori { --f-heading: "Shippori Mincho", "Noto Serif JP", serif; }
body.f-zen-old  { --f-heading: "Zen Old Mincho", "Noto Serif JP", serif; }
body.f-noto-serif { --f-heading: "Noto Serif JP", serif; }
body.f-zen-kaku { --f-heading: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif; font-feature-settings: "palt"; }

/* ----- Body font variants ----- */
body.b-noto-sans { --f-body: "Noto Sans JP", sans-serif; }
body.b-zen-kaku  { --f-body: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif; }

/* ==========================================================================
   Reset + base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--shu); color: var(--bg); }

/* ==========================================================================
   Typography
   ========================================================================== */
.h-display {
  font-family: var(--f-heading);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.h-section {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: clamp(40px, 5.2vw, 82px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0;
}
.h-eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.h-eyebrow .num {
  color: var(--shu);
  font-weight: 500;
  margin-right: 10px;
}
.vertical-label {
  writing-mode: vertical-rl;
  font-family: var(--f-heading);
  letter-spacing: 0.4em;
  font-size: 12px;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.mono { font-family: var(--f-mono); letter-spacing: 0; }
.small { font-size: 13px; color: var(--ink-mute); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
section {
  position: relative;
  padding: clamp(100px, 14vh, 180px) 0;
}
.section-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 80px;
}
.section-header .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ==========================================================================
   Global cursor blob (mouse-following accent)
   ========================================================================== */
.cursor-blob {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--shu) 30%, transparent) 0%, transparent 60%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  z-index: 1;
  transition: opacity 0.4s ease;
  filter: blur(20px);
}
body.t-night .cursor-blob { mix-blend-mode: screen; }

/* ==========================================================================
   Top nav
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: normal;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.logo {
  font-family: var(--f-heading);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 28px; height: 28px;
  position: relative;
  display: inline-block;
}
.logo-ja { color: var(--ink); }
.logo-sep { color: var(--ink-mute); font-weight: 300; }
.logo-en { color: var(--ink-mute); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; }
.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: 13px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--shu);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.3s;
}
.nav-cta:hover { background: var(--ink); color: var(--bg); }
.nav-cta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--shu); }
@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 75%);
}
.hero-ink {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}
.hero-ink.shu { background: var(--shu); width: 500px; height: 500px; top: 10%; right: -120px; }
.hero-ink.ai  { background: var(--ai);  width: 620px; height: 620px; bottom: -180px; left: -160px; opacity: 0.35; }
body.t-night .hero-ink { opacity: 0.35; filter: blur(90px); }

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 120px var(--gutter) 80px;
}

/* Kinetic layout (default) */
.hero-kinetic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 60px;
  flex-wrap: wrap;
  gap: 30px;
}
.hero-headline {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: clamp(56px, 11vw, 180px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
  position: relative;
}
.hero-headline .line {
  display: block;
  overflow: hidden;
  padding: 0.04em 0;
}
.hero-headline .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: lineUp 1.1s cubic-bezier(0.2, 0.8, 0.15, 1) forwards;
}
.hero-headline .line.d1 > span { animation-delay: 0.15s; }
.hero-headline .line.d2 > span { animation-delay: 0.30s; }
.hero-headline .line.d3 > span { animation-delay: 0.45s; }
.hero-headline .shu-ch { color: var(--shu); font-style: italic; font-family: "Shippori Mincho", serif; }
.hero-headline .ai-ch { color: var(--ai); }
.hero-headline .underline-draw {
  position: relative;
  display: inline-block;
}
.hero-headline .underline-draw::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 8%;
  height: 6px;
  background: var(--shu);
  transform: scaleX(0);
  transform-origin: left;
  animation: drawLine 1s ease 1.3s forwards;
}

@keyframes lineUp {
  to { transform: translateY(0); }
}
@keyframes drawLine {
  to { transform: scaleX(1); }
}

.hero-lede {
  max-width: 520px;
  font-size: 15px;
  line-height: 2;
  color: var(--ink-2);
  opacity: 0;
  animation: fade 1s ease 1.1s forwards;
}
.hero-lede .ja-line { display: block; }
@keyframes fade { to { opacity: 1; } }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0;
  animation: fade 1s ease 1.3s forwards;
}
.hero-chip {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: color-mix(in oklch, var(--bg-paper) 70%, transparent);
}
.hero-chip .num { color: var(--shu); }

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
  min-width: 220px;
}
.hero-clock {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  text-align: right;
  line-height: 1.8;
}
.hero-clock .big { font-size: 28px; color: var(--ink); font-weight: 300; letter-spacing: 0.02em; }

.hero-vertical {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--f-heading);
  font-size: 13px;
  letter-spacing: 0.6em;
  color: var(--ink-mute);
  opacity: 0;
  animation: fade 1.2s ease 0.8s forwards;
}
.hero-scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
  opacity: 0;
  animation: fade 1.2s ease 1.5s forwards;
}
.hero-scroll-cue::after {
  content: "";
  width: 1px; height: 60px;
  background: linear-gradient(var(--ink-mute), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* HERO variant: split */
.hero-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.hero-split .hero-headline { font-size: clamp(48px, 7.5vw, 120px); }
.hero-split .frame-panel {
  aspect-ratio: 4/5;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
}

/* HERO variant: centered */
.hero-centered { text-align: center; display: grid; place-items: center; gap: 40px; }
.hero-centered .hero-lede { margin: 0 auto; }
.hero-centered .hero-chips { justify-content: center; }

/* Ticker */
.ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--bg-paper) 70%, transparent);
  backdrop-filter: blur(6px);
  overflow: hidden;
  padding: 14px 0;
  z-index: 3;
}
.ticker-track {
  display: flex;
  gap: 60px;
  animation: tickerRun 40s linear infinite;
  width: max-content;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.ticker-track span { white-space: nowrap; }
.ticker-track .dot { color: var(--shu); }
@keyframes tickerRun {
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Stats — 数字で見る
   ========================================================================== */
.stats {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat:last-child { border-right: 0; }
.stat-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.stat-num {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: clamp(60px, 7vw, 112px);
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stat-num .unit { font-size: 0.32em; color: var(--ink-mute); font-weight: 400; letter-spacing: 0.05em; }
.stat-num .plus { color: var(--shu); font-size: 0.5em; margin-left: 2px; }
.stat-desc {
  font-size: 12px;
  color: var(--ink-2);
  max-width: 220px;
  line-height: 1.7;
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service {
  background: var(--bg);
  padding: 44px 36px 40px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.3s ease;
  cursor: default;
}
.service:hover { background: var(--bg-paper); }
.service .s-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--shu);
  letter-spacing: 0.2em;
}
.service .s-glyph {
  width: 100%;
  height: 120px;
  display: grid;
  place-items: center;
  margin: 20px 0 28px;
  position: relative;
}
.service .s-title {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 14px;
}
.service .s-title .en {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.service .s-body {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.85;
  margin: 0 0 20px;
}
.service .s-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.service .s-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 2px;
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Products
   ========================================================================== */
.product-list { display: grid; gap: 40px; }
.product {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  padding: 50px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.product:last-child { border-bottom: 1px solid var(--line); }
.product:nth-child(even) { grid-template-columns: 1.2fr 1fr; }
.product:nth-child(even) .product-info { order: 2; }
.product-info .p-name {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 56px);
  margin: 10px 0 16px;
  line-height: 1.1;
}
.product-info .p-name .accent { color: var(--shu); }
.product-info .p-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.product-info .p-desc {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.9;
  max-width: 520px;
  margin: 0 0 24px;
}
.product-info .p-meta {
  display: flex;
  gap: 30px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
}
.product-info .p-meta b { color: var(--ink); font-weight: 500; font-size: 18px; font-family: var(--f-heading); letter-spacing: 0; }
.product-shot {
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-paper);
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   Cases / 実績
   ========================================================================== */
.cases-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 20px;
}
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.filter {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.2s;
}
.filter.active {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.filter:hover:not(.active) { color: var(--ink); border-color: var(--ink-mute); }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.case {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: 0;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s;
  overflow: hidden;
}
.case:hover { transform: translateY(-4px); border-color: var(--ink); }
.case .c-cover {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.case .c-body { padding: 20px 22px 22px; }
.case .c-industry {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--shu);
  text-transform: uppercase;
}
.case .c-title {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.4;
  margin: 6px 0 10px;
}
.case .c-client {
  font-size: 12px;
  color: var(--ink-mute);
}
.case .c-kpi {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
}
.case .c-kpi b {
  font-family: var(--f-heading);
  color: var(--ink);
  font-size: 20px;
  font-weight: 500;
}
@media (max-width: 900px) {
  .cases-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Process
   ========================================================================== */
.process {
  background: var(--ink);
  color: var(--bg);
}
.process .h-eyebrow { color: color-mix(in oklch, var(--bg) 60%, transparent); }
.process .h-eyebrow .num { color: var(--shu); }
.process .h-section { color: var(--bg); }
.process .section-header .meta-row { border-top-color: color-mix(in oklch, var(--bg) 30%, transparent); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-top: 60px;
  border: 1px solid color-mix(in oklch, var(--bg) 20%, transparent);
  background: color-mix(in oklch, var(--bg) 20%, transparent);
}
.step {
  background: var(--ink);
  padding: 32px 24px 28px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.step .st-num {
  font-family: var(--f-heading);
  font-weight: 400;
  font-size: 48px;
  color: var(--shu);
  line-height: 1;
  margin-bottom: 20px;
}
.step .st-phase {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: color-mix(in oklch, var(--bg) 60%, transparent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.step .st-title {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--bg);
}
.step .st-body {
  font-size: 12.5px;
  line-height: 1.8;
  color: color-mix(in oklch, var(--bg) 80%, transparent);
  margin-bottom: 20px;
}
.step .st-deliverable {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid color-mix(in oklch, var(--bg) 20%, transparent);
  font-family: var(--f-mono);
  font-size: 10px;
  color: color-mix(in oklch, var(--bg) 60%, transparent);
  letter-spacing: 0.12em;
}
.step .st-deliverable b { color: var(--bg); display: block; font-family: var(--f-body); font-size: 12px; letter-spacing: 0.02em; margin-top: 4px; font-weight: 500; }
@media (max-width: 1100px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Stack
   ========================================================================== */
.stack-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
}
.stack-cats { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; }
.stack-cat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink-mute);
  transition: color 0.2s;
}
.stack-cat.active { color: var(--ink); }
.stack-cat.active::before { content: "●"; color: var(--shu); margin-right: 10px; }
.stack-cat .count { color: var(--ink-mute); font-size: 10px; }

.stack-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-content: start;
}
.tech {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: 20px 22px;
  border-radius: var(--radius);
  transition: all 0.25s;
}
.tech:hover { border-color: var(--ink); transform: translateY(-2px); }
.tech .t-name { font-weight: 600; font-size: 15px; }
.tech .t-role { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-mute); margin-top: 4px; text-transform: uppercase; }
@media (max-width: 900px) {
  .stack-layout { grid-template-columns: 1fr; }
  .stack-items { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-kanji {
  font-family: var(--f-heading);
  font-size: clamp(120px, 18vw, 280px);
  line-height: 1;
  color: var(--ink);
  font-weight: 500;
  position: relative;
  display: inline-block;
}
.about-kanji .accent { color: var(--shu); }
.about-statement {
  font-family: var(--f-heading);
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.8;
  letter-spacing: 0.04em;
  margin: 0 0 30px;
}
.about-statement .emph { color: var(--shu); }
.about-body { font-size: 14.5px; color: var(--ink-2); line-height: 2; margin-bottom: 40px; }
.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.fact {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  align-items: baseline;
  border-right: 1px solid var(--line);
  padding-right: 20px;
}
.fact:nth-child(even) { border-right: 0; padding-left: 20px; padding-right: 0; }
.fact-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-mute); text-transform: uppercase; }
.fact-value { font-size: 13px; color: var(--ink); }
@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-facts { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr; padding-left: 0 !important; padding-right: 0 !important; border-right: 0; }
}

/* ==========================================================================
   Team
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.member {
  background: transparent;
}
.member .m-photo {
  aspect-ratio: 3/4;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.member:hover .m-photo { transform: scale(1.02); }
.member .m-name {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: 20px;
  margin: 18px 0 4px;
}
.member .m-name .en {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-top: 2px;
}
.member .m-role {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
}
.member .m-quote {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.8;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .team-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Careers
   ========================================================================== */
.careers {
  background: var(--bg-2);
}
.careers-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: start;
}
.careers-copy .cc-big {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.15;
  margin: 0 0 20px;
}
.careers-copy .cc-big .accent { color: var(--shu); }
.careers-copy p { font-size: 14.5px; color: var(--ink-2); line-height: 2; margin: 0 0 14px; }
.job-list { display: flex; flex-direction: column; }
.job {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  transition: background 0.2s, padding 0.3s;
}
.job:first-child { border-top: 1px solid var(--line); }
.job:hover { padding-left: 20px; padding-right: 20px; }
.job:hover .j-title { color: var(--shu); }
.job-id { font-family: var(--f-mono); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.1em; }
.j-title { font-family: var(--f-heading); font-weight: 500; font-size: 20px; transition: color 0.2s; }
.j-meta { font-family: var(--f-mono); font-size: 10px; color: var(--ink-mute); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; }
.j-arrow { font-size: 20px; color: var(--ink-mute); transition: transform 0.3s, color 0.3s; }
.job:hover .j-arrow { transform: translateX(6px); color: var(--shu); }

/* ==========================================================================
   News
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.news-item {
  display: grid;
  grid-template-columns: 120px 120px 1fr auto;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding 0.3s;
  cursor: pointer;
}
.news-item:first-child { border-top: 1px solid var(--line); }
.news-item:hover { padding-left: 20px; }
.news-item:hover .n-title { color: var(--shu); }
.n-date { font-family: var(--f-mono); font-size: 12px; color: var(--ink-mute); letter-spacing: 0.05em; }
.n-category {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-2);
  display: inline-block;
  justify-self: start;
  text-transform: uppercase;
}
.n-title { font-family: var(--f-heading); font-size: 17px; font-weight: 500; line-height: 1.5; transition: color 0.2s; }
.n-arrow { color: var(--ink-mute); font-size: 14px; }
@media (max-width: 900px) {
  .news-item { grid-template-columns: 100px 1fr; gap: 12px; }
  .n-category, .n-arrow { display: none; }
}

/* ==========================================================================
   Contact / CTA
   ========================================================================== */
.contact {
  background: var(--ink);
  color: var(--bg);
  padding: 160px 0;
  position: relative;
  overflow: hidden;
}
.contact .contact-sun {
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  background: var(--shu);
  top: -20vmax; right: -20vmax;
  filter: blur(80px);
  opacity: 0.35;
}
.contact-inner { position: relative; z-index: 2; }
.contact .h-eyebrow { color: color-mix(in oklch, var(--bg) 60%, transparent); }
.contact .h-eyebrow .num { color: var(--shu); }
.contact-headline {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: clamp(56px, 9vw, 148px);
  line-height: 1;
  color: var(--bg);
  margin: 24px 0 40px;
  letter-spacing: -0.01em;
}
.contact-headline .em { color: var(--shu); }
.contact-headline .it { font-style: italic; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid color-mix(in oklch, var(--bg) 30%, transparent);
}
.contact-copy { font-size: 15px; line-height: 2; color: color-mix(in oklch, var(--bg) 82%, transparent); max-width: 480px; }
.contact-cta-wrap { display: flex; flex-direction: column; gap: 20px; }
.contact-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: 22px;
  transition: transform 0.3s, background 0.3s;
  width: 100%;
}
.contact-cta:hover { transform: translateY(-2px); background: var(--shu); color: var(--bg); }
.contact-cta .arr { font-size: 24px; }
.contact-sec {
  display: flex;
  gap: 10px;
}
.contact-sec .s-btn {
  flex: 1;
  padding: 18px 20px;
  border: 1px solid color-mix(in oklch, var(--bg) 40%, transparent);
  border-radius: 999px;
  color: var(--bg);
  font-size: 13px;
  text-align: center;
  transition: all 0.3s;
}
.contact-sec .s-btn:hover { background: color-mix(in oklch, var(--bg) 15%, transparent); border-color: var(--bg); }
.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid color-mix(in oklch, var(--bg) 20%, transparent);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: color-mix(in oklch, var(--bg) 70%, transparent);
}
.contact-info-grid b { display: block; color: var(--bg); font-family: var(--f-body); font-size: 14px; letter-spacing: 0.02em; margin-top: 4px; font-weight: 500; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-info-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--bg-2);
  padding: 60px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .f-name { font-family: var(--f-heading); font-weight: 500; font-size: 28px; }
.footer-brand p { font-size: 12.5px; color: var(--ink-mute); line-height: 1.9; max-width: 280px; margin-top: 12px; }
.footer-col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-2); transition: color 0.2s; }
.footer-col a:hover { color: var(--shu); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-giant {
  font-family: var(--f-heading);
  font-size: clamp(80px, 20vw, 320px);
  line-height: 0.85;
  color: var(--ink);
  opacity: 0.06;
  font-weight: 500;
  white-space: nowrap;
  margin-top: 60px;
  letter-spacing: -0.02em;
  text-align: center;
  user-select: none;
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 0.54s; }

/* ==========================================================================
   Tweaks panel
   ========================================================================== */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 300px;
  background: var(--bg-paper);
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 18px;
  z-index: 100;
  font-size: 12px;
  box-shadow: 0 24px 60px -20px oklch(0 0 0 / 0.25);
}
.tweaks-panel h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  margin: 0 0 14px;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-panel h3 .close { font-size: 16px; cursor: pointer; color: var(--ink-mute); }
.tweak-group { margin-bottom: 16px; }
.tweak-group label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.tweak-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.tweak-opt {
  padding: 8px 10px;
  border: 1px solid var(--line);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.2s;
  border-radius: 2px;
}
.tweak-opt.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tweak-swatches { display: flex; gap: 6px; }
.swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--line);
  transition: transform 0.2s, border-color 0.2s;
}
.swatch.active { border-color: var(--shu); transform: scale(1.1); }
