/* ==========================================================================
   AIVEN LP — base
   Tokens, fonts, reset. Shared by every chapter.
   ========================================================================== */

@font-face {
  font-family: "AIVEN Display";
  src: url("../assets/fonts/InterDisplay-Black-subset.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: block; /* preloaded & tiny: avoid a width jump of the headline */
}
@font-face {
  font-family: "AIVEN Text";
  src: url("../assets/fonts/Inter-Medium-subset.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color — black / grey / off-white */
  --c-black: #0b0b0b;
  --c-ink: #141413;
  --c-graphite: #2a2a29;
  --c-grey: #8b8a87;
  --c-mist: #c9c8c4;
  --c-offwhite: #f2f1ed;
  --c-white: #ffffff;

  /* Type */
  --font-display: "AIVEN Display", "Inter Display", "Helvetica Neue", Arial, sans-serif;
  --font-text: "AIVEN Text", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-jp: "Hiragino Sans", "Noto Sans JP", sans-serif;

  /* Layout — SP 390 base, 20px gutters → PC 1440 */
  --gutter: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Viewport units with fallbacks (iOS Safari toolbar safe) */
  --vh-small: 100vh;
  --vh-large: 100vh;
}
@supports (height: 100svh) {
  :root {
    --vh-small: 100svh;
    --vh-large: 100lvh;
  }
}
@media (min-width: 768px) {
  :root { --gutter: 40px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 64px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--c-black);
  overflow-x: clip; /* no horizontal overflow; `clip` keeps position:sticky working */
}
body {
  margin: 0;
  min-height: 100%;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 1px solid var(--c-white);
  outline-offset: 4px;
}

.page {
  position: relative;
  width: 100%;
  overflow-x: clip;
}

/* Small "↗" — the Inter "→" turned 45° (the subset font has no ↗ glyph) */
.arrow-ne {
  display: inline-block;
  transform: rotate(-45deg);
  letter-spacing: 0;
}
