/* Kaasi Landing Page - style.css (v3) */

/* --- Font & Root Variables --- */
:root {
  --brand-orange: #e67e26;
  --brand-orange-dark: #d35400;
  --bg-dark: #121212;
  --border-dark: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(24, 24, 27, 0.5); /* zinc-900/50 */
  --font-family-sans: "Satoshi", sans-serif;
}

/* --- Base Styles --- */
html {
  scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-family-sans);
    color: #a1a1aa; /* Tailwind zinc-400 */
    overflow-x: hidden;
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
}

#page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#content-wrapper {
  flex-grow: 1;
}

/* --- Animated Background & Aurora Overlay --- */
#bg-canvas {
  opacity: 0.3;
}

.aurora-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
      ellipse at 20% 80%,
      rgba(230, 126, 38, 0.1),
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 30%,
      rgba(59, 130, 246, 0.1),
      transparent 50%
    );
  opacity: 0.5;
  animation: aurora-pan 20s linear infinite alternate;
}

@keyframes aurora-pan {
  from {
    background-position: 0% 0%, 0% 0%;
  }
  to {
    background-position: 100% 100%, 100% 100%;
  }
}

/* --- Header & Navigation (FIXED BORDER) --- */
#header {
  --header-bg: transparent;
  background-color: var(--header-bg);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid transparent; /* Start with a transparent border */
  transition: background-color 0.3s ease, border-color 0.3s ease; /* Animate border color change */
}

#header.scrolled {
  --header-bg: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border-dark); /* Only change the color */
}

.nav-link {
  color: #a1a1aa; /* zinc-400 */
  position: relative;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: white;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--brand-orange);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* --- CTA Buttons --- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.cta-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.cta-button-large {
  display: inline-block;
  background-color: var(--brand-orange);
  color: white;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(230, 126, 38, 0.4);
}

.cta-button-large:hover {
  background-color: var(--brand-orange-dark);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 30px rgba(211, 84, 0, 0.5);
}

.cta-button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  border: 1px solid var(--border-dark);
  color: #d4d4d8; /* zinc-300 */
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.cta-button-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

/* --- Interactive Mockup --- */
#mockup-container {
  perspective: 1500px;
}

#mockup-image {
  transition: transform 0.1s linear;
  transform-style: preserve-3d;
}

/* --- Animations (FIXED) --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes scroll-animation {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  animation: scroll-animation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: var(--delay, 0s);
  animation-play-state: paused;
}

@supports (animation-timeline: view()) {
  .animate-on-scroll {
    animation-play-state: running;
    animation-timeline: view();
    animation-range-start: entry 10%;
    animation-range-end: cover 35%;
  }
}

/* --- Bento Grid Features (FINAL FIX) --- */
.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--border-dark);
  border-radius: 1.5rem; /* 24px */
  padding: 2rem; /* 32px */
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    800px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s;
  z-index: -1;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
}

.bento-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.bento-text {
  color: #a1a1aa; /* zinc-400 */
  line-height: 1.6;
  flex-grow: 1;
}

.bento-image-large {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1rem;
  margin-top: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-grid-pattern {
  background-size: 30px 30px;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* --- What's Next Section --- */
.next-feature-card {
  border: 1px solid var(--border-dark);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: background-color 0.3s ease, transform 0.3s ease;
  width: 260px; /* Give cards a consistent width */
  flex-shrink: 0;
}

.next-feature-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.next-feature-card i {
  font-size: 2rem;
  color: var(--brand-orange);
  margin-bottom: 1rem;
}

.next-feature-card h3 {
  color: white;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* --- Blog Card --- */
.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border-dark);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
  flex-shrink: 0;
}
.blog-card:hover .blog-card-image {
  transform: scale(1.05);
}

.blog-card-date {
  font-size: 0.875rem;
  color: #a1a1aa; /* zinc-400 */
  margin-bottom: 0.5rem;
  display: block;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.blog-card-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: #a1a1aa; /* zinc-400 */
}

/* --- Blog Post Article Styles --- */
.prose {
  font-size: 1.125rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.875rem;
  color: white;
  margin-top: 2.5em;
  margin-bottom: 1em;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: color 0.2s;
}
.prose a:hover {
  color: var(--brand-orange-dark);
}

.prose blockquote {
  border-left-color: var(--brand-orange);
  color: #d4d4d8; /* zinc-300 */
  font-style: italic;
  padding: 0.5rem 0 0.5rem 1.5rem;
}

.prose ul,
.prose ol {
  margin-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose strong {
  color: white;
}

/* --- Donate Modal Styles --- */
#donate-modal {
  transition: opacity 0.3s ease;
}
#donate-modal.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-content {
  transition: transform 0.3s ease;
  transform: scale(0.95);
}
#donate-modal:not(.hidden) .modal-content {
  transform: scale(1);
}
.copy-button.copied {
  background-color: #22c55e; /* green-500 */
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #18181b; /* zinc-900 */
}
::-webkit-scrollbar-thumb {
  background-color: #3f3f46; /* zinc-700 */
  border-radius: 10px;
  border: 2px solid #18181b;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #52525b; /* zinc-600 */
}
