:root {
  --parallax-x: 0px;
  --parallax-y: 0px;
}

/* All three plates share the same canvas geometry; only depth differs. */
.scene-art {
  background-position: center 44%;
  background-size: cover;
  transform: none;
  will-change: transform;
}
.scene-background {
  background-image: url("/assets/maintenance/background.webp");
  transform: translate3d(
      calc(var(--parallax-x) * 0.24),
      calc(var(--parallax-y) * 0.24),
      0
    )
    scale(1.045);
}
.scene-character {
  background-image: url("/assets/maintenance/kisuke-cutout.webp");
  transform: translate3d(
      calc(var(--parallax-x) * 0.85),
      calc(var(--parallax-y) * 0.85),
      0
    )
    scale(1.025);
  filter: drop-shadow(-12px 12px 13px #030c0866);
}
.scene-flowers {
  background-image: url("/assets/maintenance/foreground-flowers.webp");
  transform: translate3d(
      calc(var(--parallax-x) * 1.65),
      calc(var(--parallax-y) * 1.65),
      0
    )
    scale(1.065);
}
.scene-shade {
  background:
    linear-gradient(
      90deg,
      #08120ded 0%,
      #08120dd4 25%,
      #08120d35 51%,
      transparent 70%
    ),
    linear-gradient(
      0deg,
      #101914 0%,
      #10191485 10%,
      transparent 32%,
      transparent 84%,
      #08100c55 100%
    );
}
.scene-glow {
  opacity: 0.75;
}
.site-header {
  height: 92px;
  gap: 12px;
}
.main-site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid #d5dac66b;
  border-radius: 3px;
  background: #12251be8;
  color: #f8f1df;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.main-site-link svg {
  width: 18px;
  height: 18px;
  flex: none;
}
@media (hover: hover) and (pointer: fine) {
  .main-site-link:hover {
    background: #2b4733;
    border-color: #d5dac6;
  }
}
.hero {
  padding: 35px 0 38px;
}
.hero-copy {
  width: 595px;
}
h1 {
  font-size: clamp(52px, 4.85vw, 80px);
  margin-bottom: 20px;
}
.eyebrow {
  margin-bottom: 18px;
}
.intro {
  margin-bottom: 26px;
}

/* The generated frame is decorative; all content stays selectable HTML. */
.speech {
  isolation: isolate;
  max-width: 590px;
  padding: 46px 52px 72px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #192a22;
  box-shadow: none;
}
.speech::before,
.speech::after {
  display: none;
}
.speech-paper {
  position: absolute;
  inset: -14px -22px -14px -17px;
  background: url("/assets/maintenance/bankai-frame.webp") center / 100% 100%
    no-repeat;
  z-index: -1;
  pointer-events: none;
  filter: drop-shadow(0 16px 22px #0005);
}
.speaker-line {
  gap: 14px;
  margin-bottom: 18px;
  align-items: center;
}
.speaker-symbol {
  color: #942d2b;
  width: 24px;
  height: 24px;
  flex: none;
}
.speaker-identity {
  display: grid;
  gap: 4px;
}
.speaker-line h2 {
  font-size: 17px;
  font-weight: 800;
  color: #192a22;
}
.speaker-role {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 550;
  color: #3a443a;
  line-height: 1.45;
}
.speech-text {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
  color: #192a22;
}
.speech-text em {
  font-size: 18px;
}
/* The original greeting keeps its natural height across every tea response. */
#speech-content {
  display: grid;
}
.speech-initial,
.speech-reply {
  grid-area: 1 / 1;
  min-width: 0;
}
.speech-reply {
  visibility: hidden;
  align-self: center;
}
.tea-served .speech-initial {
  visibility: hidden;
}
.tea-served .speech-reply {
  visibility: visible;
}
.tea-question {
  font-size: 24px;
  line-height: 1.3;
  color: #172d21;
  margin-bottom: 22px;
}
.speech-actions {
  gap: 15px;
  flex-wrap: wrap;
}
.tea-button {
  font-size: 14px;
  min-height: 50px;
  padding: 13px 17px;
}
.tea-label-slot {
  display: grid;
  min-width: 0;
}
.tea-label-slot > span {
  grid-area: 1 / 1;
}
.tea-label-reserve {
  visibility: hidden;
}
.tea-button > svg {
  flex: none;
}
.tea-button .button-arrow {
  width: 18px;
  height: 18px;
}
.cup-mark {
  height: 26px;
}
.tea-note {
  font-size: 14px;
  font-weight: 600;
  font-style: normal;
  color: #334333;
  line-height: 1.5;
}
.tea-count {
  display: block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  color: #76352e;
  line-height: 1.5;
  min-height: 1.5em;
}
.tea-count[hidden] {
  display: block;
  visibility: hidden;
}
.tea-served .speech {
  box-shadow: none;
}
.hero-signoff {
  font-size: 11px;
  margin-top: 28px;
}
.tiny-star {
  width: 14px;
  height: 14px;
  flex: none;
}
.site-footer {
  min-height: 65px;
  font-size: 11px;
}

