/* Rankify — Home Page */

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --val: #ff4655;
  --fn: #9333ea;
  --green: #22c55e;
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 24px;
}

a { color: inherit; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.logo-icon { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-nav { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 10px 20px; font-size: 14.5px; }

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--border-light);
}

/* ---- Hero ---- */
.hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-text { display: flex; flex-direction: column; gap: 16px; }

.hero-tag {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-desc {
  font-size: 15.5px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ---- Preview Card ---- */
.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.preview-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 2px;
  border-radius: 6px;
}

.preview-tab {
  background: transparent;
  border: none;
  color: var(--text-3);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}

.preview-tab.active {
  background: var(--surface-2);
  color: var(--text);
}

.preview-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  min-height: 180px;
  background: #0d0d0e;
}

.preview-stage iframe {
  width: 100%;
  max-width: 420px;
  height: 130px;
  border: none;
  border-radius: 12px;
  background: transparent;
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.preview-size {
  color: var(--text-3);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.preview-link {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
}

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

/* ---- Section ---- */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.section-alt { background: var(--surface); }

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-desc {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 8px;
}

/* ---- Features Grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}

.feature-card:hover {
  border-color: var(--border-light);
}

.feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.feature-card code {
  font-size: 12px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---- Games Grid ---- */
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.game-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 5px;
}

.game-tag-val {
  color: var(--val);
  background: rgba(255, 70, 85, 0.1);
  border: 1px solid rgba(255, 70, 85, 0.2);
}

.game-tag-fn {
  color: #c084fc;
  background: rgba(147, 51, 234, 0.1);
  border: 1px solid rgba(147, 51, 234, 0.2);
}

.game-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.game-card > p {
  font-size: 14px;
  color: var(--text-2);
}

.game-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
}

.game-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-list li svg {
  color: var(--green);
  flex-shrink: 0;
}

/* ---- Steps ---- */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step-card {
  flex: 1;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  padding: 24px;
}

.step-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.step-card h3 {
  font-size: 16px;
  font-weight: 700;
}

.step-card p {
  font-size: 13.5px;
  color: var(--text-2);
}

.step-card a {
  color: var(--accent);
  text-decoration: none;
}

.step-card a:hover { text-decoration: underline; }

.step-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  color: var(--text-3);
}

/* ---- CTA ---- */
.cta-section {
  background: var(--surface);
  border-bottom: none;
}

.cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta-inner h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-inner p {
  font-size: 15px;
  color: var(--text-2);
}

.cta-inner .btn { margin-top: 8px; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  text-decoration: none;
  font-size: 12.5px;
  color: var(--text-3);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text-2); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 30px; }
  .features-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-sep { transform: rotate(90deg); padding: 0; }
  .nav-links { display: none; }
  .hero-actions { flex-direction: column; }
}
