/* 8NAKAMA — EIGHT DESIGN partner network
   Tone matched to eightdesign.co.jp: near-white paper, #212121 ink & night bands,
   Unbounded (Latin display) + Zen Kaku Gothic New (Japanese) + Playwrite US Trad (one script accent).
   Accent: EIGHT DESIGN orange, used for places (pins, the town word, the 8). */

/* ---------- tokens ---------- */
:root {
  --paper: #FAFAFA;
  --paper-2: #F1F1EF;
  --white: #FFFFFF;
  --ink: #212121;
  --ink-2: #545454;
  --ink-3: #8A8A8A;
  --line: #E1E1DE;
  --night: #212121;
  --night-2: #2C2C2C;
  --on-night: #FAFAFA;
  --on-night-2: #A9A9A6;
  --accent: #F16824;
  --accent-ink: #B5470F;          /* accent for small text on paper (AA) */
  --accent-tint: #FCE3D5;

  --c-renovation: #01AB77;
  --c-newhouse: #9474F7;
  --c-shop: #F16824;
  --c-office: #F7D843;
  --c-city: #4594E3;

  --f-en: "Unbounded", "Zen Kaku Gothic New", system-ui, sans-serif;
  --f-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  --f-script: "Playwrite US Trad", cursive;

  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px; --s11: 176px;
  --gutter: clamp(16px, 4vw, 56px);
  --hd-h: 72px;
  --sec-y: clamp(96px, 13vw, 200px);

  /* type scale (≈1.25) */
  --t-xs: 11px; --t-sm: 13px; --t-md: 15px; --t-lg: 18px; --t-xl: clamp(20px, 1.9vw, 24px);
  --t-2xl: clamp(26px, 2.8vw, 36px);
  --t-h: clamp(40px, 6.2vw, 92px);
  --t-display: clamp(34px, 9.4vw, 168px);   /* "FIND YOUR 8" must fit one line at any width */

  --r-sm: 10px; --r-md: 20px; --r-pill: 999px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --d-fast: 200ms; --d-mid: 420ms;
}
@media (max-width: 760px) { :root { --hd-h: 60px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--hd-h); overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-jp); font-weight: 500; font-size: var(--t-md); line-height: 1.9; letter-spacing: .04em;
  word-break: keep-all; overflow-wrap: anywhere; line-break: strict;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
[lang="en"] { letter-spacing: 0; overflow-wrap: normal; }   /* Latin words break at spaces only */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--white); }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.sr-only--focus:focus { position: fixed !important; top: var(--s3); left: var(--s3); width: auto; height: auto; clip: auto; clip-path: none; z-index: 100; padding: var(--s2) var(--s4); background: var(--ink); color: var(--paper); border-radius: var(--r-pill); }
.nowrap { white-space: nowrap; }
.br-sp { display: none; }
@media (max-width: 760px) { .br-sp { display: inline; } }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.sec { position: relative; padding-block: var(--sec-y); }

/* ---------- shared type ---------- */
.label {
  display: flex; align-items: center; gap: var(--s3);
  font-family: var(--f-en); font-weight: 600; font-size: var(--t-xs); letter-spacing: .14em; color: var(--ink-2);
  margin-bottom: var(--s6);
}
.label::after { content: ""; width: 48px; height: 1px; background: currentColor; opacity: .5; }
.label__n { color: var(--accent-ink); }
.label--on-night { color: var(--on-night-2); }
.label--on-night .label__n { color: var(--accent); }

.h-xl {
  font-family: var(--f-jp); font-weight: 900; font-size: var(--t-h); line-height: 1.22; letter-spacing: -.01em;
  font-feature-settings: "palt";
}
.h-display {
  font-family: var(--f-en); font-weight: 800; font-size: var(--t-display); line-height: .92; letter-spacing: -.035em;
}
.eight { color: var(--accent); }
.script { font-family: var(--f-script); font-style: normal; font-weight: 300; letter-spacing: 0; text-transform: none; }

