/*
 * 七弐八製麺 — actual timber, one ink wash, the supplied brush logo.
 * Load last, after international.css and locale-fonts.css.
 * DOM, 2.8 s phase changes, replay, skip and the trace flight belong to JS.
 * The outer #intro-trace has no CSS animation/transition: JS owns its flight.
 * Measure the final logo rect before enabling the press animation.
 */

:root {
  --wood-grain: url("/assets/wood-grain.webp");
  --reed-grain: url("/assets/reed-grain.webp");
  /* A generated mask is optional; never ship its generating placeholder. */
  --ink-mask: linear-gradient(transparent, transparent);
  --intro-logo-width: clamp(160px, 24vw, 300px);
  --wood-control-width: clamp(150px, 17vw, 230px);
}

/* Paper remains the masthead; only its material edge is timber. */
.site-header::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 4px;
  background: var(--wood-grain) center / 460px auto repeat-x;
  content: "";
  pointer-events: none;
}

/* No invented plaster or broad brown surfaces behind the reading. */
.menu-section,
.story-section,
.guide-section,
.space-section,
.faq-section {
  background-image: none;
}

.price-paper {
  isolation: isolate;
  background-image: none;
  border-inline-color: rgb(43 33 27 / 8%);
}

.price-paper::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--reed-grain) center / 340px auto repeat;
  opacity: .035;
  content: "";
  pointer-events: none;
}

.scroll-rod {
  height: 14px;
  border-radius: 1px;
  background: var(--wood-grain) center / 440px auto repeat-x;
  box-shadow: inset 0 1px rgb(242 233 216 / 20%), inset 0 -2px rgb(43 33 27 / 30%);
}

.scroll-rod::before,
.scroll-rod::after {
  top: -2px;
  width: 9px;
  height: 18px;
  border: 1px solid rgb(43 33 27 / 26%);
  background: var(--wood-grain) center / 150px auto;
}

#story::after {
  position: absolute;
  right: var(--gutter);
  bottom: 0;
  left: var(--gutter);
  height: 5px;
  background: var(--wood-grain) center / 460px auto repeat-x;
  opacity: .72;
  content: "";
  pointer-events: none;
}

#story .craft-line {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: baseline;
  gap: 24px 6%;
  margin-top: clamp(42px, 5vw, 72px);
  border-top: 1px solid var(--ink-line);
  padding-top: 26px;
}

.craft-line h3 {
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.5;
  text-wrap: pretty;
}

.craft-line p {
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.85;
  text-wrap: pretty;
}

/* Two actual photographs: portrait sign / wide counter, not three cards. */
#space .space-history {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .35fr) minmax(0, .65fr);
  align-items: start;
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(36px, 5vw, 76px);
}

.space-history figure {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.space-history .wood-room {
  margin-top: clamp(64px, 8vw, 132px);
}

.space-history figure > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  border-block: 8px solid transparent;
  border-inline: 3px solid transparent;
  border-radius: 0;
  background: var(--wood-grain) center / 460px auto repeat;
  object-fit: contain;
  transform: none;
}

.space-history :is(figcaption, h3, p) {
  position: static;
  color: var(--indigo);
  background: none;
}

.space-history figcaption {
  padding: 22px 0 0;
}

.space-history h3 {
  margin-top: 22px;
  font-size: clamp(24px, 2.45vw, 36px);
  line-height: 1.5;
  text-wrap: pretty;
}

.space-history figcaption h3 {
  margin-top: 0;
}

.space-history p {
  max-width: 56ch;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.85;
  text-wrap: pretty;
}

/* All decorative entrance layers pass input through to the real page. */
#curtain,
#ink-transition,
#intro-trace,
#intro-caption,
.hero-brand-stamp,
.hero-brand-stamp * {
  pointer-events: none;
}

#curtain,
#ink-transition,
#intro-trace,
#intro-caption {
  display: none;
}

#curtain {
  position: fixed;
  z-index: 10000;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  animation: none;
}

#curtain .entrance-scene {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: var(--indigo);
}

#curtain .entrance-scene > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
}

#curtain .entrance-scene > span {
  display: none;
}

#curtain .entrance-scene::after {
  background: linear-gradient(180deg, rgb(43 33 27 / 12%), rgb(43 33 27 / 32%));
}

