:root {
  --bg: #050507;
  --bg-alt: #0a0a0d;
  --surface: #121216;
  --border: #24242b;
  --text: #f2f3f5;
  --text-muted: #9b9ca6;
  --accent: #16c784;      /* candlestick green (up) */
  --accent-dim: #0fa373;
  --red: #ea3943;         /* candlestick red (down) */
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --radius: 14px;
  --max-w: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

.container { width: min(var(--max-w), 92%); margin: 0 auto; }
.container-narrow { max-width: 720px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo-img { display: block; height: 42px; width: auto; }
.footer-brand .logo-img { height: 34px; }
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #050507;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: line-through;
}
.logo-ticker {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.nav { display: flex; gap: 22px; align-items: center; }
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s;
}
.nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: 8px; align-items: center; }

.lang-switch {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 32px 8px 14px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  max-width: 170px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%239b9ca6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}
.lang-switch:focus { outline: 2px solid var(--accent-dim); border-color: transparent; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #050507;
}
.btn-primary:hover { background: #1fd894; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.icon-btn { padding: 8px; line-height: 0; }
.telegram-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #0088cc;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.telegram-btn:hover { background: #0099e6; transform: translateY(-1px); }
@media (max-width: 480px) {
  .telegram-btn span { display: none; }
  .telegram-btn { padding: 9px; }
}
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 60px;
  text-align: center;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 120%;
  height: 120%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);

  -webkit-mask-image: linear-gradient(to bottom, transparent 55%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 55%, #000 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 5, 7, 0.28) 0%, rgba(5, 5, 7, 0.52) 100%);
  pointer-events: none;
}
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 5, 7, 0) 0%, rgba(5, 5, 7, 1) 100%);
  pointer-events: none;
}
.hero-title, .hero-tagline, .hero-sub, .hero-graph-label {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65), 0 4px 28px rgba(0, 0, 0, 0.7);
}
.hero .container { position: relative; z-index: 2; }
.hero-graph { position: relative; z-index: 2; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface);
}
.hero-title {
  margin: 26px 0 10px;
  font-size: clamp(3.2rem, 11vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.strike { color: var(--red); text-decoration: line-through; text-decoration-thickness: 0.06em; }
.hero-tagline {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 500;
  margin: 22px 0 14px;
}
.accent-red { color: var(--red); }
.hero-sub {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; margin: 30px 0 28px; flex-wrap: wrap; }

.ca-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-mono);
}
.ca-label { font-size: 0.78rem; color: var(--text-muted); }
.ca-value {
  font-size: 0.85rem;
  color: var(--accent);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero-graph {
  margin: 46px auto 0;
  max-width: 720px;
  opacity: 0.85;
}
.hero-graph svg { width: 100%; height: 110px; }
.hero-graph-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}
.section-lead { color: var(--text-muted); margin: 0 0 36px; font-size: 1.05rem; }
.section-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 18px; text-align: center; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--text-muted); }

/* ---------- Why NoEdge ---------- */
.why-list { display: flex; flex-direction: column; gap: 16px; }
.why-item {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.why-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #050507;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.why-item h3 { margin: 0 0 8px; font-size: 1.15rem; }
.why-item p { margin: 0; color: var(--text-muted); }
.why-item p br { content: ""; display: block; margin-top: 6px; }

/* ---------- Simulator ---------- */
.simulator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.sim-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sim-inputs label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sim-inputs input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font-family: var(--font-mono);
  font-size: 1rem;
}
.sim-inputs input:focus { outline: 2px solid var(--accent-dim); border-color: transparent; }
.sim-inputs select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font-family: var(--font-mono);
  font-size: 1rem;
  width: 100%;
}
.sim-inputs select:focus { outline: 2px solid var(--accent-dim); border-color: transparent; }
.sim-inputs .field-wide { grid-column: 1 / -1; }

.sim-output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sim-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sim-stat-label { color: var(--text-muted); font-size: 0.9rem; }
.sim-stat-value { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; }
.sim-verdict { font-size: 0.95rem; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.sim-verdict.bad { border-color: rgba(234, 57, 67, 0.4); color: #ffb3b7; }
.sim-verdict.good { border-color: rgba(22, 199, 132, 0.4); color: #8ef0c6; }
.sim-chart svg { width: 100%; height: 120px; }

.sim-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 18px; text-align: center; }

.fee-ref { margin-top: 48px; }
.fee-ref-title { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -0.02em; }
.fee-ref .section-lead { margin-bottom: 24px; }
.fee-ref .card h4 { margin: 0 0 10px; font-size: 1.05rem; color: var(--accent); }
.fee-ref .card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Tokenomics ---------- */
.tokenomics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.tok {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tok-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--accent); }
.tok-label { color: var(--text-muted); font-size: 0.85rem; }
.tokenomics-mechanics { margin-top: 24px; }

/* ---------- FAQ ---------- */
.faq { counter-reset: faq; display: flex; flex-direction: column; gap: 14px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 6px 22px;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.faq details:hover { border-color: rgba(22, 199, 132, 0.35); }
.faq details[open] {
  border-color: rgba(22, 199, 132, 0.5);
  background: linear-gradient(180deg, rgba(22, 199, 132, 0.06), rgba(22, 199, 132, 0));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-weight: 600;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  counter-increment: faq;
  content: counter(faq, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.85;
}
.faq summary::after {
  content: "+";
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p {
  margin: 0;
  padding: 0 0 20px;
  padding-inline-start: 32px;
  color: var(--text-muted);
}
.faq details[open] p { animation: faqReveal 0.35s ease; }
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--bg-alt);
}
.footer-inner { display: flex; flex-direction: column; gap: 18px; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; }
.footer-disclaimer { color: var(--text-muted); font-size: 0.85rem; max-width: 640px; margin: 0 auto; }
.footer-links { display: flex; gap: 18px; justify-content: center; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 8px 4%;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .nav-toggle { display: flex; }
  .simulator { grid-template-columns: 1fr; }
  .sim-inputs { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .sim-inputs { grid-template-columns: 1fr; }
  .header-actions .btn-ghost { display: none; }
}

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .faq summary::after { float: left; }
[dir="rtl"] .logo-ticker { margin-left: 0; margin-right: 8px; }

/* ================= Motion & polish ================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 199, 132, 0.38); }
  50%      { box-shadow: 0 0 0 9px rgba(22, 199, 132, 0); }
}
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

/* Hero entrance (staggered) */
.hero-title, .hero-tagline, .hero-sub, .hero-cta, .ca-row, .hero-graph {
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-title   { animation-delay: 0.05s; }
.hero-tagline { animation-delay: 0.16s; }
.hero-sub     { animation-delay: 0.27s; }
.hero-cta     { animation-delay: 0.38s; }
.ca-row       { animation-delay: 0.49s; }
.hero-graph   { animation-delay: 0.62s; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.in-view { opacity: 1; transform: none; }
.section-title, .section-lead, .faq details {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.card, .why-item, .tok {
  transition: opacity 0.6s ease, transform 0.3s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover lift */
.card:hover, .why-item:hover, .tok:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 199, 132, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn { transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(22, 199, 132, 0.35); }
.hero-cta .btn-primary { animation: glowPulse 2.8s ease-in-out infinite; }

/* Nav underline */
.nav a { position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

/* Hero chart draw-in */
#hero-chart { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawStroke 2.6s 0.4s ease forwards; }

/* Anchor offset for sticky header + visible focus */
section[id] { scroll-margin-top: 84px; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .hero-title, .hero-tagline, .hero-sub, .hero-cta, .ca-row, .hero-graph { opacity: 1; transform: none; }
}
