*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0b0a0f;
  --surface:      #131118;
  --surface2:     #1a1825;
  --border:       #221f30;
  --border2:      #2e2a40;
  --accent:       #ff0040;
  --accent2:      #ff3355;
  --text:         #f0ecff;
  --muted:        #a8a2c0;
  --muted2:       #6b6485;
  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body:    'Syne', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
}

body.light-mode {
  --bg:       #f2f0f7;
  --surface:  #e8e4f4;
  --surface2: #ddd8ef;
  --border:   #cbc5e0;
  --border2:  #b8b0d4;
  --accent:   #e0003a;
  --accent2:  #ff3355;
  --text:     #1a1726;
  --muted:    #5c5478;
  --muted2:   #9189b0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.accent { color: var(--accent); }
a { color: inherit; text-decoration: none; }

/* Grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: grain-shift 0.15s steps(1) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-3px,2px); }
  50%  { transform: translate(2px,-3px); }
  75%  { transform: translate(-2px,3px); }
  100% { transform: translate(3px,-2px); }
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.loader-wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
}
.loader-spin-char {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  width: 1ch;
  display: inline-block;
}

/* Canvas */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Nav */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  height: 56px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
#nav.scrolled {
  background: rgba(11,10,15,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}
body.light-mode #nav.scrolled {
  background: rgba(242,240,247,0.92);
}
body.light-mode .nav-links a:hover { color: var(--text); }
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.nav-links a:hover { color: #fff; }

/* Theme toggle slider */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
  user-select: none;
}
.theme-toggle:hover { color: var(--text); }

.theme-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: color 0.2s, opacity 0.2s;
}

/* Moon is active in dark mode */
.moon-svg { opacity: 1; }
.sun-svg  { opacity: 0.4; }
body.light-mode .moon-svg { opacity: 0.4; }
body.light-mode .sun-svg  { opacity: 1; }

.toggle-track {
  position: relative;
  width: 34px;
  height: 18px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 999px;
  transition: background 0.25s, border-color 0.25s;
  flex-shrink: 0;
}
body.light-mode .toggle-track {
  background: var(--surface2);
  border-color: var(--muted2);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), background 0.25s;
}
body.light-mode .toggle-thumb {
  transform: translateX(16px);
  background: var(--text);
}

/* Hero */
.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 52px 80px 68px;
  max-width: 1260px;
  margin: 0 auto;
}

/* Floating extension card — absolute, vertically centered right */
.hero-float-card {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 52px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}
.eyebrow-sep { color: var(--muted2); }

