/* =====================================================================
   株式会社瑞達 (Zuitatu) — global stylesheet
   Typography-first, dark-mode, editorial, JP modern.
   ===================================================================== */

/* === Tokens === */
:root {
  /* === Washi Paper theme === */
  --bg: #F4F0E6;
  --bg-2: #EAE4D4;
  --bg-3: #DDD3BE;
  --fg: #1A1815;
  --fg-2: #4A453C;
  --fg-3: #8B857A;
  --line: #D8D1C0;
  --line-2: #C4BCA8;
  --accent: #C8362D;
  --accent-2: #B5944A;
  --accent-3: #4A6B5F;
  /* fixed inverse color for text-on-accent badges */
  --on-accent: #FAF7EE;

  --font-display: 'Fraunces', 'Shippori Mincho B1', 'Noto Serif JP', serif;
  --font-jp-display: 'Shippori Mincho B1', 'Noto Serif JP', 'Fraunces', serif;
  --font-body: 'IBM Plex Sans', 'IBM Plex Sans JP', system-ui, -apple-system, sans-serif;
  --font-jp-body: 'IBM Plex Sans JP', 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --pad-x: clamp(20px, 5vw, 96px);
  --rad: 2px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.2, .9, .25, 1);
  --dur-fast: 220ms;
  --dur: 480ms;
  --dur-slow: 800ms;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1, "kern" 1;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5 { font-weight: 500; line-height: 1.1; }
dl, dt, dd { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--fg); }
::-moz-selection { background: var(--accent); color: var(--fg); }

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

/* === Grain overlay === */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 9990;
  pointer-events: none;
  opacity: .10;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  animation: grainShift 7s steps(6) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-8%, 4%); }
  40%  { transform: translate(6%, -3%); }
  60%  { transform: translate(-4%, -6%); }
  80%  { transform: translate(5%, 5%); }
  100% { transform: translate(0,0); }
}

/* === Cursor (desktop only, JS-activated) === */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1px solid var(--fg-3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease),
              border-color .25s var(--ease), background .25s var(--ease);
  display: none;
  mix-blend-mode: difference;
}
.cursor::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px; height: 4px;
  background: var(--fg);
  border-radius: 50%;
}
.cursor.is-active { display: block; }
.cursor.is-hover {
  width: 64px; height: 64px;
  border-color: var(--accent);
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
}

/* === Typography helpers === */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--rad);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.btn svg { transition: transform var(--dur) var(--ease-out); }
.btn:hover svg { transform: translateX(6px); }

.btn--primary {
  background: var(--accent);
  color: var(--fg);
  border-color: var(--accent);
}
.btn--primary:hover { background: #d12f3d; border-color: #d12f3d; }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--fg); background: rgba(245,242,236,.04); }

/* === Nav === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px var(--pad-x);
  background: rgba(10, 9, 8, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              padding var(--dur-fast) var(--ease);
}
.nav.is-stuck {
  background: rgba(10, 9, 8, 0.85);
  border-bottom-color: var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nav__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--fg);
  font-family: var(--font-jp-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  border-radius: 2px;
  letter-spacing: 0;
}
.nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.nav__logo-text .ja {
  font-family: var(--font-jp-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}
.nav__logo-text .en {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fg-3);
}
.nav__logo-text .dot { color: var(--accent); }

.nav__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
}
.nav__links a {
  position: relative;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-2);
  padding: 6px 2px;
  transition: color var(--dur-fast) var(--ease);
}
.nav__links a .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  margin-right: 8px;
  letter-spacing: 0.1em;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--dur) var(--ease-out);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { width: 100%; }

.nav__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-3);
}
.lang-switch span {
  padding: 2px 6px;
  border-radius: 999px;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.lang-switch .is-active { background: var(--fg); color: var(--bg); }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--fg);
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile fullscreen menu */
.nav.is-open .nav__links {
  position: fixed;
  inset: 0;
  background: var(--bg-2);
  z-index: 998;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 var(--pad-x);
  gap: 24px;
}
.nav.is-open .nav__links a {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 64px);
  line-height: 1;
  color: var(--fg);
}
.nav.is-open .nav__links a .num {
  font-size: 12px;
  display: inline-block;
  vertical-align: super;
  margin-right: 16px;
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  padding: clamp(120px, 14vh, 180px) var(--pad-x) clamp(80px, 10vh, 120px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(40px, 6vh, 80px);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(245,242,236,.04) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, rgba(245,242,236,.04) 0 1px, transparent 1px 96px);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,.85) 60%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,.85) 60%, rgba(0,0,0,0) 100%);
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .55;
  will-change: transform;
}
.hero__glow--a {
  top: -10%; right: -8%;
  width: 56vw; height: 56vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(230,57,70,.55), rgba(230,57,70,0) 70%);
  animation: glowDrift 16s ease-in-out infinite alternate;
}
.hero__glow--b {
  bottom: -20%; left: -10%;
  width: 50vw; height: 50vw;
  max-width: 640px; max-height: 640px;
  background: radial-gradient(closest-side, rgba(255,214,10,.18), rgba(255,214,10,0) 70%);
  animation: glowDrift 22s ease-in-out infinite alternate-reverse;
}
@keyframes glowDrift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-4%, 3%) scale(1.08); }
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.hero__meta-item + .hero__meta-item::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--fg-3);
  margin-right: 4px;
}
.hero__meta-item i {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(230,57,70,.18);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(230,57,70,.18); }
  50%      { box-shadow: 0 0 0 8px rgba(230,57,70,.05); }
}

