/* ══════════ Gewiation Universe — shared design system ══════════
   Warm cream/stone palette + Gewiation blue accent, inspired by tryalcove.com:
   neutral warm base, colour used sparingly for interaction, tinted
   shadows instead of flat black, pill buttons with icon micro-motion,
   staggered entrance reveals. */

:root {
  --gw-cream: #fdf6ec;
  --gw-cream-white: #fffbf4;
  --gw-ink: #332a20;
  --gw-muted: #8a7a68;
  --gw-muted-2: #ab9c89;
  --gw-faint: #cabda9;
  --gw-border: rgba(51,42,32,0.10);
  --gw-border-2: rgba(51,42,32,0.18);
  --gw-shadow: rgba(51,38,20,0.12);
  --gw-accent: #2e86de;
  --gw-accent-hover: #1a6dbe;
  --gw-accent-soft: rgba(46,134,222,0.12);
  --gw-discord: #5865F2;
  --gw-network: #4a90e2;
  --gw-hosting: #8aa0f0;
  --gw-studios: #7da0d8;
  --gw-studios-lt: #a7c4f5;
  --gw-marketplace: #5fbfa8;
  --gw-marketplace-lt: #7fd9c4;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--gw-cream); scroll-behavior: smooth; }
body { color: var(--gw-ink); font-family: 'Nunito', sans-serif; }
a { text-decoration: none; color: inherit; }

@keyframes gw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gw-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── Scroll-triggered reveal — elements animate in as they enter the
   viewport while scrolling, not just once on page load ── */
.gw-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.85,.25,1);
}
.gw-reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .gw-reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Hand-drawn squiggle/circle doodle that draws itself in on scroll ── */
.gw-squiggle {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.85,.25,1) .15s;
}
.gw-squiggle.in-view { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .gw-squiggle { stroke-dashoffset: 0; transition: none; }
}

/* ── Giant faded wordmark, fully visible (not cropped) so it reads clearly
   as a brand flourish at the bottom of the page on any screen/resolution. ── */
.gw-wordmark-wrap {
  pointer-events: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  margin-top: 4px;
  padding: 10px 0;
}
.gw-wordmark {
  font-weight: 900;
  font-size: clamp(48px, 9vw, 170px);
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, rgba(51,42,32,0.22), rgba(51,42,32,0.05));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

/* ── Sticky nav ── */
.gw-nav-outer {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: rgba(253,246,236,0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.gw-nav-outer.scrolled { border-bottom-color: var(--gw-border); box-shadow: 0 8px 24px rgba(51,38,20,0.06); }
.gw-nav-inner {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: gw-rise .7s ease both;
}
.gw-nav-logo { display: flex; align-items: center; gap: 12px; }
.gw-nav-logo img { width: 30px; height: 30px; object-fit: contain; }
.gw-nav-logo span { font-weight: 800; font-size: 16px; letter-spacing: 0.01em; color: var(--gw-ink); }
.gw-nav-links { display: flex; align-items: center; gap: 26px; }
.gw-nav-links a:not(.gw-btn) { font-size: 13.5px; font-weight: 700; color: var(--gw-muted); letter-spacing: 0.01em; transition: color .2s ease; }
.gw-nav-links a:not(.gw-btn):hover { color: var(--gw-accent); }
.gw-nav-links a.active { color: var(--gw-accent); }
@media (max-width: 900px) { .gw-nav-links a:not(.gw-btn):not(.gw-btn-discord) { display: none; } }

/* ── World cards grid: fluid column count so the row actually fills wide
   screens instead of sitting as a fixed 2x2 block with empty space either
   side. Each card keeps a sane minimum width so titles never get cramped. ── */
#worlds { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.world-card-box { height: 320px; }

/* ── Buttons ── */
.gw-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 13.5px;
  padding: 11px 22px; border-radius: 100px; border: none; cursor: pointer;
  white-space: nowrap; transition: transform .25s cubic-bezier(.2,.85,.25,1), box-shadow .25s ease, background .2s ease, opacity .2s ease;
}
.gw-btn:hover { transform: translateY(-2px); }
.gw-btn .gw-arrow { display: inline-block; transition: transform .3s cubic-bezier(.2,.85,.25,1); }
.gw-btn:hover .gw-arrow { transform: translate(3px,-2px); }

.gw-btn-primary { background: var(--gw-ink); color: var(--gw-cream-white); box-shadow: 0 8px 22px var(--gw-shadow); }
.gw-btn-primary:hover { box-shadow: 0 14px 32px rgba(51,38,20,0.22); }

.gw-btn-accent { background: var(--gw-accent); color: #fff; box-shadow: 0 8px 22px var(--gw-accent-soft); }
.gw-btn-accent:hover { background: var(--gw-accent-hover); box-shadow: 0 14px 30px rgba(46,134,222,0.32); }

.gw-btn-ghost { background: rgba(51,42,32,0.045); color: var(--gw-ink); border: 1px solid var(--gw-border); }
.gw-btn-ghost:hover { border-color: var(--gw-border-2); background: rgba(51,42,32,0.07); }

.gw-btn-discord { background: var(--gw-discord); color: #fff; box-shadow: 0 6px 20px rgba(88,101,242,0.3); }
.gw-btn-discord:hover { box-shadow: 0 12px 28px rgba(88,101,242,0.4); }

.gw-btn-outline-discord { color: var(--gw-muted); border: 1px solid var(--gw-border-2); background: transparent; }
.gw-btn-outline-discord:hover { color: var(--gw-discord); border-color: var(--gw-discord); }

/* ── Small inline arrows on cards — fly diagonally on hover instead of sitting still ── */
.explore-arrow, .quick-arrow { transition: transform .35s cubic-bezier(.2,.85,.25,1); }
.world-card:hover .explore-arrow { transform: translate(3px,-3px); }
.gw-card:hover .quick-arrow { transform: translate(4px,-4px); }

/* ── Icon-swap buttons — one icon flies out while another flies in, squished
   + blurred mid-flight. Matches Alcove's own recipe 1:1: translate exactly
   ±100% of the icon's own box, squish to scale-x .5, no rotation (rotation
   is what made this look disjointed before), single flat 300ms ease. ── */
.gw-btn-swap { position: relative; overflow: hidden; padding-left: 42px; padding-right: 42px; }
.gw-swap-icon {
  position: absolute; top: 50%; left: 18px; width: 16px; height: 16px;
  transform: translateY(-50%) translateX(0) scaleX(1);
  opacity: 1; filter: blur(0);
  transition: transform .3s ease, opacity .3s ease, filter .3s ease;
  display: flex; align-items: center; justify-content: center;
}
.gw-swap-icon svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gw-swap-icon-b { left: auto; right: 18px; transform: translateY(-50%) translateX(100%) scaleX(.5); opacity: 0; filter: blur(4px); }
.gw-btn-swap:hover .gw-swap-icon-a { transform: translateY(-50%) translateX(-100%) scaleX(.5); opacity: 0; filter: blur(4px); }
.gw-btn-swap:hover .gw-swap-icon-b { transform: translateY(-50%) translateX(0) scaleX(1); opacity: 1; filter: blur(0); }
.gw-swap-label { display: inline-block; transition: transform .3s ease; }
.gw-btn-swap:hover .gw-swap-label { transform: translateX(-18px); }

/* ── Feature icons — plain, monochrome, no card chrome. Each gets its own
   richer multi-stage hover choreography (rotate + scale + subtle skew,
   springy easing, staggered sub-parts) instead of a single flat scale. ── */
.gw-feature { padding: 6px; flex: 0 1 170px; }
.gw-feature-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--gw-ink); overflow: visible; }
.gw-feature-icon svg { overflow: visible; }


/* ── Cards ── */
.gw-card {
  background: var(--gw-cream-white);
  border: 1px solid var(--gw-border);
  border-radius: 22px;
  box-shadow: 0 6px 18px var(--gw-shadow);
  transition: transform .3s cubic-bezier(.2,.85,.25,1), border-color .3s ease, box-shadow .3s ease;
}
.gw-card:hover { transform: translateY(-4px); }

.gw-icon-tile {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--gw-accent-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background .3s ease;
}
.gw-card:hover .gw-icon-tile { background: rgba(46,134,222,0.2); }

/* ── Badges ── */
.gw-badge {
  font-weight: 800; font-size: 12px; letter-spacing: 0.04em;
}
.gw-eyebrow {
  font-weight: 800; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gw-accent);
  display: block; margin-bottom: 14px;
}

