/* 3dshop.site: the 3DShop look (design/DESIGN_SYSTEM.md) on the web.
   Colours and GlowPanel recipes come from tokens.css (generated from design/tokens.json). */

@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(../fonts/Barlow-Medium.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(../fonts/Barlow-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(../fonts/Barlow-Bold.woff2) format("woff2"); }
@font-face { font-family: "Nunito Black"; font-weight: 900; font-display: swap; src: url(../fonts/Nunito-Black.woff2) format("woff2"); }

:root {
  --video-bg: #06194D;
  --page: min(1180px, 100% - 32px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font: 500 17px/1.5 Barlow, system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bgEdge);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 18%, var(--video-bg) 0%, var(--video-bg) 30%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 40%, var(--bgTop) 0%, var(--bgMid) 45%, var(--bgEdge) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.pixels { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, .nav, .foot { position: relative; z-index: 1; }

a { color: var(--crumbOn); text-decoration: none; }
a:hover { text-decoration: underline; }
b { font-weight: 600; color: var(--text); }
h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: 0.005em; }
code { font: 600 0.95em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
svg { width: 1.2em; height: 1.2em; flex: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------- GlowPanel */
.gp {
  position: relative;
  background: linear-gradient(var(--top), var(--bottom));
  border: var(--sw) solid var(--stroke);
  border-radius: var(--r);
  box-shadow: 0 0 calc(var(--glow) * 1.7px) calc(var(--glow) * 0.15px) color-mix(in srgb, var(--glowc) 60%, transparent);
}
.gp.p-iconButton::before, .gp.p-tabOn::before, .gp.p-rowButton::before, .gp.p-primaryButton::before {
  /* gloss: white, fading out over the top half */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 50%);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: 600 21px/1 Barlow, sans-serif; color: var(--text);
  text-decoration: none !important;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover { filter: brightness(1.12); box-shadow: 0 0 calc(var(--glow) * 2.6px) calc(var(--glow) * 0.4px) color-mix(in srgb, var(--glowc) 75%, transparent); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.small { min-height: 42px; font-size: 17px; padding: 0 18px; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, (100% - 1180px) / 2);
  background: linear-gradient(rgba(6, 25, 77, 0.92), rgba(6, 25, 77, 0.72));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--separator) 70%, transparent);
}
.brand img { display: block; height: 36px; width: auto; }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  color: var(--textDim); font-weight: 600; font-size: 16px;
  padding: 7px 12px; border-radius: 8px;
}
.nav nav a:hover { color: var(--text); background: rgba(47, 168, 255, 0.12); text-decoration: none; }

/* ---------------------------------------------------------------- hero */
.hero { width: var(--page); margin: 0 auto; padding-top: clamp(28px, 6vw, 64px); }
.hero-copy { text-align: center; max-width: 780px; margin: 0 auto; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 10px; color: var(--crumbOn); font-weight: 600; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; }
h1 {
  font: 900 clamp(40px, 7.4vw, 82px)/1.02 "Nunito Black", Barlow, sans-serif;
  letter-spacing: -0.01em;
  text-shadow: 0 0 28px rgba(63, 194, 255, 0.35);
}
h1 .glow {
  background: linear-gradient(#7AE6FF, #1AA6FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 18px auto 0; max-width: 640px; color: var(--textDim); font-size: clamp(17px, 2vw, 20px); }
.cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

.hero-media {
  position: relative; z-index: 1;
  margin: clamp(-90px, -7vw, -24px) auto 0;
  width: min(1320px, 100vw);
  margin-left: 50%; transform: translateX(-50%);
  aspect-ratio: 16 / 9;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
}
.hero-media video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--video-bg); }

/* ---------------------------------------------------------------- sections */
section h2 { font-size: clamp(30px, 4vw, 42px); text-align: center; text-shadow: 0 0 22px rgba(63, 194, 255, 0.3); }
.sub { text-align: center; color: var(--textDim); margin: 8px 0 0; }
h3 { font-size: 23px; }
.note { color: var(--textMeta); font-size: 15px; margin: 14px 0 0; }

.install { width: var(--page); margin: clamp(8px, 2vw, 24px) auto 0; }

.seg { display: flex; width: fit-content; margin: 22px auto 26px; padding: 5px; gap: 4px; --r: 14px; }
.seg button {
  font: 600 18px/1 Barlow, sans-serif; color: var(--textDim);
  background: none; border: var(--sw, 1.6px) solid transparent; border-radius: 10px;
  padding: 11px 22px; cursor: pointer; min-height: 44px;
}
.seg button:hover { color: var(--text); }
.seg button.gp { color: var(--text); }

.pane { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.pane[hidden] { display: none; }
.pane > *, .pop > *, .wifi { min-width: 0; }
#pane-android { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }

.qr { padding: 18px; display: grid; place-items: center; }
.qr img { display: block; width: 100%; max-width: 260px; height: auto; border-radius: 10px; background: #fff; image-rendering: pixelated; }

.steps-card, .apk, .wifi { padding: 26px 28px; }
.steps-card h3, .apk h3 { margin-bottom: 14px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; color: var(--textDim); }
.steps li { position: relative; padding-left: 40px; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 15px/1 Barlow, sans-serif; color: var(--navy); background: #fff;
}
.steps.dots li { padding-left: 24px; }
.steps.dots li::before { content: ""; width: 8px; height: 8px; top: 9px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.steps-card .btn { margin-top: 18px; }

.apk { display: flex; flex-direction: column; align-items: flex-start; }
.apk p { color: var(--textDim); margin: 0 0 20px; }
.apk .bag { width: 120px; height: auto; margin: -6px 0 6px -8px; filter: drop-shadow(0 0 18px rgba(63, 194, 255, 0.35)); }
.apk .btn { margin-top: auto; align-self: stretch; }

.code { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 22px; margin-bottom: 18px; --r: 26px; }
.code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding: 6px 0; }
.code code::-webkit-scrollbar { display: none; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font: 600 15px/1 Barlow, sans-serif; color: var(--text);
  background: linear-gradient(#1A63D6, #0C45A8); border: 1.2px solid #4A98FF; border-radius: 20px;
  padding: 8px 14px; min-height: 36px; cursor: pointer;
}
.copy:hover { filter: brightness(1.15); }
.copy.done { background: linear-gradient(#2E93FF, #1466E0); border-color: #7AD3FF; }

.wifi { margin-top: 24px; }
.wifi-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.wifi-head p { margin: 4px 0 0; color: var(--textDim); }
.wifi-icon { display: grid; place-items: center; width: 58px; height: 58px; flex: none; }
.wifi-icon svg { width: 32px; height: 32px; }
.steps.row { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.glyph {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: var(--navy); font: 700 14px/1 Barlow, sans-serif; vertical-align: 1px;
}

/* ---------------------------------------------------------------- popular */
.popular { width: var(--page); margin: clamp(64px, 9vw, 110px) auto 0; }
.pop { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; margin-top: 28px; align-items: start; }

.regions { padding: 8px; display: grid; gap: 4px; position: sticky; top: 84px; }
.region {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; min-height: 46px;
  font: 600 17px/1.1 Barlow, sans-serif; color: var(--text); text-align: left;
  background: none; border: 2px solid transparent; border-radius: 8px; cursor: pointer;
}
.region:hover { background: rgba(31, 116, 232, 0.22); }
.region .n { margin-left: auto; color: var(--textMeta); font-weight: 500; font-size: 15px; }
.region[aria-selected="true"] {
  background: linear-gradient(#1F74E8, #1257C9); border-color: #5CCBFF;
  box-shadow: 0 0 9px 1px color-mix(in srgb, #2FA8FF 60%, transparent);
}
.region[aria-selected="true"] .n { color: var(--textValue); }
.flag { display: inline-block; flex: none; width: 30px; height: 21px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.flag svg { display: block; width: 100%; height: 100%; }

.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 104px; margin-bottom: 8px; }
.pop-title { display: flex; align-items: center; gap: 14px; }
.pop-title .flag { width: 46px; height: 32px; border-radius: 5px; }
.pop-title h3 { font-size: 28px; line-height: 1.1; }
.pop-title .meta { margin: 2px 0 0; color: var(--crumbOn); }
.dotmap { width: min(360px, 45%); height: 110px; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.card { display: flex; flex-direction: column; gap: 8px; animation: rise 0.35s both; animation-delay: calc(var(--i) * 18ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
.cover { aspect-ratio: 768 / 680; padding: 3px; overflow: hidden; }
.cover img, .cover .initials { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.cover .initials {
  display: grid; place-items: center;
  font: 600 38px/1 Barlow, sans-serif; color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, hsl(var(--h) 55% 40%), hsl(calc(var(--h) + 40) 60% 28%));
}
.card .t { font: 600 15.5px/1.2 Barlow, sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .m { font-size: 13.5px; color: var(--textMeta); margin-top: -4px; }
.card .rank { color: var(--crumbOn); font-weight: 600; margin-right: 6px; }

/* ---------------------------------------------------------------- footer */
.foot { width: var(--page); margin: clamp(70px, 9vw, 120px) auto 0; padding: 28px 0 40px; border-top: 1px solid var(--separator); color: var(--textMeta); font-size: 15px; }
.foot img { height: 30px; width: auto; display: block; margin-bottom: 10px; }
.foot p { margin: 6px 0; max-width: 760px; }

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 900px) {
  .pane, #pane-android { grid-template-columns: minmax(0, 1fr); }
  .qr { max-width: 320px; width: 100%; margin: 0 auto; }
  .steps.row { grid-template-columns: 1fr; gap: 12px; }
  .pop { grid-template-columns: minmax(0, 1fr); }
  .regions {
    position: static; display: flex; overflow-x: auto; gap: 6px; padding: 6px;
    scroll-snap-type: x proximity; scrollbar-width: none;
  }
  .regions::-webkit-scrollbar { display: none; }
  .region { width: auto; flex: none; white-space: nowrap; scroll-snap-align: start; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav nav a:not([href="#install"]) { display: none; }
  .brand img { height: 30px; }
  .hero-media { width: 150vw; margin-top: -12px; }
  .steps-card, .apk, .wifi { padding: 20px; }
  .seg button { padding: 10px 14px; font-size: 16px; }
  .pop-head { flex-direction: column; align-items: flex-start; min-height: 0; }
  .dotmap { width: 100%; height: 90px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
  .card .t { font-size: 14px; }
  .card .pc { display: none; }
  .code { padding-left: 14px; }
  .code .copy span { display: none; }
}
