/* Core shared styles, colors, layout, and components */
/* Font & Reset */
:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --card: #f6f7fb;
  --border: #e5e7eb;
  --primary: #4f46e5; /* Indigo-600 */
  --primary-600: #4338ca;
  --accent: #0ea5e9; /* Sky-500 */

  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.04);
}

body.dark {
  --bg: #0f172a;
  --text: #f3f4f6;
  --muted: #94a3b8;
  --card: #111827;
  --border: #1f2937;
  --primary: #6366f1;
  --primary-600: #4f46e5;
  --accent: #38bdf8;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.035), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.2) blur(6px);
  animation: fadeInDown 0.5s ease-out;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  justify-content: space-between;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.2px;
}
.logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5b4bdb;
  color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd84d;
  display: inline-block;
}
.logo-sub {
  display: inline-block;
  background: #1f2937;
  color: #fff;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
}

.nav-links {
  display: none;
  gap: 16px;
}
.nav-links a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  transition: all 0.25s ease;
}
.nav-links a[data-active="true"],
.nav-links a:hover {
  color: var(--text);
  background: var(--card);
}

@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  height: 38px;
  width: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0b1220;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
body:not(.dark) .icon-btn {
  background: #0b1220;
  color: #fff;
}
body.dark .icon-btn {
  background: #111827;
  color: #fff;
  border-color: #222;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.25);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.35);
}

/* Sections */
.section {
  padding: 60px 0;
}
.section-title {
  font-size: 28px;
  margin: 0 0 6px;
}
.section-sub {
  color: var(--muted);
  margin: 0 0 24px;
}

/* Buttons */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  font-weight: 600;
  transition: all 0.25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
}
.btn-primary:hover {
  filter: brightness(0.98);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--card);
  transform: translateY(-1px);
}
.btn-ghost.sm {
  padding: 8px 12px;
  font-weight: 500;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: #eef2ff;
  border-color: #dbeafe;
  transform: scale(1.05);
}

/* Cards */
.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 680px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.12);
}
.card .thumb {
  background: var(--card);
  height: 140px;
}
.card-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-title {
  margin: 0;
  font-size: 18px;
}
.card-text {
  margin: 0;
  color: var(--muted);
}
.tag {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  transition: all 0.2s ease;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}
.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111827;
}
.price {
  font-weight: 700;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Footer */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(79, 70, 229, 0.06));
}
.footer-grid {
  display: grid;
  gap: 18px;
  padding: 28px 0;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 840px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
  }
}
.footer-brand {
  margin: 0 0 8px;
}
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.link-list a {
  color: var(--muted);
}
.socials {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.socials a {
  transition: transform 0.2s ease, color 0.2s ease;
}
.socials a:hover {
  transform: translateY(-2px);
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 0;
  color: var(--muted);
}

/* Page hero */
.page-hero {
  padding: 42px 0 20px;
  position: relative;
}
.page-hero.compact {
  padding: 36px 0 16px;
}
.page-hero h1 {
  font-size: 40px;
  margin: 0 0 6px;
}
.page-hero .muted {
  margin: 0;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      1200px 300px at 10% 0%,
      rgba(79, 70, 229, 0.12),
      transparent 50%
    ),
    radial-gradient(
      1200px 300px at 90% 0%,
      rgba(14, 165, 233, 0.12),
      transparent 50%
    );
  pointer-events: none;
}

/* Utilities */
.muted {
  color: var(--muted);
}
.xsmall {
  font-size: 12px;
}
.hidden {
  display: none !important;
}

/* Animation keyframes and utility classes */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Animation utility classes */
.animate-fadeIn {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-fadeInUp {
  animation: fadeInUp 0.7s ease-out forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 0.7s ease-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.7s ease-out forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.7s ease-out forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Initial hidden state for scroll animations */
.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.animate-visible {
  animation: fadeInUp 0.7s ease-out forwards;
}

/* Stagger delays for multiple items */
.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

.animate-delay-5 {
  animation-delay: 0.5s;
}

.animate-delay-6 {
  animation-delay: 0.6s;
}
