:root {
  color-scheme: light dark;
  --ink: #080c15;
  --ink-raised: #111928;
  --ink-rule: #313d52;
  --paper: #f2efe7;
  --paper-raised: #faf8f2;
  --paper-rule: #d5d1c7;
  --body: #272b35;
  --muted: #4d535a;
  --ice: #d6e2f8;
  --blue: #214fac;
  --blue-light: #a3c5ff;
  --focus: #5786ee;
  --radius: 20px;
  --pill: 999px;
  --shell: min(1200px, calc(100% - clamp(44px, 13vw, 192px)));
  --section-space: clamp(84px, 12vw, 172px);
  --ease: cubic-bezier(.165,.84,.44,1);
  --sans: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .19em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
h2, h3 { line-height: 1.22; text-wrap: balance; }

.content-shell { width: var(--shell); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  clip-path: inset(50%);
  padding: 10px 18px;
  color: var(--ink);
  background: white;
  border-radius: 6px;
}
.skip-link:focus { clip-path: none; }

.header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  color: white;
}
.header-inner {
  width: min(1350px, calc(100% - clamp(40px, 10vw, 144px)));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: clamp(64px, 9vh, 89px);
  border-bottom: 1px solid #ffffff28;
}
.header-brand {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: center/cover url("./assets/logo-A.svg");
}
.site-nav { position: relative; }
.portfolio-menu summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding-inline: 12px;
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
}
.portfolio-menu summary::-webkit-details-marker { display: none; }
.portfolio-menu summary span { transition: transform .32s var(--ease); }
.portfolio-menu[open] summary span { transform: rotate(180deg); }
.portfolio-options {
  position: absolute;
  inset: 100% 0 auto auto;
  width: max-content;
  max-width: calc(100vw - 40px);
  padding: 8px;
  border: 1px solid #a3c5ff43;
  border-radius: 16px;
  background: #10192a;
  box-shadow: 0 16px 42px #0006;
  animation: menu-appear .32s var(--ease) both;
}
.portfolio-options a {
  display: flex;
  min-height: 44px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none;
  font-size: .92rem;
}
.portfolio-options a:hover,
.portfolio-options a:focus-visible { background: #263750; }
.portfolio-options a span { color: var(--blue-light); }
@keyframes menu-appear {
  from { opacity: 0; translate: 0 -6px; }
  to { opacity: 1; translate: 0 0; }
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
  overflow: clip;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  background: var(--ink);
  color: #f5f6fa;
}
.hero-visual,
.hero-visual img,
.hero-visual canvas,
.hero-visual::after,
.hero-light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-visual {
  z-index: -1;
  overflow: hidden;
  transform: scale(1.04) translateY(var(--hero-shift, 0px));
}
.hero-visual img {
  object-fit: cover;
  object-position: 69% 50%;
  transform: scale(1.13);
}
.hero-visual::after {
  content: "";
  background:
    linear-gradient(90deg,#060b15b0 0%,#060b1544 42%,transparent 80%),
    linear-gradient(0deg,#080c15 0%,transparent 26%,#080c1512 72%,#080c1577);
}
.hero-visual canvas {
  z-index: 1;
  visibility: hidden;
  opacity: .85;
  pointer-events: none;
}
.hero-visual canvas[data-rendered="true"] { visibility: visible; }
.hero-light {
  background:
    radial-gradient(ellipse at 70% 48%,#759fff48,transparent 38%),
    radial-gradient(ellipse at 32% 90%,#5b91ee2e,transparent 46%);
  mix-blend-mode: screen;
}
.hero-ripple {
  position: absolute;
  z-index: 2;
  width: min(45vw, 310px);
  aspect-ratio: 1;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  transform: translate(-50%, -50%) scale(.08);
  border: 1px solid #b5daffcf;
  border-radius: 50%;
  box-shadow: 0 0 16px #7bacff8c, inset 0 0 16px #7bacff74;
  opacity: 0;
}
.hero-copy {
  display: grid;
  justify-content: center;
  padding-block: clamp(102px, 18vh, 175px) 40px;
  pointer-events: none;
}
.hero h1 {
  display: inline-flex;
  justify-content: center;
  gap: .012em;
  font-family: "Bahnschrift", "Avenir Next Condensed", "Arial Narrow", Arial, var(--sans);
  font-size: clamp(1rem, 13.8vw, 13.4rem);
  line-height: .9;
  font-weight: 600;
  letter-spacing: -.021em;
  isolation: isolate;
}
.brand-letter {
  display: inline-block;
  color: #edf4ff;
  text-shadow: 0 10px 52px #081329a6;
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .hero { --wordmark-arrival: brand-arrival; }
}
.hero.motion-running, .motion-opt-in .hero { --wordmark-arrival: brand-arrival; }
.hero:not(.motion-off,.intro-shown) .brand-letter {
  animation: var(--wordmark-arrival, none) .85s var(--ease) both;
  animation-delay: calc(.48s + var(--letter) * .06s);
}
.hero.motion-running .hero-visual img {
  animation: visual-entry .92s var(--ease) both, visual-current 3s .92s ease-in-out forwards;
}
.hero.motion-running .hero-light {
  animation: light-current 3.8s ease-in-out both;
}
.hero.motion-suspended :is(.hero-visual img, .hero-light) { animation-play-state: paused; }
.hero.motion-off .hero-visual { transform: none; }
html.motion-off { scroll-behavior: auto; }
.motion-off .chapter-appearing .chapter-glyph { animation: none; }
.hero.motion-off #ambient { visibility: hidden; }
@keyframes brand-arrival {
  from { opacity: 0; transform: translateY(.34em) scaleY(1.12); clip-path: inset(100% 0 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 -12% -18%); }
}
@keyframes visual-entry {
  from { transform: translate3d(-5.2%, 4%, 0) scale(1.29); }
  to { transform: translate3d(-2.55%, 1.4%, 0) scale(1.13); }
}
@keyframes visual-current {
  from { transform: translate3d(-2.55%, 1.4%, 0) scale(1.13); }
  to { transform: translate3d(2.7%, -2.25%, 0) scale(1.25); }
}
@keyframes light-current {
  from { opacity: .3; transform: translate3d(-12%, -9%, 0) scale(1.06); }
  to { opacity: .95; transform: translate3d(7%, 7%, 0) scale(1.36); }
}
@keyframes chapter-arrival {
  from { opacity: 0; transform: translateY(.28em); }
  to { opacity: 1; transform: none; }
}
.chapter-glyph {
  display: inline-block;
}
.chapter-appearing .chapter-glyph {
  animation: chapter-arrival .55s var(--ease) both;
  animation-delay: calc(var(--letter) * .025s);
}
.chapter-link { margin-top: 27px; }
.ink .chapter-link { color: var(--blue-light); }
.ink .lede { color: var(--ice); }

.section { padding-block: var(--section-space); }
.paper { background: var(--paper); color: var(--body); }
.ink { background: var(--ink); color: #f1f3f8; }
.section-label {
  margin-bottom: clamp(17px, 3vw, 31px);
  font-size: .96rem;
  font-weight: 650;
  letter-spacing: .12em;
  color: var(--blue);
}
.ink .section-label { color: var(--blue-light); }
.section h2 {
  font-family: var(--serif);
  letter-spacing: -.04em;
  font-weight: 550;
  font-size: clamp(2.25rem, 6.4vw, 5.35rem);
}
.philosophy-grid {
  display: grid;
  grid-template-columns: minmax(145px, .34fr) minmax(0, 1fr);
  gap: clamp(25px, 6vw, 90px);
}
.philosophy-grid .section-label { padding-top: 12px; }
.lede {
  max-width: 42rem;
  color: var(--body);
  margin-top: clamp(25px, 4vw, 46px);
  font-size: clamp(1.07rem, 2vw, 1.29rem);
  line-height: 1.9;
}
.body-copy { max-width: 42rem; color: var(--muted); margin-top: 16px; font-size: 1rem; }
.business { padding-top: 0; }
.business .content-shell { padding-top: clamp(55px, 9vw, 110px); border-top: 1px solid var(--paper-rule); }
.service-grid, .work-grid {
  margin-top: clamp(34px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(15px, 2.6vw, 34px);
}
.service-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 5vw, 56px);
  border-radius: var(--radius);
  border: 1px solid var(--paper-rule);
  background: var(--paper-raised);
}
.service-card h3, .work-card h3 {
  margin-top: 24px;
  font-size: clamp(1.38rem, 3vw, 2.05rem);
  font-weight: 650;
  letter-spacing: -.025em;
}
.service-card p, .work-card p { margin-top: 15px; font-size: 1rem; color: var(--muted); }
.service-card .text-link { margin-top: auto; padding-top: 18px; }
.service-symbol { position: relative; width: 78px; height: 65px; }
.service-symbol span {
  position: absolute;
  border-radius: 10px;
  background: linear-gradient(145deg,#c6d7f8b0,#7ea2e851);
  border: 1px solid #4c74bd;
}
.site-symbol span { width: 63px; height: 44px; }
.site-symbol span:nth-child(1) { left: 14px; top: 0; }
.site-symbol span:nth-child(2) { left: 7px; top: 8px; }
.site-symbol span:nth-child(3) { left: 0; top: 16px; }
.data-symbol span { width: 63px; height: 14px; border-radius: 4px; }
.data-symbol span:nth-child(1) { left: 1px; top: 0; }
.data-symbol span:nth-child(2) { left: 8px; top: 20px; }
.data-symbol span:nth-child(3) { left: 15px; top: 40px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 650;
  font-size: .96rem;
}
.text-link span, .button span { transition: transform .25s var(--ease); }
.text-link:hover { text-decoration: underline; }
.text-link:hover span, .button:hover span { transform: translate(3px,-2px); }

.work-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
  background: var(--ink-raised);
  border: 1px solid var(--ink-rule);
  border-radius: var(--radius);
}
.work-card p { color: var(--ice); }
.work-card .text-link { color: var(--blue-light); margin-top: 10px; }
.work-image {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16/9;
  background: #101930;
}
.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.work-image:hover img { transform: scale(1.035); }
.work-image span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #080c15dc;
  border: 1px solid #ffffff62;
}
.csv-preview {
  inline-size: 100%;
  min-height: 160px;
  aspect-ratio: 16/9;
  border-radius: 12px;
  border: 1px solid #45618f;
  background: radial-gradient(ellipse at 90% 5%,#243f72,#0d1728 64%);
  padding: clamp(16px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
}
.csv-preview .data-caption { margin: 0; font-size: .95rem; font-weight: 650; }
.csv-row {
  display: flex;
  justify-content: space-between;
  gap: 5px 12px;
  flex-wrap: wrap;
  padding-block: 8px;
  border-top: 1px solid #e2edff38;
  font-size: .93rem;
}
.csv-row code, .csv-demo td { font-variant-numeric: tabular-nums; }
.csv-row code { min-width: 0; overflow-wrap: anywhere; }
.csv-row mark { background: #c2dcff; color: #102141; border-radius: 3px; padding-inline: 1px; }
.csv-demo { margin-top: 10px; }
.csv-demo summary { padding-block: 10px; min-height: 44px; color: var(--ice); cursor: pointer; }
.csv-demo table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .92rem; font-variant-numeric: tabular-nums; }
.csv-demo :is(td, th) { padding: 7px 5px; text-align: left; border-bottom: 1px solid var(--ink-rule); overflow-wrap: anywhere; }
.csv-demo thead th:first-child { width: 30%; }
.csv-demo thead th:last-child { width: 17%; }
.csv-demo p { font-size: .94rem; }

.contact .content-shell { text-align: center; }
.contact .lede { margin-inline: auto; }
.button {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  min-height: 48px;
  border-radius: var(--pill);
  background: var(--blue);
  color: white;
  text-decoration: none;
  font-weight: 650;
  transition: background-color .25s var(--ease);
}
.button:hover { background: #173978; }
.footer { border-top: 1px solid var(--paper-rule); background: var(--paper); color: var(--muted); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 13px 26px;
  padding-block: 22px;
  font-size: .95rem;
}
.footer-brand { font-weight: 700; color: var(--body); }
.footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }

@media (max-width: 760px) {
  .hero h1 { font-size: 16.4vw; }
  .hero-visual img { object-position: 65% center; }
  .hero-visual::after {
    background: linear-gradient(0deg,#080c15,transparent 27%,#080c1557 56%,#080c1586),linear-gradient(90deg,#080c155f,transparent 90%);
  }
  .philosophy-grid, .service-grid, .work-grid { grid-template-columns: minmax(0,1fr); }
  .philosophy-grid { gap: 0; }
  .philosophy-grid .section-label { padding-top: 0; }
  .footer-inner { align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.motion-opt-in) { scroll-behavior: auto; }
  :root:not(.motion-opt-in) :is(.hero-visual, .hero-visual img) { transform: none; }
  :root:not(.motion-opt-in) .hero-visual canvas { display: none; }
  :root:not(.motion-opt-in) :is(.portfolio-options, .chapter-appearing .chapter-glyph) { animation: none; }
  :root:not(.motion-opt-in) :is(.scroll-link, .portfolio-menu summary span, .text-link span, .button, .button span, .work-image img) {
    transition: none;
  }
  :root:not(.motion-opt-in) :is(.scroll-link:hover, .text-link:hover span, .button:hover span, .work-image:hover img) { transform: none; }
}

/* A brief ink accent travels across readable text without changing its metrics. */
::highlight(reading-ink) { color: var(--reading-ink, #19478b); }
.ink, .header, .hero, .button { --reading-ink: #a9deff; }
.csv-row mark { --reading-ink: #19478b; }
@media (forced-colors: active) {
  ::highlight(reading-ink) { color: currentColor; }
}

.opening-seam { position:absolute; inset:54% 14% auto; height:2px; opacity:0; background:linear-gradient(90deg,transparent,#d4e4ff 52%,transparent); pointer-events:none; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .opening-seam { animation: surface-opening 1.1s ease-out both; }
}
@keyframes surface-opening {
  0% { opacity:0; transform:scaleX(.03); }
  30% { opacity:.85; }
  78%, 100% { opacity:0; transform:scaleX(1); }
}
.morning { color:#eee7da; background:#232922; }
.morning-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.92fr); align-items:center; gap:clamp(28px,7vw,110px); }
.morning { --reading-ink:#ffe5a6; }
.morning .lede { color:#f2eadc; }
.morning .section-label { font-size:1rem; font-weight:650; color:#ffdfa5; }
.morning .body-copy { font-size:1.075rem; color:#eee7da; }
.morning h2 { font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-weight:500; line-height:1.35; }
.morning-print { margin:0; }
.morning-print img { width:100%; height:auto; display:block; }
.morning-print figcaption { margin-top:.8em; font-size:1rem; color:#eee7da; }
@media (max-width:760px) { .morning-layout { grid-template-columns:1fr; } }

@media (prefers-reduced-motion: reduce) {
  .hero .brand-letter, .hero.motion-running .hero-visual img, .hero.motion-running .hero-light { animation: none; }
}
