/* ============================================================
   KAIYŌ — washi paper & ink
   ============================================================ */

:root {
  --paper: #f4efe6;
  --paper-deep: #ece5d8;
  --ink: #1a1815;
  --ink-soft: #4a463f;
  --grey: #a39e93;
  --vermillion: #c73e2e;
  --vermillion-deep: #a93225;
  --rule: rgba(26, 24, 21, 0.18);

  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --font-body: "Karla", "Helvetica Neue", sans-serif;

  --space-section: clamp(7rem, 16vh, 12rem);
  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --ease-calm: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper grain — low-opacity SVG noise over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 1.25rem;
}

p { margin: 0 0 1.25rem; }

a {
  color: inherit;
  text-decoration: none;
}

/* Red underline that draws in */
.topbar__nav a,
.footer a {
  position: relative;
  padding-bottom: 2px;
}

.topbar__nav a::after,
.footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--vermillion);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-calm);
}

.topbar__nav a:hover::after,
.topbar__nav a:focus-visible::after,
.footer a:hover::after,
.footer a:focus-visible::after {
  transform: scaleX(1);
}

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

:focus-visible {
  outline: 2px solid var(--vermillion);
  outline-offset: 4px;
}

.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;
}

/* ---------- Shared decorative elements ---------- */

.ink-rule {
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
  margin: 2.5rem 0;
}

.ink-rule--section {
  max-width: min(880px, calc(100% - 2 * var(--pad-x)));
  margin: 0 auto;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 2rem;
}

.section-label::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--vermillion);
}

.section-label__jp {
  font-family: var(--font-display);
  color: var(--vermillion);
  letter-spacing: 0.1em;
  font-size: 0.85rem;
}

/* Vertical kanji columns */
.kanji-column {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  letter-spacing: 0.5em;
  color: var(--ink-soft);
  margin: 0;
  user-select: none;
}

.kanji-column--hero {
  position: absolute;
  top: 50%;
  right: clamp(1rem, 4vw, 3.5rem);
  transform: translateY(-50%);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  opacity: 0.85;
}

.kanji-column--side {
  position: absolute;
  top: 6rem;
  left: clamp(0.75rem, 2.5vw, 2.5rem);
  font-size: 0.95rem;
  color: var(--grey);
  letter-spacing: 0.6em;
}

.kanji-column--right {
  left: auto;
  right: clamp(0.75rem, 2.5vw, 2.5rem);
}

/* Giant watermark glyphs */
.kanji-watermark {
  position: absolute;
  font-family: var(--font-display);
  color: var(--ink);
  opacity: 0.035;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.kanji-watermark--hero {
  font-size: clamp(18rem, 42vw, 34rem);
  bottom: -6rem;
  left: -4rem;
}

.kanji-watermark--shun {
  font-size: clamp(16rem, 38vw, 30rem);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.kanji-watermark--journey {
  font-size: clamp(14rem, 30vw, 26rem);
  top: 4rem;
  right: -3rem;
}

.kanji-watermark--reserve {
  font-size: clamp(14rem, 30vw, 26rem);
  bottom: -4rem;
  left: -2rem;
}

/* Enso */
.enso { color: var(--vermillion); }
.enso--small { width: 1.6rem; height: 1.6rem; }
.enso--large { width: clamp(4rem, 8vw, 6rem); height: auto; margin-bottom: 2.5rem; opacity: 0.9; }

/* Hanko stamp */
.hanko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  background: var(--vermillion);
  color: var(--paper);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(26, 24, 21, 0.15);
}

.hanko span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.15;
  text-align: center;
}

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem var(--pad-x);
  background: linear-gradient(to bottom, rgba(244, 239, 230, 0.92), rgba(244, 239, 230, 0));
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  letter-spacing: 0.42em;
  font-size: 0.95rem;
}

.topbar__nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.topbar__reserve { color: var(--vermillion); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--pad-x) 5rem;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.55fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding-right: clamp(2.5rem, 7vw, 7rem); /* room for kanji column */
}

.hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 2.25rem;
}

.hero__title {
  font-size: clamp(3.6rem, 11vw, 8.5rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  line-height: 1.04;
  margin: 0 0 2.5rem;
}

.hero__line { display: block; }

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.9;
  margin-bottom: 2.5rem;
}

