@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;500;700;800&family=Space+Grotesk:wght@600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg-base:        #030712;
  --bg-surface:     #111827;
  --accent:         #2563eb;
  --accent-glow:    rgba(37,99,235,0.5);
  --font-sans:      "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display:   "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-logo:      "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono:      "Inter", ui-monospace, SFMono-Regular, monospace;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: #f3f4f6;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(37,99,235,0.3); }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ─── Layout Helpers ────────────────────────────────────────────────────── */
.container {
  max-width: 80rem;   /* 1280px */
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container-md {
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ─── Background Layer ──────────────────────────────────────────────────── */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, black 0%, transparent 100%);
  mask-image:         radial-gradient(ellipse 60% 70% at 50% 30%, black 0%, transparent 100%);
}
.bg-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 50%);
  opacity: 0.4;
  filter: blur(48px);
  border-radius: 50%;
}

/* ─── Navbar ────────────────────────────────────────────────────────────── */
nav {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  z-index: 50;
  padding-top: 1rem;
}
.nav-inner {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo svg { color: #3b82f6; }
.nav-logo span {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
}
.nav-links a:hover { color: #fff; }
.nav-links a { transition: color .2s; }
.btn-nav {
  padding: 0.625rem 1.25rem;
  background: #fff;
  color: #000;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background .2s;
}
.btn-nav:hover { background: #e5e7eb; }

.nav-hamburger {
  display: flex;
  color: #9ca3af;
  transition: color .2s;
}
.nav-hamburger:hover { color: #fff; }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 5rem;
  left: 0;
  width: 100%;
  background: var(--bg-base);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 0;
  z-index: 49;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: #9ca3af;
  padding: 0.5rem 0;
  transition: color .2s;
}
.mobile-menu a:hover { color: #fff; }
.mobile-menu .btn-nav {
  width: 100%;
  text-align: center;
  padding: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .nav-links        { display: flex; }
  .nav-hamburger    { display: none; }
  .mobile-menu      { display: none !important; }
}

/* ─── Main wrapper ──────────────────────────────────────────────────────── */
main { position: relative; z-index: 10; flex-grow: 1; }
main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, rgba(37,99,235,0.05));
  pointer-events: none;
  z-index: -1;
}
#root-wrap { display: flex; flex-direction: column; min-height: 100vh; }

/* ─── Hero Section ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 10rem;
  padding-bottom: 8rem;
  padding-inline: 1.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .hero { padding-top: 14rem; padding-bottom: 12rem; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.1);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}
.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(34,197,94,0.8);
  animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 2rem;
}
@media (min-width: 1024px) { .hero h1 { font-size: 6.5rem; } }

.hero h1::after {
  content: "";
  position: absolute;
  width: clamp(100px, 14vw, 180px);
  aspect-ratio: 1.35;
  top: -25%;
  left: 11%;
  background: url("assets/shootingstar.webp") center / contain no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.85;
  filter: saturate(0.6) brightness(1.2);
}
.hero h1 {
  position: relative;
}
@media (max-width: 639px) {
  .hero h1::after { display: none; }
}

.text-gradient {
  background: linear-gradient(to right, #fff, #bfdbfe, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: #9ca3af;
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 3rem;
  line-height: 1.75;
}
@media (min-width: 768px) { .hero p { font-size: 1.25rem; } }

.hero-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
@media (min-width: 640px) { .hero-btns { flex-direction: row; } }

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  min-width: 12rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
}
@media (min-width: 640px) { .btn-primary, .btn-secondary { width: auto; } }

.btn-primary {
  background: #2563eb;
  color: #fff;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: #3b82f6; }
.btn-primary svg { transition: transform .2s; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.10); }

/* ─── Hero Midnight Icons ───────────────────────────────────────────────── */
.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }

.hero-icon {
  position: absolute;
  color: rgba(147, 197, 253, 0.18);
}
.hero-moon {
  width: 38px;
  height: 38px;
  top: 28%;
  right: 24%;
  animation: float 8s ease-in-out infinite;
}
.hero-star {
  animation: twinkle 4s ease-in-out infinite;
}
.hero-star-1 {
  width: 20px;
  height: 20px;
  top: 25%;
  left: 15%;
  animation-delay: 0s;
}
.hero-star-2 {
  width: 14px;
  height: 14px;
  top: 12%;
  left: 30%;
  animation-delay: 1.5s;
}
.hero-star-3 {
  width: 16px;
  height: 16px;
  bottom: 30%;
  right: 18%;
  animation-delay: 3s;
}

/* Small dot stars */
.hero-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(147, 197, 253, 0.25);
  animation: twinkle 3s ease-in-out infinite;
}
.hero-dot-1 { top: 15%; left: 8%;  animation-delay: 0.5s; }
.hero-dot-2 { top: 35%; right: 8%; animation-delay: 1s; }
.hero-dot-3 { top: 10%; left: 55%; animation-delay: 2s; }
.hero-dot-4 { top: 40%; left: 22%; animation-delay: 2.5s; }
.hero-dot-5 { bottom: 25%; left: 10%; animation-delay: 0.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Hide decorative icons on small screens */
@media (max-width: 639px) {
  .hero-stars { display: none; }
}

/* ─── IDE Preview ────────────────────────────────────────────────────────── */
.ide-section {
  padding-inline: 1.5rem;
  padding-bottom: 5rem;
}
.ide-wrapper {
  max-width: 56rem;
  margin-inline: auto;
  position: relative;
}
.ide-glow {
  position: absolute;
  inset: -16px;
  background: linear-gradient(135deg, #3b82f6, #6366f1, #9333ea);
  border-radius: 1.5rem;
  filter: blur(36px);
  opacity: 0.25;
  animation: ideGlow 6s ease-in-out infinite;
}
@keyframes ideGlow {
  0%, 100% { opacity: 0.2;  transform: scale(1); }
  50%      { opacity: 0.3;  transform: scale(1.02); }
}
.ide-shell {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(10,15,28,0.95);
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.ide-titlebar {
  height: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  justify-content: space-between;
  flex-shrink: 0;
}
.ide-dots { display: flex; gap: 0.5rem; }
.ide-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.dot-red    { background: rgba(239,68,68,0.8); }
.dot-yellow { background: rgba(234,179,8,0.8); }
.dot-green  { background: rgba(34,197,94,0.8); }
.ide-filename {
  color: #9ca3af;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
}
.ide-filename svg { color: #60a5fa; }
.ide-body {
  display: flex;
  flex: 1;
  min-height: 450px;
}
.ide-sidebar {
  width: 14rem;
  border-right: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.01);
  display: none;
  flex-direction: column;
  padding: 1rem 0.75rem;
  gap: 0.375rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
@media (min-width: 768px) { .ide-sidebar { display: flex; } }
.sidebar-heading {
  color: #6b7280;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.625rem;
  margin-bottom: 0.75rem;
  padding-inline: 0.5rem;
}
.sidebar-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background .15s;
}
.sidebar-file:hover { background: rgba(255,255,255,0.05); }
.sidebar-file.active {
  background: rgba(59,130,246,0.1);
  color: #e5e7eb;
  border: 1px solid rgba(59,130,246,0.2);
}
.ext-ts    { color: #60a5fa; font-weight: 700; }
.ext-js    { color: #facc15; font-weight: 700; }
.ext-json  { color: #4ade80; font-weight: 700; }
.ext-swift { color: #f97316; font-weight: 700; }
.tok-gray  { color: #6b7280; font-style: italic; }

.sidebar-file {
  user-select: none;
}

.code-area {
  animation: fadePanel .25s ease;
}
@keyframes fadePanel {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ide-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.code-area {
  flex: 1;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  overflow: hidden;
}
.line-numbers {
  display: flex;
  flex-direction: column;
  color: #4b5563;
  text-align: right;
  user-select: none;
  opacity: 0.5;
  flex-shrink: 0;
}
.line-numbers span { line-height: 1.625; font-size: 0.8125rem; }
.code-lines {
  display: flex;
  flex-direction: column;
  color: #d1d5db;
  white-space: pre;
  font-size: 0.8125rem;
  line-height: 1.625;
  overflow: hidden;
}
.code-lines .line { display: block; }
.tok-purple  { color: #c084fc; }
.tok-blue    { color: #93c5fd; }
.tok-green   { color: #86efac; }
.tok-yellow  { color: #fde047; }
.tok-orange  { color: #fb923c; }
.tok-blue2   { color: #60a5fa; }

.ide-terminal {
  height: 10rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: #050810;
  padding: 1rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  overflow: hidden;
  flex-shrink: 0;
}
.term-tabs {
  display: flex;
  gap: 1.5rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
}
.term-tab-active {
  color: #e5e7eb;
  border-bottom: 2px solid #60a5fa;
  margin-bottom: -0.5rem;
  padding-bottom: 0.375rem;
}
.term-tabs span { cursor: pointer; transition: color .15s; }
.term-tabs span:hover { color: #d1d5db; }
.t-green  { color: #4ade80; }
.t-gray   { color: #9ca3af; }
.t-blue   { color: #60a5fa; }
.t-white  { color: #f3f4f6; }
.term-cursor {
  display: inline-block;
  width: 0.5rem;
  height: 1rem;
  background: #9ca3af;
  vertical-align: text-bottom;
  animation: pulse 1.2s steps(1) infinite;
}

/* ─── Services Section ──────────────────────────────────────────────────── */
.services-section {
  padding-block: 8rem;
  background: var(--bg-base);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.services-section .container { position: relative; }
.services-intro {
  margin-bottom: 5rem;
}
@media (min-width: 768px) { .services-intro { max-width: 66%; } }
.services-intro h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.875rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.services-intro p {
  color: #9ca3af;
  font-size: 1.125rem;
  line-height: 1.75;
}
@media (min-width: 768px) { .services-intro p { font-size: 1.25rem; } }

.services-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  padding: 2rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background .2s;
}
.service-card:hover { background: rgba(255,255,255,0.04); }
.service-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: rgba(59,130,246,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform .2s;
}
.service-card:hover .service-icon-wrap { transform: scale(1.1); }
.service-icon-wrap svg { color: #60a5fa; }
.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.service-card p {
  color: #9ca3af;
  line-height: 1.625;
}

/* ─── CTA Section ───────────────────────────────────────────────────────── */
.cta-section {
  padding-block: 16rem;
  position: relative;
  text-align: center;
}
.cta-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -24rem;
  height: 24rem;
  background: linear-gradient(to bottom, transparent, rgba(37,99,235,0.08));
  pointer-events: none;
  z-index: 1;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(37,99,235,0.08) 0%, rgba(37,99,235,0.12) 100%);
}
.cta-glow-orb {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: rgba(59,130,246,0.2);
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}
.cta-section .container-md { position: relative; z-index: 10; }
.cta-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 4rem);
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}
.cta-section p {
  font-size: 1.25rem;
  color: #d1d5db;
  margin-bottom: 2.5rem;
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}
.btn-cta {
  display: inline-block;
  padding: 1.25rem 2.5rem;
  background: #fff;
  color: #000;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1.125rem;
  transition: background .6s ease, box-shadow .8s ease;
  box-shadow: 0 0 40px rgba(255,255,255,0.3);
}
.btn-cta:hover {
  background: #e5e7eb;
  box-shadow: 0 0 60px rgba(255,255,255,0.5);
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg-base);
  position: relative;
  z-index: 20;
  border-radius: 2rem 2rem 0 0;
  margin-top: -2rem;
}
.footer-inner {
  max-width: 80rem;
  margin-inline: auto;
  padding: 4rem 1.5rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand { grid-column: span 2; }
@media (min-width: 768px) { .footer-brand { grid-column: span 1; } }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  height: 2rem;
}
.footer-logo svg { color: #3b82f6; }
.footer-logo span {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.footer-desc {
  color: #9ca3af;
  max-width: 24rem;
  margin-bottom: 2rem;
  line-height: 1.625;
}
.social-links { display: flex; gap: 1rem; }
.social-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: background .2s, color .2s;
}
.social-link:hover { background: rgba(255,255,255,0.1); color: #fff; }

.footer-col h4 {
  font-weight: 600;
  margin-bottom: 1.5rem;
  height: 2rem;
  display: flex;
  align-items: center;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.footer-col a { color: #9ca3af; transition: color .2s; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom a { transition: color .2s; }
.footer-bottom a:hover { color: #fff; }

/* ─── Scroll-reveal animations ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── Hero entrance animations ──────────────────────────────────────────── */
.hero-badge, .hero h1, .hero p, .hero-btns {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s ease forwards;
}
.hero h1    { animation-delay: 0.1s; }
.hero p     { animation-delay: 0.2s; }
.hero-btns  { animation-delay: 0.3s; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}
