/* rougecoin.io: XRGE, the token of RougeChain.
   Colours come from the XRGE mark: hot red into violet on near-black. */

:root {
  --bg: #07060c;
  --panel: #100d18;
  --panel-2: #161222;
  --line: rgb(236 232 245 / 0.1);
  --line-strong: rgb(236 232 245 / 0.2);
  --text: #ece8f5;
  --muted: #9d96b2;
  --red: #ff2d55;
  --magenta: #e0247f;
  --violet: #7b3ff2;
  --live: #35f0c4;
  --grad: linear-gradient(100deg, var(--red), var(--magenta) 45%, var(--violet));
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: min(1160px, 100% - 40px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.86em; overflow-wrap: anywhere; }
b { font-weight: 700; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; }

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
}
.skip:focus { inset-inline-start: 8px; }

:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }

/* ---------------------------------------------------------------- bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px max(20px, (100% - 1160px) / 2);
  background: rgb(7 6 12 / 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 6px;
}

.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover { color: var(--text); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-hot {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 0 0 1px rgb(255 45 85 / 0.4), 0 8px 30px rgb(224 36 127 / 0.35);
}
.btn-hot:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgb(255 45 85 / 0.6), 0 10px 38px rgb(224 36 127 / 0.5); }
.btn-ghost { color: var(--text); border: 1px solid var(--line-strong); background: rgb(236 232 245 / 0.03); }
.btn-ghost:hover { border-color: var(--text); }
.bar-buy { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 140px) max(20px, (100% - 1160px) / 2) clamp(56px, 8vw, 96px);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  z-index: -2;
  background:
    radial-gradient(40% 50% at 78% 38%, rgb(123 63 242 / 0.35), transparent 70%),
    radial-gradient(35% 45% at 64% 60%, rgb(255 45 85 / 0.28), transparent 70%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 20%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 90%);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--live);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgb(53 240 196 / 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgb(53 240 196 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(53 240 196 / 0); }
}
.hero h1 { font-size: clamp(38px, 6.4vw, 76px); font-weight: 700; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 620px; margin: 24px 0 0; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.lede b { color: var(--text); font-family: var(--mono); font-weight: 500; font-size: 0.92em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-mark {
  position: absolute;
  inset-inline-end: max(20px, (100% - 1160px) / 2);
  top: 50%;
  width: clamp(150px, 22vw, 280px);
  height: auto;
  transform: translateY(-50%);
  border-radius: 50%;
  filter: drop-shadow(0 0 60px rgb(224 36 127 / 0.55));
  opacity: 0.95;
}

/* ---------------------------------------------------------------- live */

.live {
  width: var(--wrap);
  margin: 0 auto;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.stats div { min-width: 0; }
.stats dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.stats dd.up { color: var(--live); }
.stats dd.down { color: var(--red); }
.live-note { margin: 12px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- sections */

.section { width: var(--wrap); margin: 0 auto; padding: clamp(64px, 9vw, 110px) 0 0; }
.kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--magenta);
}
.section h2 { max-width: 820px; font-size: clamp(30px, 4.4vw, 50px); font-weight: 700; margin-bottom: 36px; }

.card {
  display: block;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
}
.card h3 { font-size: 24px; margin-bottom: 10px; }
.card h3 span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card p { margin: 0 0 16px; color: var(--muted); }
.more { display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--magenta); }
.more:hover { color: var(--red); }

.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-chain { background: linear-gradient(160deg, rgb(123 63 242 / 0.16), var(--panel) 60%); }
.card-base { background: linear-gradient(160deg, rgb(255 45 85 / 0.12), var(--panel) 60%); }
.ticks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.ticks li { padding-inline-start: 22px; position: relative; }
.ticks li::before { content: "›"; position: absolute; inset-inline-start: 4px; color: var(--magenta); font-weight: 700; }

