/* ════════════════════════════════════════════════════════════
   YUNAGI — yunagi.cloud
   A Higan Holdings Limited property

   切り抜き / KIRINUKI — the cut.
   The page is one sheet of washi laid over a block of sumi ink. Where the
   paper is cut away, the ink shows through: the working surfaces (tables,
   controls, the map) stay paper; the statements (the figures, the model,
   the close) are ink, and their type is knocked out of it. The boundary
   between the two is never a rule — it is a cut edge, scalloped like the
   crest of a 青海波 wave, with the punch marks of the stencil left in
   vermilion where the blade went through.

   Ancient: 伊勢型紙 — the Ise stencil, a design defined by what is removed.
   Modern:  knockout type and die-cut editorial. Held apart because the
            cut is structural, not ornamental: it is where the page changes
            what it is doing.

   Palette: washi paper, sumi ink, one hanko red. No radius, no glass.
   ════════════════════════════════════════════════════════════ */

@property --err { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  --paper:      #f5f1e8;
  --paper-deep: #ede8da;
  --ink:        #1c1a16;
  --ink-2:      #23211c;
  --ink-soft:   #55504a;
  --ink-faint:  #8d887b;
  --line:       #d8d2c2;
  --line-strong:#b7b09e;
  --hanko:      #b1352a;

  /* the same three roles, read on an ink ground */
  --on-ink:       #efeadd;
  --on-ink-soft:  #cfc9ba;
  --on-ink-faint: #8d887b;
  --on-ink-line:  #45413a;

  /* the punched stencil texture that survives on both grounds */
  --punch-paper: rgba(177, 53, 42, .075);
  --punch-ink:   rgba(245, 241, 232, .05);
  --dot:     0.85px;
  --pitch:   6px;

  /* 罫線 — the rule taxonomy. Japanese letterpress already had a grammar
     for hairlines; the page draws thirty of them and they should not all
     mean the same thing. */
  --kei-row:   1px solid var(--line);          /* 表罫 — one record */
  --kei-block: 1px solid var(--ink);           /* 裏罫 — a block of records */
  --kei-doc:   3px double var(--line-strong);  /* 双柱罫 — a document division */

  --max: 1180px;
  --serif: "Cormorant Garamond", "Noto Serif JP", serif;
  --sans:  "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono:  "IBM Plex Mono", "Consolas", monospace;
  --jp:    "Noto Serif JP", serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* the page owns no curves — but scoped, not with a global !important sledgehammer */
button, input, select, textarea, fieldset, img, svg, figure { border-radius: 0; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* subtle washi grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.52 0 0 0 0 0.45 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.jp   { font-family: var(--jp); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }

::selection { background: var(--ink); color: var(--paper); }

/* ════════════════════════════════════════════════════════════
   THE CUT — where the paper is taken away and the ink shows through
   ════════════════════════════════════════════════════════════ */
.cut {
  display: block;
  height: 26px;
  background: var(--paper);
  line-height: 0;
  position: relative;
  z-index: 1;
}
.cut svg { display: block; width: 100%; height: 26px; }
/* ink below the cut: the crests rise into the paper.
   ink above it: the same edge, turned over. */
.cut-out svg { transform: scaleY(-1); }
.cut-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── An ink ground, and everything that has to be re-read on it ── */
.on-ink {
  position: relative;
  background-color: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
  /* the punched holes of a stencil, left in the ground */
  background-image: radial-gradient(circle at 50% 50%, var(--punch-ink) var(--dot), transparent calc(var(--dot) + .5px));
  background-size: var(--pitch) var(--pitch);
}
.on-ink .wrap { position: relative; z-index: 2; }
.on-ink .sec-kicker { color: var(--on-ink-faint); }
.on-ink .sec-kicker .jp { color: var(--hanko); }
.on-ink .sec-kicker::before {
  background-color: transparent;
  background-image: linear-gradient(var(--on-ink-soft) 0 0), linear-gradient(var(--hanko) 0 0);
}
.on-ink h2, .on-ink h3 { color: var(--on-ink); }

/* the character cut clean out of the block — the largest thing on the page,
   and the quietest */
.cut-kanji {
  position: absolute;
  margin: 0;
  z-index: 1;
  font-family: var(--jp);
  font-weight: 400;
  line-height: .78;
  color: var(--paper);
  opacity: .085;
  pointer-events: none;
  user-select: none;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 13px 26px;
  border: 1px solid var(--ink);
  cursor: pointer;
  background: transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:focus-visible { outline: 1px solid var(--hanko); outline-offset: 3px; }
/* the primary action gets stronger when pointed at, never weaker */
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--hanko); border-color: var(--hanko); color: var(--paper); }
.btn-line  { color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { padding: 10px 18px; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
/* on an ink ground */
.btn-paper { border-color: var(--paper); color: var(--ink); background: var(--paper); }
.btn-paper:hover { background: var(--hanko); border-color: var(--hanko); color: var(--paper); }
.on-ink .btn-line { border-color: var(--on-ink-soft); color: var(--on-ink); }
.on-ink .btn-line:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* a keyboard user should be able to get past the masthead */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; padding: 12px 18px;
}
.skip:focus { left: 0; }

/* ── Topbar ──────────────────────────────────────────────── */
.topbar { border-bottom: var(--kei-row); font-size: 11px; color: var(--ink-soft); }
.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar-co { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-link:hover { color: var(--hanko); }

.clock { color: var(--ink); font-variant-numeric: tabular-nums; }
.cl-c { animation: colon 2s steps(1, end) infinite; }
.cl-z { color: var(--ink-faint); }
@keyframes colon { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .18; } }

/* vermilion means one thing on this page: it is running */
.sysmark { width: 7px; height: 7px; background: var(--hanko); display: inline-block; flex: none; }

/* ── Header ──────────────────────────────────────────────── */
.site-head {
  border-bottom: var(--kei-block);
  background: var(--paper);
  position: sticky; top: 0; z-index: 100;
}
.head-in { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; }

/* 朱文 — the seal, cut and inked */
.hanko {
  width: 46px; height: 46px;
  background: var(--hanko);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.hanko span {
  font-family: var(--jp); font-weight: 700; font-size: 17px;
  writing-mode: vertical-rl; letter-spacing: .05em; line-height: 1;
  transform: translateY(-1px);
}
.hanko-sm { width: 38px; height: 38px; }
.hanko-sm span { font-size: 14px; }
/* in the footer the seal is a hole in the block: the vermilion is what
   shows through, and the characters are the paper behind it */
.hanko-in { background: var(--hanko); border: 1px solid var(--hanko); }

.brand-word { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 24px; letter-spacing: .22em; font-weight: 500; }
.brand-sub { color: var(--ink-faint); font-size: 10px; }

.main-nav { display: flex; gap: 34px; margin-left: auto; }
.main-nav a {
  position: relative;
  font-size: 13.5px; font-weight: 500; letter-spacing: .04em;
  padding: 6px 0;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--hanko);
  transition: width .25s ease;
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { width: 100%; }

.head-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); width: 42px; height: 42px; padding: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1px; background: var(--ink); margin: 5px auto; transition: transform .25s ease; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { border-bottom: var(--kei-row); overflow: hidden; background-color: var(--paper); }
.hero-in { padding-top: 72px; padding-bottom: 88px; }

.hero-meta {
  display: flex; justify-content: space-between; gap: 20px;
  padding-bottom: 18px; margin-bottom: 54px;
  border-bottom: var(--kei-row);
  color: var(--ink-soft);
}

.hero-h {
  position: relative;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 1.03;
  letter-spacing: .002em;
  max-width: 12ch;
  padding-right: clamp(90px, 12vw, 170px);
  margin-bottom: 44px;
}
.hero-h-jp {
  position: absolute;
  right: 0; top: 6px;
  writing-mode: vertical-rl;
  font-size: clamp(58px, 6.6vw, 96px);
  font-weight: 400;
  letter-spacing: .12em;
  line-height: 1;
  color: var(--ink);
}
.hero-h-jp .tcy { font-size: 11px; margin-top: .9em; padding-top: .6em; }

.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; flex-wrap: wrap; }
.lede { font-size: 16.5px; line-height: 1.78; color: #3d3a33; max-width: 56ch; margin: 0; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* — the generative seascape, mounted as a print — */
.sea {
  position: relative;
  margin-top: 64px;
  border: 1px solid var(--ink);
  padding: 10px;
  background: var(--paper);
}
.sea::after {
  content: ""; position: absolute; inset: 4px;
  border: 1px solid var(--line-strong);
  pointer-events: none; z-index: 4;
}
#seaCanvas { display: block; width: 100%; height: 320px; cursor: crosshair; touch-action: pan-y; }
.sun {
  position: absolute;
  width: clamp(76px, 8.5vw, 116px); height: auto;
  left: 63%; top: -34px;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
  animation: sun-settle 22s ease-in-out infinite;
}
/* the independent `translate` property, so this composes with the parallax
   transform main.js writes each frame instead of fighting it */
@keyframes sun-settle {
  0%, 100% { translate: 0 0; }
  50%      { translate: -5px 3px; }
}
.sea-vert {
  position: absolute; top: -26px; right: 40px;
  writing-mode: vertical-rl;
  font-family: var(--jp); font-size: 15px; letter-spacing: .42em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 16px 7px;
  z-index: 5;
}
.sea-note {
  position: absolute; z-index: 5;
  color: var(--ink-soft);
  margin: 0;
  pointer-events: none;
  background: var(--paper);
  padding: 3px 8px;
}
.sea-hint  { left: 22px;  bottom: 18px; }
.sea-coord {
  right: 22px; bottom: 18px; color: var(--ink-faint);
  display: flex; align-items: baseline; gap: 8px;
  font-variant-numeric: tabular-nums;
}
.sea-sep { color: var(--line-strong); }
.sea-state { min-width: 9ch; color: var(--ink-soft); }
#seaCable { color: var(--ink-soft); }

/* ── Notice strip ────────────────────────────────────────── */
.notice-strip {
  border-bottom: var(--kei-row);
  background-color: var(--paper-deep);
  background-image: radial-gradient(circle at 50% 50%, var(--punch-paper) var(--dot), transparent calc(var(--dot) + .5px));
  background-size: var(--pitch) var(--pitch);
}
.notice-in { display: flex; gap: 22px; align-items: baseline; padding-top: 13px; padding-bottom: 13px; }
.notice-tag { flex: none; border: 1px solid var(--ink); padding: 3px 9px; font-size: 10px; background: var(--paper); }
.notice-in p { margin: 0; text-transform: none; letter-spacing: .04em; color: #3d3a33; }

/* ── 相場表 — the rate board ──────────────────────────────
   A published rate, relayed to every harbour, each leg with a known
   transmission time. The dullest modern control given the most exact
   ancient antecedent, and neither one softened. */
.board-band { border-bottom: var(--kei-row); background-color: var(--paper); padding: 26px 0 22px; }
.board { display: flex; border: 1px solid var(--ink); background: var(--paper); }
.board-jp {
  margin: 0; flex: none;
  writing-mode: vertical-rl; letter-spacing: .3em; font-size: 13px;
  padding: 12px 8px;
  background: var(--ink); color: var(--paper);
}
.board-row { display: grid; grid-template-columns: repeat(6, 1fr); flex: 1; min-width: 0; }
.board-b {
  position: relative;
  background: transparent; border: 0; border-left: 1px solid var(--line);
  padding: 12px 10px; cursor: pointer; font: inherit; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  transition: background-color .2s ease;
}
.board-b:first-child { border-left: 0; }
.board-b .jp { font-size: 15px; letter-spacing: .16em; color: var(--ink); line-height: 1.2; }
.board-b .mono { font-size: 10px; }
.board-b:hover { background: var(--paper-deep); }
.board-b:focus-visible { outline: 1px solid var(--hanko); outline-offset: -3px; }
.board-b[aria-pressed="true"] { background: var(--paper-deep); }
.board-b[aria-pressed="true"] .jp { color: var(--hanko); }
.board-b::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--hanko);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.board-b[aria-pressed="true"]::after { transform: scaleX(1); }
.board-note { margin: 12px 0 0; color: var(--ink-faint); }
.board-note b { color: var(--ink); font-weight: 500; }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 110px 0; border-bottom: var(--kei-doc); background-color: var(--paper); }
.section:last-of-type { border-bottom: 0; }
/* a section that ends at a cut hands the boundary over to the blade */
.section.to-cut { border-bottom: 0; }

.sec-head { max-width: 660px; margin-bottom: 64px; }
.sec-kicker {
  font-size: 12px; letter-spacing: .16em; color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px; margin: 0 0 22px;
}
/* the rule before a kicker is a health-check probe: an 8px block runs the
   track, pauses off the end, and repeats — the smallest possible monitor */
.sec-kicker::before {
  content: "";
  width: 46px; height: 3px; flex: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-image: linear-gradient(var(--ink) 0 0), linear-gradient(var(--hanko) 0 0);
  background-size: 100% 1px, 8px 3px;
  background-position: 0 1px, -10px 0;
  animation: probe 4.6s linear infinite;
}
@keyframes probe {
  0%   { background-position: 0 1px, -10px 0; }
  62%  { background-position: 0 1px, 46px 0; }
  100% { background-position: 0 1px, 46px 0; }
}
#notices .sec-kicker::before { animation-delay: -1.1s; }
.lotus   .sec-kicker::before { animation-delay: -2.2s; }
#network .sec-kicker::before { animation-delay: -3.3s; }
#cases   .sec-kicker::before { animation-delay: -0.6s; }
.sec-kicker .jp { font-size: 13px; letter-spacing: .3em; color: var(--ink); }
.sec-head h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.12; }
.sec-lede { color: #3d3a33; margin: 20px 0 0; max-width: 60ch; }

/* ── Services ────────────────────────────────────────────── */
.svc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: var(--kei-block); border-bottom: var(--kei-block);
}
.svc, .case, .net, .stat { min-width: 0; }
.svc-art svg, .svc-art canvas { max-width: 100%; }