#curtain .curtain-panel {
  position: absolute;
  z-index: 3;
  top: 0;
  width: 50%;
  height: 100%;
  background-color: var(--indigo);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 5px, rgb(242 233 216 / 2%) 5px 6px),
    linear-gradient(90deg, rgb(43 33 27 / 22%), transparent 34%, rgb(242 233 216 / 3%) 74%, transparent);
  animation: none;
}

#curtain .curtain-left {
  left: 0;
  transform: translateX(-104%);
  transform-origin: left top;
}

#curtain .curtain-right {
  right: 0;
  transform: translateX(104%);
  transform-origin: right top;
}

#curtain .curtain-mark {
  top: 45%;
}

#curtain .curtain-mark > img {
  mix-blend-mode: screen;
}

.curtain-post {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: clamp(12px, 2.2vw, 32px);
  background: var(--wood-grain) center / auto 420px repeat-y;
  box-shadow: inset 2px 0 rgb(242 233 216 / 12%), inset -3px 0 rgb(43 33 27 / 28%);
  pointer-events: none;
}

.post-left { left: 0; }
.post-right { right: 0; }

.entrance-triptych {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  width: min(80vw, 1010px);
  height: min(74vh, 760px);
  height: min(74svh, 760px);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.entrance-cut {
  position: relative;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: transparent;
  transform: none;
  opacity: 0;
}

.entrance-cut:first-child {
  align-self: start;
  margin-top: 5%;
}

.entrance-cut:last-child {
  align-self: end;
  margin-bottom: 4%;
}

.entrance-cut img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entrance-cut .entry-live-video {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: transparent;
  pointer-events: none;
}

/* Independent radial fallback never becomes blank if the mask is unavailable. */
#ink-transition {
  position: fixed;
  z-index: 10001;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.ink-cloud {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(64vmax, 800px);
  aspect-ratio: 1;
  background:
    radial-gradient(ellipse at 48% 48%, rgb(33 25 19 / 98%) 0 24%, transparent 56%),
    radial-gradient(ellipse at 29% 44%, rgb(43 33 27 / 96%) 0 14%, transparent 42%),
    radial-gradient(ellipse at 68% 37%, rgb(40 30 23 / 95%) 0 18%, transparent 46%),
    radial-gradient(ellipse at 57% 71%, rgb(43 33 27 / 96%) 0 17%, transparent 48%);
  transform: translate(-50%, -50%) scale(.15);
  opacity: 0;
}

.ink-cloud::after {
  position: absolute;
  inset: -14%;
  background: rgb(32 24 18 / 96%);
  -webkit-mask-image: var(--ink-mask);
  mask-image: var(--ink-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  content: "";
}

.ink-droplet {
  --ink-x: -25vw;
  --ink-y: -22vh;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  aspect-ratio: .78;
  border-radius: 48% 55% 43% 61%;
  background: #2B211B;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.ink-droplet:nth-of-type(2) { --ink-x: 30vw; --ink-y: -17vh; width: 12px; }
.ink-droplet:nth-of-type(3) { --ink-x: -36vw; --ink-y: 14vh; width: 22px; }
.ink-droplet:nth-of-type(4) { --ink-x: 37vw; --ink-y: 24vh; width: 15px; }
.ink-droplet:nth-of-type(5) { --ink-x: 7vw; --ink-y: -34vh; width: 10px; }
.ink-droplet:nth-of-type(6) { --ink-x: -12vw; --ink-y: 35vh; width: 25px; }

/* The exact supplied SVG glyphs are traced, never substituted with a font. */
#intro-trace {
  position: fixed;
  z-index: 10002;
  top: 45%;
  left: 50%;
  width: var(--intro-logo-width);
  height: auto;
  aspect-ratio: 488 / 500;
  transform: translate(-50%, -50%);
  transform-origin: center;
  color: var(--cream);
  opacity: 1;
  animation: none !important;
  transition: none !important;
}

#intro-trace .logo-contour {
  width: 100%;
  height: 100%;
  opacity: 0;
  filter: drop-shadow(0 2px 4px rgb(33 25 19 / 55%));
}

#intro-trace .logo-outline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  opacity: 1;
  animation: none;
}

#intro-trace .logo-outline path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: none;
}

#intro-trace .logo-fill {
  fill: currentColor;
  clip-path: inset(100% 0 0 0);
  animation: none;
}

#intro-trace .trace-chopsticks {
  display: none !important;
  animation: none !important;
}

