:root {
  --ink: #101210;
  --paper: #edece5;
  --paper-deep: #deddd4;
  --night: #0b0d0c;
  --night-raised: #121512;
  --lime: #c7ff45;
  --muted: #696d68;
  --line: rgba(16,18,16,.17);
  --line-dark: rgba(237,236,229,.13);
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --jp: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; font-feature-settings: "ss01"; }
html:lang(ja) body { font-family: var(--jp); }
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3 { letter-spacing: -.035em; }
html:lang(ja) .mono { font-family: var(--jp); letter-spacing: .08em; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--lime); color: var(--night); }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-200%); background: var(--lime); color: var(--night); padding: 10px 16px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }

.site-header { height: 86px; padding: 0 clamp(22px,5vw,72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 20; background: rgba(237,236,229,.92); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: .18em; text-decoration: none; }
.brand svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.site-header nav { display: flex; align-items: center; gap: clamp(22px,3vw,44px); }
.site-header nav a { font-size: 13px; font-weight: 600; text-decoration: none; }
.site-header nav a:not(.nav-contact) { color: #474b47; }
.site-header nav a:not(.nav-contact):hover { color: var(--ink); }
.language-toggle { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: var(--muted); font: 500 11px var(--mono); cursor: pointer; }
.language-toggle i { color: rgba(16,18,16,.3); font-style: normal; }
.language-toggle .lang-option { transition: color .2s ease; }
.language-toggle .lang-en, html[data-language="ja"] .language-toggle .lang-ja { color: var(--ink); }
html[data-language="ja"] .language-toggle .lang-en { color: var(--muted); }
.nav-contact { padding: 10px 15px; color: var(--paper); background: var(--night); border: 1px solid var(--night); transition: .2s ease; }
.nav-contact:hover { color: var(--night); background: var(--lime); border-color: var(--lime); }
.menu-toggle { display: none; border: 0; background: transparent; width: 44px; height: 44px; padding: 12px 8px; }
.menu-toggle span:not(.sr-only) { display: block; height: 1px; background: currentColor; margin: 6px 0; transition: transform .2s ease; }

.hero { min-height: calc(100svh - 86px); position: relative; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(360px,.85fr); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-copy { padding: clamp(90px,13vh,150px) clamp(30px,7vw,110px); align-self: center; position: relative; z-index: 2; }
.kicker, .eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .12em; }
.kicker { margin: 0 0 28px; color: var(--muted); }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 900px; margin: 0; font-size: clamp(48px,6.4vw,98px); line-height: .98; letter-spacing: -.065em; font-weight: 500; }
h1 .hero-secondary { color: var(--muted); }
.intro { max-width: 650px; margin: 38px 0 0; color: #3f433f; font-size: clamp(17px,1.45vw,21px); line-height: 1.65; }
.hero-actions { margin-top: 42px; display: flex; align-items: center; gap: 30px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 12px 18px; font-size: 13px; font-weight: 700; text-decoration: none; border: 1px solid; transition: transform .2s ease, background .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--paper); background: var(--night); border-color: var(--night); }
.button-primary:hover { color: var(--night); background: var(--lime); border-color: var(--lime); }
.text-link { font-size: 13px; font-weight: 700; text-underline-offset: 5px; }
.text-link span { margin-left: 8px; }
.hero-index { position: absolute; left: 22px; top: 50%; writing-mode: vertical-rl; transform: translateY(-50%); color: var(--muted); font-size: 10px; z-index: 3; }
.vertical-note { position: absolute; bottom: 24px; right: 25px; z-index: 3; color: rgba(237,236,229,.48); font-size: 11px; writing-mode: vertical-rl; }

.system-map { min-height: 640px; position: relative; background: var(--night); border-left: 1px solid var(--line); overflow: hidden; }
.map-grid, .contact-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-dark) 1px,transparent 1px),linear-gradient(90deg,var(--line-dark) 1px,transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom,transparent,black 18%,black 82%,transparent); }
.map-grid:after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%,rgba(199,255,69,.13),transparent 32%); }
.core { position: absolute; left: 50%; top: 46%; width: 64px; height: 64px; transform: translate(-50%,-50%) rotate(45deg); border: 1px solid var(--lime); background: rgba(199,255,69,.04); box-shadow: 0 0 45px rgba(199,255,69,.12); }
.core i { position: absolute; inset: 17px; background: var(--lime); }
.orbit { position: absolute; left: 50%; top: 46%; border: 1px solid rgba(237,236,229,.2); border-radius: 50%; transform: translate(-50%,-50%); }
.orbit:before, .orbit:after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.orbit-one { width: 240px; height: 240px; animation: spin 24s linear infinite; }
.orbit-one:before { left: 17px; top: 54px; }
.orbit-one:after { right: -4px; top: 50%; }
.orbit-two { width: 430px; height: 430px; border-style: dashed; opacity: .55; animation: spin-reverse 36s linear infinite; }
.orbit-two:before { left: 80px; bottom: 28px; }
.orbit-two:after { right: 46px; top: 48px; }
.map-label { position: absolute; color: rgba(237,236,229,.5); font-size: 9px; }
.map-label-a { left: 12%; top: 20%; }
.map-label-b { right: 12%; top: 31%; }
.map-label-c { left: 16%; bottom: 24%; }
.map-status { position: absolute; left: 34px; bottom: 30px; color: var(--paper); font-size: 10px; line-height: 1.8; }
.map-status i { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.map-status span { color: rgba(237,236,229,.42); }
.map-status .status-primary { color: var(--paper); }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes spin-reverse { to { transform: translate(-50%,-50%) rotate(-360deg); } }

.statement { max-width: var(--max); margin: 0 auto; padding: clamp(90px,13vw,180px) clamp(24px,5vw,70px); display: grid; grid-template-columns: 90px minmax(0,2.2fr) minmax(260px,.8fr); gap: clamp(28px,5vw,80px); align-items: start; }
.section-number { margin: 7px 0 0; font-size: 11px; color: var(--muted); }
.statement blockquote { margin: 0; font-size: clamp(34px,4.4vw,66px); line-height: 1.08; letter-spacing: -.05em; font-weight: 500; }
.statement > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 15px; }

