:root {
  --bg: #f2f1ed;
  --bg-alt: #e8e7e2;
  --paper: #ffffff;
  --fg: #0b0b0b;
  --fg-muted: #55554f;
  --fg-soft: #9a9a93;
  --border: rgba(11,11,11,0.14);
  --border-strong: #0b0b0b;
  --accent: #610706;
  --accent-hover: #7d0f0d;
  --accent-soft: rgba(97,7,6,0.07);
  --shape: #1a1a1a;
  --shape-edge: #f2f1ed;
  --card-shadow: none;
  --logo-filter: none;
}
:root[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg-alt: #151515;
  --paper: #171717;
  --fg: #f2f1ed;
  --fg-muted: #a3a29b;
  --fg-soft: #5c5b56;
  --border: rgba(242,241,237,0.14);
  --border-strong: #f2f1ed;
  --accent: #d9443f;
  --accent-hover: #e8665f;
  --accent-soft: rgba(217,68,63,0.1);
  --shape: #e9e8e3;
  --shape-edge: #0d0d0d;
  --card-shadow: none;
  --logo-filter: brightness(0) invert(0.95);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Archivo", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

.serif {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  letter-spacing: -0.01em;
}
.mono {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, padding 0.3s;
}
.nav.scrolled { border-bottom-color: var(--border); padding: 14px 40px; }
@media (max-width: 720px) { .nav, .nav.scrolled { padding: 14px 20px; } }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; }
.nav-logo img {
  height: 36px; width: auto; display: block;
  filter: var(--logo-filter);
  transition: filter 0.4s ease, height 0.3s ease;
}
.nav.scrolled .nav-logo img { height: 30px; }
@media (max-width: 720px) {
  .nav-logo img { height: 30px; }
  .nav.scrolled .nav-logo img { height: 26px; }
}
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links {
  display: flex; gap: 28px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted);
}
.nav-links a { position: relative; transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
.nav-links a:hover::after { transform: scaleX(1); }
@media (max-width: 720px) { .nav-links { display: none; } }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg);
  width: 36px; height: 36px;
  border-radius: 0;
  display: grid; place-items: center;
  transition: all 0.3s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: block; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 40px 100px;
  overflow: hidden;
}
.hero-fx {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
  mask-image: radial-gradient(ellipse 60% 70% at 30% 55%, transparent 0%, rgba(0,0,0,0.35) 40%, black 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 30% 55%, transparent 0%, rgba(0,0,0,0.35) 40%, black 80%);
}
.hero-grid { position: relative; z-index: 1; }
.hero-scroll { z-index: 2; }
@media (max-width: 720px) { .hero { padding: 120px 20px 80px; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1280px; margin: 0 auto; width: 100%;
  position: relative;
}

.hero-meta {
  display: flex; flex-direction: column; gap: 6px;
  position: absolute; top: 0; right: 0;
  text-align: right;
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0; animation: fadeIn 1s 0.2s forwards;
}
.hero-meta .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  margin-right: 6px; vertical-align: middle;
  animation: pulse 2s infinite;
}
@media (max-width: 900px) { .hero-meta { position: static; text-align: left; margin-bottom: 32px; } }

