@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-deep: #010409;
  --text-white: #ffffff;
  --accent-red: #ff5757;
  --text-muted: #8b949e;
  --card-bg: rgba(22, 27, 34, 0.4);
  --border-muted: rgba(48, 54, 61, 0.6);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* --- Glow behind hero --- */
.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 87, 87, 0.07) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* --- Navigation --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 10%;
  background: rgba(1, 4, 9, 0.7);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-links a:hover {
  color: #fff;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* --- Hero --- */
.hero {
  padding: 10rem 10% 6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mascot-img {
  width: 100px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 20px rgba(255, 87, 87, 0.3));
}

/* Official OpenClaw animated gradient wordmark */
.brand-text {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  /* Slightly looser to avoid overlap */
  margin-bottom: 0.5rem;
  padding-right: 15px;
  /* CRITICAL: Prevents the 'w' from being clipped */
  color: #fff;
  background: linear-gradient(90deg, #fff 0%, #ff5757 25%, #5eead4 50%, #fff 75%, #ff5757 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-shimmer 4s linear infinite;
  display: block;
  overflow: visible;
}

@keyframes brand-shimmer {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
  color: #fff;
}

.tagline {
  color: var(--accent-red);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* Pills */
.news-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 4rem;
}

.news-pill:hover {
  border-color: var(--accent-red);
  color: #fff;
}

.news-badge {
  background: var(--accent-red);
  color: #fff;
  padding: 0.1rem 0.6rem;
  border-radius: 99px;
  font-weight: 800;
  font-size: 0.7rem;
}

/* --- Section Structure --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 2rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.section-title span {
  color: var(--accent-red);
}

.view-all {
  color: var(--accent-red);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

/* --- Cards Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 4rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-muted);
  padding: 2.5rem;
  border-radius: 12px;
  text-align: left;
  transition: var(--transition);
}

.card:hover {
  background: rgba(22, 27, 34, 0.8);
  border-color: var(--accent-red);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta-btn {
  padding: 1.25rem 2.5rem;
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 10px 40px rgba(255, 87, 87, 0.2);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(255, 87, 87, 0.4);
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 3rem 10%;
  border-top: 1px solid var(--border-muted);
  border-bottom: 1px solid var(--border-muted);
  max-width: 1100px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-red);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Card Badge --- */
.card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent-red);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

/* --- 2-column grid --- */
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* --- Card highlight --- */
.card-highlight {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(22, 27, 34, 0.6), rgba(22, 27, 34, 0.3));
}

.card-highlight:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* --- Architecture Grid --- */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 4rem;
}

.arch-item {
  padding: 2rem;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  transition: var(--transition);
}

.arch-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.arch-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.arch-item h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.arch-item p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 1100px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] {
  border-color: rgba(255, 87, 87, 0.3);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent-red);
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Compact Footer --- */
footer {
  padding: 1.5rem 10%;
  border-top: 1px solid var(--border-muted);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: #444;
}

footer a {
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition);
}

footer a:hover {
  color: #fff;
}

.footer-dot {
  color: #333;
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 5%;
  }

  .hero {
    padding: 8rem 5% 4rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .arch-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    gap: 2rem;
    flex-wrap: wrap;
  }

  footer {
    flex-wrap: wrap;
  }
}