.hero__figure {
  position: relative;
  margin: 0;
  /* tall narrow column, never full bleed */
  aspect-ratio: 3 / 4.6;
  max-height: 72vh;
  overflow: hidden;
  justify-self: end;
  width: 100%;
}

.hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
}

.hero__figcaption {
  position: absolute;
  bottom: 0.9rem;
  right: 0.9rem;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--paper);
  text-shadow: 0 0 8px rgba(26, 24, 21, 0.5);
}

.scroll-cue {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
}

.scroll-cue__text {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.45em;
  color: var(--grey);
}

.scroll-cue__line {
  width: 1px;
  height: 3.25rem;
  background: var(--ink-soft);
  animation: cue-drop 2.8s var(--ease-calm) infinite;
  transform-origin: top center;
}

@keyframes cue-drop {
  0%   { transform: scaleY(0); }
  45%  { transform: scaleY(1); transform-origin: top center; }
  46%  { transform-origin: bottom center; }
  90%, 100% { transform: scaleY(0); transform-origin: bottom center; }
}

/* ---------- Philosophy ---------- */

.philosophy {
  position: relative;
  padding: var(--space-section) var(--pad-x);
  overflow: hidden;
}

.philosophy__inner {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(3rem, 10vh, 7rem) 0;
}

.philosophy__kicker {
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--vermillion);
  margin-bottom: 3rem;
}

.philosophy__statement {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.85;
  margin-bottom: 0;
}

.philosophy__statement .line-reveal { display: block; }

.philosophy .ink-rule {
  width: 4rem;
  margin: 3rem auto;
}

.philosophy__note {
  color: var(--grey);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Counter ---------- */

.counter {
  position: relative;
  padding: var(--space-section) var(--pad-x);
}

.counter__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.counter__figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.counter__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.counter__heading {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  margin-bottom: 1.75rem;
}

.counter__copy p { max-width: 48ch; }

.stats {
  display: flex;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin: 3rem 0 0;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}

.stats__item dt {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.4rem;
}

.stats__item dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: var(--ink);
}

.stats__item:nth-child(2) dd { color: var(--vermillion); }

/* ---------- Journey timeline ---------- */

.journey {
  position: relative;
  padding: var(--space-section) var(--pad-x);
  overflow: hidden;
}

.journey__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.journey__heading { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }

.journey__intro {
  color: var(--ink-soft);
  max-width: 44ch;
  margin-bottom: 4.5rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: var(--rule);
}

.timeline__item {
  position: relative;
  padding: 0 0 2.75rem;
  max-width: 52ch;
}

.timeline__item:last-child { padding-bottom: 0; }

/* asymmetric offset, Japanese composition */
.timeline__item:nth-child(even) { margin-left: clamp(0rem, 8vw, 5.5rem); }

.timeline__dot {
  position: absolute;
  left: calc(-2rem + 0.25rem - 3.5px);
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vermillion);
}

.timeline__item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.timeline__item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Horizontal gallery ---------- */

.gallery {
  position: relative;
  background: var(--paper-deep);
}

.gallery__pin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  overflow: hidden;
  padding: 5rem 0 4rem;
}

.gallery__head {
  padding: 0 var(--pad-x);
  margin-bottom: 2.75rem;
}

.gallery__head .section-label { margin-bottom: 0; }

.gallery__track {
  display: flex;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  padding: 0 var(--pad-x);
  width: max-content;
  will-change: transform;
}

.gallery__item {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  width: clamp(260px, 34vw, 520px);
}

.gallery__item img {
  width: 100%;
  height: clamp(340px, 58vh, 560px);
  object-fit: cover;
  filter: saturate(0.9);
}

.gallery__item figcaption {
  position: absolute;
  top: 1rem;
  right: -1.7rem;
}

.v-caption {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  color: var(--ink-soft);
}

/* ---------- Itamae ---------- */

.itamae {
  position: relative;
  padding: var(--space-section) var(--pad-x);
}

.itamae__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}

.itamae__figure {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.itamae__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
}

.itamae__heading { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }

.itamae__copy p { max-width: 50ch; }

.pullquote {
  margin: 2.75rem 0 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--vermillion);
}