.hero-eyebrow {
  display: block;
  font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
  margin-bottom: 36px;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s 0.1s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-eyebrow::before {
  content: ""; display: inline-block;
  width: 36px; height: 1px; background: var(--accent);
  vertical-align: middle; margin-right: 14px;
}

.hero-title {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(44px, 7.4vw, 112px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
  max-width: 14ch;
}
.hero-title .word {
  display: inline-block;
  opacity: 0; transform: translateY(24px);
  animation: fadeUp 1s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-title .word:nth-child(1) { animation-delay: 0.2s; }
.hero-title .word:nth-child(2) { animation-delay: 0.35s; }
.hero-title .word:nth-child(3) { animation-delay: 0.5s; }
.hero-title .word:nth-child(4) { animation-delay: 0.65s; }
.hero-title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}

.hero-sub {
  font-size: clamp(15px, 1.25vw, 17px);
  color: var(--fg-muted);
  max-width: 48ch;
  margin: 0 0 48px;
  line-height: 1.9;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 24px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.9s 0.95s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid transparent;
  border-radius: 0;
}
.btn-primary {
  background: var(--fg); color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
:root[data-theme="dark"] .btn-primary:hover { color: var(--bg); }
.btn-ghost {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  border-radius: 0;
  padding: 10px 0;
}
.btn-ghost:hover { color: var(--accent); border-bottom-color: var(--accent); }
.btn svg { width: 14px; height: 14px; transition: transform 0.3s; }
.btn:hover svg { transform: translateX(4px); }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}


.hero-scroll {
  position: absolute; left: 40px; bottom: 36px;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0; animation: fadeIn 1s 1.4s forwards;
  display: flex; align-items: center; gap: 12px;
}
.hero-scroll::after {
  content: ""; width: 48px; height: 1px;
  background: linear-gradient(to right, var(--fg-muted), transparent);
  animation: scrollLine 2s ease-in-out infinite;
  transform-origin: left;
}
@keyframes scrollLine {
  0%,100% { transform: scaleX(0.3); opacity: 0.4; }
  50% { transform: scaleX(1); opacity: 1; }
}
@media (max-width: 720px) { .hero-scroll { left: 20px; } }

/* ============ SECTION COMMON ============ */
section { position: relative; padding: 140px 40px; }
@media (max-width: 720px) { section { padding: 100px 20px; } }
.container { max-width: 1280px; margin: 0 auto; }

.section-head {
  display: grid; grid-template-columns: 120px 1fr; gap: 48px;
  margin-bottom: 96px; align-items: start;
}
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 64px; } }
.section-num {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--fg-muted);
  padding-top: 18px;
  border-top: 1px solid var(--fg);
}
.section-title {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(32px, 4.4vw, 60px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 18ch;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.section-title em { font-style: normal; color: var(--accent); font-weight: 500; }
.section-lead { color: var(--fg-muted); max-width: 52ch; margin: 0; font-size: 16px; }

/* reveal */
/* Hidden states apply only when boot.js opted in (html.motion), so content stays
   visible without JS or under prefers-reduced-motion. */
html.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.22,1,0.36,1), transform 0.8s cubic-bezier(0.22,1,0.36,1); }
html.motion .reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============ SERVICES (editorial list) ============ */
.services-list {
  display: grid; gap: 0;
  border-top: 1px solid var(--border);
}
.service-item {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  cursor: default;
  position: relative;
  transition: padding 0.4s cubic-bezier(0.2,0.8,0.2,1);
}
@media (max-width: 720px) {
  .service-item { grid-template-columns: 48px 1fr; gap: 20px; padding: 28px 0; }
  .service-item .service-icon-wrap { grid-column: 2; grid-row: 2; justify-self: end; }
}
.service-item::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1);
}
.service-item:hover { padding-left: 24px; }
.service-item:hover::after { transform: scaleY(1); }

.service-num {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 12px; letter-spacing: 0.2em; color: var(--fg-muted);
  padding-top: 10px;
  transition: color 0.4s;
}
.service-item:hover .service-num { color: var(--accent); }
.service-body { max-width: 62ch; }
.service-name {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.4s;
}
.service-item:hover .service-name { color: var(--accent); }
.service-desc { color: var(--fg-muted); margin: 0; font-size: 15px; }
.service-icon-wrap {
  display: grid; place-items: center;
  color: var(--fg-muted);
  transition: color 0.4s, transform 0.4s;
}
.service-item:hover .service-icon-wrap {
  color: var(--accent);
  transform: translateX(6px);
}
.service-icon-wrap svg { width: 28px; height: 28px; stroke-width: 1; }

/* ============ APPROACH (AI) ============ */
.approach-grid {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 96px;
}
@media (max-width: 860px) { .approach-grid { grid-template-columns: 1fr; gap: 40px; } }
.approach-lead {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.6;
  color: var(--fg);
  margin: 0 0 24px;
  font-weight: 400;
}
.approach-lead em { font-style: normal; color: var(--accent); font-weight: 500; }

