/* ============================================================
   Landing in Japan — shared stylesheet
   Design: monochrome rail-diagram. Matches the X header.
   Edit tokens below to adjust the whole site at once.
   ============================================================ */

:root {
  --ink:        #080808;   /* page background */
  --ink-soft:   #121212;   /* raised surfaces */
  --paper:      #ffffff;   /* primary text */
  --dim:        #8b8b8b;   /* secondary text */
  --faint:      #5a5a5a;   /* tertiary text, pending items */
  --rail:       #2e2e2e;   /* the line */
  --hairline:   #1e1e1e;   /* dividers */

  --font-body:  "Source Sans 3", ui-sans-serif, system-ui, -apple-system,
                "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --measure:    68ch;      /* reading width */
  --shell:      920px;     /* page width */
  --step:       clamp(2.5rem, 6vw, 4.5rem);
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  position: fixed;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ---------- typographic utilities ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--hairline);
  padding-block: 1.4rem;
}

.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
}
.wordmark:hover { text-decoration: underline; text-underline-offset: 4px; }

.masthead__nav {
  display: flex;
  gap: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.masthead__nav a {
  color: var(--dim);
  text-decoration: none;
}
.masthead__nav a:hover { color: var(--paper); }

/* ---------- hero ---------- */

.hero {
  padding-block: var(--step) calc(var(--step) * 0.7);
}

.hero h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.6rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.9rem 0 0;
  max-width: 16ch;
}

.hero p {
  margin: 1.4rem 0 0;
  max-width: 52ch;
  color: var(--dim);
  font-size: 1.05em;
}

.hero strong { color: var(--paper); font-weight: 600; }

/* the horizontal rail, echoing the X header */

.chain {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: calc(var(--step) * 0.8);
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.chain::-webkit-scrollbar { display: none; }

.chain__stop {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.chain__stop::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--paper);
  flex: none;
}
.chain__stop:last-child::before {
  background: var(--paper);
}
.chain__link {
  flex: 1 1 2rem;
  min-width: 1.5rem;
  height: 1.5px;
  background: var(--rail);
}

/* ---------- the line: article index ---------- */

.line {
  padding-block: calc(var(--step) * 0.6) var(--step);
}

.leg { margin-bottom: 3.2rem; }

.leg__head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.leg__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.1em;
}

.leg__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}

/* the vertical rail runs down the left of each leg */
.stops {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.9rem;
  position: relative;
}
.stops::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 1.5px;
  background: var(--rail);
}

.stop {
  position: relative;
  padding-block: 0.62rem;
}
.stop::before {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 1.35rem;
  width: 11px; height: 11px;
  margin-left: -0.5px;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
  background: var(--ink);
}

/* published article */
.stop--live::before { border-color: var(--paper); background: var(--paper); }

.stop a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--rail);
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.stop a:hover { border-bottom-color: var(--paper); }

/* not written yet */
.stop--soon { color: var(--faint); }

.stop__tag {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-left: 0.7rem;
  white-space: nowrap;
}

/* ---------- article pages ---------- */

.article {
  padding-block: var(--step);
  max-width: var(--measure);
}

.article h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.8rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.9rem 0 0;
}

.article__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 1.2rem;
}

.article h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}

.article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

.article p, .article li { color: #d8d8d8; }
.article strong { color: var(--paper); font-weight: 600; }

.article a {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rail);
}
.article a:hover { text-decoration-color: var(--paper); }

.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin-block: 0.45rem; }

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.94em;
}
.article th, .article td {
  text-align: left;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.article th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
}

/* inline affiliate notice — required near any affiliate link */
.adnote {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--dim);
  background: var(--ink-soft);
  border-left: 2px solid var(--rail);
  padding: 0.9rem 1.1rem;
  margin: 2rem 0;
}
.adnote a { color: var(--dim); }

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

.foot {
  border-top: 1px solid var(--hairline);
  padding-block: 2.4rem 3.5rem;
  margin-top: var(--step);
}

.foot__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}

.foot p { margin: 0.4rem 0 0; color: var(--faint); font-size: 0.88rem; max-width: 34ch; }

.foot__links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.foot__links a { color: var(--dim); text-decoration: none; }
.foot__links a:hover { color: var(--paper); }

@media (max-width: 560px) {
  .masthead__nav { gap: 1rem; }
  .leg { margin-bottom: 2.6rem; }
}