/* line-mask reveal (JS adds .is-in) */
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln__in { display: inline-block; }
.js .ln__in { transform: translateY(105%); }
.js [data-fade], .js [data-rise] { opacity: 0; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  position: relative; display: inline-flex; align-items: center; gap: var(--s3);
  min-height: 56px; padding: 0 var(--s6); border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: var(--t-md); letter-spacing: .06em; line-height: 1.2;
  overflow: hidden; isolation: isolate; will-change: transform;
  transition: color var(--d-mid) var(--ease-out);
}
.btn::before {   /* fill sweep */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent); transform: translateY(101%); transition: transform var(--d-mid) var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn .arr { font-style: normal; font-family: var(--f-en); font-weight: 600; transition: transform var(--d-mid) var(--ease-out); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn:hover .arr--down { transform: translateY(4px); }
.btn:hover .arr--up { transform: translateY(-4px); }
.btn--ink { }
.btn--accent { --bg: var(--accent); --fg: var(--ink); }
.btn--accent::before { background: var(--ink); }
.btn--accent:hover { color: var(--paper); }
.btn--line { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--line::before { background: var(--ink); }
.btn--line:hover { color: var(--paper); }
.btn--text { --bg: transparent; --fg: var(--ink); padding-inline: var(--s2); min-height: 44px; }
.btn--text::before { display: none; }
.btn--text span { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; transition: background-size var(--d-mid) var(--ease-out); }
.btn--text:hover span { background-size: 0 1.5px; background-position: 100% 100%; }

.arr { font-style: normal; }

/* ---------- eyes (EIGHT DESIGN's character) ---------- */
.eyes { position: relative; display: inline-block; aspect-ratio: 143 / 87; }
.eyes svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.eyes__parts { position: absolute; inset: 0; will-change: transform; }
.eyes__smile { opacity: 0; }
.eyes.is-smile .eyes__default { opacity: 0; }
.eyes.is-smile .eyes__smile { opacity: 1; }
.eyes.is-blink .eyes__parts { transform: scaleY(.12) !important; transform-origin: 50% 50%; }
.eyes--sm { width: 44px; }
.eyes--lg { width: min(300px, 62vw); }

/* ---------- header ---------- */
.hd {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--hd-h);
  display: flex; align-items: center; gap: var(--s6); padding-inline: var(--gutter);
  transition: transform var(--d-mid) var(--ease-out), background-color var(--d-mid), box-shadow var(--d-mid);
}
.hd.is-scrolled { background: color-mix(in srgb, var(--paper) 94%, transparent); box-shadow: 0 1px 0 var(--line); }
.hd.is-hidden { transform: translateY(-100%); }
.hd__brand { display: flex; align-items: center; gap: var(--s3); margin-right: auto; }
.hd__logo { width: 156px; height: auto; color: var(--ink); }
.hd__tag {
  font-family: var(--f-en); font-weight: 700; font-size: 10px; letter-spacing: .08em; line-height: 1;
  padding: 5px 8px 5px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper);
}
.hd__nav { display: flex; gap: var(--s5); font-family: var(--f-en); font-weight: 600; font-size: 12px; letter-spacing: .06em; }
.hd__nav a { position: relative; padding-block: var(--s2); }
.hd__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform var(--d-mid) var(--ease-out); }
.hd__nav a:hover::after, .hd__nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.hd__cta {
  display: inline-flex; align-items: center; gap: var(--s2); height: 40px; padding: 0 6px 0 18px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper); font-family: var(--f-en); font-weight: 600; font-size: 11px; letter-spacing: .06em;
  transition: background-color var(--d-fast);
}
.hd__cta:hover { background: #000; }
.hd__cta .eyes { margin-right: -14px; filter: drop-shadow(0 0 0 transparent); }
.hd__cta .eyes__base path:first-child { fill: var(--accent); }
.hd__menu { display: none; align-items: center; gap: var(--s3); height: 40px; padding: 0 var(--s4); border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-family: var(--f-en); font-weight: 600; font-size: 11px; letter-spacing: .08em; }
.hd__bars { position: relative; width: 16px; height: 8px; }
.hd__bars i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform var(--d-mid) var(--ease-out); }
.hd__bars i:first-child { top: 0; } .hd__bars i:last-child { bottom: 0; }
.hd__menu[aria-expanded="true"] .hd__bars i:first-child { transform: translateY(3.25px) rotate(45deg); }
.hd__menu[aria-expanded="true"] .hd__bars i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 40; background: var(--ink); color: var(--paper);
  padding: calc(var(--hd-h) + var(--s7)) var(--gutter) var(--s7);
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 600ms var(--ease-out), visibility 0s 600ms;
}
.drawer.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 600ms var(--ease-out), visibility 0s; }
.drawer nav { display: grid; gap: var(--s4); }
.drawer nav a { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding-block: var(--s3); border-bottom: 1px solid #3A3A3A; font-family: var(--f-en); font-weight: 700; font-size: clamp(30px, 9vw, 44px); line-height: 1.1; }
.drawer nav small { font-family: var(--f-jp); font-size: var(--t-sm); font-weight: 700; color: var(--on-night-2); }
.drawer__foot { font-family: var(--f-en); font-size: 12px; color: var(--on-night-2); }

@media (max-width: 1080px) {
  .hd__nav { display: none; }
  .hd__menu { display: inline-flex; }
  .hd { gap: var(--s3); }
}
@media (max-width: 760px) {
  .hd__cta { display: none; }
  .hd__logo { width: 132px; }
}

/* vertical side labels (as on eightdesign.co.jp) */
.side {
  position: fixed; top: 50%; z-index: 30; margin: 0;
  font-family: var(--f-en); font-weight: 600; font-size: 9px; letter-spacing: .16em; line-height: 1; color: var(--ink);
  writing-mode: vertical-rl; transform: translateY(-50%); pointer-events: none;
  mix-blend-mode: difference; filter: invert(1);
}
.side--l { left: 18px; transform: translateY(-50%) rotate(180deg); }
.side--r { right: 18px; }
@media (max-width: 1180px) { .side { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding: calc(var(--hd-h) + var(--s6)) var(--gutter) var(--s8);
}
.hero__map { position: absolute; top: 0; bottom: 0; right: 0; left: 44%; }
.hero__canvas { width: 100%; height: 100%; }
.hero__pinlabel {
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2;
  font-family: var(--f-en); font-weight: 700; font-size: 11px; letter-spacing: .1em; line-height: 1;
  transform: translate(-50%, -50%); opacity: 0;
}
.hero__pinlabel span { display: block; padding: 6px 10px 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); white-space: nowrap; transform: translate(0, -24px); }
.hero__copy { position: relative; z-index: 3; max-width: min(700px, 45vw); }
.eyebrow { display: flex; align-items: center; gap: var(--s2); font-family: var(--f-en); font-weight: 600; font-size: var(--t-xs); letter-spacing: .14em; color: var(--ink-2); margin-bottom: var(--s5); }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.hero__display { display: block; font-family: var(--f-en); font-weight: 800; font-size: clamp(46px, 5.5vw, 104px); line-height: .94; letter-spacing: -.035em; }
.hero__display .ln--town { font-size: .5em; letter-spacing: -.01em; margin-top: .22em; color: var(--accent); }
.hero__display .script { font-size: 1.05em; color: var(--ink); margin-right: .1em; }
.roll { position: relative; display: inline-block; vertical-align: bottom; overflow: hidden; height: 1.08em; line-height: 1.08; transition: width 520ms var(--ease-out); }
.roll__w { display: inline-block; white-space: nowrap; }
.roll__w + .roll__w { position: absolute; left: 0; top: 0; }
.roll__w i { display: inline-block; font-style: normal; }
.roll__dot { color: var(--ink); }
.hero__lead { margin-top: var(--s6); font-weight: 900; font-size: var(--t-2xl); line-height: 1.4; letter-spacing: .02em; font-feature-settings: "palt"; }
.hero__text { margin-top: var(--s4); max-width: 30em; color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); margin-top: var(--s6); }
.hero__scroll {
  position: absolute; left: var(--gutter); bottom: var(--s5); z-index: 3;
  display: flex; align-items: center; gap: var(--s3);
  font-family: var(--f-en); font-weight: 600; font-size: 10px; letter-spacing: .16em; color: var(--ink-2);
}
.hero__scroll i { position: relative; width: 56px; height: 1px; background: var(--line); overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--ink); animation: scrollcue 2.2s var(--ease-io) infinite; }
@keyframes scrollcue { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

@media (max-width: 900px) {
  .hero { display: block; min-height: 0; padding-top: calc(var(--hd-h) + min(96vw, 50svh)); }
  .hero__map { top: var(--hd-h); bottom: auto; left: 0; right: 0; height: min(96vw, 50svh); }
  .hero__copy { max-width: none; }
  .hero__scroll { display: none; }
}
@media (max-width: 760px) {
  .hero { padding-bottom: var(--s9); }
  .hero__display { font-size: clamp(36px, 11.2vw, 68px); }
  .hero__lead { font-size: 24px; }
  .hero__text { font-size: 14px; }
  .hero__actions .btn--ink { width: 100%; justify-content: space-between; }
}

/* ---------- ticker ---------- */
.tk { position: relative; z-index: 2; background: var(--night); color: var(--on-night); overflow: hidden; padding-block: clamp(18px, 2.4vw, 30px); }
.tk__track { display: flex; width: max-content; will-change: transform; }
.tk__set { display: flex; align-items: center; flex: none; }
.tk__w { font-family: var(--f-en); font-weight: 700; font-size: clamp(28px, 4.4vw, 64px); line-height: 1; letter-spacing: -.02em; padding-inline: clamp(16px, 2vw, 32px); }
.tk__w:nth-child(4n+3) { color: transparent; -webkit-text-stroke: 1.2px var(--on-night); }
.tk__8 { display: inline-flex; width: clamp(14px, 1.6vw, 22px); color: var(--accent); }
.tk__8 svg { width: 100%; height: auto; }

/* ---------- concept ---------- */
.concept__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7) var(--s8); align-items: end; }
.concept__body { display: grid; gap: var(--s4); color: var(--ink-2); max-width: 34em; }
.concept__photo { position: relative; margin: var(--s9) var(--gutter) 0; }
.concept__img { position: relative; overflow: hidden; border-radius: var(--r-md); aspect-ratio: 16 / 8; background: var(--paper-2); }
.concept__img img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; }
.js .concept__photo[data-clip] .concept__img { clip-path: inset(8% 8% 8% 8% round var(--r-md)); }
.sticker {
  position: absolute; right: clamp(16px, 6vw, 96px); bottom: clamp(-36px, -3vw, -20px);
  display: grid; place-items: center; text-align: center; width: clamp(108px, 12vw, 168px); aspect-ratio: 1;
  border-radius: 50%; background: var(--accent); color: var(--ink);
  font-family: var(--f-en); font-weight: 800; font-size: clamp(11px, 1.05vw, 15px); line-height: 1.15; letter-spacing: -.01em;
  transform: rotate(-12deg); box-shadow: 0 0 0 6px var(--paper);
}
.cap { margin-top: var(--s3); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .06em; }
.concept__sub { margin-top: var(--s10); display: grid; gap: var(--s2); font-weight: 900; font-size: var(--t-2xl); line-height: 1.4; font-feature-settings: "palt"; }
.concept__sub span { font-family: var(--f-en); font-weight: 600; font-size: var(--t-xs); letter-spacing: .14em; color: var(--accent-ink); }
.reasons { margin-top: var(--s7); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s7); counter-reset: r; }
.reason { position: relative; padding-top: var(--s5); }
.reason::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform-origin: left; }
.js .reason::before { transform: scaleX(var(--line-x, 0)); transition: transform 1100ms var(--ease-out); }
.reason.is-in::before { --line-x: 1; }
.reason__n { display: block; font-family: var(--f-en); font-weight: 700; font-size: var(--t-sm); color: var(--accent-ink); margin-bottom: var(--s5); }
.reason__t { font-weight: 900; font-size: var(--t-xl); line-height: 1.5; margin-bottom: var(--s4); font-feature-settings: "palt"; }
.reason p { color: var(--ink-2); font-size: 14.5px; }

