/* =========================
   THEME VARIABLES
========================= */

:root {
  --bg: #0b0d12;
  --text: #ffffff;
  --muted: #9ca3af;
  --card: #121621;
  --card-hover: #161b2b;
  --border: #1f2937;
  --accent: #3b82f6;
  --accent-2: #38bdf8;
}

body.light {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --card-hover: #e5e7eb;
  --border: #d1d5db;
  --accent: #2563eb;
  --accent-2: #38bdf8;
}

/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition:
    background 0.35s ease,
    color 0.35s ease;
}

/* =========================
   TOP BAR
========================= */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}

.logo {
  font-weight: 700;
  font-size: 18px;
}

.controls {
  display: flex;
  gap: 10px;
}

.controls button {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.controls button:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

/* =========================
   HERO
========================= */

.hero {
  padding: 90px 40px;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-2)
  );
  color: #ffffff;

  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  opacity: 0.95;
}

/* =========================
   TOOLS GRID
========================= */

.tools-grid {
  padding: 70px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.tool-card {
  background: var(--card);
  border-radius: 18px;
  padding: 30px;
  cursor: pointer;
  opacity: 0;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease;
}

.tool-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 20px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.tool-card:hover {
  transform: translateY(-6px) scale(1.015);
  background: var(--card-hover);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

/* =========================
   FOOTER
========================= */

.footer {
  border-top: 1px solid var(--border);
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.footer-links a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* =========================
   ANIMATIONS
========================= */

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

.animate-hero {
  animation: fadeUp 0.8s ease-out both;
}

.animate-card {
  animation: fadeUp 0.6s ease-out forwards;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .tools-grid {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .topbar {
    padding: 20px;
  }

  .footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* =========================
   ACCESSIBILITY
========================= */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* =========================
   CARD HOVER GRADIENT
========================= */

.tool-card {
  position: relative;
  overflow: hidden;
}

/* сам градиент */
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.18),
    rgba(59, 130, 246, 0.18)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* показываем при hover */
.tool-card:hover::before {
  opacity: 1;
}

/* контент поверх градиента */
.tool-card > * {
  position: relative;
  z-index: 1;
}
body.light .tool-card::before {
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.12),
    rgba(59, 130, 246, 0.12)
  );
}
/* =========================
   FLYING PLANE
========================= */

.plane-wrapper {
  position: absolute;
  top: 40%;
  left: -10%;
  width: 100%;
  pointer-events: none;
  overflow: visible;
.plane-wrapper {
  z-index: 0;
}

.hero h1,
.hero p {
  position: relative;
  z-index: 1;
}
}

.plane {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.85);
  animation: flyPlane 8s linear infinite;
}

/* анимация полёта */
@keyframes flyPlane {
  0% {
    transform: translateX(0) translateY(0) rotate(5deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  50% {
    transform: translateX(55vw) translateY(-20px) rotate(2deg);
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateX(110vw) translateY(10px) rotate(-3deg);
    opacity: 0;
  }
}
