/* sathi.systems — the company face, corporate-grade (v2, 2026-08-23,
   after the web-ecosystem brief: docs/company/WEB_ECOSYSTEM_2026-08.md).
   One stylesheet, no build, no scripts, no external requests, no
   analytics. Restrained: system sans-serif throughout (Japanese corporate
   sites set gothic), a wider measure than an essay, a facts grid, status
   labels instead of honesty prose, one deep quiet accent. Dark mode
   follows the OS. No mark, no favicon — brand marks are the owner's own
   work; the wordmark is plain text until he draws one. */

:root {
  --paper: #f6f3ec;
  --card: #ffffff;
  --ink: #171814;
  --muted: #676259;
  --line: #dcd6ca;
  --accent: #204d73;
  --accent-ink: #ffffff;
  --accent-soft: #dce7f0;
  --ok: #2f6b4f;
  --ok-bg: #e6f1ea;
  --exp: #7a4b12;
  --exp-bg: #f7ead8;
  --dev: #1f3a5f;
  --dev-bg: #e4eaf3;
  --none: #625d54;
  --none-bg: #ecebe6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15140f;
    --card: #1e1c16;
    --ink: #efeae1;
    --muted: #a39c8f;
    --line: #34302a;
    --accent: #8fb0d9;
    --accent-ink: #15140f;
    --ok: #9ed0b3;
    --ok-bg: #1d3127;
    --exp: #e6b978;
    --exp-bg: #3a2a14;
    --dev: #9fbde3;
    --dev-bg: #1d2a3c;
    --none: #a39c8f;
    --none-bg: #2a2822;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Roboto,
    "Noto Sans", "Noto Sans JP", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}

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

/* ---------- header ---------- */

header.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.35rem min(1.5rem, 24px);
}

.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

header.top nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
  font-size: 0.9rem;
  flex: 1;
}

header.top nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 180ms ease;
}
header.top nav a:hover { color: var(--ink); }
header.top nav em {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding: 0.2rem 0;
}
.langs { margin-left: auto; color: var(--muted); font-size: 0.85rem; }
.langs em { border: 0; }

@media (max-width: 44rem) {
  header.top { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  header.top nav { width: 100%; }
  .langs { margin-left: 0; width: 100%; padding-top: 0.2rem; }
}

/* ---------- layout ---------- */

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 min(1.5rem, 24px) 5rem;
}

.hero {
  padding: 5rem 0 2rem;
  max-width: 58rem;
}

.hero:has(h1.master) {
  min-height: min(43rem, calc(100svh - 5rem));
  padding: clamp(5rem, 12vh, 8rem) 0 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero .kicker { margin-bottom: 0.75rem; }

h1.master {
  max-width: 58rem;
  font-size: clamp(3.35rem, 8.5vw, 6.8rem);
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin: 0 0 1.35rem;
  text-wrap: balance;
}

.companyline { color: var(--ink); margin: 1.15rem 0 0; max-width: 43rem; }
.companyline strong { font-weight: 650; }

h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  font-weight: 700;
}

.lede {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  max-width: 46rem;
  text-wrap: pretty;
}

.actions { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }

section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 0;
  border-top: 1px solid var(--line);
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}
.hero + section { border-top: 0; margin-top: 0; padding-top: 0; }
.hero { border-top: 0; margin-top: 0; }

h2 {
  max-width: 42rem;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0 0 0.35rem;
  font-weight: 650;
}

.kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

p { margin: 0.6rem 0; max-width: 46rem; }
section > p { max-width: 46rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

ul { padding-left: 1.2rem; margin: 0.6rem 0; max-width: 46rem; }
li { margin: 0.4rem 0; }

.muted { color: var(--muted); }

.note {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--dev-bg); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }

/* ---------- grids and cards ---------- */

.grid { display: grid; gap: 0.9rem; margin: 0.9rem 0; }
.grid.two { grid-template-columns: 1fr; }
.grid.three { grid-template-columns: 1fr; }
@media (min-width: 44rem) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: 1fr 1fr 1fr; }
}

.card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 1.25rem 0 0;
}
.card p { margin: 0.3rem 0; max-width: none; }

/* ---------- facts (definition lists) ---------- */

dl.facts { margin: 0.9rem 0; max-width: 46rem; }
dl.facts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
dl.facts > div:first-child { border-top: 0; }
@media (min-width: 44rem) {
  dl.facts > div { grid-template-columns: 12rem 1fr; }
}
dl.facts dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.15rem;
}
dl.facts dd { margin: 0; }