.svc {
  position: relative;
  padding: 40px 38px;
  display: flex; flex-direction: column;
  transition: background-color .25s ease;
}
.svc:hover { background-color: var(--paper-deep); }
.svc + .svc { border-left: var(--kei-row); }

.svc-no { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 26px; }
.svc-no .jp { font-size: 20px; }
.svc-no .mono { color: var(--ink-faint); }
.svc h3 { font-size: 27px; margin-bottom: 6px; }
.svc-jp {
  position: absolute; top: 232px; right: 34px;
  font-size: 15px; color: var(--ink-faint); letter-spacing: .2em;
  writing-mode: vertical-rl;
  margin: 0;
}
.svc-desc { color: #3d3a33; font-size: 14.5px; margin: 12px 0 26px; min-height: 96px; }
.svc-foot { color: var(--ink-faint); margin: -14px 0 24px; font-size: 10px; }

/* 縦中横 — the vertical Japanese runs down; the technical serial inside it
   stands up and will not turn. One line box, two writing systems. */
.tcy {
  text-combine-upright: all;
  -webkit-text-combine: horizontal;
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
  color: var(--ink-faint);
  margin-top: .5em;
  padding-top: .4em;
  border-top: 1px solid currentColor;
}

.svc-list { list-style: none; margin: 0 0 30px; padding: 0; border-top: var(--kei-row); }
.svc-list li {
  position: relative;
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 11px 0; border-bottom: var(--kei-row);
  font-size: 13.5px;
}
.svc-list li[data-gpu].off { opacity: .32; }
.svc-list .mono { color: var(--ink-soft); white-space: nowrap; }
.row-price { display: inline-flex; align-items: baseline; gap: 7px; font-variant-numeric: tabular-nums; }
.row-unit { color: var(--ink-faint); }

/* 見せ消ち — the manuscript convention where a deletion is marked, not
   erased, so the reader can still read what was there. A diff, six
   centuries early; the hand stroke is drawn, not a browser strike. */
.svc-list del, .case-text del { text-decoration: none; color: var(--ink-faint); position: relative; }
.svc-list del::after, .case-text del::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 52%; height: 1px;
  background: var(--hanko);
  transform: rotate(-4deg);
  transform-origin: left center;
}
.svc-list ins, .case-text ins { text-decoration: none; color: var(--ink); }

