/* Extra polish and the home page design. Loaded after style.css. */

/* ---------- Site-wide polish ---------- */
html { overflow-x: clip; scroll-behavior: smooth; scrollbar-color: #2b3350 var(--bg); }
::selection { background: rgba(115, 11, 223, .6); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
main { animation: page-in .5s ease backwards; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(164, 92, 245, .75), transparent); opacity: .5; }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Buttons: a light sweep across on hover, arrows nudge forward */
.btn { position: relative; overflow: hidden; }
.btn-primary::after, .btn-discord::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%); transform: translateX(-130%); }
.btn-primary:hover::after, .btn-discord:hover::after { transform: translateX(130%); transition: transform .7s ease; }
.btn:disabled::after { display: none; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; border-radius: 12px; }
.ico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }
.btn .ico { margin-left: .35rem; transition: transform .2s; } .btn:hover .ico { transform: translateX(4px); }

/* ---------- Hero ---------- */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.hero { position: relative; isolation: isolate; display: grid; place-items: center; text-align: center; overflow: hidden;
  min-height: clamp(580px, 86vh, 860px); margin-top: -2rem; padding: 4.5rem 1rem 6.5rem; --px: 0; --py: 0; --gx: 50%; --gy: 38%; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 240px; background: linear-gradient(to bottom, transparent, var(--bg)); }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.aurora.a1 { width: 640px; height: 640px; left: 6%; top: -180px; opacity: .55; background: radial-gradient(circle, #730bdf, transparent 65%); animation: drift-a 17s ease-in-out infinite alternate; }
.aurora.a2 { width: 560px; height: 560px; right: 3%; top: 30px; opacity: .34; background: radial-gradient(circle, #d13fd6, transparent 62%); animation: drift-b 21s ease-in-out infinite alternate; }
.aurora.a3 { width: 520px; height: 420px; left: 38%; bottom: -160px; opacity: .22; background: radial-gradient(circle, #3f90ff, transparent 65%); animation: drift-a 24s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate(130px, 80px) scale(1.16); } }
@keyframes drift-b { to { transform: translate(-150px, 70px) scale(.9); } }
.hero-grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 18%, transparent 76%); mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 18%, transparent 76%); }
.hero-mark { position: absolute; left: 50%; top: 54%; width: min(780px, 92vw); opacity: .075;
  transform: translate(calc(-50% + var(--px) * -24px), calc(-50% + var(--py) * -16px)); transition: transform .25s ease-out; }
.hero-light { position: absolute; width: 560px; height: 560px; left: var(--gx); top: var(--gy); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(164, 92, 245, .24), transparent 62%); transition: left .2s ease-out, top .2s ease-out; }

.hero-inner { position: relative; max-width: 1000px; }
.hero-inner > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) backwards; }
.hero-inner > :nth-child(1) { animation-delay: .05s; } .hero-inner > :nth-child(2) { animation-delay: .15s; }
.hero-inner > :nth-child(3) { animation-delay: .27s; } .hero-inner > :nth-child(4) { animation-delay: .38s; }
.hero-inner > :nth-child(5) { animation-delay: .48s; } .hero-inner > :nth-child(6) { animation-delay: .58s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

.hero h1 { font-size: clamp(2.7rem, 8.4vw, 6.2rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 1.3rem 0 .4rem; }
.hero-tagline { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin: 0 0 1.4rem;
  background: linear-gradient(90deg, #a45cf5, #f95bd8, #7d4dff, #a45cf5); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: gradient-shift 9s linear infinite; }
@keyframes gradient-shift { to { background-position: 300% 0; } }
.lead { color: #aab1c5; font-size: clamp(1.02rem, 1.6vw, 1.2rem); line-height: 1.7; max-width: 640px; margin: 0 auto 1.8rem; }

.connect-pill { display: inline-flex; align-items: center; gap: .9rem; padding: .42rem .45rem .42rem 1.15rem; margin-bottom: 1.5rem; border-radius: 14px;
  background: rgba(21, 25, 34, .72); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(8px); box-shadow: 0 14px 40px -22px rgba(115, 11, 223, .9); }
.connect-pill code { background: none; padding: 0; font: 500 .95rem ui-monospace, "Cascadia Code", Consolas, monospace; color: #dccbff; }
.connect-pill code b { color: #8d95ab; font-weight: 500; }
.connect-pill.soon { padding: .7rem 1.2rem; opacity: .8; }
.copy-btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; cursor: pointer; padding: .5rem .85rem; border-radius: 10px;
  background: var(--panel-2); color: var(--text); font: 600 .85rem var(--font-display); transition: background .2s, color .2s, transform .12s; }
.copy-btn:hover { background: var(--accent); } .copy-btn:active { transform: scale(.96); }
.copy-btn.done { background: var(--ok); color: #05210f; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-actions.left { justify-content: flex-start; }

.scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); display: grid; justify-items: center; gap: .55rem;
  font: 600 .66rem var(--font-display); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.scroll-cue i { display: block; width: 1px; height: 36px; background: linear-gradient(to bottom, var(--accent-2), transparent); transform-origin: top; animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0 0; } .section.tight { padding-top: 3rem; }
.eyebrow { display: flex; align-items: center; gap: .7rem; margin: 0 0 1rem; font: 700 .76rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.h-display { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: 0 0 1.2rem; }
.h-display em { font-style: normal; color: var(--accent-2); }
.split { display: grid; gap: 3.5rem; grid-template-columns: 1fr 1fr; align-items: center; }
.split-text { color: #aab1c5; font-size: 1.05rem; line-height: 1.75; max-width: 48ch; margin: 0; }
.tagline-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
  font: 600 .74rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tagline-foot b { color: var(--accent-2); }
.stack { display: grid; gap: 1rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.section-head .h-display { margin-bottom: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font: 600 .92rem var(--font-display); padding-bottom: .4rem; }
.link-arrow:hover { text-decoration: none; } .link-arrow .ico { transition: transform .2s; } .link-arrow:hover .ico { transform: translateX(5px); }
.tiles { display: grid; gap: 1.1rem; }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }
.stats-row { grid-template-columns: repeat(auto-fit, minmax(200px, 300px)); justify-content: center; }

/* Words in headings lift and tilt as you move over them, and their neighbours follow a little */
.hw { display: inline-block; transition: transform .3s cubic-bezier(.2, .9, .3, 1.5), color .2s, text-shadow .3s; }
.hw:hover { transform: translateY(-7px) rotate(-2.5deg) scale(1.07); color: #fff; text-shadow: 0 10px 28px rgba(139, 54, 229, .85); }
.hw:hover + .hw, .hw:has(+ .hw:hover) { transform: translateY(-3px); color: #e6dcff; }

/* ---------- Cards ("tiles"): a light follows the cursor, the edge glows and runs around the box ---------- */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.tile { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-start; gap: 1.1rem; padding: 1.45rem; border-radius: 18px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)), var(--panel);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), box-shadow .35s, border-color .35s; --mx: 50%; --my: 0%; }
.tile.col { flex-direction: column; gap: .3rem; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(164, 92, 245, .22), transparent 62%); }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--angle), transparent 0 48%, #730bdf 66%, #f95bd8 84%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; animation: spin-angle 3.2s linear infinite; }
.tile:hover { transform: translateY(-6px); border-color: rgba(164, 92, 245, .32); box-shadow: 0 26px 50px -26px rgba(115, 11, 223, .8); }
.tile:hover::before, .tile:hover::after { opacity: 1; }
@keyframes spin-angle { to { --angle: 360deg; } }
.tile-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: .55rem; border-radius: 14px; color: var(--accent-2);
  background: rgba(115, 11, 223, .14); border: 1px solid rgba(164, 92, 245, .28);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.4), background .25s, color .25s, box-shadow .25s; }
.tile:not(.col) .tile-icon { margin-bottom: 0; }
.tile-icon .ico { width: 26px; height: 26px; stroke-width: 1.7; margin: 0; vertical-align: 0; }
.tile:hover .tile-icon { transform: rotate(-8deg) scale(1.14); color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 26px -8px rgba(115, 11, 223, .95); }
.tile h3 { margin: .1rem 0 .35rem; font-size: 1.12rem; transition: transform .3s, color .2s; } .tile:hover h3 { transform: translateX(3px); color: #fff; }
.tile p { margin: 0; color: #a7aec1; font-size: .95rem; line-height: 1.6; }
.tile.stat { align-items: center; text-align: center; padding: 1.6rem 1.2rem; }
.tile.stat .stat-n { font-size: 2.4rem; background: linear-gradient(135deg, #fff, #cfb2ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* The light also follows the cursor over store packages */
.pkg { position: relative; isolation: isolate; overflow: hidden; --mx: 50%; --my: 0%; transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), box-shadow .3s; }
.pkg::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(164, 92, 245, .18), transparent 62%); }
.pkg:hover { transform: translateY(-5px); } .pkg:hover::before { opacity: 1; }
.pkg .tier-icon { transition: transform .35s cubic-bezier(.2, .9, .3, 1.4); } .pkg:hover .tier-icon { transform: scale(1.12) rotate(-4deg); }

/* ---------- Call to action banner ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; margin: 6rem 0 1.5rem; padding: clamp(1.8rem, 5vw, 3.8rem); border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(720px circle at 88% 130%, rgba(115, 11, 223, .42), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)), var(--panel); }
.cta::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: .75;
  background: conic-gradient(from var(--angle), transparent 0 55%, #730bdf 72%, #f95bd8 88%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; animation: spin-angle 7s linear infinite; }
.cta-inner { position: relative; max-width: 620px; }
.cta-chevrons { position: absolute; right: -14px; bottom: -22px; width: min(360px, 46%); fill: none; stroke: rgba(164, 92, 245, .42); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; z-index: -1; animation: chev 3.2s ease-in-out infinite; }
@keyframes chev { 50% { transform: translateX(-16px); opacity: .7; } }

/* ---------- Scroll reveal (only when JavaScript is on) ---------- */
.js [data-reveal]:not(.in) { opacity: 0; }
.js [data-reveal].in { animation: rise .85s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.6rem 0 2rem; background: linear-gradient(to bottom, transparent, rgba(115, 11, 223, .06)); color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem 2rem; align-items: start; }
.footer-brand { display: inline-flex; align-items: center; gap: .65rem; font: 700 1.05rem var(--font-display); color: var(--text); }
.footer-brand img { width: 32px; height: 26px; }
.footer-about { margin: .7rem 0 0; max-width: 46ch; line-height: 1.6; }
.footer-links { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem 1.5rem; }
.footer-links a { color: var(--muted); font-weight: 500; transition: color .15s; } .footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-fine { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: .6rem 2rem; flex-wrap: wrap; margin-top: .8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .8rem; }

/* ---------- Smaller screens ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 2.2rem; }
  .tiles-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; }
}
.dev-select { max-width: 220px; }

/* Staff panel: team access page */
.card-title { margin: 0; font-size: 1.1rem; }
.small { font-size: .85rem; }
.who { display: flex; align-items: center; gap: .7rem; } .who img { border-radius: 50%; }
.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
select.mini { width: auto; padding: .3rem .5rem; font-size: .85rem; text-transform: capitalize; }
.table .actions { flex-wrap: wrap; align-items: center; }
@media (max-width: 700px) {
  /* menu: logo and login button on one row, links underneath */
  .topbar-in { gap: .5rem 1rem; padding: .65rem 0; }
  .userbox { margin-left: auto; }
  .nav { order: 3; flex: 1 0 100%; gap: 1.3rem; }
}
@media (max-width: 600px) {
  .tiles-3 { grid-template-columns: 1fr; }
  .section { padding-top: 4rem; }
  .hero { padding-top: 3.5rem; min-height: 0; }
  .scroll-cue { display: none; }
  .connect-pill { flex-wrap: wrap; justify-content: center; }
}

/* Anyone who asks their device for less motion gets a still page */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal]:not(.in) { opacity: 1; }
}