/* Each click adds a retained cup. The entire pile scales to fit its stage. */
.tea-pile {
  position: fixed;
  right: 3vw;
  bottom: 104px;
  width: min(41vw, 700px);
  height: min(48vh, 470px);
  z-index: 4;
  pointer-events: none;
  contain: layout style;
}
.pile-cup {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 160px;
  height: 155px;
  transform-origin: 0 100%;
  transform: translate3d(var(--cup-x), var(--cup-y), 0) scale(var(--cup-scale))
    rotate(var(--cup-rotation));
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.cup-arrival {
  width: 160px;
  height: 155px;
  position: relative;
  animation: cup-arrive 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  filter: drop-shadow(2px 7px 5px #020b0960) hue-rotate(var(--cup-hue));
}
.pile-cup .steam {
  animation: none;
  opacity: 0;
}
.pile-cup.is-warm .steam {
  animation: steam-rise 3.2s ease-out infinite;
}
.tea-served .character-caption {
  opacity: 0;
}
@keyframes cup-arrive {
  0% {
    transform: translateY(-75px) rotate(-14deg);
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  76% {
    transform: translateY(5px) rotate(3deg);
  }
  100% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
}
body.effects-paused .scene-art {
  transform: none;
}
body.effects-paused .pile-cup,
body.effects-paused .cup-arrival {
  transition: none;
  animation: none;
}
body.effects-paused .pile-cup .steam {
  animation: none;
  opacity: 0;
}

@media (min-width: 1700px) {
  .speech {
    margin-top: 0;
  }
  .speech-text {
    font-size: 17px;
  }
  .scene-art {
    background-position: center 40%;
  }
}
@media (min-width: 901px) and (max-width: 1150px) {
  .speech {
    padding: 46px 46px 78px;
  }
  .speaker-role,
  .tea-note {
    font-size: 14px;
  }
  .speech-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .scene-shade {
    background:
      linear-gradient(90deg, #101914ee, #101914c0 37%, transparent 80%),
      linear-gradient(0deg, #101914, transparent 30%);
  }
}
@media (max-width: 900px) {
  .scene-art {
    background-size: auto 850px;
    background-position: 70% -30px;
  }
  .scene-shade {
    background: linear-gradient(
      0deg,
      #101914 0%,
      #101914ed 13%,
      #10191460 34%,
      transparent 65%,
      #10191488 100%
    );
  }
  .hero {
    padding-top: 420px;
  }
  .hero-copy {
    width: 620px;
  }
  h1 {
    font-size: 72px;
  }
  .speech {
    max-width: 100%;
    padding: 48px 52px 80px;
  }
  .tea-pile {
    position: absolute;
    top: 225px;
    bottom: auto;
    right: 3%;
    width: 55%;
    height: 235px;
  }
  .scene-flowers {
    opacity: 0.9;
  }
}
@media (max-width: 540px) {
  .site-header {
    height: 77px;
  }
  .wordmark {
    font-size: 25px;
    gap: 8px;
  }
  .brand-mark {
    width: 27px;
    height: 27px;
  }
  .brand-ai {
    font-size: 9px;
    margin-left: 6px;
    top: 6px;
  }
  .main-site-link {
    font-size: 11px;
    padding: 9px 10px;
    gap: 7px;
  }
  .main-site-link svg {
    width: 16px;
    height: 16px;
  }
  .scene-art {
    background-size: auto 660px;
    background-position: 80% 12px;
  }
  .scene-shade {
    background: linear-gradient(
      to bottom,
      #10191422 0%,
      transparent 35%,
      #10191480 58%,
      #101914ed 83%,
      #101914 100%
    );
  }
  .hero {
    padding-top: 325px;
    padding-bottom: 28px;
  }
  .hero-copy {
    width: 100%;
  }
  h1 {
    font-size: clamp(38px, 10vw, 53px);
    margin-bottom: 18px;
  }
  .speech {
    padding: 60px 32px 90px;
  }
  .speech-paper {
    inset: -13px -14px;
  }
  .speaker-line {
    gap: 10px;
    margin-bottom: 16px;
  }
  .speaker-line h2 {
    font-size: 16px;
  }
  .speaker-role {
    font-size: 13px;
    display: block;
  }
  .speech-text {
    font-size: 15px;
  }
  .tea-question {
    font-size: 23px;
  }
  .speech-actions {
    align-items: stretch;
  }
  .tea-note {
    font-size: 14px;
    text-align: center;
    align-self: center;
  }
  .tea-count {
    text-align: center;
  }
  .hero-signoff {
    font-size: 10px;
  }
  .tea-pile {
    top: 230px;
    right: 8px;
    width: 66%;
    height: 160px;
  }
  .scene-flowers {
    opacity: 0.65;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-art {
    transform: none;
  }
  .pile-cup,
  .cup-arrival {
    transition: none;
    animation: none;
  }
  .pile-cup .steam {
    animation: none;
    opacity: 0;
  }
}