.hero__title {
  font-family: var(--font-jp-display);
  font-size: clamp(48px, 9vw, 152px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--fg);
}
.hero__title .line {
  display: block;
}
.hero__title .line + .line { padding-left: 0.08em; }
.hero__title .line:nth-child(2) { padding-left: 0.18em; }
.hero__title .line:nth-child(3) { padding-left: 0.34em; }
.hero__title em {
  font-style: italic;
  font-family: var(--font-display);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero__lead {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
  max-width: 100%;
}
.hero__lead p {
  max-width: 56ch;
  color: var(--fg-2);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.75;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-self: end;
}

.hero__scroll {
  position: absolute;
  right: var(--pad-x);
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fg-3);
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  position: relative;
  width: 1px;
  height: 64px;
  background: var(--line-2);
  overflow: hidden;
}
.hero__scroll-line i {
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 24px;
  background: var(--accent);
  animation: scrollDot 2.4s var(--ease) infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}

/* === Marquee === */
.marquee {
  position: relative;
  height: 96px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
  padding-left: 48px;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.marquee__track span:nth-child(4n+1) {
  -webkit-text-stroke: 1px var(--fg);
  color: transparent;
}
.marquee__track .dot {
  font-size: 16px !important;
  color: var(--accent) !important;
  -webkit-text-stroke: 0 !important;
  font-style: normal !important;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* === Section base === */
.section {
  padding: clamp(96px, 14vh, 192px) var(--pad-x);
  position: relative;
}
.section__head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(64px, 10vh, 128px);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.section__title {
  font-family: var(--font-jp-display);
  font-size: clamp(36px, 5.6vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--fg);
}
.section__title em {
  font-style: italic;
  font-family: var(--font-display);
  color: var(--accent);
  font-weight: 500;
}

/* === About === */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(48px, 8vw, 128px);
  align-items: start;
}
.about__lead {
  color: var(--fg-2);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.85;
  max-width: 60ch;
}
.about__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.about__facts > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about__facts dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.about__facts dd {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
}

/* === Stats === */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  position: relative;
  padding: clamp(40px, 6vh, 72px) clamp(20px, 2.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--dur-fast) var(--ease);
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat:hover { background: rgba(245,242,236,.02); }

.stat__num {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(56px, 8vw, 128px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
  transition: transform var(--dur) var(--ease-out);
}
.stat:hover .stat__num { transform: translateY(4px); }
.stat__num .prefix {
  font-size: 0.55em;
  color: var(--fg-2);
  font-style: normal;
  margin-right: 2px;
}
.stat__num sup {
  font-family: var(--font-mono);
  font-size: 0.22em;
  color: var(--fg-2);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.06em;
  align-self: flex-start;
  margin-top: 0.4em;
}
.stat__label {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.5;
  max-width: 24ch;
}
.stat__line {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width var(--dur-slow) var(--ease-out);
}
.stat:hover .stat__line { width: 100%; }

/* === Strength === */
.strength__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.card {
  position: relative;
  padding: clamp(32px, 4vw, 48px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 80% -10%, rgba(230,57,70,.12), transparent 50%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--bg-3);
}
.card:hover::before { opacity: 1; }

.card__no {
  position: absolute;
  top: clamp(24px, 3vw, 36px);
  right: clamp(24px, 3vw, 36px);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(56px, 6vw, 88px);
  line-height: 1;
  color: var(--line-2);
  font-weight: 500;
  transition: color var(--dur) var(--ease-out);
  letter-spacing: -0.03em;
}
.card:hover .card__no { color: var(--accent); }

.card__title {
  font-family: var(--font-jp-display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--fg);
  max-width: 70%;
  letter-spacing: -0.01em;
  margin-top: clamp(40px, 5vw, 64px);
}
.card__text {
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.75;
  max-width: 52ch;
}
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.card__tags li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-3);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.card:hover .card__tags li { border-color: var(--line-2); color: var(--fg-2); }

/* === Works === */
.works__hero {
  position: relative;
  margin-bottom: clamp(48px, 8vh, 96px);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
  background: var(--bg-2);
}
.works__hero img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--dur-slow) var(--ease-out);
}
.works__hero:hover img { transform: scale(1.02); }
.works__hero figcaption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  background: rgba(10,9,8,.6);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
}