@media (max-width: 900px) {
  .concept__head { grid-template-columns: 1fr; }
  .reasons { grid-template-columns: 1fr; gap: var(--s7); }
  .concept__img { aspect-ratio: 4 / 3; }
  .concept__photo { margin-top: var(--s8); }
}

/* ---------- network ---------- */
.network { background: var(--paper-2); }
/* heading keeps its own line; the intro sits beside it only when there is real room, otherwise wraps below */
.network__head { container-type: inline-size; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s5) var(--s8); }
/* sized from the container's own width so "FIND YOUR 8" always fits on one line (main.js fine-tunes if a font renders wider) */
.network__head .h-display { flex: none; max-width: 100%; white-space: nowrap; font-size: min(var(--t-display), 11.4cqi); }
.network__head .h-display .ln { padding-right: .08em; }   /* room for the 8's ink past its advance width */
.network__intro { flex: 1 1 320px; max-width: 460px; padding-bottom: .4em; }
.network__lead { font-weight: 900; font-size: var(--t-2xl); line-height: 1.4; font-feature-settings: "palt"; }
.network__count { margin-top: var(--s3); display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--s2); font-weight: 700; }
.network__count .num { font-family: var(--f-en); font-weight: 800; font-size: clamp(40px, 4.6vw, 64px); line-height: 1; letter-spacing: -.03em; }
.network__plus { color: var(--ink-3); font-size: var(--t-sm); margin-left: var(--s2); }

