@font-face {
  font-family: 'Shippori Mincho';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/shippori-mincho-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Shippori Mincho';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/shippori-mincho-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* two tiny cuts of the same face: the brackets and the one kanji the page uses */
@font-face {
  font-family: 'Shippori Mincho';
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/shippori-mincho-kumo0-500.woff2') format('woff2');
  unicode-range: U+3010-3011;
}
@font-face {
  font-family: 'Shippori Mincho';
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/shippori-mincho-kumo1-500.woff2') format('woff2');
  unicode-range: U+96F2;
}
@font-face {
  font-family: 'Zen Kaku Gothic New';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/zen-kaku-gothic-new-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Zen Kaku Gothic New';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/zen-kaku-gothic-new-latin-500.woff2') format('woff2');
}

:root {
  /* fixed inks */
  --paper: #fbf7ee; /* gofun, shell white */
  --indigo: #10233f; /* ai, the keyblock ink */
  --accent: #e3472b; /* shu, seal vermilion */

  /* inks that follow the sun; main.js rewrites these, the values here are high day */
  --sky-top: #1b4f9c;
  --sky-mid: #3f86cf;
  --sky-hor: #bfddf0;
  --cloud-lit: #eef3f8;
  --cloud-shade: #a2b6d4;
  --fog: #f1f4f6;
  --fog-ink: var(--indigo);
  --fog-soft: rgb(16 35 63 / 0.7);
  --on-cloud: var(--indigo);
  --under-ink: var(--indigo);
  --ceil: #c9d3e2;
  --ceil-deep: #8494b4;
  --gap: #eef4f7;
  --land-far: #6f8fb6;
  --land-mid: #456a98;
  --land-near: #25446f;
  --water: #d5e4ee;
  --win: #1d3559;
  --win-dim: #1d3559;
  --win-train: #8fa5c2;

  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'Songti SC', Georgia, serif;
  --sans: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(1.25rem, 5vw, 5.5rem);
  --edge: clamp(1.1rem, 2.4vw, 2rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--fog);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  visibility: hidden; /* until its first frame is drawn */
}

.sky-on #sky {
  visibility: visible;
}

main,
.bar {
  position: relative;
  z-index: 1;
}

/* ---------- top bar ---------- */