/* Approach FX canvas (left column, bottom) */
.approach-lead-col { display: flex; flex-direction: column; }
.approach-fx-wrap {
  margin-top: auto;
  padding-top: 56px;
  max-width: 460px;
}
.approach-fx {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: transparent;
}
@media (max-width: 860px) {
  .approach-fx-wrap { margin-top: 0; padding-top: 28px; }
}
.approach-body p { color: var(--fg-muted); margin: 0 0 16px; font-size: 15px; }
.approach-pillars {
  display: grid; gap: 0; margin-top: 40px;
  border-top: 1px solid var(--border);
}
.pillar {
  display: grid; grid-template-columns: 72px 1fr; gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.pillar-num {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 11px; letter-spacing: 0.25em;
  color: var(--accent); font-weight: 500;
  padding-top: 4px;
}
.pillar h3 {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 20px; font-weight: 500;
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.pillar p { font-size: 14px; color: var(--fg-muted); margin: 0; }
.approach-stat {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
@media (max-width: 560px) { .approach-stat { grid-template-columns: 1fr 1fr; } }
.stat .v {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat .v sup {
  font-size: 0.4em; vertical-align: super;
  margin-left: 4px; color: var(--fg-muted); font-style: normal;
}
.stat .l {
  display: block; margin-top: 10px;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--fg-muted);
}

/* ============ SECURITY ============ */
.security-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 48px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
@media (max-width: 860px) { .security-list { grid-template-columns: 1fr; gap: 32px; } }
.security-tags { margin-bottom: 48px; }
.cert {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  margin-top: 72px; padding: 40px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0;
}
@media (max-width: 860px) { .cert { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; } }
.cert-head .pillar-num { margin-bottom: 12px; text-transform: uppercase; }
.cert-head p { font-size: 14px; color: var(--fg-muted); margin: 0; }
.cert-list { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .cert-list { grid-template-columns: 1fr; gap: 28px; } }
.cert-item { display: flex; align-items: flex-start; gap: 16px; }
.cert-badge { width: 72px; height: 72px; flex: none; display: block; }
.cert-desc { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--fg-muted); }
.cert-name {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 18px; font-weight: 600; line-height: 1.3;
}
.cert-meta {
  margin-top: 4px;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-muted);
}
.security-item .pillar-num { margin-bottom: 16px; }
.security-item h3 {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(20px, 1.8vw, 24px); font-weight: 500;
  margin: 0 0 10px; letter-spacing: -0.01em; line-height: 1.4;
}
.security-item p { font-size: 14px; color: var(--fg-muted); margin: 0; }

/* ============ WORKS ============ */
#works .section-title, #security .section-title { max-width: 24ch; }

.work-feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 860px) { .work-feature { grid-template-columns: 1fr; gap: 40px; } }

.work-visual {
  position: relative;
  aspect-ratio: 4/3;
  background: #0b0b0b;
  border: 0;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.work-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 38px 38px;
}
.work-figure {
  position: absolute; left: 33%; top: 28%;
  width: 30%; height: 46%;
  display: grid; place-items: end center;
  color: #3b3b3b;
  opacity: 1;
}
.work-figure svg { height: 92%; width: auto; display: block; }
.work-scan {
  position: absolute; left: 0; right: 0; height: 2px; top: 4%;
  background: linear-gradient(90deg, transparent, #ff3a2d, transparent);
  box-shadow: 0 0 14px #ff3a2d;
  opacity: 0.9;
  animation: workScan 3.6s cubic-bezier(0.4,0,0.6,1) infinite;
}
@keyframes workScan {
  0% { top: 4%; opacity: 0; }
  12% { opacity: 0.95; }
  88% { opacity: 0.95; }
  100% { top: 94%; opacity: 0; }
}
.work-detect {
  position: absolute; left: 33%; top: 28%;
  width: 30%; height: 46%;
  border: 2px solid #ff3a2d;
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), inset 0 0 24px rgba(0,0,0,0.2);
  animation: workPulse 3.6s ease-in-out infinite;
}
.work-detect::before, .work-detect::after {
  content: ""; position: absolute;
  width: 12px; height: 12px;
  border: 3px solid #ff3a2d;
}
.work-detect::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.work-detect::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.work-detect-label {
  position: absolute; top: -20px; left: -2px;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 9px; letter-spacing: 0.12em;
  color: #fff;
  background: #ff3a2d;
  padding: 2px 7px;
  white-space: nowrap;
}
@keyframes workPulse {
  0%,100% { opacity: 0; transform: translateY(6px); }
  22%,78% { opacity: 1; transform: translateY(0); }
}
.work-visual-caption {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  z-index: 2;
}
.work-rec { display: inline-flex; align-items: center; gap: 6px; }
.work-rec .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 1.6s infinite;
}

