/* ==========================================================================
   SQLBot Website Styles
   ========================================================================== */

/* CSS Custom Properties (Variables) */
:root {
  /* Colors */
  --primary-color: #1CBA90;
  --primary-dark: #028E92;
  --primary-light: #03C4C9;
  --primary-alpha: rgba(2, 166, 171, 0.1);

  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-light: #718096;

  --bg-primary: #FFFFFF;
  --bg-secondary: #F4F7F9;
  --border-color: #E2E8F0;

  /* Typography */
  --font-primary: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-2xl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.top-bar {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #ffffff;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #333;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1001;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.top-bar.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-brand {
  color: #4a90ff;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-brand:hover {
  color: #6ba3ff;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-bar-dropdown {
  position: relative;
}

.top-bar-dropdown-btn {
  background: none;
  border: none;
  color: #cccccc;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.top-bar-dropdown-btn:hover,
.top-bar-dropdown-btn[aria-expanded="true"] {
  color: #ffffff;
}

.dropdown-arrow {
  margin-left: 5px;
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.top-bar-dropdown-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.top-bar-dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  min-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1001;
  display: none;
  margin-top: 12px;
  padding: 8px 0;
  overflow: hidden;
}

.top-bar-dropdown-content::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 60px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
  z-index: 2;
}

.top-bar-dropdown-content::after {
  content: '';
  position: absolute;
  top: -9px;
  right: 60px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid #e8e8e8;
  z-index: 1;
}

.top-bar-dropdown-content.show {
  display: block;
}

.top-bar-dropdown-item {
  padding: 12px 20px;
  color: #333333;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.top-bar-dropdown-item:last-child {
  border-bottom: none;
}

.top-bar-dropdown-item:hover {
  background-color: #f8f9fa;
}

.dropdown-item-name {
  color: #17a2b8;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2px;
}

.dropdown-item-desc {
  color: #999999;
  font-size: 14px;
  line-height: 1.4;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.header {
  position: fixed;
  top: 40px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.top-bar-hidden {
  top: 0;
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav__brand {
  display: flex;
  align-items: center;
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.nav__logo:hover {
  transform: translateY(-1px);
}

.logo__text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav__link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

.nav__link:hover {
  color: var(--primary-color);
  background: var(--primary-alpha);
}

.nav__button {
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav__button--outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.nav__button--outline:hover {
  background: var(--primary-color);
  color: #fff;
}

.nav__button--primary {
  background: var(--primary-color);
  color: #fff;
  border: 2px solid var(--primary-color);
}

.nav__button--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 160px;
  overflow: hidden;
}

.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero__shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

.hero__shape--1 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.hero__shape--2 {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  top: 60%;
  left: 5%;
  animation-delay: 2s;
}

.hero__shape--3 {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-alpha), transparent);
  top: 30%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.hero__container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
  min-height: 80vh;
}

.hero__left {
  animation: slideInLeft 0.8s ease-out;
}

.hero__title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.hero__title--highlight {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  max-width: 500px;
}

.hero__features {
  display: flex;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.feature__item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature__icon {
  font-size: 20px;
}

.hero__right {
  display: flex;
  justify-content: center;
  animation: slideInRight 0.8s ease-out;
}

/* ==========================================================================
   Beta Card
   ========================================================================== */

.beta__card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 100%;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.beta__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.beta__header {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.beta__status {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--primary-alpha);
  border-radius: 20px;
  border: 1px solid var(--primary-color);
}

.beta__dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.beta__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
}

.beta__title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.beta__description {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
}

/* ==========================================================================
   QR Code
   ========================================================================== */

.qr__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.qr__code {
  width: 140px;
  height: 140px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: var(--spacing-sm);
  transition: all 0.3s ease;
  overflow: hidden;
}

.qr__code img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
}

.qr__code:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.qr__label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   Beta Info
   ========================================================================== */

.beta__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.info__item {
  text-align: center;
  padding: var(--spacing-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.info__label {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.info__value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--text-primary);
  color: white;
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-2xl);
}

.footer__content {
  text-align: center;
}

.footer__text {
  color: #CBD5E0;
  font-size: 14px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
  .hero__content {
    gap: var(--spacing-xl);
  }

  .hero__title {
    font-size: 42px;
  }
}

@media (max-width: 768px) {
  /* Hide top bar on mobile */
  .top-bar {
    display: none !important;
  }

  .header {
    top: 0;
  }

  /* Navigation */
  .nav {
    position: relative;
    flex-wrap: wrap;
  }

  .nav__center,
  .nav__right {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  /* Mobile menu open state */
  .nav.mobile-open .nav__center,
  .nav.mobile-open .nav__right {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
  }

  .nav.mobile-open .nav__center {
    position: static;
    transform: none;
    order: 1;
  }

  .nav.mobile-open .nav__right {
    order: 2;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-md);
  }

  .nav.mobile-open .nav__link {
    padding: var(--spacing-sm) 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
  }

  .nav.mobile-open .nav__button {
    display: none !important;
  }

  /* Hide action buttons on mobile */
  .nav__button--outline,
  .nav__button--primary {
    display: none !important;
  }

  /* Hero Section */
  .hero__content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }

  .hero {
    padding-top: 110px;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 18px;
  }

  .hero__features {
    flex-direction: column;
    align-items: center;
  }

  .feature__item {
    width: fit-content;
  }

  .beta__card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .hero {
    padding-top: 90px;
  }

  .hero__title {
    font-size: 28px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .beta__card {
    padding: var(--spacing-md);
  }

  .qr__code {
    width: 120px;
    height: 120px;
  }
}

/* ==========================================================================
   Accessibility & Focus States
   ========================================================================== */

.nav__link:focus-visible,
.nav__logo:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__shape {
    animation: none;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .header,
  .footer {
    display: none;
  }

  .hero {
    padding-top: 0;
    min-height: auto;
  }

  .hero__background {
    display: none;
  }
}