.trace-brush {
  position: absolute;
  top: 38%;
  right: 6%;
  width: 5px;
  height: 46%;
  max-height: 100px;
  border-radius: 2px 2px 0 0;
  background: #49382C;
  transform: rotate(29deg);
  transform-origin: center bottom;
  opacity: 0;
  pointer-events: none;
}

.trace-brush::after {
  position: absolute;
  top: 100%;
  left: -2px;
  width: 9px;
  height: 15px;
  background: var(--cream);
  clip-path: polygon(0 0, 100% 0, 78% 65%, 45% 100%, 19% 64%);
  content: "";
}

#intro-caption {
  top: calc(45% + var(--intro-logo-width) * .62);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: .045em;
}

.intro-skip {
  min-width: 44px;
  min-height: 44px;
  max-width: calc(100vw - 40px);
  font-size: 14px;
  line-height: 1.5;
  pointer-events: auto;
}

/* The completed brand is transparent cream calligraphy and the original seal. */
.hero-brand-stamp {
  position: absolute;
  z-index: 4;
  top: 34%;
  right: 9%;
  width: clamp(150px, 20vw, 280px);
  aspect-ratio: 488 / 500;
  margin: 0;
  padding: 0;
  color: var(--cream);
  background: none;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transform-origin: 50% 55%;
  animation: none;
  transition: none;
}

.hero-brand-stamp.stamp-ready,
body.stamp-ready .hero-brand-stamp,
body.intro-done .hero-brand-stamp {
  opacity: 1;
  visibility: visible;
}

.hero-brush-logo {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 488 / 500;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgb(33 25 19 / 60%));
  mix-blend-mode: normal;
  transform: none;
  clip-path: none;
}

.hero-stamp-seal {
  position: absolute;
  right: -8%;
  bottom: -5%;
  width: 28%;
  max-width: none;
  height: auto;
  object-fit: contain;
  filter: none;
  mix-blend-mode: normal;
  transform: none;
  opacity: 1;
}

.stamp-grain {
  position: absolute;
  inset: 0;
  background: var(--reed-grain) center / 220px auto;
  opacity: .025;
  mix-blend-mode: soft-light;
}

/* Same explicit widths keep replay to the left of pause in every language. */
.hero .video-toggle,
.hero .noren-replay {
  position: absolute;
  z-index: 6;
  top: auto;
  bottom: var(--hero-controls-space);
  display: inline-flex;
  width: var(--wood-control-width);
  min-width: 44px;
  min-height: 44px;
  max-width: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgb(242 233 216 / 72%);
  padding: 10px 12px;
  color: var(--cream);
  background: rgb(43 33 27 / 94%);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: auto;
}

.hero .video-toggle {
  right: var(--hero-gutter);
}

.hero .noren-replay {
  right: calc(var(--hero-gutter) + var(--wood-control-width) + 12px);
}

.hero .noren-replay::before {
  flex: 0 0 18px;
  font-size: 20px;
  line-height: 1;
  content: "↺";
}

/* Grain is static; there are no perpetual ink particles or film-panel loops. */
html:not([data-motion="off"]) .hero-steam {
  animation: none;
  transform: none;
}

@media (min-width: 760px) {
  .hero-copy {
    width: 56%;
  }
}