.cases {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.cases__tabs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.cases__tab {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 20px 16px 20px 24px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.cases__tab::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  background: transparent;
  transition: background var(--dur-fast) var(--ease);
}
.cases__tab:hover { background: rgba(245,242,236,.03); color: var(--fg); }
.cases__tab.is-active {
  background: var(--bg-2);
  color: var(--fg);
}
.cases__tab.is-active::before { background: var(--accent); }
.cases__tab .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.cases__tab.is-active .num { color: var(--accent); }
.cases__tab .ttl {
  font-family: var(--font-jp-display);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
}
.cases__tab .sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.cases__panels { position: relative; min-height: 320px; }
.case-panel {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.case-panel.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: panelIn .55s var(--ease-out);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.case-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.case-panel__no {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: var(--accent);
  font-weight: 500;
}
.case-panel__head h3 {
  font-family: var(--font-jp-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.case-panel__head p {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}

.case-panel__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.case-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: var(--bg-2);
  transition: transform var(--dur-slow) var(--ease-out);
}
.case-panel__media a, .case-panel__media figure { overflow: hidden; display: block; }
.case-panel__media img:hover { transform: scale(1.04); }

/* === Contact === */
.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(48px, 8vw, 128px);
  align-items: start;
}
.contact__cta {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact__mail {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.contact__mail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact__mail-addr {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(36px, 6vw, 88px);
  line-height: 1;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
  transition: color var(--dur) var(--ease-out);
}
.contact__mail svg {
  color: var(--fg);
  transition: transform var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--dur-slow) var(--ease-out);
}
.contact__mail:hover .contact__mail-addr { color: var(--accent); }
.contact__mail:hover svg { transform: translateX(10px); color: var(--accent); }
.contact__mail:hover::after { width: 100%; }

.contact__tel {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.contact__tel-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact__tel-num {
  font-family: var(--font-mono);
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: 0.06em;
  color: var(--fg);
}

.contact__info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: 12px;
}
.contact__info > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.contact__info dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact__info dd {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  line-height: 1.6;
}

/* === Footer === */
.footer {
  padding: clamp(48px, 8vh, 96px) var(--pad-x) 32px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 48px;
}
.footer__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--fg);
  font-family: var(--font-jp-display);
  font-size: 28px;
  font-weight: 700;
  border-radius: 2px;
}
.footer__name {
  font-family: var(--font-jp-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
}
.footer__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fg-3);
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-3);
}

/* === Reveal animation === */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 1279px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-left: 1px solid var(--line); }
  .stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }

  .section__head { grid-template-columns: 1fr; gap: 24px; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .contact__grid { grid-template-columns: 1fr; gap: 64px; }
}

@media (max-width: 1023px) {
  .cases { grid-template-columns: 1fr; }
  .cases__tabs { flex-direction: row; flex-wrap: wrap; border-top: 0; }
  .cases__tab {
    flex: 1 0 calc(50% - 4px);
    border-bottom: 1px solid var(--line);
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .cases__tab .sub { grid-column: 2; }
}

@media (max-width: 899px) {
  :root { --pad-x: 20px; }

  .nav { grid-template-columns: auto 1fr; gap: 16px; padding: 14px var(--pad-x); }
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }

  .hero { padding-top: 120px; min-height: auto; gap: 48px; }
  .hero__title .line { padding-left: 0 !important; }
  .hero__lead { grid-template-columns: 1fr; align-items: start; gap: 24px; }
  .hero__ctas { justify-self: start; }
  .hero__scroll { display: none; }

  .marquee { height: 72px; }

  .stats__grid { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }

  .strength__list { grid-template-columns: 1fr; }

  .card__title { max-width: 100%; }
  .card__no { font-size: 56px; }

  .about__facts { grid-template-columns: 1fr; gap: 20px; }

  .case-panel__media { grid-template-columns: 1fr; }
  .case-panel__head { flex-direction: column; gap: 12px; }

  .contact__info > div { grid-template-columns: 90px 1fr; gap: 12px; }

  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 559px) {
  .cases__tab { flex: 1 0 100%; }
  .lang-switch { padding: 6px 8px; }
  .lang-switch span { padding: 2px 4px; font-size: 10px; }
  .hero__meta { gap: 14px; font-size: 11px; }
  .hero__meta-item + .hero__meta-item::before { display: none; }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .grain { animation: none; }
  .hero__glow { animation: none; }
  .marquee__track { animation: none; }
}

/* === Print === */
@media print {
  .grain, .cursor, .nav, .hero__scroll, .marquee, .rail, .seal, .tategaki { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 32px 0; }
}

/* =====================================================================
   ============= EDITORIAL UPGRADE LAYER (v2) ============================
   Adds: seal stamp · tategaki · background kanji · chapter ticks
         okuduke footer · crosshair cursor · side chapter rail
   ===================================================================== */

/* Re-tune body typography for IBM Plex */
body {
  font-family: var(--font-body);
  font-feature-settings: "palt" 1, "kern" 1, "ss03" 1;
  letter-spacing: 0.005em;
}
:lang(ja) body, [lang="ja"] body { font-family: var(--font-jp-body); }

/* --- Smooth refinement of buttons --- */
.btn {
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12.5px;
}
.btn--primary {
  position: relative;
  isolation: isolate;
}
.btn--primary::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  z-index: -1;
  transition: transform .45s var(--ease);
  transform-origin: left;
}
.btn--primary:hover::before { transform: scaleX(1.04); }

/* === Hero topline (printed-edition style header bar) === */
.hero__topline {
  position: absolute;
  top: clamp(96px, 12vh, 140px);
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  z-index: 3;
  pointer-events: none;
}
.hero__topline .hero__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.hero__edition {
  color: var(--accent);
  font-weight: 500;
}

/* === Background kanji (faint giant character behind sections) === */
.section { position: relative; isolation: isolate; }
.section__bg-kanji {
  position: absolute;
  top: 50%;
  right: -3vw;
  transform: translateY(-50%);
  font-family: var(--font-jp-display);
  font-weight: 700;
  font-size: clamp(280px, 38vw, 620px);
  line-height: 0.85;
  color: var(--bg-2);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
  text-shadow: 0 0 1px var(--line);
}
.section > * { position: relative; z-index: 1; }