.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--edge) var(--pad);
  color: var(--paper);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font: 500 1.3rem/1 var(--serif);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.seal {
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* pressed a little askew, the way a seal lands */
.mark:hover .seal {
  transform: rotate(-5deg) scale(1.05);
}

/* ---------- above the cloud ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 var(--pad) var(--edge);
}

.hero-copy {
  padding-top: clamp(6rem, 15svh, 10rem);
  max-width: 48rem;
  will-change: opacity, transform;
}

h1 {
  font: 400 clamp(2.75rem, 1.2rem + 5.2vw, 5.75rem) / 1.03 var(--serif);
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 .br {
  display: block;
}

.lede {
  margin-top: clamp(1.1rem, 2.2vw, 1.75rem);
  max-width: 27em;
  font-size: clamp(1.08rem, 0.96rem + 0.5vw, 1.4rem);
  line-height: 1.5;
  text-shadow: 0 0 1.4em rgb(12 30 70 / 0.28);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 3.1rem;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  padding: 0 1.6rem;
  border-radius: 3px;
  background: var(--paper);
  color: var(--indigo);
  font: 500 1rem/1 var(--sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

.btn:active {
  transform: translateY(1px);
}

/* the ring takes the colour of the text around the button, not the text on it */
.btn:focus-visible {
  outline-color: var(--paper);
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  color: var(--on-cloud);
  font-size: 0.9rem;
  line-height: 1.3;
  will-change: opacity;
}

.descend {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  text-decoration: none;
}

.descend .ico {
  width: 1.15rem;
  height: 1.15rem;
  animation: sink 2.6s ease-in-out 3s infinite;
}

.sky-note {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.3;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  cursor: pointer;
}

.sky-note .ico {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sky-note:hover .ico {
  transform: rotate(40deg);
}

.sky-note span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s ease;
}

.sky-note:hover span {
  text-decoration-color: currentColor;
}

.ico {
  flex: none;
}

/* the one arranged moment: we come up out of the cloud and the title settles */
.bar,
h1,
.lede,
.hero .btn,
.hero-foot > * {
  animation: settle 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.bar {
  animation-delay: 1.15s;
}
h1 {
  animation-delay: 0.9s;
}
.lede {
  animation-delay: 1.15s;
}
.hero .btn {
  animation-delay: 1.35s;
}
.hero-foot > * {
  animation-delay: 1.9s;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sink {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(4px);
  }
}

/* ---------- the way down ---------- */

.drop {
  height: 85vh;
  height: 85svh;
}

.drop-2 {
  height: 75vh;
  height: 75svh;
}

/* ---------- inside the cloud ---------- */

.cloud {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 14svh var(--pad);
  color: var(--fog-ink);
}

.entry {
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
  font-size: 1rem;
  color: var(--fog-soft);
}

.entry .kanji {
  font: 500 1.3em/1 var(--serif);
  margin: 0 0.45em 0 0.1em;
  color: var(--fog-ink);
}

.statement {
  max-width: 21em;
  font: 400 clamp(1.7rem, 0.9rem + 2.7vw, 3.4rem) / 1.2 var(--serif);
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.ways {
  list-style: none;
  margin: clamp(3.5rem, 10vh, 7.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4.5vw, 5rem);
  max-width: 72rem;
}

.ways .ico {
  width: 1.75rem;
  height: 1.75rem;
}

.ways h3 {
  margin: 1rem 0 0.45rem;
  font: 500 1.4rem/1.25 var(--serif);
}

.ways p {
  max-width: 23em;
  color: var(--fog-soft);
}

/* ---------- under the cloud ---------- */

.ground {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--under-ink);
}

.ground-copy {
  position: relative;
  z-index: 2;
  max-width: 46rem;
  padding: clamp(5rem, 14svh, 9rem) var(--pad) 0;
}

.ground h2 {
  font: 400 clamp(2.3rem, 1rem + 4.2vw, 4.75rem) / 1.06 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.ground-copy p {
  margin-top: clamp(0.8rem, 1.6vw, 1.25rem);
  font-size: clamp(1.08rem, 0.96rem + 0.5vw, 1.4rem);
  line-height: 1.5;
}

.ground .btn {
  background: var(--under-ink);
  color: var(--under-paper, var(--paper));
}

.ground .btn:hover {
  background: var(--accent);
  color: #fff;
}

.ground .btn:focus-visible {
  outline-color: var(--under-ink);
}

.land {
  position: absolute;
  inset: auto 0 0 0;
  height: min(60svh, 660px);
  z-index: 1;
  pointer-events: none;
}

.land-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.land-svg .layer {
  will-change: transform;
}

.land-svg .road {
  fill: color-mix(in srgb, var(--land-mid) 84%, var(--gap));
}
.land-svg .roof {
  fill: var(--land-near);
}
.land-svg .wall {
  fill: color-mix(in srgb, var(--land-near) 58%, var(--land-mid));
}
.land-svg .tree {
  fill: color-mix(in srgb, var(--land-near) 82%, var(--land-mid));
}
.land-svg .win {
  fill: var(--win);
}
.land-svg .win.dim {
  fill: var(--win-dim);
}
.land-svg .posts path,
.land-svg .wires path {
  fill: none;
  stroke: var(--land-near);
  stroke-linecap: round;
}
.land-svg .wires path {
  opacity: 0.8;
}
.land-svg .can,
.land-svg .near {
  fill: var(--land-near);
}
.land-svg .track {
  fill: none;
  stroke: var(--land-near);
  stroke-width: 1.4;
  opacity: 0.7;
}
.land-svg .car {
  fill: var(--land-near);
}
.land-svg .pane {
  fill: var(--win-train);
}
/* the local comes through about once a minute */
.land-svg .train {
  animation: train 56s linear 4s infinite backwards;
}
@keyframes train {
  0% {
    transform: translateX(-190px);
  }
  36%,
  100% {
    transform: translateX(1790px);
  }
}
.land-svg .bike {
  fill: none;
  stroke: var(--land-near);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem 2rem;
  flex-wrap: wrap;
  padding: var(--edge) var(--pad);
  color: rgb(251 247 238 / 0.78);
  font-size: 0.85rem;
  line-height: 1.4;
}

.foot-note {
  margin-right: auto;
}

.hone {
  position: relative;
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  opacity: 0.62;
  transition: opacity 0.2s ease;
}

.hone svg {
  width: 100%;
  height: 100%;
}

.hone:hover,
.hone:focus-visible {
  opacity: 1;
}

.tip {
  position: absolute;
  right: -0.35rem;
  bottom: calc(100% + 0.75rem);
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  background: var(--paper);
  color: var(--indigo);
  font: 500 0.8rem/1 var(--sans);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tip::after {
  content: '';
  position: absolute;
  right: 0.85rem;
  top: 100%;
  border: 5px solid transparent;
  border-top-color: var(--paper);
}

.hone:hover .tip,
.hone:focus-visible .tip {
  opacity: 1;
  transform: none;
}

/* ---------- paper ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  background-size: 200px 200px;
}

/* ---------- without WebGL the print is still, but it is still the print ---------- */

.no-gl #sky {
  display: none;
}
.no-gl body {
  background: var(--fog);
}
.no-gl .hero {
  background: linear-gradient(
    var(--sky-top),
    var(--sky-mid) 34%,
    var(--sky-hor) 59%,
    var(--cloud-lit) 59.2%,
    var(--cloud-shade) 82%,
    var(--fog)
  );
}
.no-gl .ground {
  background: linear-gradient(var(--fog), var(--ceil-deep) 16%, var(--ceil) 46%, var(--gap) 66%);
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  /* on a narrow screen the valley is cropped to its middle: bring the mountain in with it */
  .land-svg .peak {
    transform-box: view-box;
    transform-origin: 610px 345px;
    transform: translate(230px, 0) scale(0.6);
  }
  .ways {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
  .foot {
    padding-top: calc(var(--edge) * 2.2);
    background: linear-gradient(transparent, var(--land-near) 58%);
  }
  .foot-note {
    order: 3;
    flex-basis: 100%;
    margin: 0;
  }
  .foot .hone {
    margin-left: auto;
  }
  .descend span {
    max-width: 9em;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bar,
  h1,
  .lede,
  .hero .btn,
  .hero-foot > *,
  .descend .ico {
    animation: none;
  }
  .btn,
  .tip,
  .hone,
  .seal,
  .sky-note .ico {
    transition: none;
  }
  .land-svg .train {
    animation: none;
    display: none;
  }
}
