@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/noto-serif-sc-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/noto-serif-sc-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/noto-serif-sc-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/noto-serif-sc-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Cinzel;
  src: url("../fonts/cinzel-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #181818;
  --card: #121212;
  --footer: #0d0d0d;
  --header: #ffffff;
  --ink: #181818;
  --jade: #ebf1c1;
  --jade-deep: #dce9aa;
  --stroke: #7f8a52;
  --body: #f1f1f1;
  --gutter: clamp(1.25rem, 14.64vw, 12.5rem);
  --page: 85.375rem;
  --header-h: 5.625rem;
  --radius: 4.625rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  background: var(--bg);
  color: var(--body);
  min-height: 100dvh;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--header);
  color: var(--ink);
  padding: 0.6rem 1rem;
}

.skip:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--header);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transition: box-shadow 0.35s var(--ease), height 0.35s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 9rem;
}

.brand img {
  width: 9rem;
  height: auto;
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.78em;
  margin-right: -1.78em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.header-slogan {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: opacity 0.25s;
}

.header-slogan:hover,
.brand:hover {
  opacity: 0.7;
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -5px;
}

.menu-toggle span::after {
  top: 5px;
}

.mobile-nav {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  padding: 5.3rem var(--gutter) 7.2rem;
  overflow: hidden;
}

.hero-pattern,
.hero-zun {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-pattern {
  background-image: url("../assets/pattern-tile.png");
  background-repeat: repeat;
  background-size: 11.8125rem 11.75rem;
  animation: pattern-drift 36s linear infinite;
}

@keyframes pattern-drift {
  from { background-position: 0 0; }
  to { background-position: 11.8125rem 11.75rem; }
}

.hero-zun {
  overflow: hidden;
}

.hero-zun img {
  position: absolute;
  left: -28.8%;
  top: -6%;
  width: 139%;
  max-width: none;
  opacity: 0.55;
  user-select: none;
  transform: translate3d(calc(var(--hero-x, 0) * 1px), calc(var(--hero-y, 0) * 1px), 0) scale(1.02);
  transition: transform 1.2s var(--ease);
}

.badge {
  position: relative;
  z-index: 1;
  width: min(33.125rem, 86vw);
  margin: 0 auto 10.6rem;
  transform: translateY(calc(var(--badge-y, 0) * 1px)) scale(var(--badge-scale, 1));
  transform-origin: center top;
  transition: transform 0.18s ease-out;
  animation: badge-in-opacity 1.1s var(--ease) both;
}

.badge img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgb(0 0 0 / 35%));
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
  animation: badge-float 8s ease-in-out 1.2s infinite;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.badge:hover img {
  transform: scale(1.03);
  filter: drop-shadow(0 0 28px rgb(235 241 193 / 22%));
}

@keyframes badge-in-opacity {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Story card */
.story {
  position: relative;
  z-index: 1;
  height: 32.8125rem;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  animation: card-in 1s var(--ease) 0.15s both;
  box-shadow: 0 26px 70px rgb(0 0 0 / 24%);
}

.story::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 34%, rgb(235 241 193 / 12%) 48%, transparent 60%);
  transform: translateX(-130%);
  animation: card-sheen 8s ease-in-out 2s infinite;
}

@keyframes card-sheen {
  0%, 68%, 100% { transform: translateX(-130%); }
  82% { transform: translateX(130%); }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.story-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
  padding: 2.5rem 1.5rem 2.5rem 4.625rem;
  max-width: 50rem;
}

.story-copy h1 {
  color: var(--jade);
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.04em;
  margin-bottom: 2.4rem;
  text-shadow: 0 0 24px rgb(235 241 193 / 14%);
}

.story-copy > * {
  opacity: 0;
  transform: translateY(16px);
}

.story.is-visible .story-copy > * {
  animation: copy-in 0.8s var(--ease) forwards;
}

.story.is-visible .story-copy > :nth-child(2) { animation-delay: 0.12s; }
.story.is-visible .story-copy > :nth-child(3) { animation-delay: 0.22s; }
.story.is-visible .story-copy > :nth-child(4) { animation-delay: 0.32s; }

@keyframes copy-in {
  to { opacity: 1; transform: none; }
}

.story-copy p {
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.33;
  color: var(--body);
}

.story-copy p + p {
  margin-top: 1.7rem;
}

.story-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.story-map img {
  position: absolute;
  left: 16.4%;
  top: -12.2%;
  width: 114.1%;
  max-width: none;
  height: auto;
}

.pin {
  position: absolute;
  left: 78.8%;
  top: 50.2%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translate(-50%, -90%);
  z-index: 3;
  pointer-events: auto;
}

.pin-hit {
  position: absolute;
  inset: -0.4rem;
  border-radius: 50%;
}

