/* -----------------------------------------------------------------
   MaYoS Client — download site
   Design: dark, developer-console aesthetic, one accent (purple)
   and one pop (mint) with restraint.
   ----------------------------------------------------------------- */

:root {
  --void:    #0A0B10;
  --panel:   #12141C;
  --panel-2: #171A24;
  --edge:    #232739;
  --edge-2:  #2E334A;
  --text:    #E7E9F4;
  --dim:     #8B90A8;
  --dim-2:   #6A7089;
  --accent:  #A05AF0;
  --accent-2: #7C3AED;
  --mint:    #4DFFB8;
  --red:     #FF6B6B;
  --yellow:  #FFD766;

  --f-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-body:    "Inter", ui-sans-serif, system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --radius-lg: 22px;

  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--void);
  background-image:
    radial-gradient(1200px 700px at 20% -10%, rgba(160, 90, 240, 0.14), transparent 55%),
    radial-gradient(900px 600px at 100% 20%, rgba(77, 255, 184, 0.08), transparent 55%);
  overflow-x: hidden;
}

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

::selection {
  background: var(--accent);
  color: white;
}

kbd {
  font-family: var(--f-mono);
  font-size: 0.82em;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--text);
}

code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--mint);
}

.mono { font-family: var(--f-mono); }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(35, 39, 57, 0.6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--text); }

.brand-logo {
  color: var(--accent);
  font-size: 18px;
  transform: translateY(-1px);
}

.brand-tag {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--dim);
  padding: 2px 7px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: var(--panel);
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--panel);
  transition: border-color 0.15s, background 0.15s;
}
.nav-cta:hover {
  border-color: var(--accent);
  background: var(--panel-2);
  color: var(--text);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { padding: 14px 18px; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 90px 28px 60px;
  max-width: var(--max);
  margin: 0 auto;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(160, 90, 240, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160, 90, 240, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 60px 22px 40px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--dim);
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 999px;
  margin-bottom: 28px;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  margin: 0 0 24px;
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero-word {
  display: block;
  font-size: clamp(64px, 12vw, 148px);
  background: linear-gradient(120deg, #E7E9F4 0%, #A05AF0 45%, #4DFFB8 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  display: block;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0;
  margin-top: 4px;
}

.hero-desc {
  max-width: 480px;
  color: var(--dim);
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-desc a {
  color: var(--text);
  border-bottom: 1px solid var(--edge-2);
}
.hero-desc a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(160, 90, 240, 0.6);
}
.btn-primary:hover {
  background: var(--accent-2);
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border-color: var(--edge);
}
.btn-ghost:hover {
  border-color: var(--dim);
  color: var(--text);
}

/* Terminal in hero */
.hero-console {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 20px 60px -20px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.console-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--edge);
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--dim);
}

.console-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-r { background: #FF605C; }
.dot-y { background: #FFBD44; }
.dot-g { background: #00CA4E; }

.console-title {
  margin-left: 10px;
  opacity: 0.8;
}

.console-body {
  padding: 20px 22px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  line-height: 1.9;
}

.console-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.console-line.dim { color: var(--dim); }
.prompt { color: var(--accent); margin-right: 6px; font-weight: 600; }
.ok { color: var(--mint); font-weight: 700; }
.mint { color: var(--mint); }
.typed::after {
  content: "▍";
  animation: caret-blink 1s steps(2) infinite;
  color: var(--mint);
  margin-left: 2px;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

/* Hero stats */
.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 56px;
}

@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

.stat {
  padding: 26px 22px;
  background: var(--panel);
}

.stat-value {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-label {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--dim);
  text-transform: lowercase;
  margin-top: 4px;
}

/* ---------- SECTIONS ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 28px;
}

@media (max-width: 720px) {
  .section { padding: 70px 22px; }
}

.section-head {
  margin-bottom: 48px;
  max-width: 620px;
}

.section-num {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  line-height: 1;
}

.section-sub {
  color: var(--dim);
  font-size: 17px;
  margin: 0;
}

/* ---------- DOWNLOADS ---------- */
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 44px;
}

@media (max-width: 720px) {
  .download-grid { grid-template-columns: 1fr; }
}

.download-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(160, 90, 240, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.download-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--panel-2);
  color: var(--text);
}
.download-card:hover::before { opacity: 1; }

.download-card.primary {
  border-color: var(--edge-2);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
}
.download-card.primary::before {
  background: linear-gradient(135deg, rgba(160, 90, 240, 0.10), transparent 60%);
  opacity: 1;
}

.dl-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  color: var(--accent);
}
.download-card.primary .dl-icon {
  background: rgba(160, 90, 240, 0.14);
  border-color: rgba(160, 90, 240, 0.35);
}

.dl-icon svg { width: 26px; height: 26px; }

.dl-meta { flex: 1; min-width: 0; }

.dl-name {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.dl-desc {
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 10px;
}

.dl-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--dim);
  padding: 3px 8px;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  border-radius: 6px;
  text-transform: lowercase;
}
.download-card.primary .chip { background: var(--void); }