/* The big kanji behind hero */
.hero__kanji {
  position: absolute;
  bottom: -8vh;
  left: -4vw;
  font-family: var(--font-jp-display);
  font-weight: 800;
  font-size: clamp(360px, 52vw, 780px);
  line-height: 0.8;
  color: var(--bg-2);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* === Eyebrow with leading slash mark === */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.eyebrow > i {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  position: relative;
}
.eyebrow > i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  animation: rule-pulse 3.2s infinite var(--ease);
}
@keyframes rule-pulse {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(0.4); opacity: 0.5; }
}

/* === Section title: italic accent words in serif === */
.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.8vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.section__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  position: relative;
  padding: 0 0.04em;
}
.section__title em::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.04em;
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
}

/* === HERO refinement === */
.hero {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: clamp(140px, 18vh, 200px) var(--pad-x) clamp(48px, 7vh, 96px);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__meta {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-top: 20px;
}
.hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero__meta-item > i {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.18);
  animation: dot-pulse 2.4s var(--ease) infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.18); }
  50%      { box-shadow: 0 0 0 9px rgba(230, 57, 70, 0); }
}

.hero__title {
  grid-column: 1 / span 1;
  grid-row: 2;
  font-family: var(--font-jp-display);
  font-weight: 500;
  font-size: clamp(52px, 8.6vw, 148px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: clamp(40px, 8vh, 96px) 0 clamp(40px, 6vh, 80px);
  max-width: 14ch;
}
.hero__title .line {
  display: block;
  position: relative;
}
.hero__title .line + .line { padding-left: 0.6em; }
.hero__title em {
  color: var(--accent);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 500;
  position: relative;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: 6%; right: 6%;
  bottom: 0.1em;
  height: 2px;
  background: var(--accent);
  opacity: 0.4;
}

/* Hero lead — quote-style with section mark */
.hero__lead {
  grid-column: 1 / span 1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: clamp(16px, 2vw, 28px);
  max-width: 56ch;
  align-items: start;
}
.hero__lead-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 56px;
  line-height: 0.8;
  color: var(--accent);
  margin-top: -8px;
}
.hero__lead p {
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.75;
  color: var(--fg-2);
  margin-bottom: 28px;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Scroll cue */
.hero__scroll {
  position: absolute;
  bottom: clamp(28px, 5vh, 56px);
  left: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-3);
  z-index: 3;
}
.hero__scroll-jp {
  font-family: var(--font-jp-body);
  letter-spacing: 0.2em;
  font-size: 10.5px;
  color: var(--fg-3);
}
.hero__scroll-line {
  width: 60px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line i {
  position: absolute;
  left: 0; top: 0;
  width: 30%;
  height: 100%;
  background: var(--accent);
  animation: scroll-cue 2.2s var(--ease) infinite;
}
@keyframes scroll-cue {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

/* === The SEAL (朱印) === */
.seal {
  grid-column: 2 / 3;
  grid-row: 2;
  align-self: center;
  width: clamp(220px, 30vw, 420px);
  aspect-ratio: 1;
  position: relative;
  color: var(--accent);
  filter: drop-shadow(0 18px 50px rgba(230, 57, 70, 0.22));
  z-index: 2;
}
.seal__svg {
  width: 100%; height: 100%;
  animation: seal-rotate 60s linear infinite;
}
@keyframes seal-rotate {
  to { transform: rotate(360deg); }
}
.seal__ring { fill: var(--accent); font-weight: 500; }
.seal__kanji {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-jp-display);
  font-weight: 800;
  font-size: clamp(72px, 11vw, 152px);
  color: var(--accent);
  line-height: 0.86;
  text-align: center;
  letter-spacing: -0.02em;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(230, 57, 70, 0.35);
}
.seal:hover .seal__svg { animation-duration: 12s; }

/* === Tategaki (vertical Japanese text) === */
.tategaki {
  position: absolute;
  top: 50%;
  right: calc(var(--pad-x) + 4px);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: none;
  align-items: flex-start;
  gap: 26px;
  font-family: var(--font-jp-display);
  letter-spacing: 0.18em;
  color: var(--fg-3);
  font-size: 13px;
  line-height: 2;
  z-index: 4;
  user-select: none;
}
.tategaki__num {
  font-family: var(--font-mono);
  writing-mode: horizontal-tb;
  transform: rotate(180deg);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--accent);
}
.tategaki__seal {
  color: var(--accent);
  font-size: 14px;
  writing-mode: horizontal-tb;
  transform: rotate(180deg);
  letter-spacing: 0.1em;
}
.tategaki__line {
  max-height: 56vh;
  overflow: hidden;
}
@media (min-width: 1440px) {
  .tategaki { display: flex; }
}

/* === STATS — editorial poster grid === */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: clamp(48px, 6vh, 80px);
}
.stat {
  position: relative;
  padding: clamp(28px, 4vh, 56px) clamp(20px, 2.4vw, 40px) clamp(32px, 4vh, 56px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  min-height: clamp(280px, 38vh, 420px);
  transition: background .5s var(--ease);
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat:hover { background: rgba(230, 57, 70, 0.04); }
.stat__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.stat__num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(64px, 8.6vw, 148px);
  line-height: 0.9;
  color: var(--fg);
  display: flex;
  align-items: flex-start;
  gap: 0.04em;
  letter-spacing: -0.04em;
  align-self: end;
}
.stat__num .prefix {
  font-size: 0.5em;
  color: var(--accent);
  font-style: normal;
  margin-right: 0.04em;
  margin-top: 0.18em;
}
.stat__num sup {
  font-family: var(--font-mono);
  font-size: 0.28em;
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.4em;
  letter-spacing: 0.04em;
}
.stat__ticks {
  height: 14px;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 24) 14px;
  background-position: 0 100%;
  background-repeat: repeat-x;
  position: relative;
}
.stat__ticks::before, .stat__ticks::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 1px;
  background: var(--accent);
}
.stat__ticks::before { left: 0; height: 14px; }
.stat__ticks::after  { right: 0; height: 14px; }
.stat__label {
  font-family: var(--font-jp-body);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  line-height: 1.5;
  max-width: 18ch;
}
.stat__line {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width .9s var(--ease);
}
.stat:hover .stat__line { width: 100%; }
.stat.is-in .stat__ticks {
  animation: tick-draw 1.4s var(--ease) forwards;
}
@keyframes tick-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@media (max-width: 900px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 1px solid var(--line); }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}

