/* CricLegends Landing – criclegendsapp.com */
:root {
  --bg: #020617;
  --surface: #0f172a;
  --surface-hi: #1e293b;
  --primary: #39ff14;
  --secondary: #0ea5e9;
  --text: #f8fafc;
  --muted: #94a3b8;
  --red: #ef4444;
  --border: rgba(255,255,255,0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--primary);
  color: var(--bg);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Typography */
.section-badge {
  display: inline-block;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 42rem;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.text-accent { color: var(--primary); }
.text-glow {
  text-shadow: 0 0 10px rgba(57,255,20,0.5), 0 0 20px rgba(57,255,20,0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}
.btn-primary:hover {
  box-shadow: 0 0 25px rgba(57,255,20,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: rgba(57,255,20,0.1);
}

.btn-lg { padding: 1rem 2rem; }

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(2,6,23,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.nav-logo-img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
}

.nav-logo-fallback { font-size: 1.5rem; }

.nav-logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

.nav-toggle {
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle-icon {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.nav-mobile {
  position: absolute;
  top: 5rem;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-mobile[hidden] { display: none; }

.nav-mobile a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.75rem;
}
.nav-mobile a:hover { color: var(--primary); }

/* Grain overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 50%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-content { grid-template-columns: 1fr 1fr; padding: 0 2rem; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-badge::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

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

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-title-accent {
  display: block;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(57,255,20,0.5);
}

.hero-desc {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 36rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero-stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  display: block;
}

.hero-mockup {
  display: none;
  justify-content: center;
}
@media (min-width: 1024px) { .hero-mockup { display: flex; } }

.phone-mockup {
  width: 280px;
  height: 560px;
  background: linear-gradient(145deg, #1a1a2e 0%, #0f0f1a 100%);
  border-radius: 2.5rem;
  padding: 12px;
  box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5), 0 0 40px rgba(57,255,20,0.1);
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: var(--bg);
  border-radius: 20px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen img { width: 8rem; height: 8rem; }
.phone-fallback { opacity: 0.6; }

/* Section common */
.section {
  padding: 4rem 0;
}

@media (min-width: 1024px) {
  .section { padding: 6rem 0; }
}

.section-features { background: var(--bg); }
.section-steps { background: var(--surface); }
.section-screens { background: var(--bg); }

.section .section-title,
.section .section-desc { text-align: center; }

/* Cards */
.card {
  background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 40px rgba(57,255,20,0.15);
  border-color: rgba(57,255,20,0.5);
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.3);
  border-radius: 0.5rem;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Bento grid */
.bento-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }
  .bento-large { grid-column: span 2; }
}

/* Scorecard block */
.scorecard-block {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .scorecard-block { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.scorecard-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.scorecard-content p {
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.scorecard-list {
  list-style: none;
}

.scorecard-list li {
  color: var(--muted);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.scorecard-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.scorecard-box {
  background: linear-gradient(135deg, rgba(15,23,42,0.9) 0%, rgba(2,6,23,0.95) 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0.5rem;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
}

.scorecard-meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.scorecard-match {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.scorecard-live-badge {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.scorecard-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.scorecard-team,
.scorecard-crr { color: var(--muted); font-size: 0.875rem; display: block; }
.scorecard-runs {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.scorecard-value { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700; }
.scorecard-overs,
.scorecard-rrr { color: var(--muted); font-size: 0.875rem; display: block; }

.scorecard-last { font-size: 0.875rem; color: var(--muted); }

/* Steps */
.steps-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
}

.step-card {
  position: relative;
}

.step-num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(57,255,20,0.2);
  display: block;
  margin-bottom: 0.5rem;
}

/* Screens */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .screens-grid { grid-template-columns: repeat(4, 1fr); }
}

.screen-card {
  text-align: center;
}

.screen-placeholder {
  aspect-ratio: 9/16;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.3s;
}

.screen-card:hover .screen-placeholder {
  border-color: rgba(57,255,20,0.5);
}

.screen-placeholder img { width: 4rem; height: 4rem; opacity: 0.6; }
.screen-fallback { font-size: 3rem; opacity: 0.5; }

.screen-card figcaption {
  font-size: 0.875rem;
  color: var(--muted);
}
.screen-card figcaption strong {
  color: var(--text);
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
}

/* Download section */
.section-download {
  position: relative;
  background: var(--surface);
}

.download-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background: var(--surface);
}

.download-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.store-btn:hover {
  border-color: rgba(57,255,20,0.5);
  box-shadow: 0 0 30px rgba(57,255,20,0.1);
}

.store-btn small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
}

.store-icon { font-size: 2rem; }

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary);
  font-weight: 500;
}

/* Footer */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--muted);
  max-width: 24rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.875rem;
}

.footer h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-bottom p:last-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom p:last-child::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background: var(--primary);
  border-radius: 50%;
}