.network__body {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7);
  max-width: 1360px; margin: var(--s8) auto 0; padding-inline: var(--gutter);
}
.nmap { position: sticky; top: calc(var(--hd-h) + var(--s4)); height: calc(100svh - var(--hd-h) - var(--s6)); display: flex; flex-direction: column; gap: var(--s4); }
.nmap__stage { position: relative; flex: 1; min-height: 0; border-radius: var(--r-md); background: var(--paper); overflow: hidden; }
.nmap__svg { width: 100%; height: 100%; --k: 1; }
.nmap__land { fill: #E6E6E3; stroke: var(--paper); stroke-width: .5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.nmap__pref { fill: var(--accent-tint); stroke: var(--paper); stroke-width: .5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.nmap__dots { fill: none; stroke: var(--ink); stroke-opacity: .2; stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.nmap__inset rect { fill: none; stroke: var(--ink-3); stroke-width: .8; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.nmap__inset text { font-family: var(--f-jp); font-weight: 700; font-size: 6px; fill: var(--ink-3); letter-spacing: .1em; }
.nmap__arcs path { fill: none; stroke: var(--accent); stroke-width: calc(1.1px * var(--k)); stroke-linecap: round; opacity: .5; }
.pin { cursor: pointer; }
.pin__s { transition: opacity var(--d-mid); }   /* scale is set as an SVG transform attribute in main.js (keeps the pin centre fixed) */
.pin__dot { fill: var(--accent); stroke: var(--paper); stroke-width: 1.4; transition: r var(--d-mid) var(--ease-out); }
.pin--hq .pin__dot { fill: var(--ink); stroke: var(--accent); stroke-width: 1.8; }
.pin--direct .pin__dot { fill: var(--ink); }
.pin--prep .pin__dot { fill: var(--paper); stroke: var(--accent); stroke-dasharray: 2 1.4; }
.pin--sub .pin__dot { fill: var(--accent); stroke-width: 1; }
.pin__halo { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.pin__hit { fill: transparent; outline: none; }
.pin__label {
  font-family: var(--f-en); font-weight: 700; font-size: 6.6px; letter-spacing: .02em; fill: var(--ink);
  paint-order: stroke; stroke: var(--paper); stroke-width: 2.6px; stroke-linejoin: round;
  dominant-baseline: central; opacity: 0; transition: opacity var(--d-mid);
}
.pin__label--r { transform: translate(6px, 0); }
.pin__label--l { transform: translate(-6px, 0); text-anchor: end; }
.pin__label--t { transform: translate(0, -8px); text-anchor: middle; }
.pin__label--b { transform: translate(0, 9px); text-anchor: middle; }
.pin__label--sub { font-size: 5.2px; font-weight: 600; fill: var(--ink-2); }
.nmap[data-zoom="region"] .pin.in-view .pin__label { opacity: 1; }
.pin.is-hot .pin__label { opacity: 1; }
.pin.is-hot .pin__dot { r: 5; }
.pin--sub.is-hot .pin__dot { r: 3; }
.pin.is-hot .pin__halo { animation: halo 1.4s var(--ease-out) infinite; }
.nmap[data-zoom="region"] .pin:not(.in-view) .pin__s { opacity: .35; }
@keyframes halo { 0% { opacity: .45; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }
.nmap__tip {
  position: absolute; left: var(--s4); bottom: var(--s4); pointer-events: none;
  display: grid; gap: 2px; padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--ink); color: var(--paper);
  opacity: 0; transform: translateY(6px); transition: opacity var(--d-fast), transform var(--d-mid) var(--ease-out);
}
.nmap__tip.is-on { opacity: 1; transform: none; }
.nmap__tip b { font-family: var(--f-en); font-weight: 700; font-size: var(--t-md); line-height: 1.3; }
.nmap__tip span { font-size: var(--t-xs); color: var(--on-night-2); line-height: 1.5; }
@media (max-width: 900px) { .nmap__tip { display: none; } }

.nmap__ui { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); }
.nmap__tabs { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tab {
  height: 36px; padding: 0 var(--s4); border-radius: var(--r-pill); font-weight: 700; font-size: var(--t-sm); letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px var(--line); background: var(--paper); transition: background-color var(--d-fast), color var(--d-fast), box-shadow var(--d-fast);
}
.tab:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.tab.is-on { background: var(--ink); color: var(--paper); box-shadow: none; }
.nmap__legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); letter-spacing: .04em; }
.nmap__legend li { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--accent); }
.lg--hq { background: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.lg--direct { background: var(--ink); }
.lg--prep { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }

/* base list */
.network__list { display: grid; gap: var(--s8); padding-bottom: var(--s6); }
.region__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: var(--s3); border-bottom: 2px solid var(--ink); }
.region__head h3 { display: flex; align-items: baseline; gap: var(--s3); }
.region__en { font-family: var(--f-en); font-weight: 800; font-size: var(--t-xl); letter-spacing: -.01em; line-height: 1.2; }
.region__ja { font-weight: 700; font-size: var(--t-sm); color: var(--ink-2); }
.region__n { font-family: var(--f-en); font-weight: 600; font-size: var(--t-sm); color: var(--ink-3); }
.base {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "badges link" "name link" "ja link" "area link";
  column-gap: var(--s4); padding: var(--s5) var(--s4) var(--s5) var(--s4); margin-inline: calc(var(--s4) * -1);
  border-bottom: 1px solid var(--line); border-radius: var(--r-sm);
  transition: background-color var(--d-mid) var(--ease-out);
}
.base.is-hot { background: var(--white); }
.base__badges { grid-area: badges; display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.base__badges:empty { display: none; }
.base__badges:not(:empty) { margin-bottom: var(--s2); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1; box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink-2); }
.badge--hq { background: var(--accent); color: var(--ink); box-shadow: none; }
.badge--ink { background: var(--ink); color: var(--paper); box-shadow: none; }
.badge--soon { font-family: var(--f-en); font-weight: 600; font-size: 10px; color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.badge--prep { color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); background: var(--paper); }
.base__name { grid-area: name; font-family: var(--f-en); font-weight: 700; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; letter-spacing: -.02em; }
.base__ja { grid-area: ja; margin-top: var(--s2); font-weight: 700; font-size: var(--t-md); line-height: 1.5; }
.base__area { grid-area: area; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.6; }
.base__link {
  grid-area: link; align-self: center; display: inline-flex; align-items: center; gap: var(--s2);
  height: 40px; padding: 0 var(--s4); border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 700; letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px var(--ink); transition: background-color var(--d-fast), color var(--d-fast);
}
.base__link::after { content: ""; position: absolute; inset: 0; }   /* whole row is the hit area */
.base__link:hover, .base.is-hot .base__link:not(.is-none) { background: var(--ink); color: var(--paper); }
.base__link .arr { font-family: var(--f-en); transition: transform var(--d-mid) var(--ease-out); }
.base__link:hover .arr { transform: translate(2px, -2px); }
.base__link.is-none { box-shadow: none; color: var(--ink-3); font-size: var(--t-xs); padding: 0; }