/* === Side chapter RAIL === */
.rail {
  position: fixed;
  right: max(16px, calc(var(--pad-x) - 64px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  pointer-events: none;
}
.rail ol {
  display: grid;
  gap: 4px;
}
.rail a {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  pointer-events: auto;
  position: relative;
  color: var(--fg-3);
  transition: color .3s var(--ease);
}
.rail__no {
  font-family: var(--font-jp-display);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  width: 16px;
  text-align: center;
}
.rail__name {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.rail__bar {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--line-2);
  transition: width .35s var(--ease), background .3s var(--ease);
  justify-self: end;
}
.rail a:hover, .rail a.is-active {
  color: var(--fg);
}
.rail a:hover .rail__name { opacity: 1; transform: translateX(0); }
.rail a:hover .rail__bar  { width: 44px; background: var(--accent); }
.rail a.is-active .rail__no { color: var(--accent); }
.rail a.is-active .rail__bar { width: 56px; background: var(--accent); }
.rail a.is-active .rail__name { opacity: 1; transform: translateX(0); color: var(--fg); }
@media (max-width: 1100px) {
  .rail { display: none; }
}

/* === Cursor — red crosshair === */
.cursor {
  display: block;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 0;
  mix-blend-mode: normal;
  opacity: 0;
  transition: opacity .3s var(--ease), width .25s var(--ease), height .25s var(--ease);
}
.cursor.is-visible { opacity: 1; }
.cursor::after { display: none; }
.cursor__h, .cursor__v {
  position: absolute;
  background: var(--accent);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.cursor__h {
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
}
.cursor__v {
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
}
.cursor__dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform .25s var(--ease);
}
.cursor__label {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(8px, -50%);
  font-family: var(--font-jp-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}
.cursor.is-hover .cursor__h,
.cursor.is-hover .cursor__v {
  opacity: 0.4;
}
.cursor.is-hover .cursor__dot { transform: scale(2.4); }
.cursor.is-hover .cursor__label { opacity: 1; }

/* === Cases — refine layout === */
.cases__tab {
  font-family: var(--font-body);
  background: transparent;
  border: 0;
  text-align: left;
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 22px 16px 22px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  transition: color .3s var(--ease), background .3s var(--ease);
  cursor: pointer;
  position: relative;
}
.cases__tab .num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--fg-3);
}
.cases__tab .ttl {
  font-family: var(--font-jp-display);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--fg-2);
  transition: color .3s var(--ease);
}
.cases__tab .sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.cases__tab::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease);
}
.cases__tab.is-active::before,
.cases__tab:hover::before { transform: scaleY(1); }
.cases__tab.is-active .ttl,
.cases__tab:hover .ttl { color: var(--fg); }
.cases__tab.is-active { background: rgba(230, 57, 70, 0.05); }
.cases__tab.is-active .num { color: var(--accent); }

.case-panel__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--line);
}
.case-panel__no {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(56px, 6vw, 92px);
  line-height: 0.9;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.04em;
}
.case-panel__head h3 {
  font-family: var(--font-jp-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.case-panel__head p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.case-panel__media {
  display: grid;
  gap: 12px;
  padding: 24px 0;
}
.case-panel__media img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  transition: transform .8s var(--ease), border-color .4s var(--ease);
}
.case-panel__media img:hover {
  transform: scale(1.005);
  border-color: var(--accent);
}

/* Works hero figure */
.works__hero {
  position: relative;
  margin: clamp(48px, 6vh, 80px) 0 clamp(40px, 5vh, 64px);
  border: 1px solid var(--line);
  padding: 8px;
  background: var(--bg-2);
}
.works__hero img {
  width: 100%;
  display: block;
}
.works__hero figcaption {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  background: rgba(10, 9, 8, 0.7);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border: 1px solid var(--line);
}

/* === Strength cards === */
.card {
  position: relative;
  padding: clamp(32px, 4vw, 52px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color .4s var(--ease), transform .5s var(--ease), background .4s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.card:hover {
  border-color: var(--fg-3);
  transform: translateY(-4px);
  background: var(--bg-3);
}
.card:hover::before { transform: scaleX(1); }
.card__no {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 64px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin-bottom: 16px;
}
.card__title {
  font-family: var(--font-jp-display);
  font-weight: 500;
  font-size: clamp(20px, 1.8vw, 28px);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.card__text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg-2);
  margin-bottom: 24px;
  max-width: 38ch;
}
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card__tags li {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--fg-2);
  border-radius: 999px;
  background: var(--bg);
}

/* === About section refinements === */
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  margin-top: clamp(48px, 6vh, 80px);
  align-items: start;
}
.about__lead {
  font-family: var(--font-jp-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.7;
  color: var(--fg);
  letter-spacing: 0.005em;
  max-width: 36ch;
}
.about__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.about__facts > div {
  display: grid;
  gap: 6px;
}
.about__facts dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.about__facts dd {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.02em;
}

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

/* === Contact === */
.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  margin-top: clamp(48px, 6vh, 80px);
  align-items: start;
}
.contact__cta {
  display: grid;
  gap: 32px;
}
.contact__mail {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 16px 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: border-color .4s var(--ease);
}
.contact__mail:hover { border-color: var(--accent); }
.contact__mail-label, .contact__tel-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact__mail-addr {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(28px, 4.4vw, 64px);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--fg);
  transition: color .3s var(--ease), transform .4s var(--ease);
}
.contact__mail:hover .contact__mail-addr {
  color: var(--accent);
  transform: translateX(6px);
}
.contact__mail svg {
  color: var(--fg-3);
  transition: color .3s var(--ease), transform .4s var(--ease);
}
.contact__mail:hover svg {
  color: var(--accent);
  transform: translateX(6px);
}
.contact__tel {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 24px;
}
.contact__tel-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 400;
  color: var(--fg);
}
.contact__info {
  display: grid;
  gap: 18px;
  padding-top: 16px;
}
.contact__info > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.contact__info dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-top: 4px;
}
.contact__info dd {
  font-family: var(--font-jp-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fg);
}

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__mail { grid-template-columns: 1fr auto; }
  .contact__mail-label { grid-column: 1 / -1; }
}

