:root {
  /* Theme aligned to edgeplay.ai */
  --bg-dark: #ffffff;
  /* page background */
  --bg-light: #ffffff;
  /* cards/surfaces */
  --accent: #16a34a;
  /* primary green */
  --text: #111827;
  /* primary text */
  --muted: #64748b;
  /* secondary text */
  --border: rgba(148, 163, 184, 0.45);
  /* light gray-blue borders */
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
}

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

html {
  scroll-padding-top: 84px;
}

body {
  font-family: system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  transform: translateY(-200%);
  transition: transform 120ms ease;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0.75rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  background: transparent;
}

.nav {
  display: none;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.04);
}

.nav-link.is-active {
  color: var(--text);
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.12);
}

.nav-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  font-weight: 600;
}

.nav-drawer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
}

.nav-drawer .container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.85rem 0 1rem 0;
}

.section {
  padding: 4rem 1.5rem;
}

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

.center {
  text-align: center;
}

.hero {
  background: radial-gradient(circle at top, #ffffff, #f0fdf4 45%, #ffffff 100%);
}

.hero-grid {
  display: grid;
  gap: 3rem;
}

.brand h1 {
  font-size: 3rem;
}

.tagline {
  color: var(--accent);
  margin: 1rem 0;
}

.subtext {
  color: var(--muted);
}

.quote h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
}

.inline-link {
  text-decoration: none;
  color: var(--accent);
}

.inline-link:hover {
  text-decoration: underline;
}

.grid-3 {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  display: grid;
  gap: 2rem;
}

/* Light green tint for CricketBrain™ info cards (e.g., Ball Behaviour Prediction / Pitch Classification) */
.ml .grid-2 .card {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.22);
}

/* Light green tint for Core Technology Components cards */
.components .grid-3 .card {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.22);
}

/* Light green tint for HybridSense™ cards */
.sensing .grid-3 .card {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.22);
}

/* Light green tint for Applications cards */
.dashboards .grid-3 .card {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.22);
}

/* Light green tint for CricketBrain™ full-width card (Tactical Intelligence Generator) */
.ml .card.full {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.22);
}

/* Light green tint for MetaCoach™ cards */
.metacoach .grid-3 .card {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.22);
}

.card {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.card.full {
  margin-top: 2rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.layer {
  padding: 1rem;
  background: var(--bg-light);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.layer-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.layer-desc {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  text-align: right;
  max-width: 68ch;
}

/* Architecture stack rows: solid green blocks (theme accent) */
.architecture .layer.layer-row {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.28);
  border-left-color: rgba(255, 255, 255, 0.0);
}

.architecture .layer.layer-row .layer-title {
  color: #ffffff;
}

.architecture .layer.layer-row .layer-desc {
  color: rgba(255, 255, 255, 0.92);
}

.layer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
  flex: 0 0 auto;
}

.arch-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
}

.arch-watch .layer-icon {
  width: 34px;
  height: 34px;
}

.arch-watch:hover .layer-icon {
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.12);
}

.highlight {
  margin-top: 2rem;
  color: var(--accent);
}

.cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn.secondary:hover {
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.12);
}

/* Section demo blocks */
.demo {
  margin-top: 1.75rem;
  padding: 1.25rem;
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.28);
}

.demo-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
}

.demo-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.demo-toggle .layer-icon {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.demo-toggle:hover .layer-icon {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.18);
}

.demo-panel {
  margin-top: 0.85rem;
}

.demo-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #0b1220;
}

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.45);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
}

/* Responsive */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-drawer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip-link {
    transition: none;
  }
}