.anywhere { margin-top: var(--s4); padding: var(--s7) var(--s6); border-radius: var(--r-md); background: var(--night); color: var(--on-night); display: grid; gap: var(--s4); justify-items: start; }
.anywhere__en { font-family: var(--f-en); font-weight: 600; font-size: var(--t-xs); letter-spacing: .14em; color: var(--accent); }
.anywhere__t { font-weight: 900; font-size: var(--t-2xl); line-height: 1.4; font-feature-settings: "palt"; }
.anywhere p:not([class]) { color: var(--on-night-2); font-size: 14.5px; }
.anywhere .btn { --bg: var(--paper); --fg: var(--ink); margin-top: var(--s3); }
.anywhere .btn:hover { color: var(--ink); }

@media (max-width: 1080px) {
  .network__intro { flex-basis: 100%; max-width: none; }
}
@media (max-width: 900px) {
  .network__body { grid-template-columns: 1fr; gap: var(--s6); }
  .nmap { top: 0; height: auto; z-index: 5; gap: var(--s3); margin-inline: calc(var(--gutter) * -1); padding: var(--s3) var(--gutter); background: var(--paper-2); box-shadow: 0 1px 0 var(--line); }
  .nmap__stage { flex: none; height: min(36svh, 78vw); }
  /* the map stays pinned at the very top; main.js keeps the header tucked away while the map is pinned,
     so nothing above the map moves while you scroll the list */
  .nmap__ui { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .nmap__ui::-webkit-scrollbar { display: none; }
  .nmap__tabs { flex-wrap: nowrap; }
  .tab { flex: none; height: 34px; padding: 0 14px; }
  .nmap__legend { display: none; }
  .network__list { gap: var(--s7); }
  .anywhere { padding: var(--s6) var(--s5); }
}

/* ---------- strip ---------- */
.strip { padding-block: var(--sec-y) 0; overflow: hidden; }
.strip__t { padding-inline: var(--gutter); max-width: 1360px; margin-inline: auto; font-weight: 900; font-size: var(--t-h); line-height: 1.22; letter-spacing: -.01em; font-feature-settings: "palt"; }
.strip__s { padding-inline: var(--gutter); max-width: 1360px; margin: var(--s4) auto 0; font-family: var(--f-jp); font-weight: 700; font-size: var(--t-xl); color: var(--ink-2); }
.strip__rail { margin-top: var(--s8); }
.strip__track { display: flex; gap: var(--s4); width: max-content; padding-inline: var(--gutter); will-change: transform; }
.strip__track img { height: clamp(200px, 28vw, 400px); width: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); background: var(--paper-2); }
.strip__track img:nth-child(even) { margin-top: clamp(24px, 4vw, 64px); }