/* === FOOTER — Okuduke (Japanese colophon) === */
.footer {
  position: relative;
  padding: clamp(80px, 12vh, 160px) var(--pad-x) clamp(48px, 8vh, 80px);
  border-top: 1px solid var(--line);
  background: var(--bg);
  isolation: isolate;
}
.footer__rule {
  position: absolute;
  top: -1px;
  left: var(--pad-x);
  right: var(--pad-x);
  height: 5px;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--line);
}
.footer__mast {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  padding-bottom: clamp(48px, 6vh, 80px);
  margin-bottom: clamp(48px, 6vh, 80px);
  border-bottom: 1px solid var(--line);
}
.footer__brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}
.footer__mark {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-jp-display);
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -0.02em;
  border-radius: 2px;
}
.footer__name {
  font-family: var(--font-jp-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.footer__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.footer__motto {
  font-family: var(--font-jp-display);
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.7;
  color: var(--fg-2);
  max-width: 40ch;
  letter-spacing: 0.01em;
}
.footer__motto span { color: var(--accent); }

.okuduke {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 5vh, 64px);
}
.okuduke > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 18px 24px;
  align-items: baseline;
  border-right: 1px solid var(--line);
}
.okuduke > div:nth-child(3n) { border-right: 0; }
.okuduke > div:nth-child(n+4) { border-top: 1px solid var(--line); }
.okuduke dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.okuduke dd {
  font-family: var(--font-jp-body);
  font-size: 13px;
  color: var(--fg);
  letter-spacing: 0.01em;
}
.okuduke dd a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.footer__bottom-mid { color: var(--accent); opacity: 0.6; }
.footer__isbn { margin-left: auto; color: var(--accent); }

@media (max-width: 900px) {
  .footer__mast { grid-template-columns: 1fr; }
  .okuduke { grid-template-columns: 1fr 1fr; }
  .okuduke > div { border-right: 1px solid var(--line); }
  .okuduke > div:nth-child(2n) { border-right: 0; }
  .okuduke > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .okuduke > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer__isbn { margin-left: 0; }
}
@media (max-width: 560px) {
  .okuduke { grid-template-columns: 1fr; }
  .okuduke > div { border-right: 0 !important; border-top: 1px solid var(--line); }
}

/* === Nav refinements === */
.nav {
  background: rgba(10, 9, 8, 0.65);
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), padding .35s var(--ease);
}
.nav.is-stuck {
  background: rgba(10, 9, 8, 0.92);
  border-bottom-color: var(--line);
  backdrop-filter: blur(20px) saturate(140%);
}
.nav__logo-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-jp-display);
  font-weight: 800;
  font-size: 20px;
}
.nav__logo-text .en {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--fg-2);
}
.nav__logo-text .en .dot { color: var(--accent); }
.nav__logo-text .ja {
  display: block;
  font-family: var(--font-jp-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--fg);
}
.nav__links a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  position: relative;
  transition: color .3s var(--ease);
}
.nav__links a .num { color: var(--accent); margin-right: 8px; font-weight: 500; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transition: right .35s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { right: 0; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 999px;
}
.lang-switch span {
  padding: 4px 9px;
  color: var(--fg-3);
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.lang-switch span.is-active {
  background: var(--accent);
  color: var(--bg);
}

/* === Marquee refinements === */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}
.marquee__track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(36px, 5.6vw, 80px);
  line-height: 1;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.marquee__track > span:not(.dot) {
  font-weight: 400;
}
.marquee__track > .dot {
  color: var(--accent);
  font-size: 0.5em;
  align-self: center;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* === Section paddings tighten with bg kanji === */
.section { padding: clamp(96px, 14vh, 192px) var(--pad-x); }
.section__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: clamp(32px, 4vh, 56px);
}

/* === Reveal === */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stronger fade for hero title lines */
.hero__title .line[data-reveal] {
  opacity: 0;
  transform: translateY(40px) rotate(0.4deg);
}
.hero__title .line.is-in {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* Seal entry */
.seal {
  opacity: 0;
  transform: scale(0.7) rotate(-30deg);
  transition: opacity 1.4s var(--ease), transform 1.6s var(--ease);
}
.seal.is-in {
  opacity: 1;
  transform: scale(1) rotate(0);
}

/* Glow tuning */
.hero__glow {
  position: absolute;
  width: 60vw; height: 60vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  z-index: 0;
}
.hero__glow--a { background: rgba(230, 57, 70, 0.35); top: -20vw; left: -10vw; animation: glow-drift-a 18s var(--ease) infinite; }
.hero__glow--b { background: rgba(255, 214, 10, 0.10); bottom: -25vw; right: -15vw; animation: glow-drift-b 22s var(--ease) infinite; }
@keyframes glow-drift-a {
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(8vw, 4vw); }
}
@keyframes glow-drift-b {
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(-6vw, -3vw); }
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(245, 242, 236, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 242, 236, 0.03) 1px, transparent 1px);
  background-size: clamp(60px, 8vw, 120px) clamp(60px, 8vw, 120px);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* === Hero responsive === */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .seal { grid-column: 1; grid-row: 4; justify-self: end; width: 220px; margin-top: 24px; }
  .hero__title { font-size: clamp(48px, 11vw, 96px); }
}
@media (max-width: 640px) {
  .hero__topline { font-size: 9.5px; letter-spacing: 0.18em; gap: 10px; }
  .hero__meta { flex-wrap: wrap; gap: 14px 22px; }
  .hero__lead { grid-template-columns: 36px 1fr; gap: 14px; }
  .hero__lead-mark { font-size: 40px; }
  .seal { width: 160px; }
  .section__bg-kanji { font-size: clamp(240px, 60vw, 360px); right: -8vw; opacity: 0.45; }
}

