/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
}

/* Color palette (Tailwind purple/green/red scale used by the original design) */
:root {
  --purple-950: #3b0764;
  --purple-900: #581c87;
  --purple-800: #6b21a8;
  --purple-700: #7e22ce;
  --purple-600: #9333ea;
  --purple-500: #a855f7;
  --purple-400: #c084fc;
  --purple-300: #d8b4fe;
  --purple-200: #e9d5ff;
  --purple-100: #f3e8ff;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-600: #16a34a;
  --red-400: #f87171;
  --red-500: #ef4444;
  --yellow-500: #eab308;
}

/* Page shell: full-height gradient backdrop shared by every page */
.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 2rem;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -20;
  background: linear-gradient(to bottom right, var(--purple-950), var(--purple-900), #000000);
}

.page-container {
  position: relative;
  z-index: 20;
  max-width: 72rem;
  margin: 0 auto;
}

/* Animated background: grid + particles + orbs, injected by js/animated-background.js */
.animated-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -10;
}

.animated-bg .bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

.animated-bg .bg-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--purple-400);
  border-radius: 50%;
  opacity: 0.4;
}

.animated-bg .bg-orb {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(64px);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animated-bg .bg-orb-1 {
  top: 25%;
  left: 25%;
  background: rgba(147, 51, 234, 0.1);
}

.animated-bg .bg-orb-2 {
  bottom: 25%;
  right: 25%;
  background: rgba(107, 33, 168, 0.1);
  animation-delay: 2s;
}

/* Shared "back link" used on the contact + estimator pages */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--purple-300);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--purple-100);
}

/* Shared glowing purple button, used for "Contact Me" / "Calculate Estimate" / send */
.btn-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--purple-600);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  transition: all 0.3s;
}

.btn-glow:hover:not(:disabled) {
  background: var(--purple-500);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.7);
}

.btn-glow:disabled {
  background: rgba(88, 28, 135, 0.5);
  cursor: not-allowed;
}

.btn-pill {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  background: rgba(147, 51, 234, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: var(--purple-200);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
  transition: all 0.3s;
}

.btn-pill:hover {
  background: rgba(147, 51, 234, 0.5);
  border-color: rgba(192, 132, 252, 0.6);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  stroke: currentColor;
}

/* Shared keyframes */
@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
  50% { transform: translateY(-30px) translateX(20px); opacity: 0.8; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.scanline-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.1;
  overflow: hidden;
  border-radius: inherit;
}

.scanline-overlay::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.2), transparent);
  animation: scanline 8s linear infinite;
}
