/* 藤 -to-  /  base tokens & reset
   ------------------------------------------------------------ */

:root {
  /* native pickers (date / select) follow the ink */
  color-scheme: dark;

  /* 墨 — ink */
  --ink:        #08080a;
  --ink-raise:  #101014;
  --ink-line:   #1e1e24;

  /* 紙 — paper */
  --paper:      #eae7e1;
  --paper-dim:  #8e8b87;
  --paper-far:  #55545a;

  /* 藤 — the single accent */
  --fuji:       #9b8cc4;
  --fuji-deep:  #5c4e86;
  --fuji-glow:  rgba(155, 140, 196, .28);

  --alert:      #c46e6e;

  --serif-jp: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --serif-la: "Cormorant Garamond", "Shippori Mincho B1", serif;
  --sans-jp:  "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --slow: 1.1s;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
}

body {
  font-family: var(--serif-jp);
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.9;
  overflow-x: hidden;
}

/* faint paper grain over the ink — keeps the black from going flat */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 1px solid var(--fuji);
  outline-offset: 4px;
}

.u-hidden { display: none !important; }

.u-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