/* === Final touch: selection look on serif === */
em::selection { background: var(--accent); color: var(--bg); }

/* End of editorial upgrade layer */

/* =====================================================================
   ============= WASHI (LIGHT) THEME OVERRIDES =========================
   Repaint hard-coded rgba() that assumed dark surface, plus
   contrast fixes for accent badges.
   ===================================================================== */

/* Grain becomes ink-flecks: multiply on paper */
.grain {
  mix-blend-mode: multiply;
  opacity: 0.07;
}

/* Hero grid lines: dark on paper */
.hero__grid {
  background-image:
    linear-gradient(to right, rgba(26, 24, 21, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 24, 21, 0.05) 1px, transparent 1px);
}
/* Old hero__bg in original css used the inverse — repaint */
.hero__bg {
  background:
    repeating-linear-gradient(to right, rgba(26,24,21,0.04) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, rgba(26,24,21,0.04) 0 1px, transparent 1px 96px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,.85) 60%, rgba(0,0,0,0) 100%);
}

/* Hero glow softened — watercolor blobs on paper */
.hero__glow--a { background: radial-gradient(closest-side, rgba(200, 54, 45, 0.18), rgba(200, 54, 45, 0) 70%); filter: blur(80px); opacity: 1; }
.hero__glow--b { background: radial-gradient(closest-side, rgba(181, 148, 74, 0.16), rgba(181, 148, 74, 0) 70%); filter: blur(80px); opacity: 1; }

/* Hero meta dot pulse — accent on paper */
.hero__meta-item > i {
  box-shadow: 0 0 0 4px rgba(200, 54, 45, 0.16);
  animation: dot-pulse-w 2.4s var(--ease) infinite;
}
@keyframes dot-pulse-w {
  0%, 100% { box-shadow: 0 0 0 4px rgba(200, 54, 45, 0.16); }
  50%      { box-shadow: 0 0 0 9px rgba(200, 54, 45, 0); }
}

/* Seal — drop shadow tinted to paper */
.seal { filter: drop-shadow(0 14px 38px rgba(200, 54, 45, 0.20)); }
.seal__kanji { text-shadow: 0 1px 6px rgba(200, 54, 45, 0.12); }

/* Stat hover wash — subtle red blush */
.stat:hover { background: rgba(200, 54, 45, 0.05); }

/* Active case tab — paper blush */
.cases__tab.is-active { background: rgba(200, 54, 45, 0.06); }
.cases__tab:hover { background: rgba(26, 24, 21, 0.025); }

/* Nav — frosted paper */
.nav {
  background: rgba(244, 240, 230, 0.75);
}
.nav.is-stuck {
  background: rgba(244, 240, 230, 0.94);
}

/* Mobile menu overlay (from original CSS) */
.menu-overlay, .nav__menu { background: var(--bg) !important; }

/* Marquee strip — clean white-paper edge */
.marquee { background: var(--bg-2); }

/* Section bg kanji — slightly more visible against pale paper */
.section__bg-kanji { color: var(--bg-2); opacity: 0.85; }
.hero__kanji { color: var(--bg-2); opacity: 0.7; }

/* Accent badges: keep readable foreground */
.footer__mark,
.nav__logo-mark,
.lang-switch span.is-active { color: var(--on-accent); }
.btn--primary { color: var(--on-accent); }

/* Selection on paper */
::selection { background: var(--accent); color: var(--on-accent); }
::-moz-selection { background: var(--accent); color: var(--on-accent); }

/* Reset old btn--ghost translucent fill */
.btn--ghost:hover { border-color: var(--fg); background: rgba(26,24,21,0.04); }

