/* ============================================================
   ORU — a paper design system
   Inspired by the aesthetic of MUJI origami paper packs.
   MUJI and the MUJI logo are trademarks of Ryohin Keikaku Co., Ltd.
   This is an unofficial design study.

   Palette notes:
   - Signature red #7F0019 is a community-reconstructed value of
     MUJI's wordmark red (Muji publishes no official spec).
   - Kraft #D9CBB3, unbleached #EDE7DA, natural grey #8A8072,
     ink #2E2A26 are sampled from kraft packaging / undyed paper.
   - The 27-sheet pack recreates the muted colouring of MUJI's
     27-colour origami paper (deep, quiet colour on one side,
     white on the reverse).
   ============================================================ */

:root {
  /* Typography */
  --font-body: 'Switzer', 'Helvetica Neue', Helvetica, sans-serif;
  --font-display: 'Switzer', 'Helvetica Neue', Helvetica, sans-serif;
  --font-jp: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  /* Spacing — 4px system */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Surfaces — undyed paper ladder */
  --color-bg: #faf7f0; /* paper white — page */
  --color-surface: #f4eede; /* kinari — card */
  --color-surface-2: #ffffff; /* reverse sheet */
  --color-surface-offset: #ede7da; /* unbleached band */
  --color-surface-offset-2: #e0d8c6; /* deep band */
  --color-divider: #ddd5c4;
  --color-border: #cfc6b2;

  /* Ink */
  --color-text: #2e2a26; /* sumi ink */
  --color-text-muted: #6e675d;
  --color-text-faint: #8a8072; /* natural grey */
  --color-text-inverse: #faf7f0;

  /* Brand — the one red */
  --color-red: #7f0019;
  --color-red-deep: #6b0015;
  --color-red-wash: #f4e6e9;

  /* 27-sheet pack */
  --pack-kraft: #d9cbb3;
  --pack-kraft-deep: #c4b295;
  --pack-cafe: #c9ae8c;
  --pack-cinnamon: #a87c5d;
  --pack-bengara: #8a5a44;
  --pack-chestnut: #6e5a3d;
  --pack-matcha: #7d8b6a;
  --pack-olive: #8b8664;
  --pack-moss: #6d7b5a;
  --pack-shu: #a63d2f;
  --pack-terracotta: #b05c4a;
  --pack-aka: #9e3b34;
  --pack-sakura: #e8c4c4;
  --pack-peach: #efd5c0;
  --pack-barley: #e8dcc0;
  --pack-mint: #c2d4c4;
  --pack-dusty: #a9bcd0;
  --pack-sky: #c4d3de;
  --pack-lavender: #c3bccf;

  /* Sharp geometry — paper folds crisp, not rounded */
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 3px;
  --radius-xl: 3px;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Warm, paper-tinted shadows */
  --shadow-sm: 0 1px 2px oklch(0.28 0.02 80 / 0.07);
  --shadow-md: 0 4px 14px oklch(0.28 0.02 80 / 0.09);
  --shadow-lg: 0 14px 40px oklch(0.28 0.02 80 / 0.14);

  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Hairline */
  --hairline: 1px solid oklch(from var(--color-text) l c h / 0.14);
}

/* ---------- Paper grain overlay ----------
   An feTurbulence-based photographic paper grain, applied as a
   CSS pseudo-element. Multiply on light surfaces, screen on ink. */
.paper-grain {
  position: relative;
  isolation: isolate;
}

.paper-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  mix-blend-mode: multiply;
}

.paper-grain--04::after {
  opacity: 0.04;
}
.paper-grain--06::after {
  opacity: 0.06;
}
.paper-grain--08::after {
  opacity: 0.08;
}
.paper-grain--12::after {
  opacity: 0.12;
}

.paper-grain--light::after {
  mix-blend-mode: screen;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-8));
}

.container--wide {
  max-width: var(--content-wide);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  border-top: var(--hairline);
}

.section--offset {
  background: var(--color-surface-offset);
}

/* Section index + heading */
.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-16));
}

.section-index {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--color-red);
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.section-title--jp {
  font-family: var(--font-jp);
  color: var(--color-text-faint);
  font-weight: 400;
  margin-left: var(--space-2);
  font-size: var(--text-lg);
}

.lede {
  color: var(--color-text-muted);
  max-width: 52ch;
  font-size: var(--text-base);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-3);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.wordmark-chip {
  background: var(--color-red);
  color: var(--color-text-inverse);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.wordmark-jp {
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  letter-spacing: 0.35em;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: clamp(var(--space-4), 3vw, var(--space-8));
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  padding-block: var(--space-2);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-red);
}

@media (max-width: 640px) {
  .wordmark-jp {
    display: none;
  }
  .site-header__inner {
    gap: var(--space-3);
  }
  .site-nav {
    gap: var(--space-3);
  }
  .site-nav a {
    font-size: var(--text-xs);
    letter-spacing: 0;
    padding-block: var(--space-3);
  }
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--color-red);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-6);
}

