/* ================= The Star Wars vault ================= */
body.sw-page {
  --saber: #39ff6a; --saber-rgb: 57 255 106;
  background: #03050a;
}
body.sw-page[data-side="light"] { --saber: #4aa3ff; --saber-rgb: 74 163 255; }
body.sw-page[data-side="dark"] { --saber: #ff3b3f; --saber-rgb: 255 59 63; }
body.sw-page .site-header { background: rgb(3 5 10 / 0.7); }
body.sw-page .announce { background: var(--saber); transition: background 0.4s; }
#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.sw-page main { position: relative; }
.saber-text { color: #fff; text-shadow: 0 0 6px #fff, 0 0 18px var(--saber), 0 0 42px var(--saber); }

/* intro: hyperspace + "far far away" line */
.intro { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: transparent; pointer-events: none; }
.intro p { font-size: clamp(13px, 1.87vw, 22px); font-weight: 600; color: var(--saber); letter-spacing: 0.02em; text-align: center; padding: 0 20px; opacity: 0; animation: introtext 3.2s ease forwards; text-shadow: 0 0 20px rgb(var(--saber-rgb) / 0.6); }
@keyframes introtext { 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* hero */
.sw-hero { min-height: calc(100vh - 110px); display: grid; align-items: center; padding: 60px 0 40px; text-align: center; }
.sw-hero .kick { display: inline-flex; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: var(--saber); }
.sw-hero h1 { font-size: clamp(46px, 8.64vw, 121px); line-height: 0.88; margin: 18px 0 8px; letter-spacing: 0.02em; }
.sw-hero h1 .outline { color: transparent; -webkit-text-stroke: 2px var(--bone); }
.ignite { position: relative; height: 10px; width: min(640px, 80%); margin: 18px auto 26px; }
.ignite .hilt { position: absolute; left: 0; top: -5px; width: 70px; height: 20px; border-radius: 4px; background: linear-gradient(#cfd3da, #6b707b 45%, #2d3036 50%, #9aa0aa); box-shadow: inset 0 0 0 1px #000; }
.ignite .hilt::after { content: ""; position: absolute; left: 14px; top: 4px; width: 10px; height: 12px; background: #c21; border-radius: 2px; }
.ignite .blade { position: absolute; left: 66px; top: 0; height: 10px; width: 0; border-radius: 0 10px 10px 0; background: #fff; box-shadow: 0 0 8px 2px var(--saber), 0 0 30px 8px rgb(var(--saber-rgb) / 0.6), 0 0 70px 16px rgb(var(--saber-rgb) / 0.25); transition: width 0.9s cubic-bezier(.2,.9,.3,1), box-shadow 0.4s; }
.ignite.on .blade { width: calc(100% - 66px); animation: hum 0.12s infinite alternate; }
@keyframes hum { to { filter: brightness(1.15); } }
.sw-hero p.lead { color: #c8ccd6; font-size: clamp(17px, 1.8vw, 20px); max-width: 52ch; margin: 0 auto; }
.sides { display: inline-flex; gap: 6px; padding: 6px; border-radius: 16px; background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.1); margin-top: 30px; }
.sides button { border: 0; background: transparent; color: #c8ccd6; font-weight: 800; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 14px; border-radius: 11px; display: inline-flex; gap: 8px; align-items: center; }
.sides button i { width: 22px; height: 4px; border-radius: 3px; background: #fff; box-shadow: 0 0 6px 2px var(--c); }
.sides button[aria-pressed="true"] { background: rgb(255 255 255 / 0.1); color: #fff; }
.sw-stats { display: flex; justify-content: center; gap: 40px; margin-top: 34px; flex-wrap: wrap; }
.sw-stats div { font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #8a90a0; }
.sw-stats b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 33px; color: #fff; line-height: 1; letter-spacing: 0.02em; }
.scroll-cue { margin-top: 40px; display: inline-grid; justify-items: center; gap: 8px; color: #8a90a0; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.scroll-cue i { width: 2px; height: 40px; background: linear-gradient(var(--saber), transparent); animation: cue 1.6s infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* opening crawl (original text) */
.crawl-wrap { position: relative; height: 560px; overflow: hidden; perspective: 380px; mask-image: linear-gradient(transparent 0%, #000 30%, #000 80%, transparent); }
.crawl { position: absolute; left: 50%; bottom: 0; width: min(760px, 92%); transform-origin: 50% 100%; transform: translateX(-50%) rotateX(24deg); }
.crawl-inner { color: var(--yellow); font-weight: 700; font-size: clamp(14px, 1.87vw, 22px); line-height: 1.45; text-align: justify; animation: crawl 40s linear infinite; }
.crawl-inner h3 { text-align: center; font-size: clamp(24px, 3.6vw, 40px); margin-bottom: 4px; }
.crawl-inner .ep { text-align: center; display: block; font-size: 0.8em; letter-spacing: 0.1em; margin-bottom: 26px; }
.crawl-inner p { margin-bottom: 1.1em; }
@keyframes crawl { from { transform: translateY(100%); } to { transform: translateY(-140%); } }
.crawl-wrap:hover .crawl-inner { animation-play-state: paused; }

/* saber divider */
.saber-line { height: 4px; width: 0; margin: 0 auto; border-radius: 4px; background: #fff; box-shadow: 0 0 8px 2px var(--saber), 0 0 34px 6px rgb(var(--saber-rgb) / 0.55); transition: width 1.1s cubic-bezier(.2,.9,.3,1); }
.saber-line.on { width: min(1100px, 90%); }

/* section heads */
.sw-head { text-align: center; margin-bottom: 34px; }
.sw-head .kick { font-size: 12px; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: var(--saber); }
.sw-head h2 { font-size: clamp(32px, 5.04vw, 66px); margin-top: 10px; }
.sw-head p { color: #a8aebb; margin: 10px auto 0; max-width: 54ch; }

/* holo bricks: the cards take the colour of the chosen saber */
.sw-page .card { --bc: var(--saber); --bd: color-mix(in srgb, var(--saber) 40%, black); --bt: #04060a;
  background: radial-gradient(120% 60% at 50% 0%, rgb(var(--saber-rgb) / 0.12), transparent 70%), linear-gradient(180deg, #0d1320, #070b12); }
.sw-page .card .shot { background: #0b1220; }
.sw-page .card .shot::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(var(--saber-rgb) / 0.06) 0 2px, transparent 2px 4px); mix-blend-mode: screen; }
.sw-page .card .meta { color: rgb(var(--saber-rgb) / 0.85); }
.sw-page .auction-card { background: linear-gradient(135deg, rgb(var(--saber-rgb) / 0.12), transparent 60%), #070b12; border-color: rgb(var(--saber-rgb) / 0.4); }
.sw-page .badge.krypt { --c: var(--saber); }
.sw-page .card .timer, .sw-page .auction-card .row .timer b { color: var(--saber); border-color: rgb(var(--saber-rgb) / 0.4); }
.sw-page .ph-art { --pc: var(--saber) !important; }
.sw-page .theme-tile, .sw-page .footer { border-color: rgb(var(--saber-rgb) / 0.3); }
.sw-page .btn-saber { --b: var(--saber); --b-deep: color-mix(in srgb, var(--saber) 45%, black); --b-text: #04060a; }
.sw-page .site-footer { background: rgb(2 3 6 / 0.92); }

/* zero-g field */
.zero-g { position: relative; height: 480px; border-radius: 26px; overflow: hidden; touch-action: none; user-select: none; border: 1px solid rgb(var(--saber-rgb) / 0.3); background: radial-gradient(500px 300px at 50% 50%, rgb(var(--saber-rgb) / 0.08), transparent 70%), rgb(3 5 10 / 0.5); box-shadow: inset 0 0 80px rgb(0 0 0 / 0.8); }
.zero-g canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.zero-g .pit-ui .hint { background: rgb(3 5 10 / 0.8); color: #a8aebb; }
.zero-g .pit-ui .acts button:hover { border-color: var(--saber); color: var(--saber); }

/* transmission CTA */
.transmission { position: relative; border-radius: 26px; padding: 40px 26px; text-align: center; border: 1px solid rgb(var(--saber-rgb) / 0.35); background: radial-gradient(500px 220px at 50% 0%, rgb(var(--saber-rgb) / 0.16), transparent 70%), #060a12; overflow: hidden; }
.transmission::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.03) 0 1px, transparent 1px 3px); pointer-events: none; }
.transmission h2 { font-size: clamp(27px, 3.96vw, 48px); }
.transmission p { color: #a8aebb; margin: 12px auto 24px; max-width: 50ch; }

/* saber cursor trail */
/* width/height are needed: without them the canvas shows at its pixel size, which is
   bigger than the window on scaled screens (125%, 150%), and the trail drifts off the mouse */
#trail { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