/* Cursor — thicker on light bg for visibility */
.cursor__h, .cursor__v { background: var(--accent); }
.cursor__dot { background: var(--accent); }
.cursor__label { color: var(--accent); }

/* Ensure footer mast doesn't fade into bg */
.footer { background: var(--bg-2); }

/* Strength cards — slightly raised paper card */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--bg-3), 0 12px 30px -22px rgba(26, 24, 21, 0.18);
  transition: border-color .4s var(--ease), transform .5s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover {
  background: var(--bg-2);
  border-color: var(--fg-3);
  box-shadow: 0 1px 0 var(--bg-3), 0 20px 44px -22px rgba(26, 24, 21, 0.25);
}
.card__tags li { background: var(--bg-2); }

/* =====================================================================
   ============= NEW COMPONENTS — BOARD (table of works) + CASE SPECS ==
   ===================================================================== */

/* The 目次 (table-of-works) */
.board {
  margin: clamp(48px, 6vh, 80px) 0 clamp(40px, 5vh, 64px);
  border-top: 2px solid var(--fg);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.board__head, .board__list li {
  display: grid;
  grid-template-columns: 80px 2.6fr 1.2fr 1.4fr 1fr;
  gap: clamp(16px, 2.4vw, 36px);
  align-items: baseline;
  padding: clamp(16px, 2vh, 22px) clamp(16px, 2.4vw, 32px);
}
.board__head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-3);
  border-bottom: 1px solid var(--line);
}
.board__list {
  counter-reset: idx;
}
.board__list li {
  border-bottom: 1px dashed var(--line);
  transition: background .35s var(--ease), color .35s var(--ease);
  position: relative;
  cursor: default;
}
.board__list li:last-child { border-bottom: 0; }
.board__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease);
}
.board__list li:hover { background: rgba(200, 54, 45, 0.05); }
.board__list li:hover::before { transform: scaleY(1); }
.board__no {
  font-family: var(--font-jp-display);
  font-weight: 700;
  font-size: clamp(20px, 1.9vw, 28px);
  color: var(--accent);
  letter-spacing: -0.01em;
}
.board__ttl {
  font-family: var(--font-jp-display);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--fg);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.board__mkt, .board__gen, .board__yr {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.board__gen { color: var(--fg-3); }
.board__yr {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 1.4vw, 22px);
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
  text-align: right;
}
.board__foot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: clamp(14px, 1.8vh, 18px) clamp(16px, 2.4vw, 32px);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
@media (max-width: 800px) {
  .board__head { display: none; }
  .board__list li {
    grid-template-columns: 56px 1fr;
    gap: 8px 16px;
    grid-template-areas:
      "no  ttl"
      "no  mkt"
      "no  gen"
      "no  yr";
    padding: 22px 18px;
  }
  .board__no { grid-area: no; align-self: start; padding-top: 4px; }
  .board__ttl { grid-area: ttl; }
  .board__mkt { grid-area: mkt; }
  .board__gen { grid-area: gen; }
  .board__yr  { grid-area: yr; text-align: left; }
}

/* === Case panel — typographic detail (NO images) === */
.case-panel { padding-bottom: 24px; }
.case-panel__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 28px;
  padding: 36px 0 24px;
  border-bottom: 2px solid var(--fg);
}
.case-panel__title-block h3 {
  font-family: var(--font-jp-display);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--fg);
}
.case-panel__title-block p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.case-panel__no {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(72px, 9vw, 148px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--accent);
}
.case-panel__seal {
  font-family: var(--font-jp-display);
  font-size: clamp(40px, 4.2vw, 64px);
  color: var(--accent);
  line-height: 1;
  align-self: end;
  filter: drop-shadow(0 4px 12px rgba(200, 54, 45, 0.25));
}
.case-panel__lead {
  font-family: var(--font-jp-display);
  font-weight: 400;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.65;
  color: var(--fg);
  margin: 28px 0 36px;
  max-width: 56ch;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  letter-spacing: 0.005em;
}
.case-panel__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.case-panel__specs > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 18px 24px;
  align-items: baseline;
  border-right: 1px solid var(--line);
}
.case-panel__specs > div:nth-child(3n) { border-right: 0; }
.case-panel__specs > div:nth-child(n+4) { border-top: 1px solid var(--line); }
.case-panel__specs dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.case-panel__specs dd {
  font-family: var(--font-jp-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.005em;
  line-height: 1.4;
}
.case-panel__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 16px;
}
.case-panel__tags li {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
  background: var(--bg);
}

@media (max-width: 900px) {
  .case-panel__head { grid-template-columns: auto 1fr; gap: 16px; }
  .case-panel__seal { grid-column: 1 / -1; justify-self: end; }
  .case-panel__specs { grid-template-columns: 1fr 1fr; }
  .case-panel__specs > div { border-right: 1px solid var(--line); }
  .case-panel__specs > div:nth-child(2n) { border-right: 0; }
  .case-panel__specs > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .case-panel__specs > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .case-panel__specs { grid-template-columns: 1fr; }
  .case-panel__specs > div { border-right: 0 !important; border-top: 1px solid var(--line); padding: 14px 16px; }
}

/* Hide old image grid CSS if any reference remains */
.case-panel__media { display: none !important; }
.works__hero { display: none !important; }

/* === Final paper-mode tweaks to old base styles === */
.btn {
  color: var(--fg);
}
.btn--primary { color: var(--on-accent); border-color: var(--accent); background: var(--accent); }
.btn--primary:hover { color: var(--on-accent); }

/* End Washi theme overrides */