.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: var(--space-6);
}

.hero h1 em {
  font-style: normal;
  color: var(--color-red);
}

.hero-jp {
  font-family: var(--font-jp);
  color: var(--color-text-faint);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

.hero-copy {
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-8);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.hero-meta span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-red);
  margin-right: var(--space-2);
  transform: translateY(-1px);
}

/* Vertical Japanese caption on the hero edge */
.hero-vertical {
  position: absolute;
  top: 50%;
  right: var(--space-2);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  letter-spacing: 0.6em;
  color: var(--color-text-faint);
}

@media (max-width: 1100px) {
  .hero-vertical {
    display: none;
  }
}

/* Hero crane stage */
.hero-figure {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(var(--space-6), 4vw, var(--space-12));
}

.hero-figure svg {
  width: min(100%, 460px);
  height: auto;
  filter: drop-shadow(0 18px 32px oklch(0.3 0.03 70 / 0.18));
}

.hero-sheet {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* ---------- Palette ---------- */
.palette-group {
  margin-bottom: var(--space-12);
}

.palette-group h3 {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.palette-group .palette-note {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-bottom: var(--space-6);
  max-width: 60ch;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(158px, 100%), 1fr));
  gap: var(--space-3);
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border: var(--hairline);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 44px;
}

.swatch:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.swatch:active {
  transform: translateY(0);
}

.swatch-chip {
  height: clamp(64px, 9vw, 96px);
  border-bottom: var(--hairline);
}

.swatch-body {
  padding: var(--space-2) var(--space-3) var(--space-3);
  display: grid;
  gap: 2px;
}

.swatch-name {
  font-size: var(--text-sm);
  font-weight: 500;
}

.swatch-hex {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.swatch-use {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---------- Texture section ---------- */
.texture-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-8), 4vw, var(--space-12));
  align-items: start;
}

.texture-layout > * {
  min-width: 0;
}

.texture-cards {
  min-width: 0;
}

@media (min-width: 900px) {
  .texture-layout {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.texture-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--space-4);
}

.texture-card {
  border: var(--hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-2);
}

.texture-card__surface {
  height: 150px;
  border-bottom: var(--hairline);
}

.texture-card__meta {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.texture-card__meta dt {
  font-size: var(--text-sm);
  font-weight: 500;
}

.texture-card__meta dd {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.code-recipe {
  background: var(--color-text);
  color: #d8d2c4;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  font-size: var(--text-xs);
  line-height: 1.7;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-top: var(--space-6);
  max-width: 56ch;
}

.code-recipe .c {
  color: #8a8072;
}
.code-recipe .k {
  color: #d9a0a8;
}

/* ---------- Typography section ---------- */
.specimen {
  display: grid;
  gap: var(--space-8);
}

.specimen-hero {
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.specimen-hero .jp {
  font-family: var(--font-jp);
  color: var(--color-red);
  font-weight: 400;
}

.specimen-weights {
  display: grid;
  gap: var(--space-3);
  border-top: var(--hairline);
  padding-top: var(--space-6);
}

.specimen-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: baseline;
  border-bottom: var(--hairline);
  padding-bottom: var(--space-3);
}

.specimen-row .sample {
  font-size: var(--text-lg);
}

.specimen-row .w300 {
  font-weight: 300;
}
.specimen-row .w400 {
  font-weight: 400;
}
.specimen-row .w500 {
  font-weight: 500;
}

.specimen-row .label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.type-scale {
  display: grid;
  gap: var(--space-2);
  border-top: var(--hairline);
  padding-top: var(--space-6);
}

.type-scale-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-2);
  border-bottom: var(--hairline);
}

.type-scale-row .token {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.type-scale-row .demo {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* ---------- Fold iconography ---------- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(215px, 100%), 1fr));
  gap: var(--space-4);
}

.fold-icon {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  align-items: flex-start;
  min-height: 44px;
}

.fold-icon svg {
  width: 56px;
  height: 56px;
}

.fold-icon figcaption {
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fold-icon .icon-note {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-faint);
}

.fold-icon .icon-note [lang='ja'] {
  word-break: keep-all;
}

