@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=Geist+Mono:wght@300;400;500;600;700&display=swap');

/* =========================================
   CSS VARIABLES
   ========================================= */
:root {
  --bg-dark: #141413;
  --bg-light: #FAFAFA;
  --bg-card: #FFFFFF;
  --text-main: #141413;
  --text-muted: #666666;
  --primary-yellow: #FEF47A;
  --border-light: #E0E0E0;
  --nav-bg: #141413;
  --nav-text: #EAEAEA;
  --nav-height: 70px;
}

/* =========================================
   GLOBAL RESET
   ========================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  width: 100%;
  background-color: var(--bg-light);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

::selection {
  background: var(--primary-yellow);
  color: var(--bg-dark);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  color: var(--nav-text);
  z-index: 9999;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--nav-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(250,250,250,0.7);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--nav-text);
}

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(250,250,250,0.1);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
}

.nav-search input {
  background: transparent;
  border: none;
  color: var(--nav-text);
  font-family: 'Barlow', sans-serif;
  outline: none;
  margin-left: 0.5rem;
  width: 160px;
}

/* Mobile menu hamburger button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
  flex-shrink: 0;
}

.mobile-menu-btn svg {
  width: 26px;
  height: 26px;
  stroke: var(--nav-text);
  display: block;
}

/* Overlay for mobile nav */
.nav-overlay {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  background: rgba(0,0,0,0.5);
  z-index: 9998;
}

.nav-overlay.active {
  display: block;
}

/* =========================================
   ANNOUNCEMENT BAR
   ========================================= */
.announcement-bar {
  background: var(--primary-yellow);
  color: var(--bg-dark);
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: var(--nav-height);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  font-family: 'Barlow', sans-serif;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-yellow);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: #e6dc6e;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #F0F0F0;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
  background: #E8E8E8;
}

.hero-title {
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.hero-link {
  font-weight: 600;
  color: var(--text-main);
}

/* =========================================
   TICKER
   ========================================= */
.ticker-wrap {
  overflow: hidden;
  background: #E8E8E8;
  padding: 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.ticker-wrap img {
  height: 26px;
  opacity: 0.6;
  filter: grayscale(100%);
}

/* =========================================
   SECTIONS
   ========================================= */
.section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-bg-white {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

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

.section-overline {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -1px;
}

/* =========================================
   MODELS GRID
   ========================================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: #CCC;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

.product-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.product-tag {
  background: #F0F0F0;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.product-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.product-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Products page layout */
.products-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.products-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
}

.products-content {
  flex-grow: 1;
  min-width: 0;
}

/* =========================================
   PRICING
   ========================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2rem 1.5rem;
}

.pricing-name {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.pricing-price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  margin-top: 1.5rem;
}

.pricing-features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: "✓";
  color: #141413;
  font-weight: bold;
  flex-shrink: 0;
}

/* =========================================
   FEATURES BLOCK
   ========================================= */
.features-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  background: #F4F4F4;
  border-radius: 24px;
  padding: 3rem 2rem;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-width: 240px;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feature-item.active {
  color: var(--text-main);
  background: #FFFFFF;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.features-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  flex-shrink: 0;
}

/* =========================================
   OPENCLAW BANNER
   ========================================= */
.openclaw-banner {
  text-align: center;
  padding: 3rem 1.5rem;
}

.openclaw-img {
  max-width: 150px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
}

/* =========================================
   BLOG
   ========================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.blog-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.blog-image {
  width: 100%;
  height: 160px;
  background: #E8E8E8;
  object-fit: cover;
}

.blog-content {
  padding: 1rem;
}

.blog-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.blog-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================
   DOCS LAYOUT
   ========================================= */
.docs-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
}

.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.docs-content {
  flex: 1;
  padding: 2rem;
  min-width: 0;
}

.docs-nav-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  margin-top: 1.5rem;
}

.docs-nav-link {
  display: block;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  border-radius: 4px;
}

.docs-nav-link:hover {
  color: var(--text-muted);
}

/* =========================================
   DASHBOARD LAYOUT
   ========================================= */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
}

.dashboard-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.dashboard-content {
  flex: 1;
  padding: 2rem;
  min-width: 0;
}

