/* hub.css — arcircle.app's front page: the door to every ARCIRCLE world (index.html + hub.js) */
:root {
  --bg: #040814; --bg2: #071022; --ink: #eef6ff; --dim: #9fb4cc; --dim2: #6f86a3;
  --cyan: #3ce6ff; --mint: #4dffb0; --blue: #4d9fff; --gold: #ffd166;
  --glass: rgba(12, 22, 44, 0.62); --glass2: rgba(16, 30, 58, 0.82); --line: rgba(150, 200, 255, 0.14); --line2: rgba(150, 220, 255, 0.32);
  --r: 20px; --pad: clamp(16px, 4vw, 40px); --max: 1240px;
  --sa-t: env(safe-area-inset-top, 0px); --sa-b: env(safe-area-inset-bottom, 0px);
  --f: Sora, "Pretendard Variable", system-ui, sans-serif; --fd: "Big Shoulders Display", Sora, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:lang(ko), html:lang(zh) { --fd: Sora, "Pretendard Variable", sans-serif; }
body { margin: 0; font: 400 15px/1.55 var(--f); background: var(--bg); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
.hb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hb-skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cyan); color: #001; padding: 8px 12px; border-radius: 8px; }
.hb-skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* background: the universe behind everything */
.hb-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hb-bg-art { position: absolute; inset: -4%; width: 108%; height: 108%; max-width: none; object-fit: cover; transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.02); transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); opacity: calc(0.9 * var(--dim, 1)); }
.hb-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hb-bg-fade { position: absolute; inset: 0; background: radial-gradient(120% 80% at 70% 30%, transparent 0, rgba(4, 8, 20, 0.35) 55%, rgba(4, 8, 20, 0.92) 100%), linear-gradient(180deg, rgba(4, 8, 20, 0.2) 0, rgba(4, 8, 20, 0.55) 55vh, var(--bg) 100vh); }