.work-tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.work-tag {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-muted);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 5px 12px;
}
.work-name {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500; line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  word-break: keep-all;
}
.work-name em { font-style: normal; color: var(--accent); font-weight: 500; }
.work-desc { color: var(--fg-muted); margin: 0 0 24px; font-size: 15px; }
.work-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.work-points li {
  position: relative; padding-left: 24px;
  font-size: 14px; color: var(--fg);
}
.work-points li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 12px; height: 1px; background: var(--accent);
}

/* ============ ABOUT ============ */
.about {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: center;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 48px; } }

.about-visual {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border);
}
.about-fx {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.about-visual-mark {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(100px, 16vw, 220px);
  line-height: 0.85;
  color: var(--fg);
  letter-spacing: -0.04em;
  text-align: center;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0.9;
}
.about-visual-caption {
  position: absolute; left: 24px; bottom: 24px; right: 24px;
  display: flex; justify-content: space-between;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--fg);
  mix-blend-mode: difference;
  z-index: 2;
}

.about-body .eyebrow {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
  margin-bottom: 24px;
}
.about-body h3 {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}
.about-body h3 em { font-style: normal; color: var(--accent); font-weight: 500; }
.about-body p { color: var(--fg-muted); margin: 0 0 18px; font-size: 15px; }
.about-meta {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; margin-top: 40px;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.about-meta-item .label {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 6px;
}
.about-meta-item .value { font-weight: 500; font-size: 14px; }

/* ============ CONTACT ============ */
.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding: 56px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0;
}
@media (max-width: 720px) {
  .contact-card { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; }
}
.contact-card h4 {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 500;
  margin: 0 0 12px;
}
.contact-card p { color: var(--fg-muted); margin: 0; font-size: 15px; }
.contact-mail {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 14px; letter-spacing: 0.05em;
  padding: 16px 24px;
  border: 1px solid var(--fg);
  border-radius: 0;
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.4s cubic-bezier(0.22,1,0.36,1);
  white-space: nowrap;
}
.contact-mail:hover {
  color: var(--bg); background: var(--accent); border-color: var(--accent);
}
:root[data-theme="dark"] .contact-mail:hover { color: var(--bg); }
.contact-mail svg { width: 14px; height: 14px; transition: transform 0.3s; }
.contact-mail:hover svg { transform: translateX(4px); }