/* ---------- service ---------- */
.service { background: var(--night); color: var(--on-night); margin-top: var(--sec-y); padding-bottom: calc(var(--sec-y) - var(--s7)); }
.service__intro { display: grid; gap: var(--s5); }
.service__note { max-width: 40em; color: var(--on-night-2); font-size: 14.5px; }
.svc { position: relative; margin-top: var(--s7); padding-block: var(--s7); overflow: clip; }   /* the sideways track never widens the page */
.svc__track { display: flex; gap: clamp(24px, 4vw, 64px); padding-inline: var(--gutter); width: max-content; will-change: transform; }
.svc__panel { position: relative; flex: none; width: min(78vw, 1120px); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: var(--s6); align-items: end; }
.svc__img { position: relative; overflow: hidden; border-radius: var(--r-md); aspect-ratio: 4 / 3; background: var(--night-2); }
.svc__img img { position: absolute; inset: 0; width: 116%; max-width: none; height: 100%; object-fit: cover; left: -8%; }
.svc__txt { display: grid; gap: var(--s4); padding-bottom: var(--s3); }
.svc__n { font-family: var(--f-en); font-weight: 600; font-size: var(--t-xs); letter-spacing: .14em; color: var(--on-night-2); }
.svc h3 { display: grid; gap: var(--s2); }
.svc__en { font-family: var(--f-en); font-weight: 800; font-size: clamp(30px, 3.5vw, 64px); line-height: .98; letter-spacing: -.035em; color: var(--c); }
.svc__ja { font-weight: 700; font-size: var(--t-lg); }
.svc__txt > p:last-child { color: var(--on-night-2); font-size: 14.5px; max-width: 26em; }
.svc__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--s4); height: 2px; background: #3A3A3A; }
.svc__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