/* the at-a-glance grid on the company page */
dl.facts.grid {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 44rem) {
  dl.facts.grid { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  dl.facts.grid > div { grid-template-columns: 1fr; border-top: 1px solid var(--line); }
  dl.facts.grid > div:nth-child(-n+2) { border-top: 0; }
}

/* the dated updates log */
dl.log { margin: 0.5rem 0; max-width: 46rem; }
dl.log > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0 1.25rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}
dl.log > div:first-child { border-top: 0; }
dl.log dt {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 0.1rem;
}
dl.log dd { margin: 0; }
@media (max-width: 44rem) {
  dl.log > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---------- status labels ---------- */

.status {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  margin: 0 0.25rem 0.1rem 0;
  max-width: 100%;
  white-space: normal;
}
h2 .status { margin-left: 0.4rem; }
.status.live { color: var(--ok); background: var(--ok-bg); }
.status.pub  { color: var(--ok); background: var(--ok-bg); }
.status.exp  { color: var(--exp); background: var(--exp-bg); }
.status.dev  { color: var(--dev); background: var(--dev-bg); }
.status.talk { color: var(--dev); background: var(--dev-bg); }
.status.plan { color: var(--none); background: var(--none-bg); }
.status.none { color: var(--none); background: var(--none-bg); }

/* ---------- misc ---------- */

ul.pledge { border-left: 3px solid var(--accent); padding-left: 1rem; list-style: none; }
ul.pledge li { margin: 0.5rem 0; }

ul.doors { list-style: none; padding: 0; }
ul.doors li { padding: 0.5rem 0; border-top: 1px solid var(--line); }
ul.doors li:first-child { border-top: 0; }

/* One continuous line, three measured facts. This is the company site's
   only decorative motion: the same relationship surviving every change. */
.continuity {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: 1.4rem;
  margin: 0;
  border-top: 1px solid var(--line);
}
.continuity::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: continuity-travel 9s cubic-bezier(.45, 0, .2, 1) infinite;
}
.continuity div { min-width: 0; }
.continuity dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.continuity dd { margin: 0.35rem 0 0; line-height: 1.45; }

.statement {
  display: grid;
  grid-template-columns: minmax(10rem, 0.65fr) minmax(0, 1.6fr);
  gap: 2rem 4rem;
  align-items: start;
}
.statement .kicker { margin-top: 0.45rem; }
.statement-copy h2 { margin-top: 0; }
.statement-copy p { font-size: 1.1rem; color: var(--muted); }

@keyframes continuity-travel {
  0%, 8% { left: 0; opacity: 0; }
  14% { opacity: 1; }
  86% { opacity: 1; }
  92%, 100% { left: calc(100% - 5px); opacity: 0; }
}