.dl-cta {
  color: var(--dim);
  transition: color 0.15s, transform 0.15s;
}
.download-card:hover .dl-cta {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* Steps */
.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

@media (max-width: 720px) {
  .install-steps { grid-template-columns: 1fr; }
}

.step {
  display: flex;
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}

.step-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.step-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 14.5px;
  color: var(--dim);
  line-height: 1.55;
}

.callout {
  padding: 20px 24px;
  background: rgba(255, 215, 102, 0.05);
  border: 1px solid rgba(255, 215, 102, 0.2);
  border-radius: var(--radius);
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.6;
}
.callout strong {
  color: var(--yellow);
  font-weight: 600;
  margin-right: 6px;
}

/* ---------- MODULES ---------- */
.modules-controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.module-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 12px;
  color: var(--dim);
  flex: 1;
  min-width: 250px;
  max-width: 380px;
  transition: border-color 0.15s;
}
.module-search:focus-within {
  border-color: var(--accent);
  color: var(--accent);
}

#module-search {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 14px;
  flex: 1;
  min-width: 0;
}
#module-search::placeholder { color: var(--dim); }

.module-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.module-tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--dim);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }

.tab.is-active {
  background: var(--panel-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.tab-count {
  font-size: 11px;
  color: var(--dim-2);
  background: var(--void);
  padding: 1px 6px;
  border-radius: 4px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.module-card {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  position: relative;
}
.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: var(--panel-2);
}

.module-card.mayos::after {
  content: "MaYoS";
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(160, 90, 240, 0.15);
  border: 1px solid rgba(160, 90, 240, 0.4);
  border-radius: 4px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.module-name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
  padding-right: 50px;
}

.module-desc {
  font-size: 13.5px;
  color: var(--dim);
  line-height: 1.5;
}

.module-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--dim);
}
.module-empty .mono {
  color: var(--dim-2);
  font-size: 14px;
  display: block;
  margin-bottom: 10px;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq-item[open] {
  border-color: var(--edge-2);
  background: var(--panel-2);
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--f-mono);
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-body {
  padding: 0 24px 22px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.7;
}
.faq-body a {
  color: var(--text);
  border-bottom: 1px solid var(--edge-2);
}
.faq-body a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- COMMUNITY ---------- */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .community-grid { grid-template-columns: 1fr; }
}

.community-card {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}

.community-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.community-card.discord::before {
  background: radial-gradient(500px at 100% 0%, rgba(88, 101, 242, 0.14), transparent 60%);
}
.community-card.github::before {
  background: radial-gradient(500px at 100% 0%, rgba(160, 90, 240, 0.12), transparent 60%);
}

.community-card:hover {
  transform: translateY(-2px);
  color: var(--text);
}
.community-card:hover::before { opacity: 1; }
.community-card.discord:hover { border-color: #5865F2; }
.community-card.github:hover { border-color: var(--accent); }

.community-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--edge);
}
.community-card.discord .community-icon { color: #5865F2; }
.community-card.github .community-icon { color: var(--text); }
.community-icon svg { width: 28px; height: 28px; }

.community-body { flex: 1; min-width: 0; }

.community-tag {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--dim);
  margin-bottom: 6px;
  text-transform: lowercase;
}

.community-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 4px;
}

.community-desc {
  font-size: 14.5px;
  color: var(--dim);
  line-height: 1.5;
}

.community-arrow {
  font-family: var(--f-mono);
  font-size: 26px;
  color: var(--dim);
  transition: transform 0.15s, color 0.15s;
}
.community-card:hover .community-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--edge);
  padding: 40px 28px 36px;
  background: var(--panel);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--dim);
  font-size: 14px;
}
.footer-meta a {
  color: var(--text);
  border-bottom: 1px solid var(--edge-2);
}
.footer-meta a:hover { color: var(--accent); border-color: var(--accent); }

.sep { color: var(--edge-2); }

.footer-note {
  font-size: 12.5px;
  color: var(--dim-2);
  max-width: 600px;
}

/* ---------- Scroll reveal ---------- */
.section, .hero-console, .hero-stats {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section.is-visible, .hero-console.is-visible, .hero-stats.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .section, .hero-console, .hero-stats, .hero-word {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .eyebrow .dot { animation: none !important; }
  .typed::after { animation: none !important; }
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
