:root {
  color-scheme: dark;
  --forest: #172b1c;
  --panel: rgb(20 39 22 / 78%);
  --panel-border: rgb(239 235 200 / 25%);
  --cream: #faedcc;
  --white: #f8f8f2;
  --lime: #dce581;
  --muted: #c0c3ad;
  --terracotta: #b94722;
  --menu-green: #306e40;
  --menu-ink: #401b11;
  --badge: #2c2119;
  --sans: "Inter", Arial, sans-serif;
  --page-inset-block: clamp(24px, 9.18vh, 94px);
  --page-inset-inline: clamp(24px, 3.44vw, 66px);
  --panel-width: clamp(410px, 27.5vw, 528px);
  --panel-padding-block: clamp(36px, 7.42vh, 76px);
  --panel-padding-bottom: 20px;
  --panel-padding-inline: clamp(24px, 2.92vw, 56px);
  --radius: 22px;
  --space-logo: clamp(22px, 2.93vh, 30px);
  --space-title: clamp(26px, 3.13vh, 32px);
  --space-story: 24px;
  --space-paragraph: 14px;
  --space-invitation: 26px;
  --space-footer: clamp(28px, 3.906vh, 40px);
  --logo-width: clamp(180px, 21.68vh, 222px);
  --title-size: 24px;
  --title-line-height: 26px;
  --story-size: 16px;
  --invitation-size: clamp(20px, 2.344vh, 24px);
  --transition: 180ms ease;
}

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

html {
  background: var(--forest);
}

body {
  margin: 0;
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.opening-page {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--page-inset-block) var(--page-inset-inline);
}

/* The wide scene is enlarged toward the right to match the supplied mockup. */
.shop-scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: block;
  overflow: hidden;
}

.shop-scene__image {
  display: block;
  width: 145%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: left 50%;
}

.shop-scene__fallback,
.shop-scene__stage {
  position: absolute;
  inset: 0;
  display: block;
}

/* All layers share one image frame. Overscan keeps movement inside the photo. */
.shop-scene__stage {
  visibility: hidden;
  transform-origin: center;
  transform: perspective(1800px)
    rotateX(calc(var(--scene-y, 0) * -0.6deg))
    rotateY(calc(var(--scene-x, 0) * 0.6deg))
    scale(1.025);
  /* Flatten the image stack before tilting it so coincident neutral planes stay ordered. */
  transform-style: flat;
}

.shop-scene__layer {
  position: absolute;
  /* Extend the shared crop beyond both vertical edges for foreground movement. */
  inset: -32px auto auto 0;
  height: calc(100% + 64px);
  pointer-events: none;
  transform: translate3d(
    calc(var(--scene-x, 0) * var(--layer-move-x)),
    calc(var(--scene-y, 0) * var(--layer-move-y)),
    0
  );
}

.shop-scene__layer--background {
  --layer-move-x: 3px;
  --layer-move-y: 2px;
}

.shop-scene__layer--shop {
  --layer-move-x: 12px;
  --layer-move-y: 8px;
  filter: drop-shadow(0 5px 8px rgb(20 24 16 / 22%));
}

.shop-scene__layer--foreground {
  --layer-move-x: 24px;
  --layer-move-y: 16px;
}

.shop-scene.is-depth-ready .shop-scene__stage {
  visibility: visible;
}

.shop-scene.is-depth-ready .shop-scene__fallback {
  visibility: hidden;
}

.welcome-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: var(--panel-width);
  min-height: 0;
  padding: var(--panel-padding-block) var(--panel-padding-inline) var(--panel-padding-bottom);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: center;
}

.welcome-panel__logo {
  display: block;
  flex: none;
  width: var(--logo-width);
  max-width: 80%;
  height: auto;
}

.opening-status {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 10px 15px;
  border-radius: 0 0 16px 16px;
  background: var(--badge);
  color: var(--white);
  font-size: 14px;
  line-height: 1.2;
}

.opening-status::before {
  content: "";
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--terracotta);
}

.tea-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: var(--space-logo) 0 0;
  padding: 0;
  list-style: none;
}

.tea-menu__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--menu-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.tea-menu__item::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--menu-green);
}

.welcome-panel__title {
  margin: var(--space-title) 0 0;
  color: var(--cream);
  font-size: var(--title-size);
  font-weight: 600;
  line-height: var(--title-line-height);
}

.welcome-panel__title span,
.welcome-panel__invitation span {
  display: block;
}

.welcome-panel__story {
  display: grid;
  gap: var(--space-paragraph);
  margin-top: var(--space-story);
  font-size: var(--story-size);
  font-weight: 400;
  line-height: 20px;
}

.welcome-panel__story p {
  margin: 0;
}

.welcome-panel__invitation {
  margin: var(--space-invitation) 0 0;
  color: var(--lime);
  font-size: var(--invitation-size);
  font-weight: 600;
  line-height: 1.22;
}

.welcome-panel__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-footer);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.welcome-panel__website {
  min-height: 24px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition);
}

.welcome-panel__website:hover {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.welcome-panel__website:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
  border-radius: 2px;
  color: var(--cream);
}

.welcome-panel__website:active {
  color: var(--lime);
}

/* Keep the whole message readable when a laptop or landscape screen is short. */
@media (min-width: 901px) and (max-height: 850px) {
  :root {
    --page-inset-block: 24px;
    --panel-padding-block: 56px;
    --panel-padding-bottom: 32px;
    --logo-width: 168px;
    --space-logo: 20px;
    --space-title: 24px;
    --space-story: 26px;
    --space-paragraph: 12px;
    --space-invitation: 26px;
    --space-footer: 24px;
  }
}

/* On phones and tablets, show the ground and flow content onto the green page. */
@media (max-width: 900px) {
  :root {
    --mobile-scene-height: clamp(360px, 66.67vw, 600px);
    --page-inset-inline: 16px;
    --panel-padding-block: 64px;
    --panel-padding-bottom: 36px;
    --panel-padding-inline: 20px;
    --panel-width: 100%;
    --logo-width: 210px;
    --title-size: 20px;
    --title-line-height: 24px;
    --invitation-size: 21px;
    --space-logo: 24px;
    --space-title: 28px;
    --space-story: 30px;
    --space-invitation: 30px;
    --space-footer: 26px;
  }

  .opening-page {
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--mobile-scene-height);
    padding-bottom: 24px;
  }

  .shop-scene {
    bottom: auto;
    height: var(--mobile-scene-height);
  }

  .shop-scene__image {
    width: 100%;
    object-position: center bottom;
  }

  .welcome-panel {
    max-width: 480px;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .opening-status {
    font-size: 12px;
  }

  .tea-menu {
    gap: 8px;
  }

  .tea-menu__item {
    padding-inline: 12px;
    font-size: 12px;
  }
}

@media (max-width: 599px) {
  :root {
    --title-size: 18px;
    --title-line-height: 22px;
  }
}

@media (max-width: 359px) {
  :root {
    --panel-padding-inline: 14px;
    --invitation-size: 19px;
  }

  .tea-menu__item {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-panel__website {
    transition: none;
  }
}

/* These modes keep the approved static photograph, even without JavaScript. */
@media (max-width: 900px), (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .shop-scene.is-depth-ready .shop-scene__fallback {
    visibility: visible;
  }

  .shop-scene.is-depth-ready .shop-scene__stage {
    display: none;
  }
}
