/* Ara website — single-page, dark theme matching the desktop app. */

:root {
  --bg: #08070f;
  --bg-raised: #100e1c;
  --bg-card: #14111f;
  --border: #262136;
  --text: #ece9f6;
  --text-dim: #a49dbd;
  --accent: #a855f7;
  --accent-2: #7c3aed;
  --accent-soft: rgba(168, 85, 247, 0.14);
  --radius: 14px;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Ambient background: slow-drifting light blobs ───── */

.bg-ambient {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* P2P network canvas (injected by app.js) sits above the blobs. */
.bg-net {
  position: absolute; inset: 0;
}

.bg-blob {
  position: absolute;
  width: 46vw; height: 46vw;
  min-width: 420px; min-height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
  will-change: transform;
}

.bg-blob-a {
  top: -18%; left: -10%;
  background: radial-gradient(circle, #7c3aed, transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.bg-blob-b {
  top: 30%; right: -16%;
  background: radial-gradient(circle, #a855f7, transparent 65%);
  animation: drift-b 34s ease-in-out infinite alternate;
}
.bg-blob-c {
  bottom: -22%; left: 22%;
  background: radial-gradient(circle, #4c1d95, transparent 65%);
  animation: drift-c 30s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vw, 7vh) scale(1.15); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(-8vw, -6vh) scale(0.95); }
}
@keyframes drift-c {
  from { transform: translate(0, 0) scale(0.95); }
  to   { transform: translate(6vw, -8vh) scale(1.12); }
}

/* ── Cursor glow (element injected by app.js) ────────── */

.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 0;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.055), rgba(124, 58, 237, 0.028) 40%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
  will-change: transform;
}

/* Content sits above the glow. */
.nav, main, .footer { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .bg-blob { animation: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Nav ─────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  max-width: var(--max); margin: 0 auto;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }

.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #17102b, #241740);
  border: 1px solid var(--border);
  color: #e9e2f7;
}

.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--text); }

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  transition: transform .12s, box-shadow .12s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(124, 58, 237, 0.5); }

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); }

/* ── Hero ────────────────────────────────────────────── */

.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 96px 24px 72px;
  text-align: center;
  background:
    radial-gradient(600px 320px at 50% -60px, rgba(124, 58, 237, 0.22), transparent 70%);
}

.badge {
  display: inline-block;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px; font-weight: 600;
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.grad {
  background: linear-gradient(90deg, var(--accent), #d8b4fe);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede {
  max-width: 680px; margin: 0 auto 34px;
  color: var(--text-dim); font-size: 18px;
}

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  margin-top: 58px;
}
.hero-stats div {
  min-width: 180px;
  padding: 18px 22px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card);
}
.hero-stats strong { display: block; font-size: 26px; color: var(--accent); }
.hero-stats span { color: var(--text-dim); font-size: 14px; }

/* ── Sections ────────────────────────────────────────── */

.section {
  max-width: var(--max); margin: 0 auto;
  padding: 72px 24px;
  text-align: center;
}

.section h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.01em; margin-bottom: 14px; }

.section-lede { max-width: 640px; margin: 0 auto 44px; color: var(--text-dim); }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  text-align: left;
}

.card {
  position: relative; overflow: hidden;
  padding: 26px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.14);
}

/* Spotlight sheen that follows the pointer (per-card --mx/--my from app.js). */
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(168, 85, 247, 0.07),
    transparent 65%
  );
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; }

.card-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 20px; margin-bottom: 16px;
}

.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 15px; }

/* ── Rewards split ───────────────────────────────────── */

.split-bar {
  display: flex; overflow: hidden;
  max-width: 760px; margin: 0 auto;
  border-radius: 12px; border: 1px solid var(--border);
  font-weight: 700; font-size: 15px;
}
.split-bar > div {
  padding: 18px 0; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.split-bar span { font-weight: 500; font-size: 12px; opacity: .8; }
.split-creator { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; }
.split-seeders { background: #3b2a63; color: #e5dcff; }
.split-stakers { background: #241a3d; color: #b9a8e0; }

.split-note { margin-top: 16px; color: var(--text-dim); font-size: 14px; }
.split-note a { color: var(--accent); }
.split-note a:hover { text-decoration: underline; }

/* ── Downloads ───────────────────────────────────────── */

.dl-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.dl-card h3 { font-size: 20px; }
.dl-card p { color: var(--text-dim); font-size: 14px; margin-bottom: 6px; }
.dl-card .btn { width: 100%; }
.btn-row { display: flex; gap: 10px; width: 100%; }
.btn-row .btn { flex: 1; }

.dl-note { margin-top: 26px; color: var(--text-dim); font-size: 14px; }
.dl-note a { color: var(--accent); }
.dl-note a:hover { text-decoration: underline; }

/* ── Open source ─────────────────────────────────────── */

.oss {
  border-top: 1px solid var(--border);
}

/* ── Footer ──────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  padding: 34px 24px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.footer-brand { font-size: 16px; }
.footer-links { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.soon { color: var(--text-dim); font-size: 13px; font-style: italic; }
.footer-fine {
  max-width: var(--max); margin: 18px auto 0;
  color: var(--text-dim); font-size: 13px;
}

/* ── Small screens ───────────────────────────────────── */

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding-top: 64px; }
  .hero-stats div { min-width: 140px; flex: 1; }
  .split-bar { font-size: 13px; }
}

/* ── Link tiles (token markets + community) ──────────── */

.group-label {
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-dim);
  margin: 30px 0 14px;
}

.link-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  text-align: left;
}

.link-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.link-tile:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.13);
}

.link-icon {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
}
.link-tile:hover .link-icon { color: #d8b4fe; }

.link-text { display: flex; flex-direction: column; line-height: 1.35; }
.link-text strong { font-size: 15px; }
.link-text small { color: var(--text-dim); font-size: 13px; }

#token code {
  font-size: 12px; color: var(--text-dim);
  background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 7px;
  word-break: break-all;
}

/* ── App screenshot carousel ─────────────────────────── */

.shots { position: relative; }

.shots-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius);
  /* Hide the scrollbar; navigation is via arrows/dots/swipe. */
  scrollbar-width: none;
}
.shots-track::-webkit-scrollbar { display: none; }
.shots-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shot {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
}

.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.shot figcaption {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 4px 0;
  text-align: center;
}
.shot figcaption strong { font-size: 16px; }
.shot figcaption span { color: var(--text-dim); font-size: 14px; }

.shot-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border); border-radius: 50%;
  background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 26px; line-height: 1;
  cursor: pointer;
  transition: border-color .15s, background .15s, opacity .15s;
}
.shot-nav:hover { border-color: var(--accent); }
.shot-nav[disabled] { opacity: .3; cursor: default; }
.shot-prev { left: 12px; }
.shot-next { right: 12px; }

.shot-dots {
  display: flex; justify-content: center; gap: 9px;
  margin-top: 20px;
}
.shot-dot {
  width: 9px; height: 9px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.shot-dot:hover { background: var(--text-dim); }
.shot-dot[aria-current="true"] { background: var(--accent); transform: scale(1.25); }

.shot-note {
  margin-top: 14px;
  color: var(--text-dim); font-size: 13px;
}

@media (max-width: 640px) {
  .shot-nav { width: 36px; height: 36px; font-size: 20px; }
  .shot-prev { left: 4px; }
  .shot-next { right: 4px; }
}
