/* ==========================================================================
   KUMO IZAKAYA — Reset, base typography, accessibility primitives
   ========================================================================== */

*, *::before, *::after{ box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd{ margin: 0; }
ul[class], ol[class]{ margin: 0; padding: 0; list-style: none; }
img, svg{ display: block; max-width: 100%; }
button, input, select, textarea{ font: inherit; color: inherit; }
a{ color: inherit; }

html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

body{
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: var(--lh-body-sans);
  color: var(--washi);
  background: var(--sumi);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
}

p{ max-width: var(--measure); }

/* Fonts not yet loaded: keep the wordmark hidden to avoid a FOUT reflow
   (see js/main.js — flips this class once document.fonts.ready resolves,
   with a timed failsafe). */
.wordmark{ visibility: hidden; }
html.fonts-loaded .wordmark{ visibility: visible; }

/* ---- Focus ---- */
:focus{ outline: none; }
:focus-visible{
  outline: 2px solid var(--kin);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Skip link ---- */
.skip-link{
  position: absolute;
  left: var(--sp-4);
  top: -3rem;
  z-index: 200;
  background: var(--washi);
  color: var(--sumi-text);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--step-small);
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus{ top: var(--sp-4); }

/* ---- Screen-reader only ---- */
.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Selection ---- */
::selection{ background: var(--kin); color: var(--sumi); }

/* ---- Mobile nav panel open: lock background scroll ---- */
html.is-locked{ overflow: hidden; }

/* ---- Lazy background photos ----
   [data-lazy-bg] elements carry their real background-image as an inline
   style (see index.html / tokens.css). With JS, hold that image back with
   !important until js/main.js's IntersectionObserver adds .bg-in as the
   element nears the viewport. Without JS (no html.js class) this rule
   never applies, so the image just shows immediately — never a stuck-empty
   section for no-JS visitors. */
html.js [data-lazy-bg]:not(.bg-in){
  background-image: none !important;
}

/* ---- Scroll reveal (Zuma-style entrance) ----
   .reveal elements are only given the hidden "pre" state by JS, once it has
   confirmed prefers-reduced-motion is off — so no-JS and reduced-motion
   visitors simply see the finished page, never a stuck-invisible section. */
.reveal.pre{
  opacity: 0;
  transform: translateY(var(--reveal-y));
}
.reveal{
  transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease);
}
/* Stagger repeated items (kaiseki steps, venue photos) by list position */
.kaiseki-step.reveal:nth-child(1){ transition-delay: 0ms; }
.kaiseki-step.reveal:nth-child(2){ transition-delay: 70ms; }
.kaiseki-step.reveal:nth-child(3){ transition-delay: 140ms; }
.kaiseki-step.reveal:nth-child(4){ transition-delay: 210ms; }
.kaiseki-step.reveal:nth-child(5){ transition-delay: 280ms; }
.venue .media.reveal:nth-child(1){ transition-delay: 0ms; }
.venue .media.reveal:nth-child(2){ transition-delay: 90ms; }
.venue .media.reveal:nth-child(3){ transition-delay: 180ms; }
.venue .media.reveal:nth-child(4){ transition-delay: 270ms; }

/* ---- Reduced motion: kill everything but instant state ---- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