@media (max-width: 44rem) {
  .hero:has(h1.master) { min-height: auto; padding-top: 4.5rem; }
  .continuity { grid-template-columns: 1fr; gap: 1.1rem; }
  .statement { grid-template-columns: 1fr; gap: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .continuity::before { animation: none; left: 0; opacity: 1; }
  .btn, header.top nav a { transition: none; }
}

/* ---------- footer ---------- */

footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem min(1.5rem, 24px) 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* The asterisk convention (2026-09-05): a claim still being implemented,
   planned, or not yet independently verified carries this mark, linking
   to the legend on the legal page. */
.mark { font-size: 0.7em; vertical-align: super; text-decoration: none; margin-left: 0.15em; font-weight: 600; color: var(--muted, inherit); }

/* ---------- v4 (2026-09-25): systems that work together, drawn live ----------
   Owner direction: add life, keep the audience in mind. For business
   visitors this is a precise instrument rather than a sketchbook: a warm
   drafting sheet by day, an instrument-blue night, hairline geometry, and
   two drawings that move without a line of script — an orrery of the
   person's systems (models change; the line to the person holds) and the
   bridge between Kathmandu and Yokosuka. A no-script toggle pauses both. */

:root {
  --hair: color-mix(in srgb, var(--ink) 20%, transparent);
  --plate: color-mix(in srgb, var(--ink) 5.5%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1117;
    --card: #131a22;
    --ink: #e7ebf0;
    --muted: #97a3b0;
    --line: #242e39;
    --accent: #8db4e2;
    --accent-ink: #0d1117;
    --accent-soft: #1d2b3d;
    --ok: #9fd3b6;
    --ok-bg: #14261e;
    --exp: #e8bd7f;
    --exp-bg: #2f2415;
    --dev: #a4c4ea;
    --dev-bg: #182536;
    --none: #97a3b0;
    --none-bg: #1b222b;
    --plate: color-mix(in srgb, var(--accent) 7%, transparent);
  }
}

h1.master { letter-spacing: -0.04em; }
/* Japanese display type breaks only at the phrase marks in the markup. */
:lang(ja) h1.master { word-break: keep-all; overflow-wrap: normal; letter-spacing: -0.02em; }

/* The hero holds the thesis and the instrument side by side. */
.hero.with-drawing { max-width: none; }
@media (min-width: 62rem) {
  .hero.with-drawing:has(h1.master) {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(19rem, 0.88fr);
    gap: 2rem 3.5rem;
    align-items: center;
  }
  .hero.with-drawing h1.master { font-size: clamp(3rem, 4.9vw, 4.7rem); }
}
.hero-figure { margin: 0; position: relative; }
@media (max-width: 62rem) { .hero-figure { max-width: 26rem; margin: 2.5rem auto 0; } }

.orrery, .bridge { display: block; width: 100%; height: auto; overflow: visible; }
.orrery .grid-line { stroke: var(--plate); stroke-width: 1; }
.orrery .ticks { stroke: var(--hair); stroke-width: 1; }
.orrery .axis { stroke: var(--hair); stroke-width: .75; stroke-dasharray: 2 7; }
.orrery .ring { fill: none; stroke: color-mix(in srgb, var(--ink) 30%, transparent); stroke-width: 1.1; stroke-dasharray: 1 1; }
.orrery .ring-label, .orrery .person-label {
  font: 600 10.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  fill: var(--muted);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.orrery .person-label { fill: var(--ink); letter-spacing: .12em; }
:lang(ja) .orrery .ring-label, :lang(ja) .orrery .person-label { letter-spacing: .06em; font-size: 11.5px; }
.orrery .spoke { stroke: color-mix(in srgb, var(--accent) 42%, transparent); stroke-width: 1; }
.orrery .signal { fill: var(--accent); opacity: 0; }
.orrery .node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.orrery .shape { fill: var(--accent); opacity: 0; }
.orrery .shape.s1 { opacity: 1; }
.orrery .person { fill: var(--accent); }
.orrery .person-halo { fill: color-mix(in srgb, var(--accent) 15%, transparent); }

.bridge { max-width: 40rem; margin: 1.8rem 0 .4rem; }
.bridge-arc { fill: none; stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1.4; stroke-dasharray: 1 1; }
.city { fill: var(--accent); }
.city-ring { fill: none; stroke: color-mix(in srgb, var(--accent) 35%, transparent); stroke-width: 1; }
.city-name { font: 650 15px -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif; fill: var(--ink); }
.city-sub { font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif; fill: var(--muted); }
.gap { font: 600 11px -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif; letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); }
:lang(ja) .gap { letter-spacing: .06em; }
.bridge-signal { fill: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .orrery .orbit {
    transform-box: view-box;
    transform-origin: 240px 240px;
    animation: orbit var(--period) linear infinite var(--dir);
  }
  .orrery .ring { stroke-dashoffset: 1; animation: draw-ring 1.9s cubic-bezier(.16, 1, .3, 1) forwards; }
  .orrery .ring-2 { animation-delay: .12s; }
  .orrery .ring-3 { animation-delay: .24s; }
  .orrery .ring-4 { animation-delay: .36s; }
  .orrery .signal { animation: signal var(--beat) cubic-bezier(.45, 0, .25, 1) infinite; }
  .orrery .shape { animation: model-change 12s linear infinite; }
  .orrery .shape.s2 { animation-delay: -9s; }
  .orrery .shape.s3 { animation-delay: -6s; }
  .orrery .shape.s4 { animation-delay: -3s; }
  .orrery .person-halo { transform-box: fill-box; transform-origin: center; animation: breathe 6s ease-in-out infinite; }
  .bridge-runner { transform-box: view-box; animation: cross 7s cubic-bezier(.45, 0, .2, 1) infinite alternate; }
  .city-ring { transform-box: fill-box; transform-origin: center; animation: breathe 7s ease-in-out infinite; }
  .city-ring + .city ~ .city-ring { animation-delay: -3.5s; }
}
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes draw-ring { to { stroke-dashoffset: 0; } }
@keyframes signal {
  0% { transform: translateX(0); opacity: 0; }
  14% { opacity: 1; }
  50% { transform: translateX(var(--reach)); opacity: 1; }
  64% { opacity: .85; }
  100% { transform: translateX(0); opacity: 0; }
}
@keyframes model-change { 0%, 22% { opacity: 1; } 25%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes breathe { 50% { transform: scale(1.14); opacity: .65; } }
@keyframes cross { 0%, 12% { transform: rotate(0deg); } 88%, 100% { transform: rotate(var(--sweep)); } }

/* One toggle stills both drawings; it needs no script (WCAG 2.2.2). */
.motion-pause { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .6rem;
  padding: .35rem 0;
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.motion-toggle::before {
  content: "";
  width: 8px;
  height: 10px;
  border-inline: 2.5px solid currentColor;
}
.motion-toggle:hover { color: var(--ink); }
.motion-pause:focus-visible + .motion-toggle { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.when-paused { display: none; }
body:has(.motion-pause:checked) .when-paused { display: inline; }
body:has(.motion-pause:checked) .when-moving { display: none; }
body:has(.motion-pause:checked) .motion-toggle::before {
  width: 0;
  height: 0;
  border-inline: 0;
  border-left: 9px solid currentColor;
  border-block: 5.5px solid transparent;
}
body:has(.motion-pause:checked) :is(.orrery, .bridge) * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .motion-pause, .motion-toggle { display: none; }
}

/* Section labels sit in the margin like a report, not as eyebrows. */
@media (min-width: 72rem) {
  main > section:not(.hero):has(.kicker) { position: relative; padding-left: 12.5rem; }
  main > section:not(.hero):has(.kicker) > h2 > .kicker,
  main > section:not(.hero):has(.kicker) > .kicker {
    position: absolute;
    left: 0;
    width: 10.5rem;
    margin-top: .72rem;
  }
  main > section.statement { display: block; }
}