h1 {
  font-family: var(--font-display);
  font-size: clamp(52px, 8.5vw, 96px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 24px;
  max-width: 100%;
  text-shadow:
    0 2px 20px rgba(0,0,0,1),
    0 8px 60px rgba(0,0,0,0.9);
}
body.light-mode h1 {
  color: #1a1726;
  text-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
body.light-mode .hero-content {
  background: rgba(255,255,255,0.78);
  border-color: rgba(0,0,0,0.07);
}
body.light-mode .hero-sub {
  text-shadow: none;
}
.slant {
  display: inline-block;
  transform: skewX(-6deg);
  transform-origin: left;
}

.hero-content {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 40px;
  padding: 48px 56px 48px 52px;
  max-width: 810px;
}

.hero-lower {
  max-width: 600px;
  margin-left: 4px;
}

.hero-sub {
  font-size: 13px;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 32px;
  text-shadow: 0 1px 6px rgba(0,0,0,1), 0 2px 24px rgba(0,0,0,0.95);
}

/* Download group */
.dl-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.dl-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}
.dl-btn-wrap {
  display: flex;
  align-items: stretch;
  position: relative;
}
.btn-dl {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 2px;
  transition: background 0.12s, transform 0.1s;
  letter-spacing: 0.3px;
}
.btn-dl:hover { background: var(--accent2); }
.btn-dl:active { background: #cc0033; transform: translateY(1px); }
.btn-discord {
  background: #5865F2;
}
.btn-discord:hover { background: #4752c4; }
.btn-discord:active { background: #3c45a5; transform: translateY(1px); }
.btn-webpatch {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-webpatch:hover { background: var(--surface2); border-color: var(--muted2); }
.btn-webpatch:active { background: var(--surface); transform: translateY(1px); }


.btn-caret {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  padding: 0 11px;
  border-radius: 0 2px 2px 0;
  transition: background 0.12s;
}
.btn-caret:hover { background: var(--accent2); }
.btn-caret svg { transition: transform 0.2s; }
.btn-caret.open svg { transform: rotate(180deg); }

.dl-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 210px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.dl-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 15px;
  cursor: pointer;
  transition: background 0.1s;
}
.dd-item:hover { background: #201e2e; }
.dd-title { font-size: 12px; font-weight: 600; color: var(--text); font-family: var(--font-mono); }
.dd-sub { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.btn-install:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(255,0,64,0.06);
}
.btn-install svg { opacity: 0.7; flex-shrink: 0; }

.edge-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 2px;
}


.hero-specs {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted2);
  letter-spacing: 0.3px;
}
.spec-hl { color: var(--accent); font-weight: 600; }

/* Extension card */
.ext-wrapper {
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border2), 0 20px 60px rgba(0,0,0,0.7), 0 0 50px rgba(255,0,64,0.05);
  transition: box-shadow 0.3s, transform 0.3s;
  width: 230px;
}
.ext-wrapper:hover {
  box-shadow: 0 0 0 1px rgba(255,0,64,0.5), 0 24px 70px rgba(0,0,0,0.75), 0 0 60px rgba(255,0,64,0.1);
  transform: translateY(-4px);
}
.ext-chrome-bar {
  background: #181620;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.ext-dots { display: flex; gap: 5px; }
.ext-dots span { width: 8px; height: 8px; border-radius: 50%; }
.ext-dots span:nth-child(1) { background: #ff5f57; }
.ext-dots span:nth-child(2) { background: #febc2e; }
.ext-dots span:nth-child(3) { background: #28c840; }
.ext-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  margin-left: 3px;
  letter-spacing: 0.5px;
}
.ext-popup {
  background: #0f0e17;
  display: block;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.ext-banner {
  background: linear-gradient(135deg, #cc0033 0%, #ff0050 60%, #ff2244 100%);
  padding: 14px 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.ext-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  font-family: var(--font-mono);
}
.ext-subtitle {
  font-size: 9px;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
}
.ext-info-btn {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ext-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #1c1c28;
}
.ext-row-label { font-size: 11px; color: #ccc; font-family: var(--font-mono); }
.ext-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.ext-track {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: #ff0040;
}
.ext-track::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  top: 3px; left: 21px;
  background: #fff;
  border-radius: 50%;
}
.ext-footer-bar {
  text-align: center;
  padding: 9px 0 10px;
  font-size: 9px;
  color: #383838;
  font-family: var(--font-mono);
}
.ext-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(200,0,40,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  font-family: var(--font-mono);
  opacity: 0;
  transition: opacity 0.18s;
  backdrop-filter: blur(3px);
}
.ext-popup:hover .ext-hover-overlay { opacity: 1; }

/* Features */
.features {
  position: relative;
  z-index: 10;
  padding: 60px 68px 100px;
  max-width: 1260px;
  margin: 0 auto 80px;
  background: rgba(11, 10, 15, 0.6);
  border: 1px solid var(--border);
  border-radius: 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.light-mode .features {
  background: rgba(242, 240, 247, 0.6);
}

.features-header {
  margin-bottom: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.features-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.5px;
}

.features-list {
  display: flex;
  flex-direction: column;
}

.feat-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
  gap: 40px;
  transition: background 0.2s;
}

.feat-body {
  flex: 1;
}

.feat-body h3 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.feat-body p {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  max-width: 480px;
  font-family: var(--font-body);
}

.feat-n {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 110px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px #4a4560;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-end;
  user-select: none;
}

/* Footer */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.footer-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.footer-links-row a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: color 0.2s;
  position: relative;
}
.footer-links-row a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-links-row a:hover { color: var(--text); }
.footer-links-row a:hover::after { transform: scaleX(1); }
.bmc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFDD00;
  color: #000 !important;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700 !important;
  font-size: 11px;
  transition: opacity 0.2s, transform 0.1s !important;
  white-space: nowrap;
}
.bmc-btn:hover { opacity: 0.85 !important; color: #000 !important; }
.bmc-btn::after { display: none !important; }
.footer-dot {
  font-size: 10px;
  color: var(--border2);
  user-select: none;
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 44px;
  gap: 12px;
}
.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.footer-wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.footer-disclaimer {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted2);
  letter-spacing: 0.3px;
}

/* ─── Light-mode overrides for hardcoded colours ──────────────────────────── */

/* Invert the WebGL canvas */
body.light-mode #bg {
  filter: invert(1);
}

/* "How it works" feature items */
body.light-mode .feat-body h3 {
  color: var(--text);
}

/* Footer wordmark */
body.light-mode .footer-wordmark {
  color: var(--text);
}

/* Extension card chrome bar */
body.light-mode .ext-chrome-bar {
  background: var(--surface2);
}

/* Extension card body */
body.light-mode .ext-popup {
  background: var(--surface);
}

/* Extension card row separator */
body.light-mode .ext-row {
  border-bottom-color: var(--border);
}

/* Extension card row label */
body.light-mode .ext-row-label {
  color: var(--text);
}

/* Extension card footer text */
body.light-mode .ext-footer-bar {
  color: var(--muted2);
}

/* Responsive */
@media (max-width: 860px) {
  .hero {
    padding: 80px 20px 60px;
    justify-content: center;
    min-height: 100svh;
  }
  .hero-float-card {
    display: none;
  }
  .hero-content {
    padding: 32px 24px 36px;
    border-radius: 24px;
    max-width: 100%;
  }
  h1 {
    font-size: clamp(42px, 11vw, 72px);
    margin-bottom: 28px;
    line-height: 0.95;
  }
  .hero-eyebrow {
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-lower { max-width: 100%; margin-left: 0; }
  .hero-sub { font-size: 13px; margin-bottom: 24px; }
  .dl-row { flex-direction: column; gap: 8px; }
  .dl-btn-wrap { width: 100%; }
  .btn-dl { width: 100%; justify-content: center; border-radius: 2px; }
  .btn-install { justify-content: center; width: 100%; }
  .features { padding: 36px 20px 72px; margin: 0 12px 60px; border-radius: 20px; }
  .feat-item { gap: 20px; padding: 36px 0; }
  .feat-body h3 { font-size: clamp(34px, 8vw, 52px); }
  .feat-n { font-size: clamp(44px, 10vw, 72px); }
  footer { padding: 16px; }
  #nav { padding: 0 20px; }
}

@media (max-width: 480px) {
  .hero { padding: 72px 16px 48px; }
  .hero-content { padding: 28px 18px 30px; border-radius: 18px; }
  h1 { font-size: clamp(38px, 12vw, 56px); }
  .features { margin: 0 8px 48px; padding: 28px 16px 60px; }
  #nav { padding: 0 16px; }
}