@media (max-width: 900px) {
  .svc__track { width: auto; flex-direction: column; gap: var(--s8); }
  .svc__panel { width: 100%; grid-template-columns: 1fr; gap: var(--s5); }
  .svc__img img { width: 100%; left: 0; }
  .svc__bar { display: none; }
}

/* ---------- flow ---------- */
.flow { overflow: hidden; }
.steps { position: relative; z-index: 1; margin-top: var(--s9); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s5); }
.step { display: grid; align-content: start; gap: var(--s3); }
.step__n {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink);
  font-family: var(--f-en); font-weight: 700; font-size: var(--t-sm); margin-bottom: var(--s3);
  transition: background-color var(--d-mid), color var(--d-mid), box-shadow var(--d-mid);
}
.step.is-lit .step__n { background: var(--accent); box-shadow: none; color: var(--ink); }
.step h3 { font-weight: 900; font-size: var(--t-xl); line-height: 1.4; }
.step p { color: var(--ink-2); font-size: 14px; line-height: 1.85; }
.flow .wrap { position: relative; }
.step { position: relative; z-index: 1; }
.steps__line { position: absolute; z-index: 0; left: 28px; right: 0; top: 28px; height: 1.5px; background: var(--line); pointer-events: none; }
.steps__line i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: var(--s6); }
  .step { grid-template-columns: 56px minmax(0, 1fr); column-gap: var(--s4); }
  .step__n { grid-row: span 2; margin: 0; }
  .steps__line { left: 27px; right: auto; top: 28px; width: 1.5px; height: auto; bottom: var(--s8); }
  .steps__line i { transform-origin: top; transform: scaleY(0); }
}

