/* ==========================================================================
   Homepage Styles — Dark + Green
   Uses design tokens from styles.css
   ========================================================================== */

/* ====== Hero ====== */
.hero {
  padding: 140px 0 80px;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 900px;
  height: 600px;
  background: radial-gradient(
    ellipse,
    rgba(184, 255, 87, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-secondary {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.hero-secondary:hover {
  color: var(--accent);
}

/* ====== Chat Mockup ====== */
.chat-mockup {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.3),
    0 0 80px rgba(184, 255, 87, 0.03);
  overflow: hidden;
  max-width: 380px;
  margin-left: auto;
}

.chat-header {
  background: var(--bg-elevated);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.8125rem;
}

.chat-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
}

.chat-status {
  font-size: 0.75rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.chat-body {
  padding: 20px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  animation: msgIn 0.4s ease forwards;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}

.msg-bot {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg-delay-1 {
  animation-delay: 0.6s;
}
.msg-delay-2 {
  animation-delay: 1.8s;
}
.msg-delay-3 {
  animation-delay: 3.6s;
}
.msg-delay-4 {
  animation-delay: 5.4s;
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  opacity: 0;
}

.typing span {
  width: 6px;
  height: 6px;
  background: var(--text-tertiary);
  border-radius: 50%;
  animation: typDot 1.4s infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}

.typing-1 {
  animation:
    typShow 0.3s 1.2s forwards,
    typHide 0.3s 1.7s forwards;
}
.typing-2 {
  animation:
    typShow 0.3s 3s forwards,
    typHide 0.3s 3.5s forwards;
}
.typing-3 {
  animation:
    typShow 0.3s 4.8s forwards,
    typHide 0.3s 5.3s forwards;
}

@keyframes msgIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes typDot {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}
@keyframes typShow {
  to {
    opacity: 1;
  }
}
@keyframes typHide {
  to {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* ====== Social Proof ====== */
.social-proof {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-proof-label {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 24px;
}

.logo-marquee {
  overflow: hidden;
  position: relative;
}

.logo-marquee::before,
.logo-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
}
.logo-marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-primary), transparent);
}

.logo-track {
  display: flex;
  gap: 64px;
  align-items: center;
  animation: marquee 20s linear infinite;
  width: max-content;
}

.client-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  user-select: none;
}

.client-logo-img {
  height: 28px;
  width: auto;
  opacity: 0.4;
  filter: grayscale(1);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ====== Section Headers ====== */
.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* ====== How It Works ====== */
.how-it-works {
  padding: 100px 0;
}

.step-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}

.step-panel:last-child {
  margin-bottom: 0;
}
.step-panel.reverse {
  direction: rtl;
}
.step-panel.reverse > * {
  direction: ltr;
}

.step-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8125rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.step-number::before {
  content: attr(data-step);
  width: 28px;
  height: 28px;
  background: var(--accent-muted);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
}

.step-panel h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.step-panel p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-visual {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-placeholder {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 24px;
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-md);
  margin: 24px;
  width: calc(100% - 48px);
}

/* ====== Scroll Reveal ====== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ====== Product Showcase Tabs ====== */
.product-showcase {
  padding: 100px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tabs {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 14px 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}

.tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
  background: rgba(184, 255, 87, 0.04);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.tab-screenshot {
  background: linear-gradient(
    135deg,
    var(--bg-elevated) 0%,
    rgba(184, 255, 87, 0.03) 100%
  );
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 60px rgba(184, 255, 87, 0.02);
}

.tab-screenshot-placeholder {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 32px;
  border: 1.5px dashed var(--border-hover);
  border-radius: var(--radius-md);
  margin: 24px;
  background: rgba(255, 255, 255, 0.01);
}

.tab-info h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.tab-info p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}
.tab-info {
  padding: 8px 0;
}

.tab-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-features li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.tab-features li::before {
  content: "";
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--accent-muted);
  border-radius: var(--radius-full);
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8ff57' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ====== Capabilities ====== */
.capabilities-section {
  padding: 100px 0;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.capability-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.capability-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px rgba(184, 255, 87, 0.04);
}

.capability-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.capability-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.capability-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ====== Testimonial ====== */
.testimonial-section {
  padding: 100px 0;
  background: linear-gradient(
    135deg,
    rgba(184, 255, 87, 0.04) 0%,
    rgba(34, 197, 94, 0.03) 100%
  );
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.testimonial-slider {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.testimonial-slide {
  display: none;
  animation: testimonialFadeIn 0.5s ease;
}

.testimonial-slide.active {
  display: block;
}

@keyframes testimonialFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-hover);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.testimonial-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.testimonial-content {
  text-align: center;
}

.testimonial-qmark {
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--accent);
  line-height: 0.5;
  margin-bottom: 24px;
  opacity: 0.5;
}

.testimonial-text {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--bg-primary);
}

.testimonial-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}
.testimonial-author-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
}
.testimonial-author-info p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: left;
}

/* ====== Blog ====== */
.blog-section {
  padding: 100px 0;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

.blog-header-text h2 {
  margin-bottom: 8px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.blog-card:hover {
  border-color: var(--border-hover);
}
.blog-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card-body {
  padding: 24px;
}
.blog-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.blog-card-tags span {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.blog-card-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-card-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.blog-card-link:hover {
  gap: 10px;
}

/* ====== FAQ ====== */
.faq-section {
  padding: 100px 0;
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  cursor: pointer;
  user-select: none;
}

.faq-question h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  padding-right: 16px;
}

.faq-toggle {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  background: var(--text-secondary);
  transition: transform 0.2s;
}

.faq-toggle::before {
  width: 12px;
  height: 1.5px;
}
.faq-toggle::after {
  width: 1.5px;
  height: 12px;
}
.faq-item.open .faq-toggle {
  border-color: var(--accent);
  background: var(--accent-muted);
}
.faq-item.open .faq-toggle::before {
  background: var(--accent);
}
.faq-item.open .faq-toggle::after {
  background: var(--accent);
  transform: rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 24px;
}
.faq-answer p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ====== Final CTA ====== */
.final-cta {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(184, 255, 87, 0.06) 0%,
    var(--bg-surface) 100%
  );
  border-top: 1px solid var(--border);
}

.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.final-cta p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .chat-mockup {
    margin: 0 auto;
  }
  .step-panel {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .step-panel.reverse {
    direction: ltr;
  }
  .tab-content {
    grid-template-columns: 1fr;
  }
  .capabilities-grid {
    grid-template-columns: 1fr;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .how-it-works,
  .product-showcase,
  .capabilities-section,
  .testimonial-section,
  .blog-section,
  .faq-section,
  .final-cta {
    padding: 60px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .msg {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .typing {
    display: none;
  }
  .logo-track {
    animation: none;
  }
}