/* ── Locked world tiles ── */
.gw-locked-inner { filter: saturate(0.55) brightness(1.03); position: absolute; inset: 0; pointer-events: none; }
.gw-locked-chain { position: absolute; inset: 0; pointer-events: none; z-index: 5; background-image: radial-gradient(circle, rgba(51,42,32,0.08) 1.5px, transparent 1.5px); background-size: 20px 20px; }
.gw-locked-chain-sm { position: absolute; inset: 0; pointer-events: none; z-index: 2; background-image: radial-gradient(circle, rgba(51,42,32,0.06) 1.5px, transparent 1.5px); background-size: 20px 20px; }
.gw-locked-shade { position: absolute; inset: 0; background: rgba(253,246,236,0.6); backdrop-filter: blur(1px); z-index: 6; pointer-events: none; }
.gw-locked-icon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 7; pointer-events: none; }
.gw-locked-pill {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  background: rgba(255,251,244,0.88); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--gw-border-2); border-radius: 22px; padding: 22px 30px;
  box-shadow: 0 8px 24px var(--gw-shadow);
}
.gw-locked-label { font-weight: 800; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gw-muted); }

/* ── Footer ── */
.gw-footer { margin-top: 72px; padding: 30px 0 40px; border-top: 1px solid var(--gw-border); }
.gw-footer-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.gw-footer-brand { display: flex; align-items: center; gap: 12px; }
.gw-footer-brand img { width: 28px; height: 28px; object-fit: contain; }
.gw-footer-brand span { font-weight: 800; font-size: 15px; color: var(--gw-ink); }
.gw-footer-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.gw-footer-links a { color: var(--gw-muted-2); font-weight: 600; transition: color .2s; }
.gw-footer-links a:hover { color: var(--gw-accent); }
.gw-footer-pipe { color: var(--gw-faint); }
.gw-footer-copy { margin-left: auto; font-weight: 700; font-size: 11px; letter-spacing: 0.04em; color: var(--gw-faint); text-transform: uppercase; }

.gw-lottie-spin { display: inline-block; width: 18px; height: 18px; vertical-align: middle; flex-shrink: 0; }
.gw-lottie-icon { width: 76px; height: 76px; }

/* Simple hand-drawn mark (box or circle) around a key word — no fill,
   just a wobbly sketched outline, matching the site's other doodles */
.gw-highlight { position: relative; display: inline-block; color: var(--gw-ink); }
.gw-highlight-mark { position: absolute; inset: -8px -11px; pointer-events: none; }