/* ---------- closing ---------- */
.closing { display: grid; justify-items: center; text-align: center; padding-block: var(--sec-y); overflow: hidden; }
/* character = official 8 + eyes on top (eyes 69% of the 8's width = .42 of it tall, sinking ~18% of the width into the 8) */
.chara { --cw: clamp(150px, 16vw, 220px); position: relative; width: var(--cw); padding-top: calc(var(--cw) * .24); margin-bottom: var(--s8); }
.chara__eight { display: block; width: 100%; }
.chara__eight svg { width: 100%; height: auto; }
.chara__eight path { fill: var(--ink); }
.chara__eyes { position: absolute; top: 0; left: 15.5%; width: 69%; z-index: 1; transform-origin: 50% 100%; }
.js .chara__eyes, .js .chara__eight { opacity: 0; }
.closing__t { font-weight: 900; font-size: var(--t-h); line-height: 1.25; letter-spacing: -.01em; font-feature-settings: "palt"; padding-inline: var(--gutter); }
.closing__actions { margin-top: var(--s7); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s4); padding-inline: var(--gutter); }
@media (max-width: 760px) {
  .closing__actions { flex-direction: column; width: 100%; }
  .closing__actions .btn { justify-content: space-between; }
}

/* ---------- footer ---------- */
.ft { background: var(--night); color: var(--on-night); }
.ft__in { max-width: 1360px; margin-inline: auto; padding: var(--s8) var(--gutter) var(--s6); display: grid; grid-template-columns: auto 1fr; gap: var(--s6) var(--s7); align-items: start; }
.ft__logo { width: 200px; color: var(--on-night); }
.ft__nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3) var(--s5); font-size: var(--t-sm); font-weight: 700; }
.ft__nav a { opacity: .9; transition: opacity var(--d-fast), color var(--d-fast); }
.ft__nav a:hover { color: var(--accent); opacity: 1; }
.ft__credit, .ft__copy { font-size: var(--t-xs); color: var(--on-night-2); letter-spacing: .06em; }
.ft__copy { justify-self: end; font-family: var(--f-en); }
@media (max-width: 760px) {
  .ft__in { grid-template-columns: 1fr; }
  .ft__nav { justify-content: flex-start; display: grid; gap: var(--s3); }
  .ft__copy { justify-self: start; }
}

/* ---------- reduced motion: everything readable, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .js .ln__in { transform: none; }
  .js [data-fade], .js [data-rise] { opacity: 1; }
  .js .concept__photo[data-clip] .concept__img { clip-path: inset(0 round var(--r-md)); }
  .js .reason::before { transform: none; }
  .js .chara__eyes, .js .chara__eight { opacity: 1; }
  .hero__scroll i::after { display: none; }
}