/* the proofreader's caret, drawn in two borders — no box-drawing glyph,
   because the loaded Plex Mono subset does not carry U+2500 */
.svc-list li[data-kosei]::before {
  content: "";
  position: absolute; left: -13px; top: 16px;
  width: 7px; height: 7px;
  border-left: 1px solid var(--hanko);
  border-bottom: 1px solid var(--hanko);
  opacity: .55;
  transition: opacity .2s ease;
}
.svc-list li[data-kosei]:hover::before { opacity: 1; }

.svc-link { margin-top: auto; font-size: 11px; border-bottom: 1px solid var(--line-strong); align-self: flex-start; padding-bottom: 3px; }
.svc-link:hover { border-color: var(--hanko); color: var(--hanko); }

/* ── The three demonstrations ────────────────────────────
   Each card carries a small documentary loop of the thing it sells. */
.svc-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 122px;          /* the three demonstrations share one height so
                                 the headings below them sit on one line */
  margin: 0 0 26px;
  padding: 9px;
  border: 1px solid var(--line);
  background-color: var(--paper);
  transition: border-color .25s ease;
}
.svc:hover .svc-art { border-color: var(--line-strong); }
.art-cap {
  display: flex; justify-content: space-between; gap: 10px;
  margin: 8px 0 0; font-size: 9px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* 01 — a rack answering a request */
.rk-svg { display: block; width: 100%; height: 84px; }
.rk-chassis { fill: var(--paper-deep); stroke: var(--line-strong); stroke-width: 1; }
.rk-bays rect { fill: var(--line-strong); opacity: .55; }
.rk-rail { fill: var(--line); }
.rk-pkt {
  fill: var(--hanko);
  animation: rk-run 3.6s linear infinite;
  animation-delay: calc(var(--u) * -1.2s);
}
@keyframes rk-run {
  0%   { transform: translateX(0);     opacity: 0; }
  7%   { opacity: 1; }
  62%  { transform: translateX(272px); opacity: 1; }
  70%  { transform: translateX(272px); opacity: 0; }
  100% { transform: translateX(272px); opacity: 0; }
}
.rk-led { fill: var(--ink-faint); }
/* coprime idle periods, short-on / long-off — machines churn out of step */
.rk-led.a { animation: led .79s steps(1, end) infinite; }
.rk-led.b { animation: led 1.13s steps(1, end) infinite; animation-delay: -.4s; }
.rk .rk-led.a { animation-delay: calc(var(--u) * -.31s); }
.rk .rk-led.b { animation-delay: calc(var(--u) * -.47s); }
@keyframes led { 0%, 22% { opacity: 1; } 23%, 100% { opacity: .2; } }
/* the answering LED fires ~260ms after the packet lands — a machine that
   replies late is a machine; one that replies instantly is a decoration */
.rk-led.ans {
  fill: var(--hanko);
  opacity: .16;
  animation: led-ans 3.6s linear infinite;
  animation-delay: calc(var(--u) * -1.2s + .26s);
}
@keyframes led-ans {
  0%, 60% { opacity: .16; }
  62%     { opacity: 1; }
  74%     { opacity: 1; }
  76%, 100% { opacity: .16; }
}

/* 02 — the register, as an actual search box */
.art-dd { padding: 9px; }
.dd-bar { display: flex; border: 1px solid var(--ink); background: var(--paper); }
.dd-in {
  flex: 1 1 auto; min-width: 0;
  border: 0; background: transparent; color: var(--ink);
  font: 400 15px/1 var(--sans);
  padding: 11px 10px;
}
.dd-in::placeholder { color: var(--ink-faint); }
.dd-in:focus { outline: none; }
.dd-bar:focus-within { outline: 1px solid var(--hanko); outline-offset: 2px; }
.dd-tld {
  flex: none;
  border: 0; border-left: 1px solid var(--line);
  background: transparent; color: var(--ink-soft);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  padding: 0 8px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.dd-go {
  flex: none;
  border: 0; border-left: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font-family: var(--jp); font-size: 13px; letter-spacing: .2em;
  padding: 0 14px; cursor: pointer;
  transition: background-color .2s ease;
}
.dd-go:hover { background: var(--hanko); }
.dd-out {
  display: flex; align-items: center; gap: 8px;
  margin: 11px 0 0; font-size: 10px; color: var(--ink-soft);
  text-transform: none; letter-spacing: .05em;
  min-height: 15px;
}
.dd-sub {
  margin: 4px 0 0; padding-left: 14px;
  font-size: 9px; color: var(--ink-faint);
  text-transform: none; letter-spacing: .05em;
  min-height: 14px;
}
.dd-out b { color: var(--ink); font-weight: 500; }
.dd-mark { width: 6px; height: 6px; flex: none; background: var(--line-strong); }
.dd-out.ok  .dd-mark { background: var(--ink); }
.dd-out.no  .dd-mark { background: var(--hanko); }
.dd-out.busy .dd-mark { animation: led .5s steps(1, end) infinite; }

/* 03 — inference, drawn as a 1-bit screen resolving out of noise */
.art-ai #aiDemo { display: block; width: 100%; height: 84px; }

/* ════════════════════════════════════════════════════════════
   測 — THE FIGURES, CUT OUT OF THE BLOCK
   ════════════════════════════════════════════════════════════ */
.band { padding: 8px 0 4px; }
.band-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.band .cut-kanji {
  left: -3.2%; top: 50%;
  transform: translateY(-50%);
  font-size: clamp(130px, 16vw, 208px);
  letter-spacing: -.04em;
}
.stat { position: relative; padding: 52px 30px 48px; border-left: 1px solid var(--on-ink-line); }
.stat:first-child { border-left: none; }
.stat-n {
  font-family: var(--serif); font-size: clamp(38px, 4.4vw, 58px); line-height: 1;
  margin: 0 0 12px;
  color: var(--paper);
  font-variant-numeric: tabular-nums lining-nums;
}
/* vermilion is the only thing on the ink that is not paper */
.stat-u { font-size: 26px; margin-left: 2px; color: var(--hanko); }
.stat-l { position: relative; color: var(--on-ink-soft); margin: 0; padding-top: 10px; }
.stat-l::before {
  content: "";
  position: absolute; top: 0; left: 0;
  height: 2px; width: calc((1 - var(--err)) * 46px);
  background: var(--hanko);
}

/* ── Notices list ────────────────────────────────────────── */
.notice-list { list-style: none; margin: 0; padding: 0; border-top: var(--kei-block); }
.notice-list li {
  display: grid;
  grid-template-columns: 110px 110px 1fr;
  gap: 26px; align-items: baseline;
  padding: 22px 4px 22px 10px;
  border-bottom: var(--kei-row);
  border-left: 3px solid transparent;
  transition: background-color .2s ease, border-left-color .2s ease;
}
.notice-list li:hover, .notice-list li.on { background-color: var(--paper-deep); }
.notice-list li.on { border-left-color: var(--hanko); }
.n-date { color: var(--ink-soft); }
.n-tag { border: 1px solid var(--line-strong); text-align: center; padding: 3px 0; font-size: 10px; }
.notice-list p { margin: 0; font-size: 14.5px; color: #33302a; }
.more { margin-top: 26px; }
.more a { border-bottom: 1px solid var(--line-strong); padding-bottom: 3px; }
.more a:hover { border-color: var(--hanko); color: var(--hanko); }

/* ════════════════════════════════════════════════════════════
   蓮 — LOTUS DIFFUSION, ON THE BLOCK
   ════════════════════════════════════════════════════════════ */
.lotus { padding: 110px 0; }
.lotus-in { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.lotus h2 { font-size: clamp(34px, 4vw, 48px); line-height: 1.1; margin-bottom: 26px; }
.lotus-copy > p { color: var(--on-ink-soft); font-size: 15.5px; max-width: 52ch; margin: 0 0 34px; }
.code { border: 1px solid var(--on-ink-line); background: var(--ink-2); padding: 22px 24px; margin-bottom: 34px; overflow-x: auto; }
.code pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--on-ink); text-transform: none; letter-spacing: 0; }
/* one pigment here too — the code block used to ship a tan and a green */
.c-key { color: var(--on-ink); }
.c-str { color: #d98a7e; }
.c-mut { color: var(--on-ink-faint); }

.lotus-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lotus-gallery figure { position: relative; margin: 0; border: 1px solid var(--on-ink-line); padding: 8px; overflow: hidden; }
.lotus-gallery img {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  filter: grayscale(1) sepia(.1) contrast(.97);
  transition: filter .3s ease;
}
.lotus-gallery figure:hover img { filter: grayscale(.55) sepia(.12) contrast(1.02); }
/* the sampler's scan line descending the plate in eight discrete steps */
.lotus-gallery figure::after {
  content: "";
  position: absolute; left: 8px; right: 8px; top: 8px;
  height: 1px;
  background: var(--hanko);
  box-shadow: none;
  animation: sample-scan 6.4s steps(8, end) infinite;
}
.lotus-gallery figure:nth-child(2)::after { animation-delay: -2.13s; }
.lotus-gallery figure:nth-child(3)::after { animation-delay: -4.26s; }
@keyframes sample-scan {
  from { transform: translateY(0);     opacity: .85; }
  to   { transform: translateY(100%);  opacity: .15; }
}
.lotus-gallery figcaption {
  grid-column: 1 / -1; color: var(--on-ink-faint); margin-top: 4px;
  display: flex; justify-content: space-between; gap: 14px;
}

/* ── Network map ─────────────────────────────────────────── */
.netmap-wrap { border: 1px solid var(--ink); padding: 10px; background: var(--paper); }
.netmap { display: block; width: 100%; height: auto; }
.nm-meridians line { stroke: var(--line); stroke-width: 1; }
.nm-ring path {
  fill: none; stroke: var(--line-strong); stroke-width: 1;
  stroke-dasharray: 3 5;
  animation: transit-march 6.4s linear infinite;
  transition: stroke .25s ease, stroke-width .25s ease;
}
.nm-ring path.on { stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: none; }
@keyframes transit-march { to { stroke-dashoffset: -8; } }

/* the relay hop: the leg is struck once, end to end, before the next
   harbour lights. pathLength="100" on the arcs makes the dash arithmetic
   independent of how long the leg actually is. */
.nm-ring path.hop {
  stroke: var(--hanko);
  stroke-width: 2.2;
  stroke-dasharray: 100;
  animation: hop-draw .95s cubic-bezier(.35, 0, .2, 1);
}
@keyframes hop-draw {
  0%   { stroke-dashoffset: 100; opacity: 1; }
  62%  { stroke-dashoffset: 0;   opacity: 1; }
  100% { stroke-dashoffset: 0;   opacity: 0; }
}

/* twelve paths repainting stroke-dashoffset forever is the most expensive
   object on the page — it stops when nobody is looking at it */
.netmap.idle .nm-ring path { animation-play-state: paused; }

.nm-pkts .pkt { fill: var(--ink-soft); }
.nm-pkts .pkt-red { fill: var(--hanko); }

.nm-node rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; transition: fill .2s ease, stroke .2s ease; }
.nm-node text { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; fill: var(--ink-soft); text-transform: uppercase; }
.nm-node.on rect { fill: var(--hanko); stroke: var(--hanko); }
.nm-node.on text { fill: var(--ink); font-weight: 500; }
.nm-node { cursor: pointer; }

.net-facts { margin: 14px 0 34px; color: var(--ink-faint); font-size: 10px; line-height: 1.9; letter-spacing: .06em; }

.net-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: var(--kei-block); border-left: var(--kei-row);
}
.net {
  position: relative;
  border-right: var(--kei-row); border-bottom: var(--kei-row);
  padding: 34px 30px 26px;
  transition: background-color .25s ease;
  cursor: pointer;
}
.net:hover, .net:focus-visible, .net.on { background-color: var(--paper-deep); }
.net:focus-visible { outline: 1px solid var(--hanko); outline-offset: -3px; }
.net h3 { font-size: 24px; margin-bottom: 10px; }
.net .mono { color: var(--ink-soft); margin: 0 0 6px; }
.net-svc { color: var(--ink-faint) !important; font-size: 10px !important; }
.net-lat {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 10px !important; margin-top: 12px !important;
  font-variant-numeric: tabular-nums;
}
.lat { color: var(--ink) !important; font-size: 12px; letter-spacing: .04em; }
.lat-from { color: var(--ink-faint); }
.net-kanji {
  position: absolute; top: 26px; right: 24px; margin: 0;
  font-size: 17px; color: var(--line-strong); letter-spacing: .18em;
  writing-mode: vertical-rl;
  transition: color .25s ease;
}
.net:hover .net-kanji, .net.on .net-kanji { color: var(--hanko); }

/* the chosen harbour, marked the way the board marks it */
.net.sel { background-color: var(--paper-deep); }
.net.sel::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--hanko);
}
.net.sel .net-kanji { color: var(--hanko); }
.net.sel .lat, .net.on .lat { color: var(--hanko) !important; }

