﻿/* R.E.X landing page. Loaded only by landing.html, after style.css, so everything here is scoped to body.landing.
   Palette: deep black, charcoal, one intense red, white and neutral greys. Red light is used sparingly: the hero glow,
   the primary action and hover states. Compatibility marks keep their meaning (works / not available / not tested). */
body.landing {
  --bg: #080808;
  --s1: #111111;
  --s2: #161616;
  --s3: #1d1d1d;
  --line: #232323;
  --line-2: #343434;
  --text: #ffffff;
  --muted: #a3a3a3;
  --faint: #707070;
  --red: #f12d3d;
  --red-hi: #ff4856;
  --red-lo: #b81d2b;
  --accent: var(--red);
  --accent-text: #ff5a67;
  --ok: #46c98a;
  --bad: var(--red-hi);
  --unk: #8a8a8a;
  --max: 1160px;
  background: var(--bg);
}
body.landing .content { padding: 0; max-width: none; margin: 0; }
body.landing .lizarion-bar { margin-top: 0; border-top-color: var(--line); background: #050505; }
body.landing .muted { margin: 0; }
body.landing a { color: inherit; }
body.landing ::selection { background: var(--red); color: #fff; }
.lp-wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- Header ---------- */
.lp-header {
  position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.lp-header-inner { height: 68px; display: flex; align-items: center; gap: 28px; }
.lp-logo { display: flex; flex: none; }
.lp-logo img { height: 44px; width: auto; display: block; }
.lp-nav { display: flex; align-items: center; gap: 26px; }
.lp-nav a, .lp-nav .header-dropdown-trigger { font: 500 14px var(--f-body); color: var(--muted); transition: color .15s; }
.lp-nav a:hover, .lp-nav .header-dropdown-trigger:hover, .lp-nav .header-dropdown.open .header-dropdown-trigger { color: #fff; text-decoration: none; }
.lp-header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.lp-discord { display: flex; color: var(--muted); transition: color .15s; }
.lp-discord:hover { color: #fff; }
.lp-header .header-dropdown-menu { background: var(--s1); border-color: var(--line-2); border-radius: 12px; }
.lp-header .dropdown-item:hover { background: var(--s3); }
.lp-header .dropdown-icon { background: var(--bg); border-color: var(--line-2); color: var(--red); }

/* ---------- Buttons ---------- */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 20px; border-radius: 6px;
  font: 700 14px var(--f-body); letter-spacing: .01em; border: 1px solid var(--line-2); background: var(--s1); color: #fff;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .2s, transform .15s;
}
.lp-btn:hover { background: var(--s3); border-color: #4a4a4a; text-decoration: none; }
.lp-btn:active { transform: translateY(1px); }
.lp-btn.red { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 0 rgba(241, 45, 61, 0); }
.lp-btn.red:hover { background: var(--red-hi); border-color: var(--red-hi); box-shadow: 0 8px 30px rgba(241, 45, 61, .35); }
.lp-btn.ghost { background: transparent; }
.lp-btn.sm { padding: 8px 14px; font-size: 13px; }
.lp-btn.lg { padding: 15px 26px; font-size: 15px; }
.lp-btn svg { flex: none; }
body.landing :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Hero ---------- */
/* overflow-x only: the "Add to Discord" list drops below the buttons and must not be clipped; z-index lets it sit over the stats. */
.lp-hero { position: relative; z-index: 2; overflow-x: clip; isolation: isolate; border-bottom: 1px solid var(--line); }
.lp-hero::before {  /* red light from above, and a faint grid that fades out */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 72% 0%, rgba(241, 45, 61, .30), transparent 70%),
    radial-gradient(ellipse 45% 40% at 8% 100%, rgba(241, 45, 61, .10), transparent 70%),
    var(--bg);
}
.lp-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 70% 15%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 85% at 70% 15%, #000 0%, transparent 72%);
}
.lp-hero-inner { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; padding-block: 92px 84px; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font: 500 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 22px;
}
.lp-eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--red); }
.lp-hero h1 {
  font: 800 clamp(40px, 6.2vw, 76px)/.98 var(--f-display); letter-spacing: -.035em; margin: 0 0 24px; text-wrap: balance;
}
.lp-hero h1 em { font-style: normal; color: var(--red); text-shadow: 0 0 40px rgba(241, 45, 61, .45); }
.lp-lead { font-size: 17px; line-height: 1.65; color: #c9c9c9; max-width: 54ch; margin: 0 0 34px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lp-hosts { margin-top: 26px; font-size: 14px; color: #d4d4d4; }
.lp-hosts span { font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 10px; }
.lp-note { margin-top: 18px; font-size: 13px; color: var(--muted); }
.lp-note code { background: var(--s1); border-color: var(--line-2); }

/* Hero visual: the R.E.X head on a red-lit stage. Embers rise behind it (canvas), the light breathes, a glint crosses
   the logo now and then and it leans toward the pointer. Decorative only; a still picture with reduced motion. */
.lp-stage { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1; margin-inline: auto; display: grid; place-items: center; }
.lp-stage::before {
  content: ""; position: absolute; inset: 10%; border-radius: 50%; filter: blur(14px);
  background: radial-gradient(closest-side, rgba(241, 45, 61, .55), rgba(241, 45, 61, .16) 58%, transparent 78%);
  animation: lp-breathe 5s ease-in-out infinite;
}
.lp-stage canvas { position: absolute; left: -8%; top: -8%; width: 116%; height: 116%; pointer-events: none; }
.lp-mark {
  position: relative; width: 76%; aspect-ratio: 1; animation: lp-hover 7s ease-in-out infinite;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s ease-out;
}
.lp-mark img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 26px rgba(241, 45, 61, .55)) drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); }
.lp-mark::after {  /* a band of light that crosses only the logo's own shape */
  content: ""; position: absolute; inset: 0; mix-blend-mode: overlay;
  -webkit-mask: url("/static/favicon.png") center / contain no-repeat; mask: url("/static/favicon.png") center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  animation: lp-glint 6.5s ease-in-out infinite;
}
@keyframes lp-breathe { 0%, 100% { opacity: .6; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes lp-hover { 50% { translate: 0 -10px; } }
@keyframes lp-glint { 0%, 52% { background-position: 130% 0; } 82%, 100% { background-position: -30% 0; } }
@keyframes lp-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lp-hero-inner > * { animation: lp-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.lp-hero-inner > *:nth-child(2) { animation-delay: .12s; }

/* ---------- Stats ---------- */
.lp-stats { border-bottom: 1px solid var(--line); background: var(--s1); }
.lp-stats-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-stat { padding: 34px 28px; display: grid; gap: 6px; }
.lp-stat + .lp-stat { border-left: 1px solid var(--line); }
.lp-stat b { font: 800 clamp(34px, 5vw, 54px)/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lp-stat span { font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Sections ---------- */
.lp-section { padding-block: 96px 20px; scroll-margin-top: 72px; }
.lp-head { max-width: 640px; margin-bottom: 44px; }
.lp-head h2 { font: 800 clamp(28px, 4vw, 42px)/1.05 var(--f-display); letter-spacing: -.025em; margin: 0 0 14px; text-wrap: balance; }
.lp-head p { font-size: 16px; line-height: 1.65; color: var(--muted); }

.lp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lp-card {
  --mx: 50%; --my: 0%;
  position: relative; padding: 26px 22px 24px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s; overflow: hidden;
}
.lp-card::before {  /* soft red spotlight that follows the pointer */
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(241, 45, 61, .16), transparent 70%);
}
.lp-card:hover { border-color: rgba(241, 45, 61, .55); transform: translateY(-3px); }
.lp-card:hover::before { opacity: 1; }
.lp-icon { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; background: var(--bg); border: 1px solid var(--line-2); color: var(--red); margin-bottom: 20px; }
.lp-icon svg { width: 22px; height: 22px; }
.lp-card h3 { position: relative; font: 700 16px var(--f-display); margin: 0 0 8px; letter-spacing: -.005em; }
.lp-card p { position: relative; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Compatibility table ---------- */
.lp-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--s1); }
.lp-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.lp-table th, .lp-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.lp-table thead th {
  position: sticky; top: 0; background: var(--s2); font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); text-align: center; white-space: nowrap;
}
.lp-table thead th:first-child { text-align: left; }
.lp-table tbody th { text-align: left; font: 500 14px var(--f-body); color: #e8e8e8; }
.lp-table td { text-align: center; font: 700 17px var(--f-body); width: 112px; }
.lp-table tbody tr:last-child th, .lp-table tbody tr:last-child td { border-bottom: 0; }
.lp-table tbody tr:hover { background: var(--s2); }
.lp-table .ok { color: var(--ok); }
.lp-table .no { color: var(--red-hi); }
.lp-table .unk { color: var(--unk); }
.lp-legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.lp-legend .ok { color: var(--ok); } .lp-legend .no { color: var(--red-hi); } .lp-legend .unk { color: var(--unk); }
.lp-legend b { font-weight: 700; margin-right: 6px; }

/* ---------- FAQ ---------- */
.lp-faq { max-width: 820px; display: grid; gap: 8px; }
.lp-faq details { background: var(--s1); border: 1px solid var(--line); border-radius: 10px; padding: 0 22px; transition: border-color .2s; }
.lp-faq details:hover { border-color: var(--line-2); }
.lp-faq details[open] { border-color: rgba(241, 45, 61, .5); }
.lp-faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 600 15.5px var(--f-body); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
  content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line-2);
  font: 400 18px/1 var(--f-mono); color: var(--muted); transition: background .15s, color .15s, transform .2s;
}
.lp-faq details[open] summary::after { content: "−"; background: var(--red); border-color: var(--red); color: #fff; }
.lp-faq-body { padding: 0 0 20px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.lp-faq-body p { margin: 0 0 12px; }
.lp-faq-body ul { margin: 0 0 12px; padding-left: 20px; }
.lp-faq-body li { margin-bottom: 8px; }
.lp-faq-body strong { color: #e8e8e8; }
.lp-faq-body img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line-2); margin-top: 4px; }

/* ---------- Closing call ---------- */
.lp-closing { margin-top: 96px; border-block: 1px solid var(--line); position: relative; overflow: hidden; isolation: isolate; }
.lp-closing::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 120% at 50% 130%, rgba(241, 45, 61, .28), transparent 70%), var(--s1); }
.lp-closing-inner { padding-block: 72px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.lp-closing h2 { font: 800 clamp(26px, 3.6vw, 38px)/1.05 var(--f-display); letter-spacing: -.025em; margin: 0; max-width: 20ch; text-wrap: balance; }

/* ---------- Footer ---------- */
.lp-footer { padding-block: 44px 40px; }
.lp-footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 40px; align-items: start; }
.lp-footer p { font-size: 12.5px; line-height: 1.7; color: #8c8c8c; max-width: 76ch; }
.lp-footer-links { display: grid; gap: 10px; font-size: 14px; }
.lp-footer-links a { color: var(--muted); transition: color .15s; }
.lp-footer-links a:hover { color: #fff; }

/* ---------- Add-to-server panel, restyled for this page ---------- */
body.landing .add-panel { background: var(--s1); border-color: var(--line-2); border-radius: 10px; }
body.landing .add-row:hover { background: var(--s2); }
body.landing .add-btn { background: var(--red); border-radius: 6px; }
body.landing .add-btn.added { background: rgba(70, 201, 138, .14); color: var(--ok); }
body.landing .add-icon { background: var(--s3); }
body.landing .add-panel .btn.primary { background: var(--red); border-color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 64px 56px; }
  .lp-stage { max-width: 380px; }
  .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .lp-nav .lp-link { display: none; }
  .lp-nav { gap: 0; }
  .lp-header-inner { gap: 14px; }
  .lp-header .header-dropdown-menu { left: 0; transform: translateY(-6px); width: min(300px, calc(100vw - 40px)); }
  .lp-header .header-dropdown.open .header-dropdown-menu { transform: none; }
  .lp-stat { padding: 24px 16px; }
  .lp-section { padding-top: 72px; }
  .lp-footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .lp-grid { grid-template-columns: 1fr; }
  .lp-cta .lp-btn, .lp-cta .add-menu { width: 100%; }
  .lp-cta .add-menu .lp-btn { width: 100%; }
  .lp-closing-inner .lp-btn { width: 100%; }
  .lp-logo img { height: 38px; }
  .lp-header-actions .lp-btn { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-hero-inner > *, .lp-stage::before, .lp-mark, .lp-mark::after { animation: none !important; }
  .lp-mark::after { opacity: 0; }
  .lp-card, .lp-btn { transition: none; }
}
.lp-header .dropdown-icon:has(img) { background: none; border: 0; }
