:root { --bg: #05060f; --bg2: #0b1024; --ink: #e4ebf7; --muted: #8c99b3; --edge: #1c2a42; --accent: #6fb3ff; --accent2: #9a7bff; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(1200px 600px at 70% -10%, #14204a 0%, transparent 60%), var(--bg); color: var(--ink); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
header, main, footer { width: 100%; max-width: 960px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
header { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.brand { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 15px; color: var(--ink); text-decoration: none; }
nav a { margin-left: 20px; color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--ink); }
main { flex: 1; padding-bottom: 64px; }
.hero { padding: 56px 0 40px; }
.hero { text-align: center; }
.hero p { margin-left: auto; margin-right: auto; }
.hero-logo { display: block; width: min(420px, 80%); height: auto; margin: 0 auto 24px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.1; margin: 0 0 16px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0; font-size: 19px; }
h2 { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 48px 0 16px; }
.card { display: grid; grid-template-columns: 1fr; border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--bg2); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card img { width: 100%; display: block; }
.card .body { padding: 20px 24px 24px; }
.card h3 { margin: 0 0 6px; font-size: 24px; }
.card p { margin: 0; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--edge); border-radius: 999px; padding: 2px 10px; color: var(--muted); margin-bottom: 10px; }
.game-hero { text-align: center; padding: 32px 0 8px; }
.game-hero img.logo { width: min(520px, 100%); height: auto; }
.game-hero .lead { color: var(--muted); font-size: 20px; max-width: 600px; margin: 16px auto 0; }
.btn { display: inline-block; margin-top: 24px; padding: 12px 24px; border-radius: 10px; border: 1px solid var(--accent); color: var(--ink); text-decoration: none; background: rgba(111,179,255,.1); }
.btn.off { border-color: var(--edge); color: var(--muted); background: transparent; cursor: default; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid > div { border: 1px solid var(--edge); border-radius: 12px; padding: 18px 20px; background: var(--bg2); }
.grid h3 { margin: 0 0 6px; font-size: 18px; }
.grid p { margin: 0; color: var(--muted); font-size: 15px; }
.shot { width: 100%; border-radius: 14px; border: 1px solid var(--edge); display: block; margin-top: 32px; }
footer { border-top: 1px solid var(--edge); padding-top: 20px; padding-bottom: 32px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }
@media (min-width: 720px) { .card.wide { grid-template-columns: 1.2fr 1fr; } .card.wide .body { align-self: center; } }

/* Logo button: small grow on hover, then a single-turn whirlpool of blue/green/violet arcs */
.brand { position: relative; display: grid; place-items: center; width: 47px; height: 47px; border-radius: 50%; transition: transform .25s ease; --blue: #4aa8ff; --green: #3ee6a0; --violet: #a27bff; }
.brand img { width: 36px; height: auto; display: block; position: relative; z-index: 1; }
.brand:hover, .brand:focus-visible { transform: scale(1.05); outline: none; }
.brand .w { position: absolute; border-radius: 50%; border: 1.5px solid transparent; opacity: 0; pointer-events: none; }
.brand .w1 { inset: -1px; border-top-color: var(--blue); border-right-color: var(--blue); filter: drop-shadow(0 0 3px var(--blue)); }
.brand .w2 { inset: -3px; border-bottom-color: var(--green); border-left-color: var(--green); filter: drop-shadow(0 0 3px var(--green)); }
.brand .w3 { inset: -5px; border-top-color: var(--violet); border-left-color: var(--violet); filter: drop-shadow(0 0 3px var(--violet)); }
.brand:hover .w, .brand:focus-visible .w { animation: swirl 1.3s cubic-bezier(.4,0,.6,1) 1; }
.brand:hover .w2, .brand:focus-visible .w2 { animation-delay: .1s; }
.brand:hover .w3, .brand:focus-visible .w3 { animation-delay: .2s; }
@keyframes swirl { 0% { transform: rotate(0) scale(1.28); opacity: 0; } 25% { opacity: 1; } 100% { transform: rotate(360deg) scale(.85); opacity: 0; } }

/* Header spans the full window: logo in the left corner, nav in the right corner */
header { max-width: none; padding-top: 28px; padding-left: clamp(24px, 2.5vw, 40px); padding-right: clamp(24px, 2.5vw, 40px); }

.bio { text-align: center; padding: 8px 0 8px; }
.bio h1 { font-size: clamp(26px, 4.5vw, 38px); line-height: 1.2; margin: 0 0 12px; }
.bio p { color: var(--muted); font-size: 19px; margin: 0; }

/* Centered section title with an underline that draws itself when scrolled into view */
h2.section-title { display: table; margin: 64px auto 28px; position: relative; font-size: clamp(30px, 6vw, 46px); letter-spacing: .04em; text-transform: none; color: #16a2c1; padding-bottom: 12px; }
h2.section-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #4aa8ff, #3ee6a0, #a27bff); transform-origin: left; }
.js h2.section-title::after { transform: scaleX(0); transition: transform .9s cubic-bezier(.3,.7,.2,1); }
.js h2.section-title.in-view::after { transform: scaleX(1); }
.center { text-align: center; }

.contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; transition: color .2s; }
.contact a:hover { color: #16a2c1; }
.contact svg { flex: none; color: #16a2c1; }

/* Game box: logo | divider | info, evenly split, fully rounded, whole box is the link */
.game-box { display: flex; align-items: center; border: 1px solid var(--edge); border-radius: 0; background: var(--bg2); padding: 44px 0; box-shadow: 0 6px 18px rgba(0,0,0,.5); text-decoration: none; color: inherit; transition: border-color .25s, transform .25s, box-shadow .25s; }
.game-box:hover, .game-box:focus-visible { border-color: #16a2c1; transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 22px rgba(22,162,193,.18); outline: none; }
.game-box-logo, .game-box-info { flex: 1 1 0; padding: 0 44px; }
.game-box-logo img { width: 100%; height: auto; display: block; }
.game-box-divider { align-self: stretch; width: 2px; background: linear-gradient(#4aa8ff, #3ee6a0, #a27bff); border-radius: 1px; }
.game-box-info p { margin: 0; font-size: 22px; line-height: 1.9; }
@media (max-width: 600px) { .game-box { flex-direction: column; padding: 24px 0; } .game-box-logo, .game-box-info { padding: 0 24px; } .game-box-divider { align-self: auto; width: 70%; height: 2px; margin: 20px 0; } .game-box-info { text-align: center; } }

/* Comet Connect page: screenshot strip and mode cards with GIFs */
.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; scrollbar-color: #16a2c1 var(--bg2); }
.gallery img { flex: 0 0 min(560px, 85%); width: min(560px, 85%); height: auto; scroll-snap-align: center; border: 1px solid var(--edge); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.mode { border: 1px solid var(--edge); background: var(--bg2); box-shadow: 0 6px 18px rgba(0,0,0,.5); padding: 0 0 20px; }
.mode img { width: 100%; height: auto; display: block; margin-bottom: 16px; }
.mode h3 { margin: 0 20px 6px; font-size: 22px; color: #16a2c1; }
.mode p { margin: 0 20px; color: var(--muted); }

/* Screenshot lightbox */
.gallery img, .mode img { cursor: zoom-in; }
#lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
#lightbox[open] { display: grid; place-items: center; }
#lightbox::backdrop { background: rgba(2,3,10,.92); }
#lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0,0,0,.7); cursor: default; }
.lb-nav, .lb-close { position: fixed; background: rgba(11,16,36,.7); color: #16a2c1; border: 1px solid var(--edge); font-size: 34px; line-height: 1; width: 52px; height: 52px; cursor: pointer; }
.lb-nav:hover, .lb-close:hover { border-color: #16a2c1; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }

/* Draggable screenshot strip */
.gallery { cursor: grab; }
.gallery.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.gallery img { -webkit-user-drag: none; user-select: none; }

/* Lightbox buttons: glyphs perfectly centered */
.lb-nav, .lb-close { display: grid; place-items: center; padding: 0; }
.lb-nav svg, .lb-close svg { display: block; }

/* Hero logo fades out at its edges to blend into the page background */
.game-hero img.logo { -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); mask-composite: intersect; }
.game-hero .lead { text-align: center; }

/* Mode cards: same draggable horizontal strip as the screenshots */
.modes { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; cursor: grab; scrollbar-color: #16a2c1 var(--bg2); }
.modes.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.mode { flex: 0 0 min(420px, 85%); scroll-snap-align: center; }
.mode img { -webkit-user-drag: none; user-select: none; }

/* Center everything except the corner header (logo left, nav right) and the legal pages */
footer { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.gallery, .modes { justify-content: safe center; }
.mode { text-align: center; }
.game-box-info { text-align: center; }

/* Closed beta card: one centered mode card with a join button */
.beta { display: flex; justify-content: center; }
.beta .mode { flex: 0 1 min(480px, 100%); }
.beta .btn { margin: 20px 0 0; }
