/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0b0d14;
  --surface: #131722;
  --card-bg: #1a1f2f;
  --text-primary: #f0f3fa;
  --text-secondary: #b7c0d4;
  --gold: #f5b342;
  --gold-dim: rgba(245, 179, 66, 0.15);
  --gold-glow: rgba(245, 179, 66, 0.3);
  --border-subtle: #2a3145;
  --radius: 18px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================
   AMBIENT BACKGROUND LAYERS
   ============================================ */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 179, 66, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(245, 179, 66, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(30, 40, 70, 0.5) 0%, transparent 60%);
  pointer-events: none;
}

.spark-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.spark {
  position: absolute;
  bottom: -10px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold-glow);
  opacity: 0;
  animation: sparkFloat linear infinite;
  pointer-events: none;
}

@keyframes sparkFloat {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.6);
  }
  15% {
    opacity: 1;
    transform: translateY(-20vh) translateX(var(--drift)) scale(1);
  }
  70% {
    opacity: 0.8;
    transform: translateY(-70vh) translateX(calc(var(--drift) * 0.7)) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translateY(-110vh) translateX(calc(var(--drift) * 0.4)) scale(0.3);
  }
}

.lightning-flash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(circle at 60% 40%, rgba(255, 230, 180, 0.25) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.08s ease, transform 0.08s ease;
  mix-blend-mode: overlay;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 13, 20, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}
.logo .bolt {
  color: var(--gold);
}

.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.menu a:hover,
.menu a:focus {
  color: #fff;
}
.menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.menu a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 6px;
  transition: background var(--transition);
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}
.hamburger-line {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 4px;
  transition: all var(--transition);
  transform-origin: center;
}
.nav-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================
   SECTIONS — COMMON
   ============================================ */
section {
  position: relative;
  z-index: 2;
  padding: 6rem 2rem 5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 0.3rem 1rem;
  border-radius: 40px;
  margin-bottom: 1rem;
  border: 1px solid rgba(245, 179, 66, 0.15);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 1.2rem;
}
h1 .accent {
  color: var(--gold);
  background: linear-gradient(135deg, var(--gold), #ffd966);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   HOME / HERO
   ============================================ */
.home {
  padding-top: 9rem;
  text-align: center;
}
.home-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.hero-sub .highlight {
  color: #fff;
  font-weight: 500;
  background: linear-gradient(90deg, var(--gold), #ffd966);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.terminal-frame {
  width: 100%;
  max-width: 780px;
  margin: 2rem auto 2.5rem;
  background: #0f121c;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1.2rem;
  background: #171e2b;
  border-bottom: 1px solid var(--border-subtle);
}
.terminal-bar span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-bar span:nth-child(1) {
  background: #ff5f56;
}
.terminal-bar span:nth-child(2) {
  background: #ffbd2e;
}
.terminal-bar span:nth-child(3) {
  background: #27c93f;
}
.terminal-title {
  margin-left: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.terminal-frame video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.home h3 {
  max-width: 740px;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
}
.btn .bolt-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gold);
  color: #0b0d14;
  box-shadow: 0 4px 20px rgba(245, 179, 66, 0.35);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 35px rgba(245, 179, 66, 0.5);
}

.btn-ghost {
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
}
.btn-ghost:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
  transform: translateY(-3px);
}

/* ============================================
   ABOUT
   ============================================ */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}

.about-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  background: var(--surface);
}
.img-fallback {
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  border: 1px dashed var(--border-subtle);
}

.about-body h1 {
  margin-bottom: 0.5rem;
}
.about-copy p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}
.about-copy strong {
  color: #fff;
}

.stack-trace {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.8rem;
  background: var(--surface);
  padding: 1.2rem 1.8rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  margin: 1.8rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.stack-trace b {
  color: var(--gold);
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.skill-tags span {
  background: var(--card-bg);
  padding: 0.4rem 1.2rem;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
}
.skill-tags span:hover {
  border-color: var(--gold);
  color: #fff;
  background: var(--gold-dim);
}

/* ============================================
   SERVICES / PRICING CARDS
   ============================================ */
.services {
  background: rgba(19, 23, 34, 0.4);
  border-radius: 40px 40px 0 0;
  padding-bottom: 6rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.card-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.8rem;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-item:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 179, 66, 0.04);
}
.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(245, 179, 66, 0.06), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.card-item:hover .card-glow {
  opacity: 1;
}

.service-icon {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}
.card-item h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.service-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1.2rem;
}
.price-tag {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.2rem;
  margin-top: auto;
}
.price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
}
.price .dollar {
  font-size: 1.2rem;
  color: var(--gold);
  margin-right: 2px;
}
.unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: right;
  line-height: 1.4;
}

/* ============================================
   TOOLS
   ============================================ */
.ourtools {
  background: var(--bg-dark);
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 1.8rem;
  align-items: center;
  margin-top: 2rem;
}
.tools-grid div {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface);
  padding: 1rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
  aspect-ratio: 1/1;
}
.tools-grid div:hover {
  border-color: var(--gold);
  transform: scale(1.05);
  background: var(--card-bg);
}
.tools-grid img {
  max-width: 55px;
  max-height: 55px;
  object-fit: contain;
  filter: grayscale(0.15) brightness(0.85);
  transition: filter var(--transition);
}
.tools-grid div:hover img {
  filter: grayscale(0) brightness(1);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  background: rgba(19, 23, 34, 0.3);
  border-radius: 40px 40px 0 0;
}
.contact-inner {
  text-align: center;
}
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 2.5rem 0 2rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  min-width: 220px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
  gap: 0.3rem;
}
.contact-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.contact-icon {
  font-size: 2.2rem;
}
.contact-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.contact-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}
.contact-arrow {
  color: var(--gold);
  font-size: 1.4rem;
  margin-top: 0.2rem;
  transition: transform var(--transition);
}
.contact-card:hover .contact-arrow {
  transform: translateX(6px);
}
.contact-card .card-glow {
  background: radial-gradient(circle at 50% 30%, rgba(245, 179, 66, 0.08), transparent 70%);
}

.contact-extra a {
  color: var(--gold);
  font-weight: 500;
  border-bottom: 1px dashed var(--gold-dim);
}
.contact-extra a:hover {
  border-bottom-color: var(--gold);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: var(--bg-dark);
}
.site-footer .bolt {
  color: var(--gold);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-media {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }
  .menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(11, 13, 20, 0.96);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    gap: 1.8rem;
    transform: translateY(-120%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  }
  .menu.is-open {
    transform: translateY(0);
  }
  .menu a {
    font-size: 1.1rem;
  }

  .home {
    padding-top: 7rem;
  }
  .terminal-frame {
    max-width: 100%;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 1rem;
  }
  .contact-card {
    min-width: 180px;
    padding: 1.5rem 1.8rem;
  }
}

@media (max-width: 640px) {
  section {
    padding: 4rem 1.2rem;
  }
  .navbar {
    padding: 0 1rem;
  }
  .logo {
    font-size: 1.2rem;
  }
  .home h1 {
    font-size: 2rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .home h3 {
    font-size: 0.95rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tools-grid div {
    aspect-ratio: 1/1;
    padding: 0.5rem;
  }
  .tools-grid img {
    max-width: 40px;
    max-height: 40px;
  }
  .contact-grid {
    flex-direction: column;
    align-items: center;
  }
  .contact-card {
    width: 100%;
    max-width: 320px;
  }
  .stack-trace {
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.2rem;
  }
  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }
  .cta-row {
    flex-direction: column;
    width: 100%;
  }
  .cta-row .btn {
    width: 100%;
    justify-content: center;
  }
}