/* Fold-line draw-on hover */
.fold-icon .fold-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.fold-icon:hover .fold-line,
.fold-icon:focus-visible .fold-line {
  animation: redraw 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes redraw {
  from {
    stroke-dashoffset: 240;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fold-icon:hover .fold-line,
  .fold-icon:focus-visible .fold-line {
    animation: none;
  }
}

/* ---------- Pattern showcase ---------- */
.pattern-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .pattern-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pattern-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pattern-card--wide {
    grid-column: span 2;
  }
}

.pattern-card {
  display: grid;
  grid-template-columns: 1fr;
  text-align: left;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  overflow: hidden;
  min-height: 44px;
  padding: 0;
}

@media (min-width: 640px) {
  .pattern-card--row {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.pattern-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pattern-card:active {
  transform: translateY(0);
}

.pattern-card__figure {
  display: grid;
  place-items: center;
  padding: var(--space-6);
  border-bottom: var(--hairline);
}

.pattern-card--row .pattern-card__figure {
  border-bottom: none;
  border-right: var(--hairline);
}

.pattern-card__figure svg {
  width: 120px;
  height: 120px;
}

.pattern-card__body {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.pattern-card__name {
  font-size: var(--text-lg);
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.pattern-card__name .jp {
  font-family: var(--font-jp);
  font-weight: 400;
  color: var(--color-text-faint);
  font-size: var(--text-base);
}

.pattern-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.difficulty {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.difficulty i {
  width: 5px;
  height: 5px;
  background: var(--color-text-faint);
  display: inline-block;
}

.difficulty i.on {
  background: var(--color-red);
}

.pattern-card__cta {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-red);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.pattern-card__cta::after {
  content: '→';
  transition: transform var(--transition-interactive);
}

.pattern-card:hover .pattern-card__cta::after,
.pattern-card:focus-visible .pattern-card__cta::after {
  transform: translateX(4px);
}

/* ---------- Fold guide modal ---------- */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: oklch(from var(--color-text) l c h / 0.45);
  backdrop-filter: blur(3px);
  padding: clamp(var(--space-4), 4vw, var(--space-10));
  overflow-y: auto;
}

.guide-overlay[open],
.guide-overlay.is-open {
  display: grid;
  place-items: center;
}

.guide {
  width: min(880px, 100%);
  background: var(--color-bg);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.guide__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: var(--hairline);
}

.guide__title {
  font-size: var(--text-lg);
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.guide__title .jp {
  font-family: var(--font-jp);
  font-weight: 400;
  color: var(--color-text-faint);
  font-size: var(--text-base);
}

.guide__close {
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
}

.guide__close:hover {
  color: var(--color-red);
}

.guide__body {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .guide__body {
    grid-template-columns: 1fr 1fr;
  }
}

.guide__diagram {
  padding: var(--space-6);
  display: grid;
  place-items: center;
  background: var(--color-surface-offset);
  border-bottom: var(--hairline);
}

@media (min-width: 720px) {
  .guide__diagram {
    border-bottom: none;
    border-right: var(--hairline);
  }
}

.guide__diagram svg {
  width: min(100%, 320px);
  height: auto;
}

.guide__steps {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.guide__step-label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
}

.guide__step-text {
  font-size: var(--text-base);
  color: var(--color-text);
  max-width: 40ch;
  min-height: 5.5em;
}

.guide__notation {
  display: grid;
  gap: var(--space-2);
  border-top: var(--hairline);
  padding-top: var(--space-4);
}

.guide__notation li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.guide__notation svg {
  width: 44px;
  height: 18px;
  flex: none;
}

.guide__foot {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-top: var(--hairline);
}

.guide-dots {
  display: flex;
  gap: var(--space-2);
  margin-inline: auto;
}

.guide-dots i {
  width: 6px;
  height: 6px;
  background: var(--color-text-faint);
  opacity: 0.4;
  transition: all var(--transition-interactive);
}

.guide-dots i.on {
  background: var(--color-red);
  opacity: 1;
  transform: scale(1.25);
}

.guide-btn {
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--space-4);
  border: var(--hairline);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.guide-btn:hover:not(:disabled) {
  border-color: var(--color-red);
  color: var(--color-red);
}

.guide-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translate(-50%, 20px);
  background: var(--color-text);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: var(--hairline);
  padding-block: var(--space-10);
  background: var(--color-surface);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 760px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.site-footer p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 64ch;
}

.site-footer .fine {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}

.site-footer-jp {
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  height: 6.5em;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 600ms ease,
    transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Origami diagram shared styles ---------- */
.od {
  --od-paper: #f4eede; /* kinari — reverse */
  --od-ink: #2e2a26;
  --od-red: #7f0019;
  --od-front: #d9cbb3; /* kraft — coloured face */
}

.od .paper {
  fill: var(--od-paper);
  stroke: var(--od-ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.od .paper--front {
  fill: var(--od-front);
}

.od .valley {
  fill: none;
  stroke: var(--od-ink);
  stroke-width: 1.3;
  stroke-dasharray: 7 5;
}

.od .mountain {
  fill: none;
  stroke: var(--od-ink);
  stroke-width: 1.3;
  stroke-dasharray: 11 4 2 4;
}

.od .crease {
  fill: none;
  stroke: var(--od-ink);
  stroke-width: 0.7;
  opacity: 0.35;
  stroke-dasharray: 2 4;
}

.od .arrow {
  fill: none;
  stroke: var(--od-red);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.od .arrow-head {
  fill: var(--od-red);
}