/* top bar */
.hb-top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: calc(12px + var(--sa-t)) var(--pad) 12px; transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.hb-top.solid { background: rgba(4, 8, 20, 0.78); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-color: var(--line); }
.hb-logo { display: flex; align-items: center; gap: 9px; font: 800 17px/1 var(--f); letter-spacing: 0.06em; flex: none; }
.hb-logo img { width: 38px; height: auto; filter: drop-shadow(0 0 8px rgba(60, 230, 255, 0.5)); }
.hb-nav { display: flex; gap: 4px; margin: 0 auto; }
.hb-nav a { padding: 8px 12px; border-radius: 999px; color: var(--dim); font-size: 13.5px; font-weight: 600; transition: color 0.2s, background 0.2s; white-space: nowrap; }
.hb-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.hb-top-r { display: flex; align-items: center; gap: 10px; flex: none; }
.hb-lang select { appearance: none; -webkit-appearance: none; background: rgba(255, 255, 255, 0.06); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font: 600 12.5px var(--f); cursor: pointer; }
.hb-lang select option { background: var(--bg2); }
.hb-menu { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); padding: 11px 10px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.hb-menu i { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.25s, opacity 0.25s; }
.hb-menu[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hb-menu[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.hb-menu[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.hb-drawer { position: fixed; z-index: 19; top: calc(64px + var(--sa-t)); left: 10px; right: 10px; padding: 8px; border-radius: 18px; background: var(--glass2); border: 1px solid var(--line2); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); animation: hb-drop 0.22s ease-out; }
.hb-drawer[hidden] { display: none; }
.hb-drawer a { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.hb-drawer a img { grid-row: span 2; width: 36px; height: 36px; object-fit: contain; }
.hb-drawer b { display: block; font-size: 14px; } .hb-drawer small { color: var(--dim); font-size: 11.5px; }
@keyframes hb-drop { from { opacity: 0; transform: translateY(-8px); } }

/* buttons */
.hb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font: 700 13.5px/1 var(--f); border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.06); color: var(--ink); cursor: pointer; transition: transform 0.18s, box-shadow 0.25s, background 0.2s; white-space: nowrap; }
.hb-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hb-btn-pri svg { fill: currentColor; stroke: none; }
.hb-btn:hover { transform: translateY(-1px); }
.hb-btn-pri { border: 0; color: #00131c; background: linear-gradient(100deg, var(--cyan), var(--mint)); box-shadow: 0 6px 24px rgba(60, 230, 255, 0.35); }
.hb-btn-pri:hover { box-shadow: 0 8px 34px rgba(60, 230, 255, 0.55); }
.hb-btn-lg { padding: 15px 24px; font-size: 15px; }
.hb-btn-ghost { background: rgba(4, 10, 24, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* hero */
main, .hb-foot { position: relative; z-index: 1; }
.hb-hero { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: center; gap: 24px; max-width: var(--max); margin: 0 auto; padding: calc(96px + var(--sa-t)) var(--pad) 56px; }
.hb-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(60, 230, 255, 0.1); border: 1px solid rgba(60, 230, 255, 0.28); color: #bff6ff; font-size: 12.5px; font-weight: 600; }
.hb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(77, 255, 176, 0.6); animation: hb-pulse 1.8s infinite; flex: none; }
@keyframes hb-pulse { 70% { box-shadow: 0 0 0 9px rgba(77, 255, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(77, 255, 176, 0); } }
.hb-hero h1 { margin: 18px 0 14px; font: 800 clamp(40px, 6.4vw, 84px)/0.98 var(--fd); letter-spacing: 0.005em; text-transform: uppercase; }
.hb-hero h1 span { display: block; }
.hb-hero h1 em { display: block; font-style: normal; background: linear-gradient(95deg, var(--cyan), var(--mint) 55%, #b8ffdf); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(60, 230, 255, 0.25)); }
html:lang(ko) .hb-hero h1, html:lang(zh) .hb-hero h1 { font-size: clamp(36px, 5.2vw, 68px); line-height: 1.12; letter-spacing: -0.01em; }
.hb-sub { max-width: 560px; margin: 0 0 26px; color: #c9d8ea; font-size: clamp(15px, 1.4vw, 17.5px); }
.hb-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hb-live { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; }
.hb-live li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: rgba(4, 10, 24, 0.5); border: 1px solid var(--line); font-size: 12.5px; color: var(--dim); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: hb-in 0.5s ease-out both; }
.hb-live li[hidden] { display: none; }
.hb-live li b { color: var(--ink); font: 700 13px "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }
.hb-mark { position: relative; justify-self: center; width: min(460px, 100%); aspect-ratio: 1.45; display: grid; place-items: center; }
.hb-mark img { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 0 30px rgba(60, 230, 255, 0.45)) drop-shadow(0 0 60px rgba(77, 255, 176, 0.25)); animation: hb-float 7s ease-in-out infinite; }
.hb-mark-glow { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 230, 255, 0.32), rgba(77, 255, 176, 0.12) 55%, transparent 72%); animation: hb-breathe 5s ease-in-out infinite; }
@keyframes hb-float { 50% { transform: translateY(-14px) rotate(-1.5deg); } }
@keyframes hb-breathe { 50% { transform: scale(1.08); opacity: 0.75; } }
@keyframes hb-in { from { opacity: 0; transform: translateY(8px); } }

/* sections */
.hb-sec { max-width: var(--max); margin: 0 auto; padding: 56px var(--pad); }
.hb-head { max-width: 720px; margin-bottom: 26px; }
.hb-k { color: var(--cyan); font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hb-head h2 { margin: 8px 0 8px; font: 800 clamp(28px, 3.6vw, 44px)/1.05 var(--fd); text-transform: uppercase; }
html:lang(ko) .hb-head h2, html:lang(zh) .hb-head h2 { line-height: 1.2; }
.hb-head p { margin: 0; color: var(--dim); }

/* the world cards — a bento grid on computers, one column on phones */
.hb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 16px; }
.hb-c-game { grid-column: span 2; grid-row: span 2; }
.hb-c-pad { grid-column: span 2; }
.hb-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); isolation: isolate; transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), border-color 0.3s, box-shadow 0.35s; --mx: 50%; --my: 0%; }
.hb-card::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 22%, transparent), transparent 60%); opacity: 0; transition: opacity 0.3s; }
.hb-card:hover, .hb-card:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent), 0 0 40px color-mix(in srgb, var(--c) 18%, transparent); }
.hb-card:hover::before { opacity: 1; }
.hb-art { position: absolute; inset: 0; z-index: 0; }
.hb-art img, .hb-art video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(.2, .8, .2, 1), opacity 0.4s; }
.hb-art video { position: absolute; inset: 0; opacity: 0; }
.hb-card.playing .hb-art video { opacity: 1; }
.hb-card:hover .hb-art img { transform: scale(1.06); }
.hb-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 8, 20, 0) 25%, rgba(4, 8, 20, 0.72) 62%, rgba(4, 8, 20, 0.95) 100%); }
.hb-art-mark { background: radial-gradient(circle at 50% 40%, #0d2a3a, #050b18 70%); display: grid; place-items: start center; }
.hb-art-mark img { width: 58%; height: auto; margin-top: 18px; object-fit: contain; filter: drop-shadow(0 0 18px rgba(60, 230, 255, 0.45)); }
.hb-body { position: relative; z-index: 3; padding: 18px 18px 16px; }
.hb-ic { position: absolute; right: 14px; top: -34px; width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 12px color-mix(in srgb, var(--c) 45%, transparent)); transition: transform 0.45s cubic-bezier(.2, 1.4, .4, 1); }
.hb-c-game .hb-ic { width: 84px; height: 84px; top: -52px; right: 22px; }
.hb-card:hover .hb-ic { transform: translateY(-6px) rotate(-6deg) scale(1.08); }
.hb-c-game .hb-body { padding: 26px; }
.hb-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 14%, rgba(0, 0, 0, 0.4)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.hb-card h3 { margin: 8px 0 4px; font: 800 22px/1.1 var(--fd); letter-spacing: 0.02em; text-transform: uppercase; }
.hb-c-game h3 { font-size: clamp(30px, 3.4vw, 44px); }
.hb-card p { margin: 0; color: #c3d3e6; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hb-c-game p { font-size: 15px; max-width: 460px; -webkit-line-clamp: 3; }
.hb-meta { display: block; margin-top: 8px; font: 600 12px "JetBrains Mono", monospace; color: var(--c); min-height: 0; }
.hb-meta:empty { display: none; }
.hb-go { position: absolute; right: 16px; bottom: 16px; transform: translateY(-100%); font-size: 12.5px; font-weight: 700; color: var(--c); opacity: 0; transition: opacity 0.25s, transform 0.25s; }
.hb-card:hover .hb-go { opacity: 1; transform: none; }

/* reveal on scroll */
.hb-rv { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.hb-rv.in { opacity: 1; transform: none; }

/* how it connects */
.hb-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: f; position: relative; }
.hb-flow::before { content: ""; position: absolute; left: 6%; right: 6%; top: 30px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan), var(--mint), var(--gold)); opacity: 0.35; }
.hb-flow li { position: relative; padding: 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hb-flow b { display: block; margin: 12px 0 4px; font-size: 15px; } .hb-flow span:not(.hb-n) { color: var(--dim); font-size: 13px; }
.hb-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--mint)); color: #00131c; font-weight: 800; font-size: 13px; box-shadow: 0 0 16px rgba(60, 230, 255, 0.5); }