.pin-pulse {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgb(235 241 193 / 70%);
  box-shadow: 0 0 0 0 rgb(235 241 193 / 55%);
  animation: pulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 16px rgb(235 241 193 / 0%);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(235 241 193 / 0%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.pin-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.7rem);
  transform: translateX(-50%) translateY(6px);
  background: var(--jade);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.pin-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--jade);
}

.pin:hover .pin-tip,
.pin:focus-within .pin-tip,
.pin.is-open .pin-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer */
.site-footer {
  background: var(--footer);
  min-height: 11.625rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.1rem var(--gutter);
}

.company-name {
  font-size: 1.48rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.contact {
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
}

.contact li + li {
  margin-top: 0.12rem;
}

.contact button,
.contact a {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
}

.contact button:hover,
.contact a:hover {
  border-bottom-color: rgb(255 255 255 / 45%);
}

.miniapp {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
}

.miniapp-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.miniapp-label svg {
  width: 0.7rem;
  height: 0.7rem;
  fill: currentColor;
}

.qr-btn {
  width: 6.875rem;
  height: 6.75rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease), filter 0.35s;
}

.qr-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-btn:hover,
.qr-btn:focus-visible {
  transform: scale(1.06);
  filter: drop-shadow(0 0 16px rgb(235 241 193 / 28%));
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 72%);
}

.modal-panel {
  position: relative;
  background: #111;
  border: 1px solid var(--stroke);
  border-radius: 1.5rem;
  padding: 2rem 2.2rem 1.6rem;
  text-align: center;
  width: min(22rem, 100%);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.35s var(--ease);
}

.modal.is-open .modal-panel {
  transform: none;
}

.modal-panel h2 {
  color: var(--jade);
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 1.1rem;
}

.modal-panel img {
  width: 14rem;
  height: 14rem;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.modal-panel p {
  font-size: 0.85rem;
  color: rgb(255 255 255 / 72%);
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--jade);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(12px);
  background: var(--jade);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1024px) {
  :root {
    --gutter: clamp(1.25rem, 6vw, 4rem);
    --radius: 2.5rem;
    --header-h: 4.5rem;
  }

  .story {
    height: auto;
    min-height: 28rem;
  }

  .story-copy {
    min-height: 28rem;
    height: auto;
    padding: 2.5rem 2rem 8rem;
    max-width: none;
  }

  .story-copy h1 {
    font-size: 1.7rem;
    margin-bottom: 1.2rem;
  }

  .story-copy p {
    font-size: 1.02rem;
  }

  .story-map img {
    left: 28%;
    top: 28%;
    width: 90%;
  }

  .badge {
    margin-bottom: 4rem;
  }

  .hero {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .header-slogan {
    font-size: 0.82rem;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 1rem;
    --radius: 1.5rem;
    --header-h: 4rem;
  }

  .hero {
    padding: 2.25rem 1rem 3rem;
  }

  .hero-pattern {
    background-size: 8rem 8rem;
  }

  .hero-zun img {
    left: -48%;
    top: 2%;
    width: 185%;
    opacity: 0.3;
  }

  .badge {
    width: min(19rem, 78vw);
    margin-bottom: 2.75rem;
  }

  .story {
    min-height: 0;
    height: auto;
    border-radius: 1.5rem;
  }

  .story-copy {
    min-height: 0;
    height: auto;
    padding: 2.25rem 1.25rem 2.4rem;
  }

  .story-copy h1 {
    max-width: 15rem;
    font-size: 1.48rem;
    line-height: 1.25;
    letter-spacing: 0.02em;
    margin-bottom: 1.35rem;
  }

  .story-copy p {
    font-size: 0.94rem;
    line-height: 1.65;
    font-weight: 500;
  }

  .story-copy p + p {
    margin-top: 1.15rem;
  }

  .story-map {
    opacity: 0.18;
  }

  .story-map img {
    left: 14%;
    top: 42%;
    width: 135%;
  }

  .pin {
    left: 83%;
    top: 66%;
    transform: translate(-50%, -90%) scale(0.78);
  }

  .header-slogan {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--header);
    color: var(--ink);
    padding: 1rem 1.25rem 1.3rem;
    border-top: 1px solid rgb(0 0 0 / 8%);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s var(--ease);
  }

  .mobile-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .mobile-nav a {
    font-weight: 700;
    font-size: 1rem;
  }

  .brand img {
    width: 7.2rem;
  }

  .brand-sub {
    font-size: 0.62rem;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1rem;
  }

  .miniapp {
    width: 100%;
    justify-content: space-between;
  }

  .miniapp-label {
    max-width: 12rem;
    font-size: 0.9rem;
    text-align: left;
  }

  .qr-btn {
    width: 5.5rem;
    height: 5.4rem;
  }

  .pin {
    left: 72%;
    top: 72%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