.section-shell { padding: clamp(90px,11vw,150px) max(24px,calc((100vw - var(--max))/2)); }
.section-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: end; margin-bottom: 60px; }
.eyebrow { margin: 0 0 17px; color: var(--muted); }
h2 { margin: 0; font-size: clamp(42px,5vw,72px); line-height: 1; letter-spacing: -.055em; font-weight: 500; }
.section-heading > p { max-width: 460px; margin: 0 0 4px; color: var(--muted); }

.work { background: var(--night); color: var(--paper); }
.work .eyebrow, .work .section-heading > p { color: #999e98; }
.project-feature { position: relative; display: grid; grid-template-columns: 110px 1fr 1.05fr; min-height: 460px; color: inherit; border: 1px solid var(--line-dark); background: rgba(255,255,255,.018); text-decoration: none; transition: border-color .25s ease, background .25s ease; overflow: hidden; }
.project-feature:hover { border-color: rgba(199,255,69,.55); background: rgba(199,255,69,.025); }
.project-meta { padding: 24px 20px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line-dark); color: #777d77; font-size: 9px; }
.project-meta span:nth-child(2) { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; }
.project-main { padding: clamp(35px,5vw,70px); align-self: center; }
.project-type { color: var(--lime); font-size: 9px; line-height: 1.8; }
.project-main h3 { margin: 22px 0; font-size: clamp(38px,4.8vw,70px); line-height: 1; letter-spacing: -.05em; font-weight: 500; }
.project-main > p:last-child { max-width: 500px; color: #aeb2ac; }
.project-visual { margin: 45px 45px 45px 0; align-self: center; border: 1px solid var(--line-dark); background: #080a08; box-shadow: 0 30px 80px rgba(0,0,0,.24); transform: perspective(1000px) rotateY(-3deg); }
.terminal-bar { height: 42px; padding: 0 14px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line-dark); color: #6d726d; font: 9px var(--mono); }
.terminal-bar i { width: 7px; height: 7px; border-radius: 50%; background: #3c403c; }
.terminal-bar span { margin-left: auto; }
.project-visual pre { min-height: 300px; margin: 0; padding: 34px; color: #7f867e; font: 12px/1.8 var(--mono); white-space: pre-wrap; }
.project-visual pre span { color: var(--lime); }
.project-arrow { position: absolute; right: 18px; top: 12px; color: var(--lime); font-size: 24px; }

.practice { background: var(--paper); }
.service-list { border-top: 1px solid var(--line); }
.service { display: grid; grid-template-columns: 80px minmax(230px,.75fr) 1fr minmax(210px,.6fr); gap: 30px; align-items: center; min-height: 160px; border-bottom: 1px solid var(--line); transition: padding .25s ease, background .25s ease; }
.service:hover { padding-left: 14px; padding-right: 14px; background: rgba(255,255,255,.26); }
.service-num { color: var(--muted); font-size: 11px; }
.service h3 { margin: 0; font-size: clamp(22px,2.1vw,31px); letter-spacing: -.035em; font-weight: 600; }
.service > p:not(.service-num) { color: var(--muted); max-width: 450px; }
.service > span { color: var(--muted); font-size: 9px; text-align: right; }

.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(60px,10vw,150px); align-items: center; border-top: 1px solid var(--line); background: var(--paper-deep); }
.about-mark { padding: clamp(20px,5vw,70px); }
.about-mark svg { width: 100%; fill: none; stroke: rgba(16,18,16,.68); stroke-width: 1; }
.about-copy { max-width: 680px; }
.about-copy h2 { margin-bottom: 38px; }
.about-copy > p:not(.eyebrow) { color: #565a55; font-size: 17px; }
.location { margin-top: 40px; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; }
.location i { width: 28px; height: 1px; background: var(--muted); }

.contact { min-height: 650px; padding: clamp(100px,14vw,190px) 24px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--lime); color: var(--night); }
.contact-grid { opacity: .18; background-image: linear-gradient(rgba(11,13,12,.3) 1px,transparent 1px),linear-gradient(90deg,rgba(11,13,12,.3) 1px,transparent 1px); mask-image: radial-gradient(circle at center,black,transparent 72%); }
.contact > *:not(.contact-grid) { position: relative; z-index: 2; }
.contact .eyebrow { color: rgba(11,13,12,.65); }
.contact h2 { font-size: clamp(54px,8vw,115px); }
.contact > p:not(.eyebrow) { margin: 28px 0 0; font-size: 18px; }
.contact-actions { margin-top: 42px; display: flex; align-items: center; gap: 28px; }
.button-light { color: var(--paper); background: var(--night); border-color: var(--night); min-width: 220px; }
.button-light:hover { color: var(--night); background: transparent; }
.contact-secondary { font-size: 13px; font-weight: 700; text-underline-offset: 5px; }

footer { min-height: 120px; padding: 30px clamp(22px,5vw,72px); display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; background: var(--night); color: var(--paper); }
footer p { margin: 0; color: #818680; font-size: 11px; }
footer p:last-child { text-align: right; font-size: 9px; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.contact :focus-visible { outline-color: var(--night); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 670px; padding-left: max(45px,8vw); padding-right: max(30px,8vw); }
  .system-map { min-height: 620px; border-left: 0; }
  .hero-index { display: none; }
  .statement { grid-template-columns: 55px 1fr; }
  .statement > p:last-child { grid-column: 2; max-width: 520px; }
  .project-feature { grid-template-columns: 75px 1fr; }
  .project-visual { grid-column: 2; margin: 0 40px 50px; }
  .service { grid-template-columns: 55px 1fr 1fr; padding: 26px 0; }
  .service > span { grid-column: 2 / -1; text-align: left; }
}

@media (max-width: 760px) {
  .site-header { height: 72px; position: sticky; top: 0; }
  .menu-toggle { display: block; cursor: pointer; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
  .site-header nav { position: absolute; left: 0; right: 0; top: 72px; display: none; padding: 24px; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-header nav.open { display: flex; }
  .site-header nav a { min-height: 50px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
  .site-header nav .language-toggle { min-height: 50px; justify-content: flex-start; border-bottom: 1px solid var(--line); }
  .site-header nav .nav-contact { margin-top: 18px; justify-content: center; border: 0; }
  .hero { min-height: 0; }
  .hero-copy { min-height: calc(100svh - 72px); padding: 90px 24px 70px; display: flex; flex-direction: column; justify-content: center; }
  h1 { font-size: clamp(45px,14vw,72px); }
  .intro { margin-top: 30px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 22px; }
  .vertical-note { display: none; }
  .system-map { min-height: 500px; }
  .orbit-two { width: 340px; height: 340px; }
  .statement { padding-left: 24px; padding-right: 24px; grid-template-columns: 1fr; }
  .statement .section-number, .statement > p:last-child { grid-column: 1; }
  .section-heading { grid-template-columns: 1fr; gap: 25px; margin-bottom: 42px; }
  .section-shell { padding-left: 24px; padding-right: 24px; }
  .project-feature { grid-template-columns: 1fr; }
  .project-meta { min-height: 62px; padding: 16px; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .project-meta span:nth-child(2) { writing-mode: initial; transform: none; }
  .project-main { padding: 40px 22px; }
  .project-visual { grid-column: 1; margin: 0 16px 18px; transform: none; }
  .project-visual pre { min-height: 260px; padding: 22px 18px; font-size: 10px; }
  .project-arrow { display: none; }
  .service { grid-template-columns: 45px 1fr; gap: 15px; }
  .service > p:not(.service-num), .service > span { grid-column: 2; }
  .service > p:not(.service-num) { margin: 0; }
  .about { grid-template-columns: 1fr; gap: 45px; }
  .about-mark { max-width: 360px; }
  .contact-actions { flex-direction: column; }
  footer { grid-template-columns: 1fr; padding-top: 45px; padding-bottom: 45px; }
  footer p:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
