@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;600&family=Outfit:wght@400;500;600&display=swap");

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #07080d; color: #f6f1e6; font-family: Outfit, system-ui, sans-serif; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus, button:focus-visible { outline: none; }

@property --cam-x { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --cam-y { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --cam-s { syntax: "<number>"; inherits: true; initial-value: 1.08; }

#stage {
  --mx: 0; --my: 0; --cam-x: 0px; --cam-y: 0px; --cam-s: 1.08; --reel: 0px;
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #07080d;
  transition: --cam-x 720ms cubic-bezier(0.22, 1, 0.36, 1), --cam-y 720ms cubic-bezier(0.22, 1, 0.36, 1), --cam-s 720ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 640px) {
  #stage { height: 100dvh; overflow: hidden; }
}

.stage-reel { position: fixed; inset: 0; overflow: hidden; pointer-events: none; background: #2c3338; }
.stage-strip {
  --pan: 0px;
  position: absolute; left: -3%; top: -3%; width: 106%; height: 106%; max-width: none;
  object-fit: cover; object-position: center 42%;
  opacity: 0;
  transform: translate3d(calc(var(--pan) + var(--cam-x) * 0.35), calc(var(--cam-y) * 0.35 + var(--my) * -4px), 0);
  transition: transform 980ms cubic-bezier(0.22, 1, 0.36, 1), opacity 720ms ease;
}
.stage-strip.is-on { opacity: 1; }
@media (max-width: 639px) {
  .stage-strip {
    left: -3%; top: -3%; width: 106%; height: 106%;
    object-position: center center;
    transform: translate3d(calc(var(--pan) * 0.25), calc(var(--my) * -3px), 0);
  }
}
.stage-strip.is-on { opacity: 1; }
.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgb(18 32 51 / 0.45), rgb(18 32 51 / 0.1), transparent); }
.enter-flash { position: absolute; inset: 0; z-index: 30; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, rgb(246 231 192 / 0.5), transparent); }
#stage.is-in .enter-flash { animation: flash-x 620ms ease-out; }
.leaf { position: absolute; top: -8%; width: 11px; height: 18px; border-radius: 80% 0; background: #e2b15a; opacity: 0.8; animation: leaf-fall linear infinite; }
.leaf-a { left: 72%; animation-duration: 9s; }
.leaf-b { left: 84%; width: 8px; height: 14px; background: #8fb56a; animation-duration: 12s; animation-delay: -4s; }
.leaf-c { left: 58%; background: #f3d7a1; animation-duration: 14s; animation-delay: -7s; }
.leaf-d { left: 91%; animation-duration: 10s; animation-delay: -2s; }
.leaf-e { left: 66%; width: 9px; height: 15px; background: #c9843a; animation-duration: 13s; animation-delay: -9s; }

.ui { position: relative; z-index: 10; display: flex; min-height: 100dvh; flex-direction: column; padding: 1.25rem 1rem 1rem; }
@media (min-width: 640px) { .ui { height: 100%; min-height: 0; padding: 2rem 2.5rem 1rem; } }
.ui header { padding-right: 3.4rem; }
.music-btn {
  position: fixed;
  z-index: 25;
  top: 1.55rem;
  right: 2.2rem;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgb(12 16 24 / 0.78);
  color: #fff4c8;
  border: 1px solid rgb(228 201 138 / 0.75);
  box-shadow: 0 8px 22px rgb(0 0 0 / 0.4);
}
.music-btn svg { width: 1.05rem; height: 1.05rem; display: block; }
.music-btn.is-on { background: #c6a15b; color: #16130d; border-color: #fff4c8; }
@media (max-width: 639px) {
  .ui header { padding-right: 2.7rem; }
  .music-btn { top: 0.55rem; right: 0.7rem; width: 2.35rem; height: 2.35rem; }
  .music-btn svg { width: 0.95rem; height: 0.95rem; }
}
.brand { font-family: Oswald, sans-serif; font-size: 2.25rem; line-height: 1; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #fff4c8; text-shadow: 0 2px 0 #1a1208, 0 0 18px rgb(240 90 34 / 0.45); }
@media (min-width: 640px) { .brand { font-size: 3rem; } }

.storm-nav { position: relative; margin-top: 1.5rem; width: 100%; max-width: 24rem; transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1), opacity 360ms ease-out; }
@media (min-width: 640px) { .storm-nav { margin-top: 2rem; } }
#stage.is-in .storm-nav { transform: translateX(-28px); opacity: 0; pointer-events: none; }
.storm-cursor { position: absolute; top: 0; left: 0; width: 0.375rem; height: 3.5rem; border-radius: 999px; background: linear-gradient(#fff4c8, #f05a22); box-shadow: 0 0 16px #f05a22; transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1); }
.storm-item { display: flex; align-items: center; width: 100%; height: 3.5rem; padding-left: 1.25rem; text-align: left; white-space: nowrap; font-family: Oswald, sans-serif; font-size: 1.25rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: rgb(255 248 232 / 0.92); text-shadow: 0 1px 2px rgb(0 0 0 / 0.9), 0 0 12px rgb(0 0 0 / 0.55); transition: color 200ms ease-out, transform 320ms cubic-bezier(0.22, 1, 0.36, 1); }
@media (min-width: 640px) { .storm-item { font-size: 1.875rem; } }
.storm-item.is-on { color: #fff8e8; text-shadow: 0 1px 2px rgb(0 0 0 / 0.95), 0 0 14px rgb(240 90 34 / 0.45); transform: translateX(12px); }

.phone-pose { position: relative; margin-top: 0.25rem; height: 25.6rem; flex-shrink: 0; }
.pose { background-repeat: no-repeat; background-size: 100% 600%; background-position: 0 0; }
.phone-pose .pose { position: absolute; right: 0; bottom: 0; height: 100%; aspect-ratio: 703 / 1280; }
@media (min-width: 640px) { .phone-pose { display: none; } }
@media (max-width: 639px) {
  #stage, .ui { height: 100svh; min-height: 0; max-height: 100svh; overflow: hidden; }
  .ui { padding: 0.7rem 0.85rem 0.4rem; }
  .brand { font-size: 1.45rem; letter-spacing: 0.03em; }
  .storm-nav { margin-top: 0.35rem; }
  .storm-item { height: 2.15rem; padding-left: 0.95rem; font-size: 1.25rem; line-height: 1; }
  .storm-cursor { top: 0.4rem; height: 1.35rem; width: 0.28rem; }
  .phone-pose {
    position: absolute; right: -2%; bottom: 0; z-index: 15; margin: 0;
    height: 44svh; pointer-events: none;
  }
  .phone-pose .pose { pointer-events: auto; cursor: pointer; touch-action: manipulation; }
  .line, .hint { font-size: 0.68rem; line-height: 1.25; }
}

.foot { position: relative; z-index: 20; margin-top: auto; display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.75rem; }
@media (min-width: 640px) { .foot { flex-direction: row; align-items: flex-end; justify-content: space-between; padding-top: 1rem; } }
.line { margin: 0; max-width: 36rem; font-size: 0.875rem; font-weight: 500; }
@media (min-width: 640px) { .line { font-size: 1rem; } }
.hint { margin: 0.15rem 0 0; font-size: 0.75rem; color: rgb(246 241 230 / 0.6); }
.keys { display: flex; gap: 0.75rem; font-size: 0.75rem; font-weight: 600; }
kbd { display: inline-grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 999px; font-size: 10px; }
kbd.go { background: #fff4c8; color: #1a1208; }
kbd.back { border: 1px solid rgb(246 241 230 / 0.4); }
@media (max-width: 639px) {
  .keys { display: none; }
  .foot { margin-top: 0.85rem; padding-top: 0; z-index: 16; }
  .line {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 600;
    text-shadow: 0 1px 2px #120c08, 0 2px 14px rgb(0 0 0 / 0.85);
  }
  .hint {
    margin-top: 0.25rem;
    font-size: 0.88rem;
    line-height: 1.35;
    color: #fff6df;
    text-shadow: 0 1px 2px #120c08, 0 2px 10px rgb(0 0 0 / 0.75);
  }
}

.mascot { display: none; pointer-events: none; position: absolute; right: 2%; bottom: 4rem; z-index: 20; height: 58vh; max-height: 520px; transform: translate(calc(var(--mx) * 18px + var(--cam-x) * -0.25), calc(var(--my) * 8px)) rotate(calc(var(--mx) * -5deg)); transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1); }
@media (min-width: 640px) { .mascot { display: block; } }
@media (min-width: 1024px) { .mascot { right: 6%; bottom: 3.5rem; height: 72vh; max-height: 680px; } }
.hop-box { height: 100%; }
.mascot .pose { display: block; height: 100%; width: auto; aspect-ratio: 703 / 1280; filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.45)); pointer-events: auto; cursor: pointer; touch-action: manipulation; }
.mascot-hop { animation: hop 480ms cubic-bezier(0.2, 0.8, 0.2, 1); }

.dock {
  position: absolute; top: 0; bottom: 0; left: 0; z-index: 40; display: flex; width: 100%; max-width: 36rem;
  flex-direction: column; overflow: auto; border-right: 1px solid rgb(198 161 91 / 0.35);
  background: rgb(12 16 24 / 0.95); padding: 1.25rem; box-shadow: 16px 0 40px rgb(0 0 0 / 0.45);
  transform: translateX(-108%); opacity: 0; pointer-events: none;
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1), opacity 360ms ease-out;
}
.dock.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
@media (min-width: 640px) { .dock { padding: 2rem; } }
.dock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.kicker { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: #e4c98a; }
.dock h2 { margin: 0.2rem 0 0; font-family: Oswald, sans-serif; font-size: 2.25rem; line-height: 1; font-weight: 600; text-transform: uppercase; }
.close { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border-radius: 999px; background: #c6a15b; color: #16130d; font-size: 1.4rem; }
.panel { display: none; font-size: 0.875rem; line-height: 1.55; }
.panel.on { display: block; }
.panel p.dim, .card p.dim, ol { color: #c8bfb0; }
.card, .linkish { display: block; margin: 0.75rem 0; border-radius: 0.5rem; border: 1px solid rgb(198 161 91 / 0.3); background: #171d28; padding: 0.75rem 1rem; color: inherit; text-decoration: none; }
.linkish.lynk-link { display: block; }
.linkish.lynk-link span { display: block; white-space: normal; }
.tag { margin: 0; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #e4c98a; }
.dock-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.85rem 0 0.15rem; }
.dock-tab {
  border: 1px solid rgb(198 161 91 / 0.5);
  border-radius: 0.35rem;
  padding: 0.38rem 0.55rem;
  color: #e4c98a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dock-tab.is-on { background: #c6a15b; color: #16130d; border-color: #c6a15b; }
.dock-pane[hidden] { display: none; }
.card p { margin: 0.2rem 0 0; }
.panel img { width: 100%; border-radius: 0.5rem; object-fit: cover; }
.go-page, .search-go { display: inline-flex; min-height: 2.75rem; align-items: center; margin-top: 0.75rem; background: #c6a15b; padding: 0 1rem; font-weight: 600; color: #16130d; text-decoration: none; border: 0; }
.search-go { cursor: pointer; }
label { display: block; font-weight: 600; }
input[type="search"] { margin-top: 0.25rem; width: 100%; border-radius: 0.5rem; border: 2px solid rgb(198 161 91 / 0.4); background: #171d28; padding: 0.5rem 0.75rem; color: #f6f1e6; font: inherit; }
input[type="search"]:focus { border-color: #e4c98a; outline: none; }

@keyframes leaf-fall { 0% { transform: translate3d(0, -10vh, 0) rotate(0deg); } 100% { transform: translate3d(-18vw, 115vh, 0) rotate(320deg); } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-16px) scale(0.97, 1.05); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes flash-x { 0% { opacity: 0; transform: translateX(-45%); } 28% { opacity: 1; } 100% { opacity: 0; transform: translateX(35%); } }

@media (prefers-reduced-motion: reduce) {
  .leaf, .mascot-hop, .enter-flash { animation: none; }
  #stage, .stage-reel, .stage-strip, .mascot, .storm-cursor, .storm-item, .storm-nav, .dock { transition: none; }
}
