/* 看看 LOOK CLOSER — 快閃展覽介紹網站
   設計稿 4500×8000（9:16），圖層位置都換算成百分比，所以手機/桌機都對得上 */

@font-face {
  font-family: 'Galyon';
  src: url(fonts/galyon-bold.woff2) format('woff2');
  font-weight: 700;
  font-display: swap;
  size-adjust: 75%; /* 作者指定英文縮放 75% */
}

:root {
  --red: #ff0000;
  --deep: #3d0503;
  --yellow: #ffe500;
  --ink: #02141a;
  --col: min(100vw, 480px);
  --font: 'Galyon', 'Noto Sans TC', 'PingFang TC', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background: linear-gradient(var(--red) 50%, var(--deep) 50%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100svh;
}
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
a { color: inherit; }

/* ---------- 可點擊元素：持續微光＋hover 發亮 ---------- */
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 240, 120, .55)) drop-shadow(0 0 8px rgba(255, 230, 0, .35)); }
  50%      { filter: drop-shadow(0 0 5px rgba(255, 250, 190, .95)) drop-shadow(0 0 18px rgba(255, 230, 0, .75)); }
}
.glow { animation: glow 2.4s ease-in-out infinite; transition: transform .25s; cursor: pointer; }
.glow:hover, .glow:focus-visible, a:hover > .glow, a:focus-visible > .glow {
  animation: none; transform: scale(1.04);
  filter: drop-shadow(0 0 6px #fff9c4) drop-shadow(0 0 22px #ffe500) drop-shadow(0 0 40px rgba(255, 230, 0, .7));
}
a:focus-visible { outline: none; }

/* 平面圖上的熱區（文字已經畫在圖裡時用）：底下一團會呼吸的光暈 */
@keyframes halo { 0%, 100% { opacity: .45; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
.hot { position: absolute; display: block; cursor: pointer; }
.hot::after {
  content: ''; position: absolute; inset: -18% -8%; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 238, 90, .42), rgba(255, 238, 90, .16) 60%, transparent);
  mix-blend-mode: screen; animation: halo 2.4s ease-in-out infinite;
}
.hot:hover::after, .hot:focus-visible::after {
  animation: none; opacity: 1; transform: scale(1.08);
  background: radial-gradient(closest-side, rgba(255, 245, 150, .8), rgba(255, 238, 90, .35) 60%, transparent);
}

/* ---------- 封面：可縮放、拖曳 ---------- */
body.cover { height: 100svh; overflow: hidden; background: #2a0302; }
/* 畫面比海報寬或長時，旁邊用模糊的主視覺補滿 */
body.cover::before {
  content: ''; position: fixed; inset: -40px; z-index: -1;
  background: url(assets/og.jpg) center / cover; filter: blur(28px) saturate(1.1); opacity: .9;
}
.viewport {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; touch-action: none;
  display: grid; place-items: center; cursor: grab;
}
.viewport.dragging { cursor: grabbing; }
.poster {
  position: relative;
  width: min(100vw, 100svh * 9 / 16);
  aspect-ratio: 9 / 16;
  transform-origin: 0 0;
  will-change: transform;
}
.poster .layer { position: absolute; pointer-events: none; }
.poster .bg { inset: 0; background: var(--red); }
.poster .fg { inset: 0; width: 100%; height: 100%; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -2.6%; }
}
.word { position: absolute; left: 10.67%; top: 33.1%; width: 82.69%; display: block; }
.word img { animation: float 4.5s ease-in-out infinite; }
.word .glow { animation: float 4.5s ease-in-out infinite, glow 2.4s ease-in-out infinite; }
.word:hover .glow { animation: float 4.5s ease-in-out infinite; }

.sign { position: absolute; display: block; }
.sign img { width: 100%; }
.cover .s-xiaoye { left: 43.38%; top: 12.2%;  width: 37.5%; }
.cover .s-610    { left: 28.27%; top: 23.6%;  width: 32.93%; }
.cover .s-yijin  { left: 14.93%; top: 49.6%;  width: 34.01%; }
.cover .s-car    { left: 50%;    top: 54.9%;  width: 15.6%; height: 4.6%; }

.zoom-reset {
  position: fixed; right: 14px; bottom: 14px; z-index: 5;
  font: 700 13px var(--font); color: #fff; background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; padding: 7px 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s; cursor: pointer;
}
.zoom-reset.show { opacity: 1; pointer-events: auto; }
.hint {
  position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 4;
  font-size: 12px; color: #fff; background: rgba(0, 0, 0, .45); border-radius: 999px;
  padding: 6px 12px; white-space: nowrap; transition: opacity .6s; pointer-events: none;
}
.hint.hide { opacity: 0; }

/* ---------- 文字頁（看看展覽介紹、準備中頁） ---------- */
.page {
  position: relative; width: var(--col); margin: 0 auto;
  background: var(--red); min-height: 100svh; display: flex; flex-direction: column;
}
.pole { position: absolute; left: .7%; top: 0; width: 40.5%; aspect-ratio: 3507 / 8892; z-index: 2; pointer-events: none; }
.pole > img {
  width: 100%;
  -webkit-mask-image: linear-gradient(#000 82%, transparent 98%);
          mask-image: linear-gradient(#000 82%, transparent 98%);
}
.pole .sign { pointer-events: auto; }
.pole .s-610    { left: 17.79%; top: 21.14%; width: 60.36%; }
.pole .s-yijin  { left: 0;      top: 45.7%;  width: 54.55%; }
.pole .s-xiaoye { left: 46.99%; top: 9.63%;  width: 57.29%; }

.home {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  font: 700 12px/1 var(--font); text-decoration: none; color: var(--ink);
  background: var(--yellow); border-radius: 999px; padding: 7px 12px 6px;
  box-shadow: 0 0 10px rgba(255, 240, 120, .9);
}
.home:hover { box-shadow: 0 0 18px 4px #fff59d; }

.copy {
  position: relative; z-index: 3;
  margin: calc(var(--col) * .3) 6% 0 31%;
  font-size: clamp(13px, 3.5vw, 15px); line-height: 1.75; letter-spacing: .02em;
}
.copy h1 {
  font-size: clamp(16px, 4.6vw, 21px); font-weight: 900; letter-spacing: .01em;
  margin-bottom: 1.1em; line-height: 1.4;
}
.copy p { margin-bottom: 1.15em; font-weight: 500; }
.copy .ig { font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }

/* 打字動畫：先把整段排好再逐字顯示，版面不會跳 */
.typing .ch { opacity: 0; }
.typing .ch.on { opacity: 1; }
.typing .ch.cur::after {
  content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 1px;
  vertical-align: -.15em; background: var(--ink); animation: blink .8s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.land { position: relative; margin-top: auto; aspect-ratio: 1440 / 1248; }
.land > img { width: 100%; height: 100%; object-fit: cover; }
.car { position: absolute; left: 6.58%; top: 23.08%; width: 92.53%; }
.car img { width: 100%; pointer-events: none; }
.car a { position: absolute; left: 44%; top: 15%; width: 20%; height: 70%; }
.car:has(a:hover) img, .car:has(a:focus-visible) img {
  animation: none;
  filter: drop-shadow(0 0 6px #fff9c4) drop-shadow(0 0 22px #ffe500) drop-shadow(0 0 40px rgba(255, 230, 0, .7));
}

.invite { position: absolute; left: 6%; top: 57%; width: 50%; color: #fff; }
.invite h2 { font-size: clamp(11px, 3vw, 14px); font-weight: 700; color: var(--yellow); line-height: 1.5; margin-bottom: .8em; }
.scramble {
  font-size: clamp(16px, 4.6vw, 22px); font-weight: 700; letter-spacing: .04em;
  min-height: 1.5em; white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 230, 0, .45);
}
.scramble .x { color: var(--yellow); opacity: .75; }

/* ---------- 作者整張設計圖頁（haooobangs） ---------- */
body.flat { background: linear-gradient(#7fa6dd 50%, #0f4552 50%); }
.flatpage { position: relative; width: var(--col); margin: 0 auto; }
.flatpage > img { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