@media (max-width: 759px) {
  /* display:contents lets the existing nested stamp/buttons participate in
   * the hero grid. The video and shades stay absolutely full-bleed. Brand,
   * controls, tabs and status each own a row, independent of text length. */
  .hero,
  body[data-night="true"] .hero {
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
    min-height: max(720px, 85vh);
    min-height: max(720px, 85svh);
    row-gap: 0;
  }

  .hero .hero-composition,
  .hero .hero-screen {
    display: contents;
  }

  .hero-overline {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    padding-bottom: 8px;
  }

  .hero-travel-note {
    max-width: 62%;
    margin-bottom: 22px;
    font-size: 15px;
  }

  .hero-brand-stamp {
    position: relative;
    grid-column: 1;
    grid-row: 3;
    justify-self: end;
    align-self: center;
    top: auto;
    right: auto;
    bottom: auto;
    width: 96px;
    margin: 10px 8px 22px 0;
  }

  .hero .video-toggle,
  .hero .noren-replay {
    position: relative;
    grid-column: 1;
    grid-row: 4;
    align-self: stretch;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: calc(50% - 6px);
    min-height: 44px;
    max-width: 46vw;
    margin: 0 0 16px;
    padding: 9px 10px;
    font-size: 14px;
  }

  .hero .video-toggle { justify-self: end; }
  .hero .noren-replay { justify-self: start; }

  .hero-shot-tabs {
    grid-column: 1;
    grid-row: 5;
  }

  .hero-baseline {
    grid-column: 1;
    grid-row: 6;
  }

  body[data-entry="map"] .hero {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  }

  body[data-entry="map"] .hero-baseline { grid-row: 1; }
  body[data-entry="map"] .hero-overline { grid-row: 2; }
  body[data-entry="map"] .hero-copy { grid-row: 3; }
  body[data-entry="map"] .hero-brand-stamp { grid-row: 4; }
  body[data-entry="map"] .hero :is(.video-toggle, .noren-replay) { grid-row: 5; }
  body[data-entry="map"] .hero-shot-tabs { grid-row: 6; }

  .entrance-triptych {
    width: 88vw;
    height: min(66vh, 540px);
    height: min(66svh, 540px);
    gap: 7px;
  }

  #space .space-history {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
    margin-top: 24px;
  }

  .space-history .wood-room {
    margin-top: 0;
  }

  .space-history figure > img {
    border-block-width: 6px;
  }

  .space-history h3 {
    margin-top: 20px;
    font-size: 27px;
  }

  .space-history p,
  .craft-line p {
    font-size: 14px;
  }

  #story .craft-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 40px;
  }

  .intro-skip {
    top: max(18px, env(safe-area-inset-top));
    right: 18px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .hero .noren-replay:hover {
    background: var(--indigo);
    text-decoration: underline;
    text-underline-offset: .25em;
  }
}

/* Attach to intro-active, not an individual phase: phase changes do not
 * restart the cloth/wash/drawing. Removing intro-active ends them instantly;
 * adding it again restarts the whole 2.8 s sequence. */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) body.intro-active #curtain {
    display: block;
    animation: wood-entrance-clear 150ms ease 1250ms both;
  }

  html:not([data-motion="off"]) body.intro-active #curtain .curtain-left {
    animation: wood-noren-left 700ms cubic-bezier(.4, 0, .2, 1) both;
  }

  html:not([data-motion="off"]) body.intro-active #curtain .curtain-right {
    animation: wood-noren-right 700ms cubic-bezier(.4, 0, .2, 1) both;
  }

  html:not([data-motion="off"]) body.intro-active #curtain .entrance-scene {
    animation: wood-scene-clear 300ms ease 650ms both;
  }

  html:not([data-motion="off"]) body.intro-active .entrance-triptych {
    animation: wood-three-cuts 700ms ease 650ms both;
  }

  html:not([data-motion="off"]) body.intro-active .entrance-cut {
    animation: wood-cut-arrive 260ms cubic-bezier(.22, 1, .36, 1) 650ms both;
  }

  html:not([data-motion="off"]) body.intro-active .entrance-cut:nth-child(2) {
    animation: wood-cut-arrive 260ms cubic-bezier(.22, 1, .36, 1) 650ms both;
  }

  html:not([data-motion="off"]) body.intro-active #ink-transition {
    display: block;
  }

  html:not([data-motion="off"]) body.intro-active .ink-cloud {
    animation: wood-ink-wash 550ms cubic-bezier(.3, 0, .2, 1) 1000ms both;
  }

  html:not([data-motion="off"]) body.intro-active .ink-droplet {
    animation: wood-ink-drop 550ms ease-out 1000ms both;
  }

  html:not([data-motion="off"]) body.intro-active #intro-trace {
    display: block;
  }

  html:not([data-motion="off"]) body.intro-active .brand-logo {
    visibility: visible;
  }

  html:not([data-motion="off"]) body.intro-active #intro-trace .logo-contour {
    animation: wood-trace-show 80ms linear 1350ms both;
  }

  html:not([data-motion="off"]) body.intro-active #intro-trace .logo-outline path {
    animation: wood-glyph-contour 500ms ease 1350ms both;
  }

  html:not([data-motion="off"]) body.intro-active #intro-trace .logo-outline {
    animation: wood-outline-settle 300ms ease 1650ms both;
  }

  html:not([data-motion="off"]) body.intro-active #intro-trace .logo-fill {
    animation: wood-glyph-fill 450ms cubic-bezier(.2, .6, .2, 1) 1550ms both;
  }

  html:not([data-motion="off"]) body.intro-active #intro-trace .trace-brush {
    animation: wood-brush-touch 550ms ease 1350ms both;
  }

  html:not([data-motion="off"]) body.intro-active #intro-caption {
    display: block;
    animation: wood-caption 650ms ease 1350ms both;
  }

  html:not([data-motion="off"]) body.intro-active .intro-skip:not([hidden]) {
    display: inline-flex;
  }

  html:not([data-motion="off"]) body.intro-active[data-entrance="press"] .hero-brand-stamp.stamp-ready.stamp-impact,
  html:not([data-motion="off"]) body.intro-active.stamp-ready[data-entrance="press"] .hero-brand-stamp.stamp-impact {
    animation: wood-brand-press 310ms cubic-bezier(.22, 1, .36, 1) both;
  }

  html:not([data-motion="off"]) body.intro-active[data-entrance="press"] .hero-brand-stamp.stamp-ready.stamp-impact .hero-stamp-seal,
  html:not([data-motion="off"]) body.intro-active.stamp-ready[data-entrance="press"] .hero-brand-stamp.stamp-impact .hero-stamp-seal {
    animation: wood-seal-press 220ms cubic-bezier(.22, 1, .36, 1) 70ms both;
  }
}