.hb-links { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-links a { padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--dim); font-size: 13px; font-weight: 600; transition: color 0.2s, border-color 0.2s; }
.hb-links a:hover { color: var(--ink); border-color: var(--line2); }

.hb-foot { border-top: 1px solid var(--line); background: rgba(4, 8, 20, 0.9); }
.hb-foot-in { max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) calc(28px + var(--sa-b)); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hb-foot p { margin: 0; color: var(--dim2); font-size: 12.5px; flex: 1 1 260px; }
.hb-social { display: flex; gap: 14px; font-size: 13px; color: var(--dim); }
.hb-social a:hover { color: var(--ink); }

/* tablets */
@media (max-width: 1080px) {
  .hb-nav { display: none; }
  .hb-menu { display: flex; }
  .hb-top-r { margin-left: auto; }
  .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 230px; }
  .hb-c-game { grid-column: span 2; grid-row: span 2; }
  .hb-c-pad { grid-column: span 2; }
  .hb-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hb-flow::before { display: none; }
}
/* phones */
@media (max-width: 760px) {
  .hb-top { gap: 10px; padding-top: calc(10px + var(--sa-t)); padding-bottom: 10px; }
  .hb-logo span { font-size: 15px; } .hb-logo img { width: 32px; }
  .hb-lang select { padding: 7px 9px; }
  .hb-play { padding: 9px 13px; font-size: 13px; }
  .hb-hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(min(78vw, 330px) + var(--sa-t)); padding-bottom: 28px; gap: 0; text-align: left; }
  .hb-hero h1 span, .hb-sub { text-shadow: 0 2px 18px rgba(4, 8, 20, 0.9); }
  .hb-hero h1 { margin: 14px 0 10px; }
  .hb-cta .hb-btn-lg { flex: 1 1 100%; }
  .hb-live { margin-top: 18px; }
  .hb-sec { padding: 34px var(--pad); }
  .hb-grid { grid-template-columns: 1fr; grid-auto-rows: 210px; gap: 12px; }
  .hb-c-game { grid-column: auto; grid-row: span 2; } .hb-c-pad { grid-column: auto; }
  .hb-c-game .hb-body { padding: 20px; }
  .hb-go { display: none; }
  .hb-flow { grid-template-columns: 1fr; }
  .hb-drawer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) { .hb-lang { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hb-rv { opacity: 1; transform: none; }
}
