/* ==========================================================================
   Mars Market Forum — Light Concept
   Light theme: #ffffff + #7c5cff (violet accent)
   Dual typography: Space Grotesk (body) + JetBrains Mono (terminal/code)
   ========================================================================== */

/* ---------- Google Fonts preconnect ---------- */
/* Fonts are loaded in <head> via <link rel="preconnect"> and <link rel="stylesheet"> */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #ffffff;
  --bg-surface: #f3f0f9;
  --bg-surface-hover: #e9e4f2;
  --accent: #7c5cff;
  --accent-hover: #9576ff;
  --accent-glow: rgba(124, 92, 255, 0.15);
  --accent-glow-strong: rgba(124, 92, 255, 0.30);
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --text-dim: #8a8a8a;
  --border: #d8d4e8;
  --border-focus: var(--accent);
  --success: #2e7d32;
  --warning: #b45309;
  --danger: #c62828;

  --font-sans: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Monaco", "Consolas",
    "Liberation Mono", monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 24px var(--accent-glow-strong);
  --transition: 220ms ease;
  --container-max: 1200px;
  --header-height: 72px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

/* ---------- Background stars (subtle on light) ---------- */
.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  background: #7c5cff;
  border-radius: 50%;
  opacity: 0.12;
  animation: twinkle var(--transition) infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.06; transform: scale(1); }
  to { opacity: 0.18; transform: scale(1.1); }
}

/* ---------- Layout ---------- */
.container {
  width: min(92%, var(--container-max));
  margin-inline: auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ---------- Top links (Reddit / LinkedIn / 4chan) ---------- */
.top-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.top-links a {
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.top-links a:hover,
.top-links a:focus-visible {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ---------- Logo ---------- */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo.small-logo {
  display: inline-flex;
  align-items: center;
}

.logo.small-logo img {
  height: 32px;
  width: auto;
  display: block;
  border-radius: 8px;
  margin-left: 20px;
}

.logo .dot {
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow-strong);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.logo span {
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ---------- Navigation ---------- */
.nav-list {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  align-items: center;
}

.nav-list a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition), transform var(--transition);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--accent);
}

.nav-list a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 6rem) 0 clamp(2rem, 4vw, 4rem);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 72ch;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.hero-eyebrow::before {
  content: ">";
  color: var(--text-muted);
}

.hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--font-mono);
}

.hero p {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  margin-bottom: 1.75rem;
  max-width: 58ch;
}

/* ---------- SEO text block ---------- */
.seo-block {
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seo-block h2 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.seo-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.seo-block ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.seo-block li {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
}

.seo-block li:last-child {
  border-bottom: none;
}

.seo-block li::before {
  content: "▸";
  color: var(--accent);
  margin-right: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  margin-left: 0.75rem;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-glow);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(2.5rem, 5vw, 5rem) 0;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-header h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-header p {
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform var(--transition);
  transform-origin: bottom;
}

.card:hover,
.card:focus-within {
  border-color: var(--accent-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.card:hover::before,
.card:focus-within::before {
  transform: scaleY(1);
}

.card-icon {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Terminal Block ---------- */
.terminal-wrap {
  margin: 2.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #faf9fe;
  box-shadow: var(--shadow);
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  background: #efeaff;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; box-shadow: 0 0 6px rgba(255, 95, 86, 0.4); }
.dot.yellow { background: #ffbd2e; box-shadow: 0 0 6px rgba(255, 189, 46, 0.4); }
.dot.green { background: #27c93f; box-shadow: 0 0 6px rgba(39, 201, 63, 0.4); }

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #4a4a4a;
  line-height: 1.6;
  overflow-x: auto;
}

.terminal-body .prompt {
  color: var(--accent);
  margin-right: 0.5rem;
}

.terminal-body .cmd {
  color: var(--text);
}

.terminal-body .output {
  color: var(--text-muted);
  margin-left: 1.5rem;
}

.terminal-body .highlight {
  color: var(--accent);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1rem;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 0.2rem;
}

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

/* ---------- Forum ---------- */
.forum-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.forum-hero h2 {
  font-size: 1.5rem;
  margin: 0;
}

.forum-hero p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.category {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform var(--transition), border-color var(--transition);
}

.category:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
}

.category h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.category .count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.category p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.category .tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* ---------- Guides ---------- */
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.guide-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.guide-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.guide-item .difficulty {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: auto;
}

.guide-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.guide-item ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.guide-item li {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
}

.guide-item li:last-child {
  border-bottom: none;
}

.guide-item li::before {
  content: "▸";
  color: var(--accent);
  margin-right: 0.5rem;
  font-family: var(--font-mono);
}

/* ---------- Verification / Links ---------- */
.verify-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.verify-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.verify-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.verify-card .icon {
  font-family: var(--font-mono);
  color: var(--accent);
}

.verify-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.link-list li:last-child {
  border-bottom: none;
}

.link-list a {
  color: var(--text);
  word-break: break-all;
}

.link-list a:hover {
  color: var(--accent);
}

.status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  margin-left: 0.5rem;
}

.status-ok {
  color: var(--success);
  border-color: var(--success);
}

.status-warn {
  color: var(--warning);
  border-color: var(--warning);
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  transition: background var(--transition);
}

.faq-summary:hover {
  background: var(--bg-surface-hover);
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary .arrow {
  width: 14px;
  height: 14px;
  border: 2px solid var(--text-muted);
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
  transition: transform var(--transition);
}

details[open] .faq-summary .arrow {
  transform: rotate(135deg);
}

.faq-content {
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ---------- CTA ---------- */
.cta {
  background: radial-gradient(circle at 50% 0, rgba(124, 92, 255, 0.1), transparent 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-top: 3rem;
}

.cta h2 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin-bottom: 1rem;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: clamp(2rem, 4vw, 3rem) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 30ch;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-list {
    position: fixed;
    inset: var(--header-height) 0% 0 0%;
    flex-direction: column;
    background: var(--bg);
    padding: 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav-list.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .btn-group,
  .hero > .container > div > div:last-child {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-secondary {
    margin-left: 0;
  }

  .top-links {
    gap: 0.8rem;
    font-size: 0.8rem;
  }

  .top-links a {
    padding: 0.3rem 0.6rem;
  }
}

/* ---------- Print ---------- */
@media print {
  .stars { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* End of CSS */