/* ============================================================
   Grex Parser — Landing Page Styles
   ============================================================ */

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

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #21262d;
  --border:    #30363d;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --accent:    #2f81f7;
  --accent2:   #388bfd;
  --green:     #3fb950;
  --purple:    #a371f7;
  --orange:    #f78166;
  --radius:    12px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: var(--accent2) !important; transform: translateY(-1px); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(47,129,247,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(47,129,247,0.12);
  border: 1px solid rgba(47,129,247,0.3);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(47,129,247,0.35);
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 6px 32px rgba(47,129,247,0.5); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(47,129,247,0.07); transform: translateY(-2px); }

/* ── Marketplaces strip ───────────────────────────────────── */
.mp-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.mp-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.mp-badge:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

.mp-badge .mp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Sections ────────────────────────────────────────────── */
section { padding: 80px 24px; }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── For whom ────────────────────────────────────────────── */
#for-whom { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.forwhom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.forwhom-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.forwhom-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }

.forwhom-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.forwhom-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.forwhom-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Features ────────────────────────────────────────────── */
#features { background: var(--bg); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Data fields ─────────────────────────────────────────── */
#data { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.data-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition);
}
.data-item:hover { border-color: var(--green); transform: translateY(-2px); }

.data-item .di-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.data-item span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

/* ── API Demo ────────────────────────────────────────────── */
#api { background: var(--bg); }

.api-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
  align-items: start;
}

@media (max-width: 768px) {
  .api-layout { grid-template-columns: 1fr; }
}

.code-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.code-header .code-title {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.cd-red  { background: #ff5f57; }
.cd-yellow { background: #ffbd2e; }
.cd-green  { background: #28ca42; }

.code-body {
  padding: 20px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.83rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.t-key    { color: #79c0ff; }
.t-str    { color: #a5d6ff; }
.t-val    { color: #3fb950; }
.t-num    { color: #f2cc60; }
.t-muted  { color: var(--muted); }
.t-method { color: var(--purple); }
.t-url    { color: var(--orange); }
.t-comment{ color: #8b949e; font-style: italic; }

.endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.endpoint {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color var(--transition);
}
.endpoint:hover { border-color: var(--accent); }

.ep-method {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  flex-shrink: 0;
  font-family: monospace;
  margin-top: 1px;
}
.ep-get  { background: rgba(63,185,80,0.15); color: var(--green); }
.ep-post { background: rgba(47,129,247,0.15); color: var(--accent); }

.ep-info { flex: 1; }
.ep-path {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.87rem;
  color: var(--text);
  margin-bottom: 4px;
}
.ep-desc { font-size: 0.82rem; color: var(--muted); }

/* ── Demo video ──────────────────────────────────────────── */
#demo { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

#demo .section-sub { margin-bottom: 0; }

.video-wrapper {
  margin-top: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  background: var(--bg3);
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg3);
  color: var(--muted);
}

.video-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(47,129,247,0.15);
  border: 2px solid rgba(47,129,247,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.video-placeholder p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ── Admin overview ──────────────────────────────────────── */
#admin { background: var(--bg); }

.admin-tabs {
  margin-top: 48px;
}

.admin-tab-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.admin-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
  font-family: inherit;
}
.admin-tab-btn:hover { color: var(--text); }
.admin-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.admin-panel-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-panel-inner { grid-template-columns: 1fr; }
}

.admin-screenshot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.admin-screenshot img {
  width: 100%;
  display: block;
}

.admin-desc-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.admin-desc h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.admin-desc p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.admin-desc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-desc-list li {
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-desc-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Stats ───────────────────────────────────────────────── */
#stats { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.stat-card {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-4px); }

.stat-num {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Why not SaaS ───────────────────────────────────────── */
#why-not-saas { background: var(--bg); }

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

.notsaas-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.notsaas-item:hover { border-color: var(--accent); transform: translateY(-3px); }

.notsaas-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.notsaas-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.notsaas-item p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── How to start ────────────────────────────────────────── */
#how-to-start { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.steps-grid {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

@media (max-width: 768px) {
  .steps-grid { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
}

.step-card {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.step-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(47,129,247,0.15);
  border: 2px solid rgba(47,129,247,0.4);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.step-arrow {
  font-size: 1.6rem;
  color: var(--border);
  flex-shrink: 0;
}

/* ── FAQ ─────────────────────────────────────────────────── */
#faq { background: var(--bg); }

.faq-list {
  max-width: 760px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--accent); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }

.faq-arrow {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--muted);
  transition: transform var(--transition);
}
.faq-question.open .faq-arrow { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 24px 20px;
}
.faq-answer p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── CTA ─────────────────────────────────────────────────── */
#cta {
  background: var(--bg);
  text-align: center;
}

.cta-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 64px 40px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(circle, rgba(47,129,247,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-box p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-tg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #229ED9;
  color: #fff;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 24px rgba(34,158,217,0.3);
}
.btn-tg:hover { opacity: 0.9; transform: translateY(-2px); color: #fff; }

/* ── Pricing ─────────────────────────────────────────────── */
#pricing { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.4); }

.pricing-card--accent {
  border-color: rgba(47,129,247,0.35);
  background: rgba(47,129,247,0.05);
}

.pricing-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.pricing-price {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}
.pricing-price span { font-size: 1.6rem; font-weight: 600; }

.pricing-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-list li {
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

footer p {
  color: var(--muted);
  font-size: 0.87rem;
}

/* ── Animations ──────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  section { padding: 60px 20px; }
  .cta-box { padding: 40px 24px; }
}
