/* JumpGate home: hero, featured carousel, worlds gates */
:root {
  --rust: #8f4b29;
  --rust-deep: #5a2c18;
  --ember: #c8642e;
  --ember-hi: #e07a3c;
  --ink: #f6e9dc;
  --ink-dim: rgba(246, 233, 220, .74);
  --niche: #140c09;
  --night: #1a0f0b;
  --cyan: #4fe0ee;
  --teal: #2f7f80;
  --teal-hi: #3b9a9b;
  --gap: 4px;
  --pad: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--night); color: var(--ink); font-family: "Poppins", system-ui, sans-serif; overflow-x: hidden; }

/* ---------- header ---------- */
.site-head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding: 22px var(--pad); font-size: 14px; }
.site-logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: .04em; color: var(--ink); text-decoration: none; margin-right: 12px; white-space: nowrap; }
.site-logo-img { display: block; height: 44px; width: auto; }
.site-logo b { color: var(--ember-hi); font-weight: 500; }
.site-nav { display: flex; gap: 28px; list-style: none; }
.site-nav a { color: var(--ink-dim); text-decoration: none; transition: color .2s; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }
.menu-toggle { display: none; }
@media (max-width: 720px) {
  .site-head { justify-content: space-between; }
  .menu-toggle { display: grid; place-content: center; gap: 5px; width: 46px; height: 46px; margin-right: -8px; border: 0; border-radius: 50%; background: rgba(20, 12, 9, .5); backdrop-filter: blur(8px); cursor: pointer; }
  .menu-toggle i { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
  .menu-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
  .site-head.open .menu-toggle i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-head.open .menu-toggle i:nth-child(2) { opacity: 0; }
  .site-head.open .menu-toggle i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-head nav { position: absolute; top: calc(100% - 6px); left: 12px; right: 12px; padding: 8px; border-radius: 18px; border: 1px solid rgba(246, 233, 220, .14);
                   background: rgba(20, 12, 9, .94); backdrop-filter: blur(12px); box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
                   visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .site-head.open nav { visibility: visible; opacity: 1; transform: none; }
  .site-nav { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 14px 16px; border-radius: 12px; font-size: 16px; color: var(--ink); }
  .site-nav a:hover, .site-nav a:focus-visible { background: rgba(246, 233, 220, .08); outline: none; }
}
@media (prefers-reduced-motion: reduce) { .menu-toggle i, .site-head nav { transition: none; } }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: var(--night); }
.hero canvas, .hero .fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .fallback { object-fit: cover; opacity: 0; transition: opacity .6s; }
.hero.no-gl .fallback { opacity: 1; }
.hero canvas { opacity: 0; transition: opacity 1.2s ease; }
.hero.ready canvas { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 45% 0 0; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(26, 15, 11, .6)); }
.hero-copy { position: absolute; z-index: 1; left: var(--pad); right: var(--pad); bottom: clamp(48px, 11vh, 120px); text-align: center; }
.hero-kicker { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; }
.hero-kicker[hidden] { display: none; }
.hero h1 { font-weight: 400; line-height: 1; letter-spacing: -.025em; font-size: clamp(42px, 9vw, 136px); text-shadow: 0 2px 30px rgba(0, 0, 0, .5); text-wrap: balance; }
.hero-sub { margin-top: clamp(8px, 1.6vh, 18px); font-weight: 400; font-size: clamp(20px, 3.1vw, 46px); letter-spacing: -.01em; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.hero-actions { margin-top: clamp(22px, 4vh, 44px); display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
.btn { display: inline-block; min-width: min(240px, 42vw); padding: 15px 34px; border-radius: 999px; color: #fff; text-decoration: none; text-align: center;
       font-weight: 500; font-size: clamp(15px, 1.4vw, 19px); box-shadow: 0 8px 28px rgba(0, 0, 0, .35); transition: background .25s, transform .25s; }
.btn.teal { background: var(--teal); } .btn.teal:hover, .btn.teal:focus-visible { background: var(--teal-hi); }
.btn.rust { background: #b85c2c; } .btn.rust:hover, .btn.rust:focus-visible { background: var(--ember-hi); }
.btn:hover { transform: translateY(-2px); } .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---------- featured carousel ---------- */
  .featured {
    position: relative; padding: clamp(56px, 9vh, 104px) 0 clamp(48px, 8vh, 88px); overflow: hidden;
    background: var(--rust) url("assets/featured-bg.webp") center / cover no-repeat;
  }
  /* sandstone grain */
  .featured::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  .head { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 var(--pad); margin-bottom: clamp(24px, 4vh, 44px); }
  .kicker { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
  .kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--cyan); box-shadow: 0 0 10px var(--cyan); }
  .head h2 { font-weight: 300; font-size: clamp(28px, 4.2vw, 54px); line-height: 1.05; letter-spacing: -.01em; }

  .nav { display: flex; align-items: center; gap: 14px; flex: none; }
  .nav[hidden] { display: none; }
  .count { font-size: 12px; letter-spacing: .18em; color: var(--ink-dim); font-variant-numeric: tabular-nums; margin-right: 6px; }
  .arrow {
    width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(246, 233, 220, .45); background: transparent; color: var(--ink);
    display: grid; place-items: center; cursor: pointer; transition: background .25s, border-color .25s, opacity .25s, transform .25s;
  }
  .arrow svg { width: 20px; height: 20px; }
  .arrow:hover:not(:disabled), .arrow:focus-visible { background: var(--ember); border-color: var(--ember); outline: none; }
  .arrow:active:not(:disabled) { transform: scale(.94); }
  .arrow:disabled { opacity: .28; cursor: default; }

  /* the row: native horizontal scroll with snapping, so touch swipes just work */
  .track {
    position: relative; display: flex; gap: var(--gap); padding: 0 var(--pad); scroll-padding: 0 var(--pad);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .track::-webkit-scrollbar { display: none; }
  .track:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }
  .card { --per: 3; flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); scroll-snap-align: start; min-width: 0; text-decoration: none; color: inherit; display: block; }
  .card:first-child { margin-left: auto; } .card:last-child { margin-right: auto; }   /* fewer items than fit: centre them */
  @media (max-width: 980px) { .card { --per: 2; } }
  @media (max-width: 620px) { .card { --per: 1.18; } }   /* next card peeks in */

  /* each item sits in a dark niche with a gate ring glowing behind it */
  .niche { position: relative; aspect-ratio: 4 / 5; background: var(--niche); overflow: hidden; display: grid; place-items: center; }
  .niche::before {
    content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--tint, var(--cyan)) 55%, transparent);
    box-shadow: 0 0 60px color-mix(in srgb, var(--tint, var(--cyan)) 22%, transparent), inset 0 0 60px color-mix(in srgb, var(--tint, var(--cyan)) 14%, transparent);
    opacity: .55; transition: opacity .5s, transform .9s cubic-bezier(.2, .7, .2, 1);
  }
  .niche::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 62%, rgba(20, 12, 9, .78)); }
  .niche img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  .niche img.contain { object-fit: contain; height: auto; width: 92%; border-radius: 6px; box-shadow: 0 24px 50px rgba(0, 0, 0, .6); }
  .card:hover .niche::before, .card:focus-visible .niche::before { opacity: 1; transform: scale(1.06); }
  .card:hover .niche img, .card:focus-visible .niche img { transform: scale(1.035); }
  .card:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

  .tag { position: absolute; left: 16px; top: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
         background: rgba(20, 12, 9, .7); backdrop-filter: blur(6px); font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
  .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tint, var(--cyan)); box-shadow: 0 0 8px var(--tint, var(--cyan)); }
  .badge { position: absolute; right: 16px; top: 16px; z-index: 1; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim); padding: 6px 0; }

  .info { text-align: center; padding: 20px 16px 6px; }
  .info h3 { font-weight: 500; font-size: clamp(14px, 1.25vw, 17px); letter-spacing: .12em; text-transform: uppercase; }
  .info p { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--ink-dim); max-width: 34ch; margin-inline: auto; }
  .info .price { margin-top: 8px; font-size: 14px; color: var(--ink); }
  .info .price b { font-weight: 600; }
  .cta { display: inline-block; margin-top: 14px; padding: 10px 26px; border-radius: 999px; background: var(--ember); color: #fff; font-size: 14px; transition: background .25s; }
  .card:hover .cta, .card:focus-visible .cta { background: var(--ember-hi); }
  .cta.ghost { background: transparent; border: 1px solid rgba(246, 233, 220, .4); color: var(--ink-dim); }
  .card:hover .cta.ghost { background: transparent; border-color: var(--ink); color: var(--ink); }

  /* progress line */
  .rail { position: relative; height: 1px; margin: clamp(24px, 4vh, 40px) var(--pad) 0; background: rgba(246, 233, 220, .22); }
  .rail[hidden] { display: none; }
  .rail i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--ink); transition: transform .35s ease, width .35s ease; transform-origin: left; }

  @media (max-width: 620px) { .head { flex-direction: column; align-items: start; } .count { display: none; } }
  @media (prefers-reduced-motion: reduce) { .niche img, .niche::before, .rail i { transition: none; } }

