/* 藤 -to-  /  the gate — one column, one button
   ------------------------------------------------------------ */

.body--gate { height: 100%; }

.gate {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 8vh 24px 0;
  isolation: isolate;
}

/* 狭き門 — a single seam of light, the whole composition hangs on it */
.gate__seam {
  position: fixed;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--ink-line) 12%,
    var(--fuji-deep) 46%,
    var(--fuji) 50%,
    var(--fuji-deep) 54%,
    var(--ink-line) 88%,
    transparent 100%
  );
  opacity: .55;
  z-index: -1;
  animation: seam-breathe 7s var(--ease) infinite;
  transition: width var(--slow) var(--ease),
              opacity var(--slow) var(--ease),
              filter var(--slow) var(--ease);
}

@keyframes seam-breathe {
  0%, 100% { opacity: .42; }
  50%      { opacity: .72; }
}

.gate__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 34rem;
  animation: rise 1.6s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* --- eyebrow --- */

.eyebrow {
  font-size: .68rem;
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--paper-dim);
  margin-bottom: clamp(3rem, 9vh, 5.5rem);
}

.eyebrow__latin {
  font-family: var(--serif-la);
  font-style: italic;
  letter-spacing: .22em;
  text-transform: lowercase;
}

/* --- the mark --- */

.mark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 400;
}

.mark__kanji {
  font-size: clamp(4.6rem, 17vw, 8.5rem);
  letter-spacing: .06em;
  text-indent: .06em;
  color: var(--paper);
  text-shadow: 0 0 60px var(--fuji-glow);
}

.mark__latin {
  font-family: var(--serif-la);
  font-size: clamp(.95rem, 2.4vw, 1.2rem);
  letter-spacing: .78em;
  text-indent: .78em;
  color: var(--fuji);
  margin-top: 1.9rem;
  position: relative;
}

.mark__latin::before,
.mark__latin::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 1px;
  background: var(--ink-line);
}
.mark__latin::before { right: calc(100% + 14px); }
.mark__latin::after  { left:  calc(100% + 4px); }

/* --- lede --- */

.lede {
  margin-top: clamp(3rem, 8vh, 4.75rem);
  font-size: clamp(1rem, 3.4vw, 1.22rem);
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--paper);
  opacity: .88;
}

/* --- the one button --- */

.knock {
  position: relative;
  margin-top: clamp(3.25rem, 8vh, 4.5rem);
  padding: 1.15rem 3.6rem 1.25rem;
  background: var(--ink);   /* the door itself — the seam stops at it */
  border: 1px solid var(--ink-line);
  border-radius: 0;
  color: var(--paper);
  font-family: var(--serif-jp);
  font-size: .95rem;
  letter-spacing: .38em;
  text-indent: .38em;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .7s var(--ease), color .7s var(--ease);
}

/* the fill rises from the floor — the gate giving way */
.knock::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--fuji-deep), transparent);
  opacity: 0;
  transform: translateY(30%);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.knock__label { position: relative; z-index: 1; }

.knock__rule {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--fuji);
  transform: translateX(-50%);
  transition: width .8s var(--ease);
}

.knock:hover,
.knock:focus-visible { border-color: var(--fuji-deep); }
.knock:hover::before,
.knock:focus-visible::before { opacity: .5; transform: none; }
.knock:hover .knock__rule,
.knock:focus-visible .knock__rule { width: 100%; }

.knock:active { transform: translateY(1px); }

/* --- note --- */

.note {
  margin-top: 2.1rem;
  font-size: .74rem;
  letter-spacing: .18em;
  color: var(--paper-far);
}

/* --- footer --- */

.gate__foot {
  padding: 4.5rem 0 2.4rem;
  text-align: center;
  font-size: .7rem;
  letter-spacing: .24em;
  color: var(--paper-far);
  animation: rise 1.6s .5s var(--ease) both;
}

.gate__foot-sub {
  margin-top: .55rem;
  font-family: var(--serif-la);
  letter-spacing: .3em;
  opacity: .65;
}

/* --- opening: the seam widens and swallows the page --- */

.gate.is-opening .gate__inner,
.gate.is-opening .gate__foot {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .55s var(--ease), transform .8s var(--ease);
}

.gate.is-opening .gate__seam {
  width: 100vw;
  opacity: 1;
  filter: blur(0);
  background: linear-gradient(to bottom, var(--ink), var(--fuji-deep) 50%, var(--ink));
  animation: none;
  transition: width .95s .25s var(--ease), background .95s .25s var(--ease);
}