/* =========================================
   AUTH PAGES (Login / Register)
   ========================================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background: url('https://cdn.prod.website-files.com/6979c6c70c21b50639123793%2F69b3ded3c2a4636dab7a7910_atf-background_poster.0000000.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 3rem;
}

.auth-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2rem;
  text-decoration: none;
}

.auth-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  background: var(--bg-light);
  color: var(--text-main);
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--text-main);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row > * {
  flex: 1;
  min-width: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.auth-footer-text {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-footer-text a {
  color: var(--text-main);
  font-weight: 600;
  text-decoration: underline;
}

/* =========================================
   CHAT LAYOUT
   ========================================= */
.chat-layout {
  display: flex;
  height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
}

.chat-sidebar {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  background: var(--bg-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
  min-width: 0;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.chat-input-area {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-card);
}

.chat-input-wrapper {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.4rem;
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}

/* =========================================
   STATUS PAGE
   ========================================= */
.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 3rem 2rem;
  background: #FFFFFF;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand .nav-logo {
  color: var(--text-main);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text-muted);
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.w-full { width: 100%; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Page top padding when no hero (accounts for fixed nav) */
.page-content {
  padding-top: calc(var(--nav-height) + 2rem);
  min-height: 100vh;
}

/* =========================================
   TABLET (max-width: 992px)
   ========================================= */
@media (max-width: 992px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-grid,
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-block {
    flex-direction: column;
    gap: 2rem;
  }
  .features-image {
    max-width: 250px;
    margin: 0 auto;
  }
}

/* =========================================
   MOBILE (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {

  /* --- NAVBAR --- */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-right {
    display: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--nav-height));
    background: var(--nav-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 0.5rem;
    overflow-y: auto;
    z-index: 9998;
    border-right: 1px solid rgba(255,255,255,0.1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
    transform: translateX(-100%);
  }

  .nav-links.active {
    display: flex;
    transform: translateX(0);
  }

  .nav-links .nav-link {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
    width: 100%;
    border-radius: 8px;
  }

  .nav-links .nav-link:hover {
    background: rgba(255,255,255,0.05);
  }

  /* --- HERO --- */
  .hero {
    padding: 5.5rem 1rem 3rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* --- SECTIONS --- */
  .section {
    padding: 2.5rem 1rem;
  }

  .section-bg-white {
    padding: 1.5rem 1rem;
    border-radius: 12px;
  }

  /* --- TICKER --- */
  .ticker-wrap {
    gap: 1.5rem;
    padding: 1rem;
  }

  .ticker-wrap img {
    height: 20px;
  }

  /* --- MODELS PAGE --- */
  .products-layout {
    flex-direction: column;
  }

  .products-sidebar {
    width: 100%;
    position: relative;
  }

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

  /* --- PRICING --- */
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  /* --- BLOG --- */
  .blog-grid,
  .blog-list {
    grid-template-columns: 1fr;
  }

  /* --- DOCS --- */
  .docs-layout {
    flex-direction: column;
    margin-top: 0;
  }

  .docs-sidebar {
    position: fixed;
    top: var(--nav-height);
    left: -280px;
    width: 280px;
    height: calc(100vh - var(--nav-height));
    z-index: 9997;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }

  .docs-sidebar.active {
    left: 0;
  }

  .docs-content {
    padding: 1rem;
    margin-top: var(--nav-height);
  }

  /* --- DASHBOARD --- */
  .dashboard-layout {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .dashboard-content {
    padding: 1rem;
  }

  /* --- CHAT --- */
  .chat-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - var(--nav-height));
  }

  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    max-height: 300px;
  }

  .chat-main {
    min-height: 400px;
  }

  /* --- AUTH --- */
  .auth-card {
    padding: 2rem 1.25rem;
    border-radius: 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  /* --- FOOTER --- */
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    gap: 1rem;
  }

  .footer {
    padding: 2rem 1rem;
  }

  /* --- FEATURES BLOCK --- */
  .features-block {
    padding: 1.5rem 1rem;
  }
}

/* =========================================
   SMALL MOBILE (max-width: 480px)
   ========================================= */
@media (max-width: 480px) {
  .hero-title {
    letter-spacing: -1px;
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .section-title {
    letter-spacing: -0.5px;
  }

  .announcement-bar {
    font-size: 0.78rem;
    padding: 0.4rem 0.5rem;
  }

  .pricing-price {
    font-size: 2rem;
  }

  .auth-card {
    padding: 1.5rem 1rem;
  }
}