.pullquote p {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.pullquote cite {
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- Sake ---------- */

.sake { padding: var(--space-section) var(--pad-x); }

.sake__inner { max-width: 820px; margin: 0 auto; }

.sake__heading {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 3rem;
}

.sake__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.sake__table th {
  text-align: left;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
  padding: 0 1rem 0.9rem 0;
  border-bottom: 1px solid var(--ink);
}

.sake__table td {
  padding: 1.15rem 1rem 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.sake__table td:first-child { font-family: var(--font-display); font-size: 1.02rem; }
.sake__table td:nth-child(2) { color: var(--ink-soft); }
.sake__table td:last-child { color: var(--grey); }

.sake__table tbody tr { transition: background-color 0.4s var(--ease-calm); }
.sake__table tbody tr:hover { background: rgba(199, 62, 46, 0.045); }

.sake__note {
  margin-top: 2.25rem;
  color: var(--grey);
  font-size: 0.9rem;
}

/* ---------- Reservation ---------- */

.reserve {
  position: relative;
  padding: var(--space-section) var(--pad-x);
  overflow: hidden;
}

.reserve__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 8vh, 5rem) 0;
}

.reserve__heading { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }

.reserve__detail {
  color: var(--ink-soft);
  margin-bottom: 3rem;
}

.btn-reserve {
  display: inline-block;
  padding: 1.05rem 3.25rem;
  background: var(--vermillion);
  color: var(--paper);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: background-color 0.4s var(--ease-calm), transform 0.4s var(--ease-calm);
}

.btn-reserve:hover,
.btn-reserve:focus-visible {
  background: var(--vermillion-deep);
  transform: translateY(-2px);
}

.reserve__small {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--grey);
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--rule);
  padding: 4.5rem var(--pad-x) 2.5rem;
  background: var(--paper-deep);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  max-width: 1120px;
  margin: 0 auto 3.5rem;
  font-size: 0.92rem;
}

.footer__brand { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }

.hanko--footer { width: 2.75rem; height: 2.75rem; }
.hanko--footer span { font-size: 0.9rem; }

.footer__name {
  font-family: var(--font-display);
  letter-spacing: 0.42em;
  margin: 0;
}

.footer__label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.9rem;
}

.footer__col p { margin-bottom: 0.6rem; line-height: 1.7; }

.footer__col p[lang="ja"] {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--grey);
}

.footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--grey);
}

.footer__base p { margin: 0; }
.footer__base p[lang="ja"] { font-family: var(--font-display); letter-spacing: 0.3em; }

/* ---------- Reveal initial states (JS adds .is-ready to <html>) ---------- */

html.is-ready .reveal,
html.is-ready .line-reveal {
  opacity: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-right: 0;
    gap: 3rem;
  }

  .hero { padding-top: 7rem; }

  .hero__figure {
    justify-self: start;
    max-width: 320px;
    max-height: 56vh;
  }

  .kanji-column--hero {
    top: 7.5rem;
    transform: none;
    font-size: 1.6rem;
    right: 1.25rem;
  }

  .counter__inner,
  .itamae__inner { grid-template-columns: 1fr; }

  .counter__figure,
  .itamae__figure { max-width: 480px; }

  .kanji-column--side { display: none; }
}

@media (max-width: 720px) {
  .topbar__nav a:not(.topbar__reserve) { display: none; }

  .timeline__item:nth-child(even) { margin-left: 0; }

  /* gallery becomes native swipe strip; JS skips the pin */
  .gallery__pin { min-height: 0; }

  .gallery__track {
    width: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 1.5rem;
  }

  .gallery__item { scroll-snap-align: center; width: 78vw; }
  .gallery__item img { height: 60vw; min-height: 280px; }
  .gallery__item figcaption { right: 0.6rem; top: 0.75rem; }
  .gallery__item .v-caption { color: var(--paper); text-shadow: 0 0 8px rgba(26,24,21,0.55); }

  .footer__inner { grid-template-columns: 1fr; gap: 2.25rem; }
  .footer__base { flex-direction: column; align-items: flex-start; }

  .kanji-watermark--hero { font-size: 16rem; left: -3rem; bottom: -3rem; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line { animation: none; transform: scaleY(1); }

  html.is-ready .reveal,
  html.is-ready .line-reveal { opacity: 1; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
