/* ===== CoreChat Landing Page - CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* --- CSS Variables / Design Tokens --- */
:root {
  --background: #1a1b2e;
  --foreground: #e8e9f0;
  --card: #22233a;
  --card-foreground: #e8e9f0;
  --primary: #2dd4a8;
  --primary-foreground: #1a1b2e;
  --secondary: #2a2b44;
  --secondary-foreground: #d1d2dc;
  --muted: #262740;
  --muted-foreground: #8b8da3;
  --border: #32334d;
  --destructive: #ef4444;
  --radius: 0.75rem;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Utility Classes --- */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-md {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.font-mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}
.btn-secondary:hover { opacity: 0.85; }

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-outline:hover { background-color: var(--secondary); }

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
}
.btn-ghost:hover { color: var(--foreground); }

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

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
}

.btn-full { width: 100%; }

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(50, 51, 77, 0.5);
  background: rgba(26, 27, 46, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background-color: var(--primary);
}

.navbar-logo svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary-foreground);
}

.navbar-brand span {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.navbar-links a:hover { color: var(--foreground); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--foreground);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn:hover { border-color: rgba(45, 212, 168, 0.3); }

.lang-flag { font-size: 1.125rem; }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 10rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 100;
}

.lang-dropdown.open { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border-radius: 0.375rem;
  transition: all 0.15s;
}
.lang-option:hover {
  background: var(--secondary);
  color: var(--foreground);
}
.lang-option.active {
  color: var(--primary);
  background: rgba(45, 212, 168, 0.08);
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.25rem;
}
.mobile-toggle svg { width: 1.5rem; height: 1.5rem; }

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(50, 51, 77, 0.5);
  background: rgba(26, 27, 46, 0.95);
  backdrop-filter: blur(16px);
  padding: 1.5rem;
}

.mobile-menu.open { display: flex; flex-direction: column; gap: 1rem; }

.mobile-menu a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--foreground); }

@media (max-width: 768px) {
  .navbar-links, .navbar-actions .btn { display: none; }
  .mobile-toggle { display: block; }
}

/* --- Hero Section --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 5rem 1.5rem 3rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(120px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 56rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(50, 51, 77, 0.8);
  background: rgba(42, 43, 68, 0.5);
  margin-bottom: 2rem;
}

.hero-badge svg { width: 0.875rem; height: 0.875rem; color: var(--primary); }
.hero-badge span { font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }

.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-wrap: balance;
}

.hero h1 .highlight { color: var(--primary); }

.hero-desc {
  margin-top: 1.5rem;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Chat Preview */
.chat-preview {
  margin-top: 4rem;
  width: 100%;
  max-width: 36rem;
  border-radius: var(--radius);
  border: 1px solid rgba(50, 51, 77, 0.6);
  background: rgba(34, 35, 58, 0.8);
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.chat-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(50, 51, 77, 0.4);
  padding: 0.75rem 1rem;
}

.chat-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}
.chat-dot--red { background: rgba(239, 68, 68, 0.6); }
.chat-dot--yellow { background: rgba(234, 179, 8, 0.6); }
.chat-dot--green { background: rgba(45, 212, 168, 0.6); }

.chat-titlebar span {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.chat-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.chat-avatar--user {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.chat-avatar--bot {
  background: var(--primary);
  color: var(--primary-foreground);
}
.chat-avatar--bot svg { width: 1rem; height: 1rem; }

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.chat-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}
.chat-name--bot { color: var(--primary); }

.chat-bot-badge {
  padding: 0.125rem 0.375rem;
  background: rgba(45, 212, 168, 0.2);
  color: var(--primary);
  font-size: 0.625rem;
  font-weight: 500;
  border-radius: 0.25rem;
}

.chat-time {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.chat-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: left;
  line-height: 1.5;
}

/* --- Section Base --- */
.section {
  position: relative;
  padding: 6rem 1.5rem;
}

.section-label {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-label--destructive { color: var(--destructive); }

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-wrap: balance;
}

.section-desc {
  margin-top: 1rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.section-header {
  margin-bottom: 4rem;
  text-align: center;
}

/* Sub section headers */
.sub-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.sub-title {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-wrap: balance;
}

.sub-desc {
  margin-top: 0.75rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(50, 51, 77, 0.6);
  background: rgba(34, 35, 58, 0.5);
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: rgba(45, 212, 168, 0.3);
  background: rgba(34, 35, 58, 0.8);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(45, 212, 168, 0.1);
  margin-bottom: 1rem;
}
.feature-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }

.feature-card h3 {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

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

@media (max-width: 768px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* --- Pricing Section --- */
.pricing-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.08;
  filter: blur(100px);
  pointer-events: none;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(50, 51, 77, 0.6);
  background: rgba(34, 35, 58, 0.5);
  transition: all 0.2s;
}

.plan-card--highlighted {
  border-color: var(--primary);
  background: rgba(34, 35, 58, 0.8);
  box-shadow: 0 10px 40px rgba(45, 212, 168, 0.05);
}

.plan-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.plan-name {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.plan-desc {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.plan-price {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.plan-price-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.plan-price-period {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.plan-features {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.plan-feature svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.plan-feature span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Server icon */
.server-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(45, 212, 168, 0.1);
  margin-bottom: 0.75rem;
}
.server-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }

/* Token Packs */
.tokens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.token-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(50, 51, 77, 0.6);
  background: rgba(34, 35, 58, 0.5);
  text-align: center;
  transition: all 0.2s;
}
.token-card:hover {
  border-color: rgba(45, 212, 168, 0.3);
  background: rgba(34, 35, 58, 0.8);
}

.token-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(45, 212, 168, 0.1);
  margin-bottom: 0.75rem;
}
.token-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }

.token-amount {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.token-label {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.token-price {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

@media (max-width: 768px) {
  .plans-grid { grid-template-columns: 1fr; max-width: 24rem; margin: 0 auto; }
  .tokens-grid { grid-template-columns: 1fr; max-width: 20rem; margin: 0 auto; }
}

/* --- FAQ Accordion --- */
.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid rgba(50, 51, 77, 0.6);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--primary); }

.faq-question svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
  transition: transform 0.2s;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 20rem;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

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

.rule-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.03);
  transition: all 0.2s;
}
.rule-card:hover { border-color: rgba(239, 68, 68, 0.4); }

.rule-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  margin-bottom: 1rem;
}
.rule-icon svg { width: 1.25rem; height: 1.25rem; color: var(--destructive); }

.rule-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

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

.rules-footer {
  margin-top: 2.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(50, 51, 77, 0.6);
  background: rgba(34, 35, 58, 0.5);
  text-align: center;
}

.rules-footer p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

@media (max-width: 640px) {
  .rules-grid { grid-template-columns: 1fr; }
}

/* --- CTA Section --- */
.cta-box {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(50, 51, 77, 0.6);
  background: rgba(34, 35, 58, 0.5);
  backdrop-filter: blur(4px);
}

.cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: rgba(45, 212, 168, 0.1);
  margin: 0 auto 1.5rem;
}
.cta-icon svg { width: 1.75rem; height: 1.75rem; color: var(--primary); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid rgba(50, 51, 77, 0.4);
  padding: 2.5rem 1.5rem;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--primary);
}
.footer-logo svg { width: 1rem; height: 1rem; color: var(--primary-foreground); }

.footer-brand span {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--foreground); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Spacing for subsections */
.mt-20 { margin-top: 5rem; }