/* 90 days, one bar a day — the most recognisable object an infrastructure
   company owns, and the one place vermilion means fault */
.up90 { margin-top: 14px; }
.up90 svg { display: block; width: 100%; height: 14px; }
.up90 rect { fill: var(--line-strong); }
.up90 rect.dn { fill: var(--hanko); }
.net:hover .up90 rect, .net.on .up90 rect, .net.sel .up90 rect { fill: var(--ink-faint); }
.net:hover .up90 rect.dn, .net.on .up90 rect.dn, .net.sel .up90 rect.dn { fill: var(--hanko); }
.up90-cap { display: flex; justify-content: space-between; margin: 5px 0 0; font-size: 9px; color: var(--ink-faint); }

.net-legend { margin: 22px 0 0; color: var(--ink-faint); font-size: 9px; display: flex; align-items: center; flex-wrap: wrap; }
.lg { display: inline-block; margin-right: 8px; }
.lg-solid { width: 3px; height: 11px; background: var(--hanko); }
.lg-dot { width: 3px; height: 11px; background: var(--line-strong); }
.lg-gap { width: 22px; display: inline-block; }

/* ── Cases ───────────────────────────────────────────────── */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: var(--kei-block); }
.case { position: relative; padding: 38px 34px 34px; border-bottom: var(--kei-row); }
.case + .case { border-left: var(--kei-row); }
.case-tag { color: var(--ink-faint); margin: 0 0 20px; display: flex; align-items: baseline; gap: 12px; }
.case-no { border: 1px solid var(--line-strong); padding: 2px 6px; font-size: 9px; color: var(--ink-soft); }
.case-text { font-family: var(--serif); font-size: 19px; line-height: 1.55; margin: 0 0 26px; color: #2c2922; }
.case-foot { color: var(--ink-soft); margin: 0; border-top: var(--kei-row); padding-top: 14px; }

/* ════════════════════════════════════════════════════════════
   凪 — THE CLOSE, AND THE COLOPHON, ON ONE BLOCK
   ════════════════════════════════════════════════════════════ */
.cta {
  padding: 116px 0 104px;
  text-align: center;
}
/* a ghost of the study the name came from, veiled back into the ink */
.cta::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(28, 26, 22, .84), rgba(28, 26, 22, .93)),
    url("../img/hero.jpg");
  background-size: cover, cover;
  background-position: center, center 38%;
  background-repeat: no-repeat, no-repeat;
}
.cta h2 { font-size: clamp(38px, 5vw, 58px); margin-bottom: 18px; color: var(--paper); }
.cta-sub { color: var(--on-ink-soft); max-width: 52ch; margin: 0 auto 40px; font-size: 15.5px; }
.cta .hero-cta { justify-content: center; }