/* ============ FOOTER ============ */
.footer {
  padding: 60px 40px 40px;
  border-top: 1px solid var(--border);
}
@media (max-width: 720px) { .footer { padding: 40px 20px; } }
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: space-between; align-items: center;
}
.footer-brand img { height: 32px; width: auto; filter: var(--logo-filter); display: block; }
.footer-copy {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-size: 11px; letter-spacing: 0.18em; color: var(--fg-muted);
}
.footer-links {
  display: flex; gap: 20px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted);
}
.footer-links a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ============ SWISS ============ */
body { font-feature-settings: "palt"; line-height: 1.85; }
::selection { background: var(--accent); color: #fff; }

/* headings: heavy gothic, tight, accent by colour only */
.hero-title, .section-title, .service-name, .pillar h3, .security-item h3, .work-name,
.about-body h3, .contact-card h4, .approach-lead, .cert-name {
  font-family: "Archivo", "Noto Sans JP", sans-serif;
  font-weight: 900; letter-spacing: -0.035em;
}
.hero-title em, .section-title em, .work-name em, .about-body h3 em, .approach-lead em {
  font-style: normal; font-weight: 900; color: var(--accent);
}
.about-body p em { font-style: normal; color: var(--fg); }
.about-body p em strong { color: var(--accent); }

/* nav: hard rule */
.nav { background: var(--bg); backdrop-filter: none; border-bottom: 2px solid transparent; }
.nav.scrolled { border-bottom-color: var(--fg); }
.nav-links { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; color: var(--fg); }
.nav-links a::after { height: 2px; bottom: -4px; }
.theme-toggle { border: 2px solid var(--fg); }

/* hero */
.hero { border-bottom: 6px solid var(--fg); }
.hero-title {
  font-size: clamp(48px, 8.4vw, 136px);
  line-height: 1.02; letter-spacing: -0.055em;
  max-width: none; margin-bottom: 44px;
}
.hero-eyebrow { color: var(--fg); font-weight: 800; letter-spacing: 0.2em; }
.hero-eyebrow::before { width: 48px; height: 6px; background: var(--accent); }
.hero-meta { color: var(--fg); font-weight: 700; letter-spacing: 0.16em; }
.hero-sub { color: var(--fg); font-weight: 500; font-size: clamp(15px, 1.25vw, 18px); max-width: 40ch; }
.hero-title { margin-bottom: 28px; }
.hero-tagline {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 40px;
  font-weight: 900; font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -0.02em; line-height: 1.3;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s 0.75s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-tagline::before { content: ""; width: 48px; height: 6px; background: var(--accent); flex: none; }
.hero-scroll { color: var(--fg); font-weight: 700; }

.btn { font-weight: 800; font-size: 13px; letter-spacing: 0.08em; padding: 18px 30px; }
.btn-primary { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary:hover { color: #fff; }
.btn-ghost { font-weight: 800; border-bottom-width: 3px; }

/* section head: big index number */
section:not(.hero) { border-top: 0; }
.section-head { grid-template-columns: 220px 1fr; gap: 40px; margin-bottom: 80px; padding-top: 24px; border-top: 6px solid var(--fg); }
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: 16px; } }
.section-num { border-top: 0; padding-top: 0; color: var(--fg); letter-spacing: 0; text-transform: none; display: flex; flex-direction: column; }
.section-num { padding-top: 14px; }
.section-num span { display: flex; align-items: center; gap: 12px; margin-top: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.section-num span::before { content: ""; width: 28px; height: 6px; background: var(--accent); flex: none; }
.section-title { font-size: clamp(36px, 5vw, 76px); line-height: 1.06; max-width: none; margin-bottom: 24px; }
.section-lead { color: var(--fg); font-weight: 500; font-size: 16px; }

/* services: hard rules, big numbers */
.services-list { border-top: 2px solid var(--fg); }
.service-item { border-bottom: 2px solid var(--fg); grid-template-columns: 120px 1fr 80px; padding: 44px 0; }
@media (max-width: 720px) { .service-item { grid-template-columns: 64px 1fr; } }
.service-item::after { width: 8px; }
.service-item:hover { padding-left: 32px; }
.service-num { font-weight: 900; font-size: clamp(36px, 3.4vw, 52px); line-height: 1; letter-spacing: -0.05em; color: var(--fg); padding-top: 0; }
.service-name { font-size: clamp(22px, 2.3vw, 32px); margin-bottom: 12px; }
.service-desc { color: var(--fg-muted); }
.service-icon-wrap { color: var(--fg); }
.service-icon-wrap svg { stroke-width: 1.6; width: 32px; height: 32px; }

/* approach */
.approach-lead { font-size: clamp(20px, 1.9vw, 26px); line-height: 1.65; font-weight: 700; letter-spacing: -0.02em; }
.approach-pillars { border-top: 2px solid var(--fg); }
.pillar { border-bottom: 1px solid var(--fg); }
.pillar-num { font-weight: 900; font-size: 22px; letter-spacing: -0.03em; }
.pillar h3 { font-size: 20px; }
.approach-stat { border-top: 2px solid var(--fg); }
.stat .v { font-weight: 900; font-size: clamp(44px, 5vw, 76px); letter-spacing: -0.06em; }
.stat .v sup { font-weight: 700; letter-spacing: 0; }
.stat .l { color: var(--fg); font-weight: 800; letter-spacing: 0.14em; }

/* security */
.work-tag { border: 2px solid var(--fg); color: var(--fg); font-weight: 800; letter-spacing: 0.08em; }
.security-list { border-top: 2px solid var(--fg); gap: 0; padding-top: 0; }
.security-item { padding: 32px 32px 36px 0; border-bottom: 1px solid var(--fg); }
.security-item:nth-child(3n+2), .security-item:nth-child(3n+3) { padding-left: 32px; border-left: 1px solid var(--fg); }
@media (max-width: 860px) {
  .security-item, .security-item:nth-child(3n+2), .security-item:nth-child(3n+3) { padding: 28px 0; border-left: 0; }
}
.security-item h3 { font-size: clamp(20px, 1.8vw, 24px); }
.security-item .pillar-num { font-size: 40px; line-height: 1; margin-bottom: 18px; }
.cert { background: var(--fg); color: var(--bg); border: 0; padding: 48px; }
.cert .pillar-num { color: var(--bg); font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; }
.cert-head p, .cert-desc, .cert-meta { color: color-mix(in oklab, var(--bg) 70%, var(--fg)); }
.cert-name { font-size: 18px; letter-spacing: -0.02em; }
.cert-meta { font-weight: 700; }

/* works */
.work-tag-row { gap: 6px; }
.work-name { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.12; }
.work-points li { font-weight: 500; }
.work-points li::before { width: 14px; height: 3px; top: 11px; }

/* about */
.about { background: var(--bg-alt); border-top: 6px solid var(--fg); border-bottom: 0; }
.about-body p { color: var(--fg-muted); }
.about-body .eyebrow { display: flex; align-items: center; gap: 12px; color: var(--fg); font-weight: 800; letter-spacing: 0.2em; }
.about-body .eyebrow::before { content: ""; width: 28px; height: 6px; background: var(--accent); flex: none; }
.about-body h3 { font-size: clamp(32px, 3.8vw, 56px); line-height: 1.1; }
.about-meta { border-top: 2px solid var(--fg); }
.about-meta-item .label { color: var(--fg); font-weight: 800; }
.about-visual { border: 2px solid var(--fg); }
.about-visual { container-type: inline-size; }
.about-visual-mark { font-weight: 900; letter-spacing: -0.06em; font-size: 26cqw; justify-items: center; }

/* contact */
.contact-card { border: 6px solid var(--fg); background: var(--paper); }
.contact-card h4 { font-size: clamp(24px, 2.4vw, 34px); }
.contact-mail { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 18px; letter-spacing: 0; border: 0; background: var(--fg); color: var(--bg); padding: 22px 30px; }
.contact-mail:hover { background: var(--accent); color: #fff; }

/* footer */
.footer { border-top: 6px solid var(--fg); }
.footer-copy, .footer-links { color: var(--fg); font-weight: 700; }

/* ============ MOTION ============ */
@keyframes failsafe { to { opacity: 1; transform: none; } }
/* If app.js never runs, reveal everything after a short grace period. */
html.motion:not(.motion-ready) .reveal,
html.motion:not(.motion-ready) .hero-title { animation: failsafe 0s 2.5s forwards; }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  pointer-events: none;
}

/* hero headline: per-character mask rise */
html.motion .hero-title:not(.is-split) { opacity: 0; }
html.motion .hero-title .word { opacity: 1; transform: none; animation: none; }
.hero-title .char {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: 0.12em; margin-bottom: -0.12em;
}
.hero-title .char-in {
  display: inline-block;
  transform: translateY(112%) rotate(4deg);
  transition: transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.hero-title.is-play .char-in { transform: none; }

/* headings: per-line mask rise, triggered by the enclosing .reveal */
html.motion .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
html.motion .line-in {
  display: block;
  transform: translateY(105%);
  transition: transform 0.95s cubic-bezier(0.22,1,0.36,1);
}
html.motion .in .line-in { transform: none; }

/* section rule draws in from the left */
html.motion .section-head { position: relative; border-top-color: transparent; }
html.motion .section-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
  background: var(--fg);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.65,0,0.35,1);
}
html.motion .section-head.in::before { transform: scaleX(1); }

/* stable widths while numbers decode / count */
.stat .v { font-variant-numeric: tabular-nums; }

.cert-badge { transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), filter 0.35s; will-change: transform; }
.cert-item:hover .cert-badge { filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45)); }