@keyframes wood-noren-left {
  0% { transform: translateX(0) skewX(0); }
  12% { transform: translateX(-1%) skewX(-.7deg); }
  100% { transform: translateX(-104%) skewX(-2deg); }
}

@keyframes wood-noren-right {
  0% { transform: translateX(0) skewX(0); }
  12% { transform: translateX(1%) skewX(.7deg); }
  100% { transform: translateX(104%) skewX(2deg); }
}

@keyframes wood-entrance-clear {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes wood-scene-clear {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes wood-three-cuts {
  0% { opacity: 0; }
  20%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes wood-cut-arrive {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wood-centre-reveal {
  0% { opacity: 0; transform: scale(.98); }
  25%, 50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

@keyframes wood-ink-wash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.15); }
  35% { opacity: .95; transform: translate(-50%, -50%) scale(1.7); }
  62% { opacity: .95; transform: translate(-50%, -50%) scale(3.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.5); }
}

@keyframes wood-ink-drop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.15); }
  24% { opacity: .8; }
  64% { opacity: .9; transform: translate(calc(-50% + var(--ink-x)), calc(-50% + var(--ink-y))) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--ink-x)), calc(-50% + var(--ink-y))) scale(.75); }
}

@keyframes wood-trace-show {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wood-glyph-contour {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes wood-outline-settle {
  from { opacity: 1; }
  to { opacity: .18; }
}

@keyframes wood-glyph-fill {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes wood-brush-touch {
  0% { opacity: 0; transform: rotate(29deg) translateY(-4px); }
  22%, 65% { opacity: .65; }
  100% { opacity: 0; transform: rotate(23deg) translateY(8px); }
}

@keyframes wood-caption {
  0% { opacity: 0; }
  20%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes wood-brand-press {
  0% { opacity: 0; transform: scale(1.18); }
  32% { opacity: 1; }
  64% { opacity: 1; transform: scale(.94); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes wood-seal-press {
  0% { opacity: 0; transform: scale(1.2); }
  62% { opacity: 1; transform: scale(.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* Skip, revisit and finish remove intro-active: no delayed stamp is left alive. */
body.intro-done .hero-brand-stamp,
body.intro-done .hero-brush-logo,
body.intro-done .hero-stamp-seal {
  animation: none;
  transition: none;
  transform: none;
  opacity: 1;
}

/* Both ways of disabling motion show only the completed, legible mark. */
html[data-motion="off"] :is(#curtain, #ink-transition, #intro-trace, #intro-caption, .intro-skip),
html[data-motion="off"] .entrance-triptych {
  display: none !important;
}

html[data-motion="off"] :is(.hero-brand-stamp, .hero-brush-logo, .hero-stamp-seal) {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
  clip-path: none !important;
}

@media (prefers-reduced-motion: reduce) {
  :is(#curtain, #ink-transition, #intro-trace, #intro-caption, .intro-skip),
  .entrance-triptych {
    display: none !important;
  }

  :is(.hero-brand-stamp, .hero-brush-logo, .hero-stamp-seal) {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    clip-path: none !important;
  }
}

@media print {
  :is(#curtain, #ink-transition, #intro-trace, #intro-caption, .intro-skip, .hero-brand-stamp, .noren-replay) {
    display: none !important;
  }

  .hero .hero-composition { display: block; }
  .hero .hero-screen { display: none; }
  .space-history { break-inside: avoid; }
}