/* hand-off from the hero's dark fade into the rust */
.featured::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 160px; pointer-events: none; background: linear-gradient(180deg, var(--night), rgba(26, 15, 11, 0)); }

/* ---------- worlds gates ---------- */
.worlds { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: #2a1c16; }
.worlds canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.worlds::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 180px; pointer-events: none; background: linear-gradient(180deg, var(--rust-deep), rgba(90, 44, 24, 0)); }
.gates-ui { position: absolute; z-index: 2; inset: 0; pointer-events: none; transition: opacity .5s ease; }
.gates-ui.away { opacity: 0; }
.worlds h2 { position: absolute; left: 0; right: 0; top: clamp(40px, 8vh, 96px); text-align: center; font-weight: 300; font-size: clamp(30px, 5vw, 64px); letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.gate-btn {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none;
  padding: 7px 26px 7px 8px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ember); color: #fff; font: 400 clamp(14px, 1.5vw, 19px)/1 "Poppins", sans-serif;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45); transition: background .25s, box-shadow .25s, opacity .3s;
}
.gate-btn:hover, .gate-btn.hot, .gate-btn:focus-visible { background: var(--ember-hi); box-shadow: 0 6px 30px rgba(79, 224, 238, .35); outline: none; }
.gate-btn.locked { background: #4a3a30; color: #d9cbbd; }
.gate-btn .seal { width: 38px; height: 38px; display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.gate-btn.denied { animation: denied .45s; }
@keyframes denied { 20% { margin-left: -7px } 40% { margin-left: 7px } 60% { margin-left: -4px } 80% { margin-left: 4px } }
.gates-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(246, 233, 220, .5); }
@media (max-aspect-ratio: 95/100) { .gates-hint { display: none; } }
.gates-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.gates-fallback[hidden] { display: none; }

/* covers the cut to a world page */
#veil { position: fixed; z-index: 50; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .35s ease, background-color .35s ease; }
#veil.on { opacity: 1; }


/* ---------- footer ---------- */
.site-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; padding: 34px var(--pad); background: var(--night); font-size: 14px; border-top: 1px solid rgba(246, 233, 220, .1); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; margin-right: auto; }
.foot-nav a { color: var(--ink-dim); text-decoration: none; transition: color .2s; }
.foot-nav a:hover, .foot-nav a:focus-visible { color: var(--ink); }
.foot-soon { color: var(--ink-dim); } .foot-soon b { color: var(--ink); font-weight: 500; margin-right: 6px; }
.foot-legal { color: rgba(246, 233, 220, .5); font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; flex: 1 1 100%; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-right: auto; }
.foot-links a { color: var(--ink-dim); text-decoration: none; transition: color .2s; }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--ink); }
