/* ===================================
   RunTask.work — Design System & Styles
   =================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --bg-primary: #07070f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #f0f0f5;
  --text-secondary: #9595b0;
  --text-muted: #5a5a78;

  --accent-1: #6366f1;   /* indigo */
  --accent-2: #8b5cf6;   /* violet */
  --accent-3: #06b6d4;   /* cyan */
  --accent-4: #a855f7;   /* purple */

  --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --gradient-accent: linear-gradient(135deg, var(--accent-3), var(--accent-1));
  --gradient-glow: linear-gradient(135deg, var(--accent-1), var(--accent-3));

  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(99, 102, 241, 0.3);

  /* Spacing */
  --section-py: 120px;
  --container-max: 1200px;
  --container-px: 24px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

img { max-width: 100%; height: auto; }

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

.btn--outline {
  background: transparent;
  color: var(--accent-1);
  border: 1px solid var(--accent-1);
}

.btn--outline:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  z-index: 1001;
}

.logo-icon {
  font-size: 1.3rem;
}

.logo-highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.navbar__links a:not(.btn):hover {
  color: var(--text-primary);
}

.navbar__links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar__links a:not(.btn):hover::after {
  width: 100%;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 6px;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero__bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.hero__orb--1 {
  width: 500px;
  height: 500px;
  background: var(--accent-1);
  top: -10%;
  right: -5%;
  opacity: 0.15;
  animation: float 12s ease-in-out infinite;
}

.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: var(--accent-3);
  bottom: 0;
  left: -5%;
  opacity: 0.1;
  animation: float 15s ease-in-out infinite reverse;
}

.hero__orb--3 {
  width: 300px;
  height: 300px;
  background: var(--accent-2);
  top: 40%;
  left: 30%;
  opacity: 0.08;
  animation: float 18s ease-in-out infinite 3s;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-3);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 100px;
  background: rgba(6, 182, 212, 0.05);
  margin-bottom: 32px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat__number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- SECTIONS (common) ---------- */
.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section__tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-1);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 100px;
  margin-bottom: 20px;
}

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section__description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- ABOUT ---------- */
.section--about {
  background: var(--bg-secondary);
}

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

.about__card {
  padding: 40px 32px;
  text-align: center;
  transition: var(--transition);
}

.about__card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
}

.about__icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.about__card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.about__card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

.service-card {
  position: relative;
  padding: 44px 32px 40px;
  overflow: hidden;
  transition: var(--transition);
}

.service-card__glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.06), transparent 60%);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

.service-card:hover .service-card__glow {
  opacity: 1;
}

.service-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.08);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  margin-bottom: 24px;
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.service-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.service-card__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-card__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.service-card__features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-primary);
  flex-shrink: 0;
}

/* ---------- TECHNOLOGIES ---------- */
.section--tech {
  background: var(--bg-secondary);
}

.tech__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.tech-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.08);
}

.tech-item i {
  font-size: 3rem;
  transition: var(--transition);
}

.tech-item:hover i {
  transform: scale(1.15);
}

.tech-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.tech-item:hover span {
  color: var(--text-primary);
}

/* White color for Next.js icon in dark theme */
.tech-item .devicon-nextjs-plain {
  color: var(--text-primary);
}

/* ---------- CONTACT ---------- */
.contact__wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 64px;
  overflow: hidden;
}

.contact__content {
  position: relative;
  z-index: 1;
}

.contact__content .section__tag { margin-bottom: 16px; }

.contact__content .section__title {
  text-align: left;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 16px;
}

.contact__content .section__description {
  text-align: left;
  margin-bottom: 32px;
  max-width: 500px;
}

.contact__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.contact__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.contact__orb {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.3;
  filter: blur(40px);
  animation: pulse 4s ease-in-out infinite;
}

.contact__ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

.contact__ring--2 {
  width: 280px;
  height: 280px;
  border-color: rgba(6, 182, 212, 0.1);
  animation-duration: 30s;
  animation-direction: reverse;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border-color);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 48px;
}

.footer__brand p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
  line-height: 1.6;
}

.footer__links {
  display: flex;
  gap: 80px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer__col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
}

.footer__bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__domain {
  color: var(--accent-1) !important;
  font-weight: 600;
}

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-py: 80px;
  }

  .about__grid,
  .services__grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }

  .tech__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .contact__wrapper {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 48px 32px;
  }

  .contact__content .section__title,
  .contact__content .section__description {
    text-align: center;
    max-width: none;
  }

  .contact__actions {
    align-items: center;
  }

  .contact__visual {
    display: none;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer__brand p {
    max-width: none;
  }

  .footer__links {
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-py: 64px;
    --container-px: 20px;
  }

  .navbar__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    background: rgba(7, 7, 15, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-color);
    padding: 40px;
    transition: var(--transition-slow);
  }

  .navbar__links.open {
    right: 0;
  }

  .navbar__links a {
    font-size: 1.1rem;
  }

  .navbar__toggle {
    display: flex;
  }

  .navbar__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .navbar__toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .navbar__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .hero__stats {
    gap: 32px;
  }

  .tech__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .tech-item {
    padding: 24px 12px;
  }

  .tech-item i {
    font-size: 2.2rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .tech__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__stats {
    flex-direction: column;
    gap: 24px;
  }

  .contact__wrapper {
    padding: 32px 20px;
  }

  .contact__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
