:root {
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --ink: #0E1620;            /* near-black with a navy cast — headings */
  --navy: #173A5E;
  --body: #3A4450;
  --mute: #6B7683;
  --line: #E4E8ED;
  --accent: #2F80ED;
  --accent-deep: #1A5FD0;
  --dark: #0B1C2E;           /* the one dark section + footer */
  --dark-line: #22344A;
  --dark-text: #AAB8C7;
  --logo-blue: #0055E6;      /* the accent square in the logo mark */
  --font-display: "Manrope", "Noto Sans JP", sans-serif;
  --font-body: "Inter", "Noto Sans JP", sans-serif;
  --font-jp: "Noto Sans JP", "Inter", sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --shadow-tile: 0 6px 24px rgba(14,22,32,.08), 0 2px 6px rgba(14,22,32,.05);
  --shadow-card: 0 2px 8px rgba(14,22,32,.06), 0 12px 32px rgba(14,22,32,.07);
  --header-h: 84px;
  --lh-text: 1.7;            /* running text; Japanese overrides below */
}
:root:lang(ja) { --lh-text: 1.9; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: 16px; line-height: var(--lh-text); color: var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
body:lang(ja) { font-family: var(--font-jp); line-break: strict; }
p[lang="en"] { font-family: var(--font-body); line-height: 1.7; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 48px; }
section { padding: 120px 0; }
a { text-decoration: none; color: inherit; }
[hidden] { display: none !important; }   /* the attribute must win over component display rules */
::selection { background: rgba(47,128,237,.22); }

:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; border-radius: 4px; }
.pill:focus-visible { border-radius: 999px; }
.services :focus-visible, .site-footer :focus-visible { outline-color: #9CC3FA; }
.skip-link { position: absolute; left: 16px; top: -72px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font: 600 14px var(--font-body); transition: top 160ms var(--ease); }
.skip-link:focus { top: 16px; }

.h-display { font: 800 clamp(40px, 6.4vw, 84px)/1.06 var(--font-display); letter-spacing: -.03em; color: var(--ink); }
.h-section { font: 800 clamp(32px, 4.4vw, 56px)/1.1 var(--font-display); letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
/* Japanese copy breaks between phrases, never inside a word: the build inserts <wbr> at phrase
   boundaries (BudouX) and keep-all stops the browser breaking anywhere else. */
.nb { white-space: nowrap; }
/* Japanese headlines: Noto Sans JP 700, no tracking, looser leading (guidelines 4.3) */
.h-section:lang(ja) { font-weight: 700; font-size: clamp(28px, 3.8vw, 48px); line-height: 1.4; letter-spacing: 0; font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: anywhere; }
.section-sub { max-width: 620px; margin-top: 24px; font-size: 16.5px; text-wrap: pretty; }
.section-sub:lang(ja) { word-break: keep-all; overflow-wrap: anywhere; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 64px; flex-wrap: wrap; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px var(--font-body); border-radius: 999px; padding: 14px 30px; cursor: pointer; transition: all 160ms var(--ease); border: 1.5px solid transparent; white-space: nowrap; }
.pill-primary { background: var(--accent); color: #fff; }
.pill-primary:hover { background: var(--accent-deep); }
.pill-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.pill-outline:hover { background: var(--ink); color: #fff; }

.circle-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font: 400 16px/1 var(--font-body); transition: all 160ms var(--ease); flex-shrink: 0; }

/* ---------- header ---------- */
.site-header { height: var(--header-h); background: rgba(247,248,250,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; align-items: center; position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid transparent; transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.site-header.scrolled, .site-header.menu-open { background: var(--bg); border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--font-display); color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
.wordmark .mark { height: 26px; width: auto; flex-shrink: 0; }
.wordmark .mark .accent { fill: var(--logo-blue); }
.nav { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 36px; align-items: center; font: 500 15px var(--font-body); color: var(--ink); }
.nav-links a:not(.pill) { opacity: .82; transition: opacity 150ms var(--ease); }
.nav-links a:not(.pill):hover { opacity: 1; }
.menu-cta { display: none; }
/* language pull-down: a native <details>, so it opens without scripting */
.lang { position: relative; font: 500 14px/1 var(--font-body); color: var(--ink); }
.lang summary { display: inline-flex; align-items: center; gap: 6px; margin: 0 -12px; padding: 10px 12px; border-radius: 999px; cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none; transition: background-color 150ms var(--ease); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: rgba(14,22,32,.06); }
.lang .globe { width: 16px; height: 16px; opacity: .8; }
.lang .chev { width: 12px; height: 12px; opacity: .7; transition: transform 160ms var(--ease); }
.lang[open] .chev { transform: rotate(180deg); }
.lang ul { position: absolute; top: calc(100% + 8px); right: -12px; z-index: 10; min-width: 168px; padding: 6px; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-card); }
.lang li a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 12px; border-radius: 6px; font-weight: 400; line-height: 1.2; color: var(--body); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.lang li a:hover { background: var(--bg); color: var(--ink); }
.lang li a[aria-current] { font-weight: 600; color: var(--ink); }
.lang li a[aria-current]::after { content: ""; width: 5px; height: 10px; margin-right: 4px; border: solid var(--accent-deep); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.menu-toggle { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform 200ms var(--ease), top 200ms var(--ease); }
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-open .menu-toggle span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

/* ---------- hero : big type left, mosaic right ---------- */
.hero { padding: 190px 0 130px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero .sub-lines { margin-top: 40px; max-width: 520px; font-size: 16.5px; color: var(--body); }
.hero .sub-lines .tagline { font-weight: 600; color: var(--ink); }
.hero .sub-lines .lead { margin-top: 4px; text-wrap: pretty; }
.hero .sub-lines .lead:lang(ja) { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.hero .cta-row { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

/* mosaic */
.mosaic { position: relative; aspect-ratio: 1 / 0.92; }
.mosaic .grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }
.mosaic .cell { border: 1px solid var(--line); margin: -0.5px; position: relative; }
.mosaic .cross { position: absolute; width: 13px; height: 13px; transform: translate(-50%, -50%); color: #C3CBD4; }
.mosaic .cross::before, .mosaic .cross::after { content: ""; position: absolute; background: currentColor; }
.mosaic .cross::before { left: 6px; top: 0; width: 1px; height: 13px; }
.mosaic .cross::after { left: 0; top: 6px; width: 13px; height: 1px; }
.cross.c1 { left: 25%; top: 25%; } .cross.c2 { left: 75%; top: 25%; } .cross.c3 { left: 50%; top: 50%; }
.cross.c4 { left: 25%; top: 75%; } .cross.c5 { left: 75%; top: 75%; }
.tile { position: absolute; border-radius: 4px; aspect-ratio: 1; }
.tile.raised { background: var(--white); box-shadow: var(--shadow-tile); }
.tile.flat-blue { background: var(--accent); }
.tile.flat-navy { background: var(--navy); }
.tile.flat-amber { background: #F2A93B; }
.tile.grad-1 { background: linear-gradient(140deg, #173A5E, #2F80ED); box-shadow: var(--shadow-tile); }
.tile.grad-2 { background: linear-gradient(160deg, #0B1C2E 30%, #1E5FA8); box-shadow: var(--shadow-tile); }
.tile.dots { background-image: radial-gradient(#C3CBD4 1.5px, transparent 1.5px); background-size: 12px 12px; }
.tile.bars { display: flex; flex-direction: column; gap: 6px; justify-content: center; padding: 14px; }
.tile.bars i { display: block; height: 7px; border-radius: 2px; background: #D8DEE5; }
.tile.bars i:nth-child(1) { width: 85%; } .tile.bars i:nth-child(2) { width: 60%; } .tile.bars i:nth-child(3) { width: 72%; }
.tile.t1  { left: 6%;  top: 8%;  width: 11%; } .tile.t2  { left: 27%; top: 2%;  width: 21%; }
.tile.t3  { left: 63%; top: 9%;  width: 17%; } .tile.t4  { left: 82%; top: 4%;  width: 13%; }
.tile.t5  { left: 38%; top: 30%; width: 19%; } .tile.t6  { left: 60%; top: 33%; width: 15%; }
.tile.t7  { left: 79%; top: 28%; width: 8%;  } .tile.t8  { left: 8%;  top: 38%; width: 16%; }
.tile.t9  { left: 20%; top: 58%; width: 14%; } .tile.t10 { left: 48%; top: 60%; width: 12%; }
.tile.t11 { left: 66%; top: 62%; width: 18%; } .tile.t12 { left: 34%; top: 80%; width: 11%; }
.tile.t13 { left: 56%; top: 84%; width: 7%;  }
.v-label { position: absolute; writing-mode: vertical-rl; font: 600 10px var(--font-body); letter-spacing: .22em; color: #A6B0BB; text-transform: uppercase; }
.v-label.l1 { right: 2%; top: 44%; } .v-label.l2 { left: 2%; top: 66%; }

/* ---------- hero scene : sand condenses into the logo ---------- */
/* Default (no scripting, no WebGL, reduced motion): the plain hero with the CSS mosaic.
   scene.js adds .live to run the sand scene behind the hero, or .static when it cannot. */
.hero canvas { display: none; }
.js .hero:not(.live):not(.static) .mosaic { visibility: hidden; }   /* no flash of the fallback before the scene starts */
.hero.live { position: relative; padding: 0; min-height: 100vh; min-height: 100svh; }
.hero.live .hero-stick { position: relative; min-height: inherit; display: flex; }
.hero.live canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.hero.live .container { position: relative; display: flex; align-items: center; width: 100%; padding-top: var(--header-h); padding-bottom: 56px; }
.hero.live .mosaic { display: none; }
.hero.live .hero-copy { max-width: 640px; }
@media (max-width: 900px) {
  .hero.live .container { align-items: flex-end; padding-bottom: max(40px, 8svh); }
  .hero.live .hero-copy { max-width: none; }
}

/* ---------- business domain ---------- */
.domain { position: relative; background: var(--white); }
.domain::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 80% at 70% 20%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 20%, black 20%, transparent 75%); }
.domain .container { position: relative; }
.domain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
/* The card grows past its aspect ratio when copy runs long: no overflow:hidden (that would clip instead),
   and min-width:0 so the taller content cannot push the ratio back into the column width. */
.domain-card { position: relative; isolation: isolate; min-width: 0; border-radius: 10px; aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: flex-end; padding: 64px 24px 24px; color: #fff; }
.domain-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(to top, rgba(6,14,23,.8) 0%, rgba(6,14,23,.3) 55%, transparent 100%); }
.domain-card .art { position: absolute; inset: 0; z-index: -2; overflow: hidden; border-radius: inherit;
  -webkit-mask-image: linear-gradient(to top, transparent 8%, #000 62%); mask-image: linear-gradient(to top, transparent 8%, #000 62%); }
.domain-card .art svg { position: absolute; top: 0; right: 0; width: 100%; height: 100%; }
.domain-card .num { position: absolute; top: 20px; left: 22px; font: 700 13px var(--font-display); letter-spacing: .06em; }
.domain-card h3 { font: 800 21px/1.25 var(--font-display); letter-spacing: -.01em; }
.domain-card .sub { margin-top: 4px; font: 500 12.5px/1.6 var(--font-jp); color: rgba(255,255,255,.85); }
.domain-card .desc { margin-top: 12px; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.88); text-wrap: pretty; }
.domain-card .desc:lang(ja) { font-size: 13px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
/* four across: reserve three lines so titles sit on one line across the row */
@media (min-width: 1081px) {
  .domain-card .desc { min-height: calc(6 * 1.6em); }
  .domain-card .desc:lang(ja) { min-height: calc(5 * 1.75em); }
}
/* a soft light from the top-right corner gives each illustration depth */
.dc-1 { background: radial-gradient(90% 70% at 100% 0%, rgba(47,128,237,.5), transparent 70%), linear-gradient(160deg, #173A5E, #0E2238); }
.dc-2 { background: radial-gradient(90% 70% at 100% 0%, rgba(30,95,168,.6), transparent 70%), linear-gradient(160deg, #10263C, #0B1C2E); }
.dc-3 { background: radial-gradient(90% 70% at 100% 0%, rgba(111,168,245,.45), transparent 70%), linear-gradient(160deg, #1B4470, #12304F); }
.dc-4 { background: radial-gradient(90% 70% at 100% 0%, rgba(53,97,143,.65), transparent 70%), linear-gradient(160deg, #16283C, #0E1A28); }

/* ---------- services : the one dark section ---------- */
.services { background: var(--dark); color: var(--dark-text); }
.services .h-section { color: #fff; }
.services .section-sub { color: var(--dark-text); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc-card { min-width: 0; background: #10263C; border: 1px solid var(--dark-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform 200ms var(--ease), border-color 200ms var(--ease); }
.svc-card:hover { transform: translateY(-4px); border-color: #3D5A7C; }
.svc-card .cover { aspect-ratio: 16 / 9; display: flex; align-items: flex-end; padding: 20px; position: relative; }
.svc-card .cover .num { position: absolute; top: 16px; left: 20px; font: 700 12px var(--font-display); color: rgba(255,255,255,.8); letter-spacing: .06em; }
.svc-card .cover h3 { font: 800 20px/1.3 var(--font-display); color: #fff; letter-spacing: -.01em; }
.svc-card .cover { overflow: hidden; isolation: isolate; }
.svc-card .cover .sub { margin-top: 4px; font: 500 12.5px/1.6 var(--font-jp); color: rgba(255,255,255,.88); }
.svc-card .cover .photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.05); transition: transform 600ms var(--ease); }
/* navy tint over the photograph keeps the title readable and ties it to the brand */
.svc-card .cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(6,14,23,.88) 0%, rgba(6,14,23,.42) 52%, rgba(6,14,23,.18) 100%), linear-gradient(140deg, rgba(23,58,94,.62), rgba(47,128,237,.2)); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) { .svc-card:hover .cover .photo { transform: scale(1.05); } }
.sc-1 .cover { background: linear-gradient(140deg, #14304F, #2F80ED 160%); }
.sc-2 .cover { background: linear-gradient(140deg, #0D2036, #1E5FA8 170%); }
.sc-3 .cover { background: linear-gradient(140deg, #16283C, #6FA8F5 220%); }
.svc-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.svc-card .body p { font-size: 14.5px; line-height: 1.7; flex: 1; }
.svc-card .body p:lang(ja) { line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.svc-card .more { display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 600 13.5px/1.4 var(--font-body); color: #fff; }
.svc-card:hover .circle-arrow { background: var(--accent); border-color: var(--accent); }

/* ---------- why dApp Technology : white raised tiles ---------- */
.why { background: var(--bg); }
.why .layout { display: grid; grid-template-columns: 2.4fr 1fr; gap: 64px; align-items: start; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.why-card { min-width: 0; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-tile); padding: 28px 28px 30px; }
.why-card .num { display: block; font: 700 12px var(--font-display); letter-spacing: .06em; color: var(--accent-deep); }
.why-card h3 { margin: 14px 0 8px; font: 800 18px/1.35 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.why-card h3:lang(ja) { font-weight: 700; font-size: 17px; line-height: 1.5; letter-spacing: 0; word-break: keep-all; overflow-wrap: anywhere; }
.why-card p { font-size: 14.5px; line-height: 1.7; text-wrap: pretty; }
.why-card p:lang(ja) { line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.why .side-note { position: sticky; top: 120px; padding-top: 22px; border-top: 2px solid var(--accent); font-size: 16px; font-weight: 500; color: var(--ink); text-wrap: pretty; }
.why .side-note:lang(ja) { font-size: 15px; word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- contact ---------- */
.contact { background: var(--white); text-align: center; padding: 140px 0; }
.contact .body { max-width: 560px; margin: 24px auto 44px; text-wrap: balance; }
.contact .body:lang(ja) { max-width: 600px; word-break: keep-all; overflow-wrap: anywhere; }
.contact .promise { display: block; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; max-width: 640px; margin: 0 auto; text-align: left; }
.contact-form .wide { grid-column: 1 / -1; }
.contact-form .hp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-form label { display: block; margin-bottom: 8px; font: 600 13.5px/1.4 var(--font-body); color: var(--ink); }
.contact-form .optional { margin-left: 4px; font-weight: 400; color: var(--mute); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea { display: block; width: 100%; padding: 14px 16px; font: 400 16px/1.5 var(--font-body); color: var(--ink); background: var(--white); border: 1px solid #8E99A6; border-radius: 8px; -webkit-appearance: none; appearance: none; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.contact-form :lang(ja):is(input, textarea) { font-family: var(--font-jp); }
.contact-form textarea { min-height: 148px; resize: vertical; }
.contact-form input:hover, .contact-form textarea:hover { border-color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent-deep); box-shadow: 0 0 0 3px rgba(47,128,237,.28); }
.contact-form [aria-invalid="true"] { border-color: #C2362F; }
.contact-form [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(194,54,47,.22); }
.contact-form .error { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: #C2362F; }
.contact-form .actions { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 6px; }
.contact-form .actions .error { margin-top: 0; }
.contact-form button { font-family: var(--font-body); }
.contact-form button[disabled] { opacity: .65; cursor: progress; }
.form-success { max-width: 560px; margin: 0 auto; padding: 40px 32px; background: var(--bg); border-radius: 10px; outline: none; }
.form-success .tick { display: inline-flex; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 50%; background: var(--accent); position: relative; }
.form-success .tick::after { content: ""; position: absolute; left: 16px; top: 10px; width: 9px; height: 17px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.form-success h3 { font: 800 21px/1.35 var(--font-display); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.form-success h3:lang(ja) { font-weight: 700; font-size: 19px; line-height: 1.6; letter-spacing: 0; word-break: keep-all; overflow-wrap: anywhere; }
.form-success p { margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-text); padding: 96px 0 56px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 3fr; gap: 48px; margin-bottom: 72px; }
.site-footer .wordmark { color: #fff; margin-bottom: 16px; }
.site-footer .brand p { font-size: 14px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.site-footer h2 { font: 600 12.5px/1.5 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.site-footer h2:lang(ja) { font-size: 13px; letter-spacing: 0; }
.site-footer ul { list-style: none; }
.site-footer li { font-size: 14px; line-height: 1.7; padding: 5px 0; }
.site-footer li a { transition: color 150ms var(--ease); }
.site-footer li a:hover { color: #fff; }
.site-footer li a[href^="mailto:"] { overflow-wrap: anywhere; }
.site-footer .creds { border-top: 1px solid var(--dark-line); padding-top: 32px; font-size: 13px; line-height: 1.7; display: flex; gap: 12px 32px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- 404 ---------- */
.not-found { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 56px) 0 96px; }
.not-found .container { width: 100%; }
.not-found .code { font: 700 13px var(--font-display); letter-spacing: .06em; color: var(--accent-deep); margin-bottom: 16px; }
.not-found .body { max-width: 560px; margin-top: 20px; }
.not-found .body:lang(ja) { margin-top: 8px; font-family: var(--font-jp); line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.not-found .cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; }

/* ---------- motion ----------
   Everything below is gated on .js (so no-script visitors see the finished page), on
   prefers-reduced-motion, and on :not(.no-anim) for entrances (so a language switch never replays them). */
.h-display .line > span { display: block; }
.js .h-display .line { overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.tile.t1 { --i: 0; --z: 1.0; --fd: 6.2s; }
.tile.t2 { --i: 1; --z: 1.8; --fd: 7.4s; }
.tile.t3 { --i: 2; --z: 1.2; --fd: 5.6s; }
.tile.t4 { --i: 3; --z: 0.6; --fd: 8.0s; }
.tile.t5 { --i: 4; --z: 1.5; --fd: 6.8s; }
.tile.t6 { --i: 5; --z: 1.9; --fd: 7.0s; }
.tile.t7 { --i: 6; --z: 0.8; --fd: 5.8s; }
.tile.t8 { --i: 7; --z: 0.5; --fd: 8.4s; }
.tile.t9 { --i: 8; --z: 1.3; --fd: 6.4s; }
.tile.t10 { --i: 9; --z: 1.6; --fd: 7.2s; }
.tile.t11 { --i: 10; --z: 2.0; --fd: 6.0s; }
.tile.t12 { --i: 11; --z: 0.9; --fd: 7.8s; }
.tile.t13 { --i: 12; --z: 0.7; --fd: 5.4s; }
.mosaic { transform-style: preserve-3d; will-change: transform; }
.js .mosaic .tile { will-change: translate; }   /* moved by site.js: depth shifts and shadows follow the pointer */

@keyframes line-up { from { transform: translateY(110%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes tile-in { from { opacity: 0; transform: translateY(18px) scale(.9); } }
@keyframes tile-float { from { transform: translateY(0); } to { transform: translateY(-7px); } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.5); } }
@keyframes cursor-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  /* hero: headline lines rise, copy and buttons follow, tiles assemble then drift */
  .js:not(.no-anim) .h-display .line > span { animation: line-up 900ms var(--ease) calc(80ms + var(--n) * 110ms) backwards; }
  .js:not(.no-anim) .hero .sub-lines { animation: fade-up 800ms var(--ease) 480ms backwards; }
  .js:not(.no-anim) .hero .cta-row { animation: fade-up 800ms var(--ease) 600ms backwards; }
  .js:not(.no-anim) .tile { animation: tile-in 750ms var(--ease) calc(160ms + var(--i) * 70ms) backwards, tile-float var(--fd) ease-in-out calc(1600ms + var(--i) * 120ms) infinite alternate; }
  .js.no-anim .tile { animation: tile-float var(--fd) ease-in-out calc(var(--i) * 120ms) infinite alternate; }

  /* card illustrations: draw and assemble once, when the card scrolls into view */
  .js .art :is(.pop, .fade, .grow, .grow-y, .draw) { transition: opacity 600ms var(--ease), transform 650ms var(--ease), stroke-dashoffset 1100ms var(--ease); transition-delay: calc(320ms + var(--i, 0) * 120ms); }
  .js .art .pop { transform-box: fill-box; transform-origin: center; }
  .js .art .grow-y { transform-box: fill-box; transform-origin: center bottom; }
  .js .art .grow { transform-box: fill-box; transform-origin: left center; }
  .js .art .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
  .js:not(.no-anim) :is(.domain-card, .svc-card):not(.visible) .art .pop { opacity: 0; transform: scale(.6); }
  .js:not(.no-anim) :is(.domain-card, .svc-card):not(.visible) .art .grow { opacity: 0; transform: scaleX(0); }
  .js:not(.no-anim) :is(.domain-card, .svc-card):not(.visible) .art .grow-y { opacity: 0; transform: scaleY(0); }
  .js:not(.no-anim) :is(.domain-card, .svc-card):not(.visible) .art .fade { opacity: 0; }
  .js:not(.no-anim) :is(.domain-card, .svc-card):not(.visible) .art .draw { opacity: 0; stroke-dashoffset: 1; }
  .js .art .blink { animation: cursor-blink 1.1s steps(1) 2.4s infinite; }

  /* micro-interactions */
  .pill:active { transform: scale(.97); }
  .svc-card:hover .circle-arrow { transform: translateX(3px); }
  .lang[open] ul { animation: menu-in 170ms var(--ease); }
  .form-success .tick { animation: pop-in 480ms var(--ease); }
  .form-success .tick::after { animation: pop-in 320ms var(--ease) 240ms backwards; }
}
.contact-form label { transition: color 150ms var(--ease); }
.contact-form .field:focus-within label { color: var(--accent-deep); }

/* ---------- reveal (only once scripting is confirmed, so content never stays hidden) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 450ms var(--ease), transform 450ms var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }
.js .domain-grid .reveal:nth-child(2), .js .svc-grid .reveal:nth-child(2), .js .why-grid .reveal:nth-child(even) { transition-delay: 70ms; }
.js .domain-grid .reveal:nth-child(3), .js .svc-grid .reveal:nth-child(3) { transition-delay: 140ms; }
.js .domain-grid .reveal:nth-child(4) { transition-delay: 210ms; }
/* arriving from a language switch: show the page as it was, without replaying entrances */
.js.no-anim .reveal { opacity: 1; transform: none; transition: none; }

/* language switch cross-fades between the two documents where supported */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .svc-card, .svc-card:hover { transform: none; }
  @view-transition { navigation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav, .nav-links { gap: 28px; }
  .domain-grid { grid-template-columns: repeat(2, 1fr); }
  .domain-card { aspect-ratio: 16 / 10; }
  /* wide cards: copy runs under the illustration's left side, so let it fade out from the top-right corner */
  .domain-card .art { -webkit-mask-image: radial-gradient(115% 115% at 100% 0%, #000 28%, transparent 68%); mask-image: radial-gradient(115% 115% at 100% 0%, #000 28%, transparent 68%); }
  .why .layout { grid-template-columns: 1fr; gap: 40px; }
  .why .side-note { position: static; max-width: 620px; }
  .site-footer .cols { grid-template-columns: 1.4fr 3fr; }
  .footer-nav { gap: 32px; }
}
@media (max-width: 960px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc-card { flex-direction: row; }
  .svc-card .cover { flex: 0 0 38%; aspect-ratio: auto; min-height: 190px; }
}
@media (max-width: 900px) {
  :root { --header-h: 68px; }
  html { scroll-padding-top: 20px; }
  .hero { padding: 150px 0 96px; }
  .hero .container { grid-template-columns: 1fr; gap: 56px; }
  .mosaic { width: 100%; max-width: 560px; }
  .nav { gap: 8px; }
  .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 48px 32px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 32px rgba(14,22,32,.08); font-size: 17px; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s linear 180ms; }
  .menu-open .nav-links { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-links a:not(.pill) { padding: 16px 0; border-bottom: 1px solid var(--line); opacity: 1; }
  .nav-links .menu-cta { display: inline-flex; margin-top: 28px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  section { padding: 76px 0; }
  .hero { padding: 132px 0 72px; }
  .hero .sub-lines { margin-top: 28px; }
  .hero .cta-row { margin-top: 32px; }
  .nav-links { padding: 8px 24px 28px; }
  .section-head { margin-bottom: 44px; }
  .contact { padding: 96px 0; }
  .site-footer { padding: 72px 0 44px; }
  .site-footer .cols { gap: 44px; margin-bottom: 56px; }
}
@media (max-width: 640px) {
  .domain-grid { grid-template-columns: 1fr; }
  .domain-card { aspect-ratio: 16 / 9; }
  .svc-card { flex-direction: column; }
  .svc-card .cover { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .why-grid { grid-template-columns: 1fr; }
  .why-card { padding: 24px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .actions .pill { width: 100%; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
}
@media (max-width: 480px) {
  .wordmark { font-size: 19px; gap: 8px; }
  .wordmark .mark { height: 22px; }
  .lang .globe { display: none; }
  .hero .cta-row .pill { flex: 1 1 auto; }
  .pill { padding: 14px 26px; }
}
@media (max-width: 340px) {
  .wordmark { font-size: 17px; }
}
