/* ═══════════════════════════════════════════════
   Cotime Landing — Shared Stylesheet
   Dark theme by default; light via OS or toggle.
   ═══════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  /* Dark theme (default) */
  --bg-body-from: #1a1a2e;
  --bg-body-via: #1e2433;
  --bg-body-to: #16213e;
  --bg-card: rgba(42, 50, 65, 0.55);
  --card-backdrop: blur(8px);
  --card-shadow: none;
  --border-card: rgba(55, 65, 81, 0.45);
  --nav-bg: rgba(26, 26, 46, 0.85);
  --nav-border: rgba(55, 65, 81, 0.45);
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --brand: #ffa600;
  --brand-light: #ffcc44;
  --brand-glow: rgba(255, 166, 0, 0.35);
  --radius: 1rem;
  --max-w: 1100px;
  --theme-color: #1a1a2e;
}

/* Light theme — OS preference (no JS / no saved pref) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg-body-from: #f8fafc;
    --bg-body-via: #ffffff;
    --bg-body-to: #eef4ff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --card-backdrop: none;
    --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
    --border-card: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(248, 250, 252, 0.92);
    --nav-border: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --brand: #d97706;
    --brand-light: #f59e0b;
    --brand-glow: rgba(217, 119, 6, 0.2);
    --theme-color: #f8fafc;
  }
}

/* Light theme — explicit (data-theme="light") */
[data-theme="light"] {
  --bg-body-from: #f8fafc;
  --bg-body-via: #ffffff;
  --bg-body-to: #eef4ff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --card-backdrop: none;
  --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
  --border-card: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(248, 250, 252, 0.92);
  --nav-border: rgba(0, 0, 0, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --brand: #d97706;
  --brand-light: #f59e0b;
  --brand-glow: rgba(217, 119, 6, 0.2);
  --theme-color: #f8fafc;
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: linear-gradient(
    160deg,
    var(--bg-body-from) 0%,
    var(--bg-body-via) 40%,
    var(--bg-body-to) 100%
  );
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ── Layout Utilities ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
section {
  padding: 5rem 1.5rem;
  text-align: center;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* ── CTA Buttons ── */
.cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  border: none;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 4px 15px var(--brand-glow);
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--brand-glow);
}
.cta-small {
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 50px;
}
.cta-outline {
  background: transparent;
  color: var(--brand-light);
  border: 1.5px solid var(--brand);
  box-shadow: none;
}
.cta-outline:hover {
  background: rgba(255, 166, 0, 0.08);
  box-shadow: none;
}
[data-theme="light"] .cta-outline {
  color: var(--brand);
}

/* ── Card Base ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  box-shadow: var(--card-shadow);
  text-align: left;
}

/* ── Header / Nav ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
}
nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
.nav-logo {
  width: 2rem;
  height: 2rem;
}
.nav-name {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--text-primary);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ── Theme Toggle ── */
.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.theme-toggle svg {
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

/* ── Hero ── */
#hero {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.hero-logo {
  width: 5rem;
  height: 5rem;
  margin-bottom: 1.5rem;
}
#hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── How It Works Steps ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.step {
  text-align: center;
}
.step-number {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Activity Grid (homepage) ── */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.activity-grid-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 1.5rem auto 0;
}
.activity-card {
  position: relative;
  transition: transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.activity-card:hover {
  transform: translateY(-4px);
}
.activity-card:visited {
  color: inherit;
}
.activity-icon {
  width: 3rem;
  height: 3rem;
  color: var(--brand);
  margin-bottom: 1rem;
}
.activity-icon svg {
  width: 100%;
  height: 100%;
}
.activity-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.activity-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.player-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
  background: rgba(255, 166, 0, 0.12);
  color: var(--brand-light);
}
[data-theme="light"] .player-badge {
  background: rgba(217, 119, 6, 0.1);
  color: var(--brand);
}
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.status-badge.wip {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}
[data-theme="light"] .status-badge.wip {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.03);
  pointer-events: none;
}

/* ── Value / Feature Grid ── */
.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.value-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--brand);
  margin-bottom: 0.75rem;
}
.value-icon svg {
  width: 100%;
  height: 100%;
}
.value-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.value-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Audience / Use-case Grid ── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.audience-card {
  transition: transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.audience-card:visited {
  color: inherit;
}
a.audience-card:hover {
  transform: translateY(-4px);
}
.audience-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  margin-bottom: 0.75rem;
}
.audience-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.audience-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.audience-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-light);
}
[data-theme="light"] .audience-link {
  color: var(--brand);
}

/* ── Final CTA Section ── */
#cta {
  padding: 6rem 1.5rem;
}
#cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
#cta p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}

/* ── Activity Pages ── */
.activity-hero {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}
.activity-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.activity-hero .tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.meta-badges {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.meta-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  background: rgba(255, 166, 0, 0.12);
  color: var(--brand-light);
}
[data-theme="light"] .meta-badge {
  background: rgba(217, 119, 6, 0.1);
  color: var(--brand);
}
.activity-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.content-section {
  margin-bottom: 3rem;
}
.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.content-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.content-section ul,
.content-section ol {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-section li {
  margin-bottom: 0.5rem;
}
.rules-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  box-shadow: var(--card-shadow);
}
.rules-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--brand-light);
}
[data-theme="light"] .rules-card h3 {
  color: var(--brand);
}
.rules-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.activity-cta {
  text-align: center;
  padding: 3rem 1.5rem 5rem;
}
.activity-cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--text-primary);
}

/* ── Audience / Use-case Pages (for-communities, for-streamers) ── */
.page-hero {
  padding: 5rem 1.5rem 3rem;
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 1rem;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  background: rgba(255, 166, 0, 0.12);
}
[data-theme="light"] .page-hero .eyebrow {
  background: rgba(217, 119, 6, 0.1);
}
.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.page-hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* Featured highlight (Poke the Ogre, etc.) */
.feature-highlight {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2.5rem;
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  box-shadow: var(--card-shadow);
  max-width: 800px;
  margin: 0 auto 2.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.feature-highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
}
.feature-highlight .badge-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.feature-highlight h3 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.feature-highlight .big-claim {
  font-size: 1.1rem;
  color: var(--brand-light);
  font-weight: 600;
  margin-bottom: 1rem;
}
[data-theme="light"] .feature-highlight .big-claim {
  color: var(--brand);
}
.feature-highlight p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.feature-highlight p:last-of-type {
  margin-bottom: 0;
}

/* Activity cards for audience pages */
.acts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 1.5rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-card);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text-secondary);
}
.footer-heart {
  color: #ef4444;
}
.footer-copy {
  margin-top: 0.35rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .activity-grid-bottom {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: 3.5rem 1.25rem;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 320px;
  }
  .activity-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .activity-grid-bottom {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .value-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .audience-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .acts-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  #hero {
    min-height: auto;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  .nav-links {
    display: none;
  }
  .activity-hero {
    padding: 3rem 1.25rem 1.5rem;
  }
  .rules-grid {
    grid-template-columns: 1fr;
  }
  .page-hero {
    padding: 3.5rem 1.25rem 2rem;
  }
  .feature-highlight {
    padding: 2rem 1.5rem;
  }
}
