/* Linknesis landing page — light/dark responsive stylesheet */

:root {
  --font-sans: 'Google Sans Flex Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-body: #121212;
  --bg-surface: #1e1e1e;
  --bg-surface-2: #252525;
  --bg-hero: #0d0d0d;
  --text-body: #e0e0e0;
  --text-muted: #9e9e9e;
  --border-color: #333333;
  --primary: #0d6efd;
  --primary-hover: #0b5ed7;
  --accent: #8ab4f8;
  --btn-shine: rgba(255, 255, 255, 0.25);
  --navbar-bg: rgba(18, 18, 18, 0.85);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --radius: 0.75rem;
  --transition: 0.2s ease;
}

html[data-bs-theme="light"] {
  --bg-body: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-surface-2: #f8f9fa;
  --bg-hero: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  --text-body: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --accent: #0d6efd;
  --navbar-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --btn-shine: rgba(255, 255, 255, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
  background-color: var(--navbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition: background-color var(--transition), border-color var(--transition);
}

.navbar-brand img {
  height: 28px;
  width: auto;
  filter: brightness(1.1);
}

html[data-bs-theme="light"] .navbar-brand img {
  filter: none;
}

.navbar-toggler {
  border-color: var(--border-color);
  color: var(--text-body);
}

.navbar-toggler-icon {
  filter: invert(1);
}

html[data-bs-theme="light"] .navbar-toggler-icon {
  filter: none;
}

.nav-link {
  color: var(--text-body);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent);
}

.btn-outline-theme {
  color: var(--text-body);
  border-color: var(--border-color);
  background: transparent;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-outline-theme:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero */
.hero {
  background: var(--bg-hero);
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(13, 110, 253, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.badge-pill {
  background: rgba(13, 110, 253, 0.15);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid rgba(13, 110, 253, 0.25);
}

html[data-bs-theme="light"] .badge-pill {
  background: rgba(13, 110, 253, 0.08);
  color: var(--primary);
}

.hero-logo {
  max-width: 320px;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.35));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

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

.btn-outline-secondary {
  color: var(--text-body);
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  background-color: var(--bg-surface-2);
  border-color: var(--border-color);
  color: var(--text-body);
}

.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--btn-shine),
    transparent
  );
  transform: rotate(25deg);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.btn:hover::after {
  opacity: 1;
  animation: btnShine 0.45s ease forwards;
}

@keyframes btnShine {
  0% { left: -60%; }
  100% { left: 140%; }
}

html[data-bs-theme="light"] .btn-outline-secondary::after,
html[data-bs-theme="light"] .btn-outline-primary::after {
  --btn-shine: rgba(13, 110, 253, 0.22);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-surface);
  transition: background-color var(--transition);
}

/* Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition);
}

.feature-card {
  padding: 0.5rem;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: rgba(13, 110, 253, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

html[data-bs-theme="light"] .feature-icon {
  background: rgba(13, 110, 253, 0.08);
  color: var(--primary);
}

/* Steps */
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.25);
}

/* Architecture diagram */
.arch-diagram {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: background-color var(--transition), border-color var(--transition);
}

.arch-layer,
.arch-box {
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border-color);
}

.arch-core {
  background: rgba(13, 110, 253, 0.15);
  color: var(--accent);
}

html[data-bs-theme="light"] .arch-core {
  background: rgba(13, 110, 253, 0.08);
  color: var(--primary);
}

.arch-box {
  background: var(--bg-surface);
  color: var(--text-body);
  font-weight: 500;
}

.arch-probe {
  background: rgba(25, 135, 84, 0.12);
  color: #20c997;
}

html[data-bs-theme="light"] .arch-probe {
  background: rgba(25, 135, 84, 0.08);
  color: #198754;
}

.arch-conn {
  color: var(--text-muted);
  padding: 0.5rem 0;
  font-size: 1.25rem;
}

.arch-list .arch-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

html[data-bs-theme="light"] .arch-list .arch-icon {
  background: rgba(13, 110, 253, 0.08);
  color: var(--primary);
}

/* Pricing */
.pricing-card {
  text-align: center;
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  transform: scale(1.02);
}

.badge-popular {
  background: var(--primary);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card ul li {
  padding: 0.35rem 0;
  color: var(--text-muted);
}

.pricing-card ul li i {
  margin-right: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--bg-surface-2);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
  transition: background-color var(--transition), border-color var(--transition);
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent);
}

.footer h4 {
  color: var(--text-body);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  margin-right: 0.5rem;
  transition: transform var(--transition), border-color var(--transition);
}

.social-links a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.footer hr {
  border-color: var(--border-color);
}

/* Form */
.form-control {
  background-color: var(--bg-surface);
  color: var(--text-body);
  border-color: var(--border-color);
}

.form-control:focus {
  background-color: var(--bg-surface);
  color: var(--text-body);
  border-color: var(--primary);
}

/* Utilities */
.text-muted {
  color: var(--text-muted) !important;
}

.lead {
  color: var(--text-muted);
}

/* Lazy image placeholders */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}

/* Responsive */
@media (max-width: 991.98px) {
  .hero {
    padding-top: 6rem;
    text-align: center;
  }

  .hero-logo {
    max-width: 220px;
    margin-top: 1.5rem;
  }

  .navbar-collapse {
    background-color: var(--bg-surface);
    border-radius: var(--radius);
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
  }

  .navbar-collapse .nav-item:last-child .btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 575.98px) {
  .hero {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero .btn {
    width: 100%;
  }

  .pricing-card.featured {
    transform: none;
  }
}

/* Scroll-driven reveal animations (native CSS) */
@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Hero entrance on page load */
.reveal-hero {
  opacity: 0;
  animation: revealUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.reveal-hero-delay {
  opacity: 0;
  animation: revealUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
}

@supports (animation-timeline: view()) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    will-change: transform, opacity;
  }

  .reveal-up {
    opacity: 0;
    animation: revealUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  .reveal-left {
    opacity: 0;
    animation: revealLeft 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  .reveal-right {
    opacity: 0;
    animation: revealRight 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  /* Staggered left-to-right reveals (pricing, how it works) */
  .reveal-stagger-1 { animation-range: entry 0% cover 25%; }
  .reveal-stagger-2 { animation-range: entry 0% cover 35%; }
  .reveal-stagger-3 { animation-range: entry 0% cover 45%; }
}

/* Hover lift for interactive elements */
.nav-link,
.navbar-brand,
.btn,
.footer a,
.social-links a {
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.navbar-brand:hover,
.btn:hover,
.footer a:hover,
.social-links a:hover {
  transform: translateY(-3px);
}

.navbar-brand {
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-logo {
    animation: none;
  }

  .reveal-up,
  .reveal-left,
  .reveal-right,
  .reveal-hero,
  .reveal-hero-delay {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .nav-link:hover,
  .navbar-brand:hover,
  .btn:hover,
  .footer a:hover,
  .social-links a:hover {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
