:root {
  --bg-base: #07070f;
  --bg-surface: #0f0f1a;
  --bg-card: #14141f;
  --accent-red: #ff3d2e;
  --accent-orange: #ff6b35;
  --accent-cyan: #00d4ff;
  --text-primary: #eeeef5;
  --text-secondary: #9494b0;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(255, 61, 46, 0.3);

  --c-transparent: transparent;
  --stroke-ghost: rgba(255, 255, 255, 0.04);
  --shadow-soft: rgba(0, 0, 0, 0.35);
  --shadow-strong: rgba(0, 0, 0, 0.5);
  --accent-red-soft: rgba(255, 61, 46, 0.1);
  --accent-red-quote: rgba(255, 61, 46, 0.12);
  --accent-cyan-soft: rgba(0, 212, 255, 0.12);
  --glow-red: rgba(255, 61, 46, 0.22);
  --glow-cyan: rgba(0, 212, 255, 0.22);
  --glow-white: rgba(238, 238, 245, 0.18);

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC",
    system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-base);
  line-height: 1.7;
  font-weight: 400;
  text-rendering: geometricPrecision;
}

.page {
  min-height: 100%;
  background: radial-gradient(1200px 700px at 18% 10%, var(--accent-red-soft), var(--c-transparent) 60%),
    radial-gradient(900px 500px at 82% 18%, var(--accent-cyan-soft), var(--c-transparent) 55%),
    linear-gradient(180deg, var(--bg-base), var(--bg-surface));
}

::selection {
  background: var(--accent-red-soft);
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-cyan);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Gradient text: must include both background-clip + color fallback */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.c-red {
  color: var(--accent-red);
}
.c-cyan {
  color: var(--accent-cyan);
}
.c-white {
  color: var(--text-primary);
}

.section {
  padding: 120px 8vw;
}

.section-header {
  max-width: 1100px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 600;
}

.section-title {
  margin: 14px 0 0;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.section-subtitle {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
}

/* SECTION 1: HERO */
.hero {
  position: relative;
  height: 100vh;
  padding: 0 8vw;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--bg-base), var(--bg-surface));
  overflow: hidden;
}

#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.brand-line {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
}

.hero-title {
  margin: 18px 0 0;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.06;
}

.hero-rule {
  width: 60px;
  height: 3px;
  border-radius: 999px;
  margin-top: 18px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-orange));
}

.hero-subtitle {
  margin: 18px 0 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  max-width: 560px;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-slogan {
  margin-top: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--accent-cyan);
  font-weight: 700;
}

.hero-deco {
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(80px, 15vw, 160px);
  color: var(--c-transparent);
  -webkit-text-stroke: 1px var(--stroke-ghost);
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

/* SECTION 2: MAGIC EVENTS */
.bento-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.event-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border-subtle);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 16px 44px var(--c-transparent);
}

.event-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 18px 50px var(--shadow-strong);
}

.event-emoji {
  font-size: 36px;
  line-height: 1;
}

.event-title {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.event-desc {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

.span-2 {
  grid-column: span 2;
}

/* SECTION 3: WHAT IS OPENCLAW */
.two-col {
  display: flex;
  gap: 80px;
  align-items: flex-start;
  margin-top: 36px;
}

.intro {
  flex: 1;
}

.intro-lead {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.intro-body {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
}

.em-red {
  color: var(--accent-red);
  font-weight: 600;
}

.feature-list {
  flex: 1;
  border-top: 1px solid var(--border-subtle);
}

.feature-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.feature-bar {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  background: var(--accent-red);
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.feature-desc {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-divider {
  margin-top: 54px;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--c-transparent),
    var(--accent-red),
    var(--accent-cyan),
    var(--c-transparent)
  );
}

/* SECTION 4: REAL STORIES */
.stories-scroller {
  margin-top: 36px;
  overflow-x: auto;
  padding: 8px 0 24px;
  scrollbar-width: none;
}

.stories-scroller::-webkit-scrollbar {
  display: none;
}

.stories-track {
  display: flex;
  gap: 24px;
}

.story-card {
  width: 320px;
  height: 260px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 32px 28px;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 18px 50px var(--shadow-soft);
}

.story-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.story-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.story-role {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-red-soft);
  color: var(--accent-red);
  border: 1px solid var(--border-glow);
  white-space: nowrap;
}

.story-quote {
  font-family: var(--font-sans);
  font-size: 64px;
  line-height: 1;
  color: var(--accent-red-quote);
  margin-top: 10px;
}

.story-text {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.75;
  font-style: italic;
}

/* SECTION 5: VOICES */
.tagcloud-wrap {
  margin-top: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 22px 60px var(--shadow-soft);
}

#tagCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.tag-fallback {
  width: 100%;
}

.tag-fallback ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.tag-fallback a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-card));
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.tag-fallback a:hover {
  border-color: var(--border-glow);
  text-decoration: none;
}

.voices-ticker {
  width: 100%;
  margin-top: 18px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 50px var(--shadow-soft);
}

.voices-ticker::before,
.voices-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  width: 72px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.voices-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-card), var(--c-transparent));
}

.voices-ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-card), var(--c-transparent));
}

.ticker-track {
  --ticker-duration: 28s;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  width: max-content;
  will-change: transform;
  animation: ticker-scroll var(--ticker-duration) linear infinite;
}

.voices-ticker:hover .ticker-track {
  animation-play-state: paused;
}

.tick {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 0 0 16px var(--glow-white);
}

.tick.c-red {
  text-shadow: 0 0 16px var(--glow-red);
}

.tick.c-cyan {
  text-shadow: 0 0 16px var(--glow-cyan);
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Required tag colors */
#tagList a.c-red {
  color: #ff3d2e;
}
#tagList a.c-cyan {
  color: #00d4ff;
}
#tagList a.c-white {
  color: #eeeef5;
}

/* SECTION 6: FOOTER */
.footer {
  padding: 60px 8vw;
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-col {
  min-width: 220px;
}

.footer-brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-slogan {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.footer-link {
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 500;
}

.footer-right {
  text-align: right;
}

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

.footer-powered {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.45;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-deco {
    right: 4vw;
    opacity: 0.75;
  }

  .section {
    padding: 96px 8vw;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .two-col {
    flex-direction: column;
    gap: 40px;
  }

  .tagcloud-wrap {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    --ticker-duration: 80s;
  }
}