.contract {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  text-align: start;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.contract span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contract code { grid-column: 1; font-size: 13px; }
.contract em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--live); }
.contract:hover { border-color: var(--magenta); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.num { display: block; margin-bottom: 18px; font-family: var(--mono); font-size: 14px; color: var(--magenta); }
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { margin: 0 0 14px; color: var(--muted); }
.fine { margin: 22px 0 0; font-size: 14px; color: var(--muted); }

.section-pq .pq { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 1000px; }
.section-pq .pq p { margin: 0; font-size: 18px; color: var(--muted); }
.section-pq .pq b { color: var(--text); font-family: var(--mono); font-weight: 500; font-size: 0.92em; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; }
.chips li {
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid rgb(224 36 127 / 0.45);
  background: rgb(224 36 127 / 0.08);
  border-radius: 999px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card-link { transition: border-color 0.15s ease, transform 0.15s ease; }
.card-link:hover { border-color: var(--magenta); transform: translateY(-2px); }
.tag { display: inline-block; margin-bottom: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--live); }

.eco { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eco-col { display: grid; align-content: start; gap: 8px; }
.eco-col h3 { margin: 0 0 6px; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.eco-col a,
.social a {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.eco-col a span,
.social a span { font-size: 13px; color: var(--muted); }
.eco-col a:hover,
.social a:hover { border-color: var(--magenta); background: var(--panel-2); }

.social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.social b { font-size: 18px; }

.foot {
  width: var(--wrap);
  margin: clamp(72px, 10vw, 120px) auto 0;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}
.foot p { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.foot img { border-radius: 50%; }
.foot a { color: var(--text); }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 960px) {
  .nav { display: none; }
  .lang-pick { margin-inline-start: auto; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
  .twin, .steps, .grid-3, .section-pq .pq { grid-template-columns: 1fr; }
  .eco { grid-template-columns: 1fr 1fr; }
  .social { grid-template-columns: 1fr 1fr; }
  .hero-mark { position: static; transform: none; width: 96px; margin: 0 0 28px; order: -1; }
  .hero { display: flex; flex-direction: column; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .brand small { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats dd { font-size: 17px; }
  .eco, .social { grid-template-columns: 1fr; }
  .cta .btn { width: 100%; }
  .card, .steps li { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot { animation: none; }
  .btn, .card-link, .eco-col a, .social a { transition: none; }
}
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }

/* ---------------------------------------------------------------- languages */

.lang-pick { position: relative; }
.lang-pick summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:hover, .lang-pick[open] summary { color: var(--text); border-color: var(--text); }
.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  width: min(460px, calc(100vw - 32px));
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.6);
}
.lang-item {
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}
.lang-item:hover { color: var(--text); background: rgb(236 232 245 / 0.06); }
.lang-item[aria-current] { color: var(--text); background: rgb(224 36 127 / 0.16); }

.lang-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 14px 0; font-size: 14px; }
.foot .lang-list a { color: var(--muted); text-decoration: none; }
.foot .lang-list a:hover, .foot .lang-list a[aria-current] { color: var(--text); }

@media (max-width: 520px) {
  .lang-menu { position: fixed; inset-inline: 16px; top: 62px; width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar { gap: 10px; }
  .lang-pick summary { padding: 0 10px; }
}

/* Scripts Space Grotesk does not cover fall back to good system fonts. */
:lang(ru) { --display: "Space Grotesk", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
:lang(ar) { --display: "Space Grotesk", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif; }
:lang(hi) { --display: "Space Grotesk", "Nirmala UI", "Kohinoor Devanagari", "Noto Sans Devanagari", Mangal, sans-serif; }
:lang(zh) { --display: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
:lang(ja) { --display: "Space Grotesk", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }
:lang(ko) { --display: "Space Grotesk", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif; }

/* The small monospace labels (nav, kickers, stat names) keep IBM Plex Mono
   for Latin, but take the script's proportional system font for everything
   else: a monospace fallback breaks Arabic joining and looks broken in CJK. */
:lang(ru) { --mono: "IBM Plex Mono", "Segoe UI", Roboto, Arial, ui-monospace, monospace; }
:lang(ar) { --mono: "IBM Plex Mono", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", "Noto Kufi Arabic", Tahoma, monospace; }
:lang(hi) { --mono: "IBM Plex Mono", "Nirmala UI", "Kohinoor Devanagari", "Noto Sans Devanagari", Mangal, monospace; }
:lang(zh) { --mono: "IBM Plex Mono", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", monospace; }
:lang(ja) { --mono: "IBM Plex Mono", "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", monospace; }
:lang(ko) { --mono: "IBM Plex Mono", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", monospace; }

/* Technical names stay whole and left-to-right inside any language. */
.lede b, .pq b { white-space: nowrap; }
[dir="rtl"] b, [dir="rtl"] code { unicode-bidi: isolate; }
.brand span { white-space: nowrap; direction: ltr; unicode-bidi: isolate; }

@media (max-width: 400px) {
  .brand { font-size: 18px; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .bar-buy { padding: 0 12px; font-size: 14px; }
  .lang-pick summary span { display: none; }
}

/* Letter-spacing breaks Arabic joining and Devanagari conjuncts; CJK and
   Hangul need no tracking and a little more line height. */
:lang(ar) body *, :lang(hi) body * { letter-spacing: 0 !important; }
:lang(zh) h1, :lang(zh) h2, :lang(ja) h1, :lang(ja) h2, :lang(ko) h1, :lang(ko) h2 { letter-spacing: 0; line-height: 1.2; }
:lang(ar) h1, :lang(ar) h2, :lang(hi) h1, :lang(hi) h2 { line-height: 1.3; }
:lang(ko) body, :lang(ja) body, :lang(zh) body { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) body, :lang(zh) body { word-break: normal; line-break: strict; }