/* ── Footer ──────────────────────────────────────────────── */
.site-foot { background: var(--ink); color: var(--on-ink); }
.foot-in {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; padding-top: 72px; padding-bottom: 56px;
  border-top: 1px solid var(--on-ink-line);
}
.foot-brand .hanko { margin-bottom: 20px; }
.foot-name { font-family: var(--serif); font-size: 22px; letter-spacing: .22em; margin: 0 0 8px; }
.foot-d { color: var(--on-ink-faint); margin: 0; }
.foot-h { color: var(--on-ink-faint); margin: 4px 0 18px; }
.foot-col { display: flex; flex-direction: column; }
.foot-col a { font-size: 13.5px; color: var(--on-ink-soft); padding: 5px 0; width: max-content; border-bottom: 1px solid transparent; }
.foot-col a:hover { color: var(--paper); border-bottom-color: var(--hanko); }

/* 奥付 — the colophon. Publisher, registration, edition, impression. */
.okuzuke { border-top: 3px double var(--on-ink-line); padding-top: 26px; padding-bottom: 30px; }
.oku { display: grid; grid-template-columns: max-content 1fr; margin: 0 0 20px; }
.oku dt {
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--jp); font-size: 11px; letter-spacing: .1em;
  height: 2.9em; padding-right: 10px; color: var(--on-ink-faint);
  border-right: 1px solid var(--on-ink-line);
}
.oku dd {
  margin: 0; padding-left: 16px; line-height: 2.1em; color: var(--on-ink-soft);
  text-transform: none; letter-spacing: .04em; font-size: 11px;
}
.oku dt + dd { border-bottom: 1px solid #2c2922; }
.oku dd a { border-bottom: 1px solid var(--on-ink-line); }
.oku dd a:hover { color: var(--paper); border-bottom-color: var(--hanko); }
.oku-mark { color: #6d6961; margin: 0; font-size: 9px; letter-spacing: .1em; }

/* ── 差分 — the difference against the last harbour, in the accent ── */
.delta { color: var(--hanko); font-size: 10px; letter-spacing: .06em; white-space: nowrap; }

/* ── Reveal — sections arrive, they do not blink into place ── */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1020px) {
  .lotus-in > *, .band-in > *, .hero-row > *, .foot-in > *, .board-row > * { min-width: 0; }
  .hero-h { padding-right: 110px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc + .svc { border-left: none; border-top: var(--kei-row); }
  .svc-desc { min-height: 0; }
  .band-in { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: none; border-top: 1px solid var(--on-ink-line); }
  .stat:nth-child(odd) { border-right: 1px solid var(--on-ink-line); }
  .lotus-in { grid-template-columns: 1fr; gap: 56px; }
  .net-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; }
  .case + .case { border-left: none; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .board-row { grid-template-columns: repeat(3, 1fr); }
  .board-b:nth-child(4) { border-left: 0; }
  .board-b:nth-child(n+4) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    flex-direction: column; gap: 0;
    padding: 8px 28px 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 0; border-bottom: var(--kei-row); font-size: 15px; }
  .nav-toggle { display: block; }
  .topbar-co { display: none; }
  .topbar-right { gap: 12px; }
  .topbar-right .mono:not(.clock):not(.topbar-link) { display: none; }
  .stat { padding: 34px 20px 30px; }
  .stat-u { font-size: 17px; }
  .band .cut-kanji { font-size: 148px; left: -7%; }
  .hero-in { padding-top: 48px; padding-bottom: 64px; }
  .hero-h { padding-right: 0; margin-bottom: 34px; }
  .hero-h-jp {
    position: static; writing-mode: horizontal-tb;
    display: inline-block; margin-left: 12px;
    font-size: .62em; vertical-align: baseline;
  }
  .hero-h-jp .tcy {
    text-combine-upright: none; border-top: 0; border-left: 1px solid currentColor;
    margin: 0 0 0 .5em; padding: 0 0 0 .5em; font-size: 10px; vertical-align: middle;
  }
  .hero-meta { margin-bottom: 38px; }
  .hero-meta span:last-child { display: none; }
  .sea { margin-top: 44px; padding: 7px; }
  #seaCanvas { height: 210px; }
  .sun { top: -20px; left: 60%; }
  .sea-vert { right: 18px; top: -22px; font-size: 13px; }
  .sea-hint { display: none; }
  .sea-coord { right: 14px; bottom: 12px; font-size: 9px; gap: 6px; }
  .sea-state { min-width: 8ch; }
  .notice-in { flex-direction: column; gap: 8px; align-items: flex-start; }
  .notice-list li { grid-template-columns: 1fr; gap: 8px; }
  .net-grid { grid-template-columns: 1fr; }
  .section { padding: 76px 0; }
  .lotus { padding: 80px 0; }
  .cta { padding: 84px 0 76px; }
  .lotus-gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .lotus-gallery figure { padding: 5px; }
  .lotus-gallery figure::after { left: 5px; right: 5px; top: 5px; }
  .lotus-gallery figcaption { flex-direction: column; gap: 2px; margin-top: 8px; }
  .head-cta .btn-ghost { display: none; }
  .board { flex-direction: column; }
  .board-jp { writing-mode: horizontal-tb; padding: 6px 12px; letter-spacing: .4em; }
  .board-row { grid-template-columns: repeat(2, 1fr); }
  .board-b { border-left: 1px solid var(--line); }
  .board-b:nth-child(odd) { border-left: 0; }
  .board-b:nth-child(n+3) { border-top: 1px solid var(--line); }
  .oku dt { writing-mode: horizontal-tb; height: auto; padding: 6px 10px 6px 0; }
  .oku dd { line-height: 1.6; padding: 6px 0 6px 14px; }
  .foot-in { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Reduced motion — every device has a complete static state ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sec-kicker::before { animation: none; background-position: 0 1px, 19px 0; }
  .sun { animation: none; }
  .cl-c { animation: none; }
  .rk-pkt { animation: none; transform: translateX(150px); }
  .rk-led, .rk-led.ans { animation: none; }
  .rk-led.ans { opacity: 1; }
  .dd-out.busy .dd-mark { animation: none; }
  .nm-ring path { animation: none; }
  .lotus-gallery figure::after { animation: none; transform: translateY(62%); opacity: .4; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
