:root {
  --bg: #000000;
  --bg-alt: #0d100d;
  --text: #f2f4f2;
  --accent: #22c55e;
  --accent-dark: #16a34a;
  --gray: #93a093;
  --border: #263026;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 40s linear infinite;
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.12), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(22, 163, 74, 0.12), transparent 45%);
  animation: bgDrift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Cursor glow */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.4), rgba(22, 163, 74, 0.12) 45%, transparent 70%);
  filter: blur(10px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: transform 0.15s ease-out, opacity 0.3s ease;
}
.cursor-glow.active { opacity: 1; }

@media (hover: none), (pointer: coarse) {
  .cursor-glow { display: none; }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1 { font-size: 2.6rem; line-height: 1.15; margin-bottom: 16px; }
h2 { font-size: 1.9rem; margin-bottom: 32px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }
p { color: var(--gray); }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.logo {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  transition: opacity 0.2s ease;
}
.logo:hover { opacity: 0.7; }
.logo span { color: var(--accent); }
.nav nav a {
  position: relative;
  margin-left: 24px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}
.nav nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-cta {
  background: var(--accent);
  color: #000 !important;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.35);
}

/* Hero */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
}
.hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse closest-side at 50% 40%, rgba(34, 197, 94, 0.28), transparent 80%);
  animation: heroGlow 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.hero::after,
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridDrift 20s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse closest-side at center, black 20%, transparent 80%);
  mask-image: radial-gradient(ellipse closest-side at center, black 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.hero .container,
.page-hero .container {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero h1 { animation: fadeInUp 0.7s ease both; }
.hero .subhead {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
  animation: fadeInUp 0.7s ease 0.15s both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}
.word-rotator {
  display: inline-block;
  color: var(--accent);
  animation: textGlow 2.4s ease-in-out infinite;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.word-rotator.swap {
  opacity: 0;
  transform: translateY(-10px);
}

.page-hero {
  padding: 60px 0 20px;
  text-align: center;
}
.page-hero .subhead {
  max-width: 560px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #000 !important;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.15);
}

/* Sections */
.section { padding: 70px 0; }
.section-alt { background: transparent; }

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

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.12);
  border-color: var(--accent);
}

/* Portfolio */
.portfolio-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--bg-alt);
}
.browser-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.browser-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(34, 197, 94, 0.15);
}
.browser-frame-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green {
  background: var(--accent);
  animation: pulse 1.8s ease infinite;
}
.browser-frame iframe {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

/* Testimonial */
.testimonial-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
}
.testimonial-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.12);
}
.testimonial-quote p {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 16px;
}
.testimonial-quote footer {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray);
}

/* CTA band */
.cta-band {
  text-align: center;
  background: linear-gradient(120deg, #000000, #0a1f0f, var(--accent-dark), #000000);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  color: #fff;
  border-radius: var(--radius);
  margin: 0 24px;
}
.cta-band h2 { color: #fff; }

/* Pricing */
.pricing-grid { align-items: stretch; }
.price-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.12);
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.18);
}
.price-card.featured:hover {
  box-shadow: 0 16px 32px rgba(34, 197, 94, 0.28);
}
.badge {
  background: var(--accent);
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
  width: fit-content;
}
.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0;
}
.price-desc { margin-bottom: 16px; }
.price-card ul {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}
.price-card ul li {
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--gray);
}
.price-card .btn { text-align: center; }
.pricing-note {
  text-align: center;
  margin-top: 30px;
  font-size: 0.85rem;
  font-style: italic;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 12px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 10px 12px;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form button {
  margin-top: 20px;
  align-self: flex-start;
  border: none;
  cursor: pointer;
}
.contact-info { padding-top: 12px; }
.contact-info p { margin-bottom: 10px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
}
.site-footer p { margin-bottom: 6px; }

/* Motion */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes heroGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 40px 40px, 40px 40px; }
}
@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 12px rgba(34, 197, 94, 0.35); }
  50% { text-shadow: 0 0 26px rgba(34, 197, 94, 0.7); }
}
@keyframes bgDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(3%, -3%) scale(1.08); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.grid-3 .card:nth-child(1) { transition-delay: 0s; }
.grid-3 .card:nth-child(2) { transition-delay: 0.12s; }
.grid-3 .card:nth-child(3) { transition-delay: 0.24s; }
.pricing-grid .price-card:nth-child(1) { transition-delay: 0s; }
.pricing-grid .price-card:nth-child(2) { transition-delay: 0.12s; }
.pricing-grid .price-card:nth-child(3) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .portfolio-card { grid-template-columns: 1fr; }
  .testimonial-layout { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .testimonial-image { width: 100%; max-width: 320px; height: 200px; }
  .contact-layout { grid-template-columns: 1fr; }
  .nav nav a { margin-left: 14px; font-size: 0.88rem; }
  h1 { font-size: 2rem; }
  .cta-band { margin: 0; border-radius: 0; }
}
