/* ===================================
   MyLinkz.me - Theme System (Viral Suite Aesthetic)
   =================================== */

/* CSS Custom Properties (Theme Variables) */
:root {
  /* Brand Colors - Viral Suite gradients */
  --theme-primary-from: #2563eb; /* blue-600 */
  --theme-primary-to: #9333ea; /* purple-600 */

  /* Section Background Gradients */
  --bg-hero: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #faf5ff 100%); /* from-blue-50 via-white to-purple-50 */
  --bg-feature: linear-gradient(135deg, #faf5ff 0%, #ffffff 50%, #eff6ff 100%); /* from-purple-50 via-white to-blue-50 */
  --bg-cta: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #9333ea 100%); /* from-blue-600 via-purple-600 to-purple-600 */

  /* Text Colors */
  --text-primary: #111827; /* gray-900 */
  --text-secondary: #4b5563; /* gray-600 */
  --text-muted: #6b7280; /* gray-500 */
  --text-light: #f3f4f6; /* gray-100 */

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-gray-50: #f9fafb;
  --bg-blue-50: #eff6ff;
  --bg-purple-50: #faf5ff;

  /* Border Colors */
  --border-light: rgba(0, 0, 0, 0.06);
  --border-default: #e5e7eb; /* gray-200 */
  --border-hover: #d1d5db; /* gray-300 */

  /* Shadows */
  --shadow-subtle: 0 2px 10px -4px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
  --shadow-elevated: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
  --shadow-glow-blue: 0 20px 40px -12px rgba(37, 99, 235, 0.2);
  --shadow-glow-purple: 0 20px 40px -12px rgba(147, 51, 234, 0.2);

  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Border Radius */
  --radius-card: 1.5rem; /* 24px - rounded-3xl */
  --radius-button: 9999px; /* rounded-full */
  --radius-xl: 1.75rem; /* 28px */

  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-slow: all 0.5s ease;
}

/* ===================================
   Global Styles & Reset
   =================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: 2.25rem; /* 36px */
}

h2 {
  font-size: 1.875rem; /* 30px */
}

h3 {
  font-size: 1.5rem; /* 24px */
}

@media (min-width: 640px) {
  h1 { font-size: 3rem; /* 48px */ }
  h2 { font-size: 2.25rem; /* 36px */ }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.75rem; /* 60px */ }
  h2 { font-size: 2.5rem; /* 40px */ }
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 1.125rem;
}

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

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

ul {
  list-style: none;
}

/* ===================================
   Container & Layout Utilities
   =================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

.section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
}

/* ===================================
   Gradient Text Effect
   =================================== */

.gradient-text {
  background: linear-gradient(to right, var(--theme-primary-from), var(--theme-primary-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-alt {
  background: linear-gradient(to right, #2563eb, #7c3aed, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===================================
   Background Gradients
   =================================== */

.bg-gradient-hero {
  background: var(--bg-hero);
  position: relative;
}

.bg-gradient-feature {
  background: var(--bg-feature);
  position: relative;
}

.bg-gradient-cta {
  background: var(--bg-cta);
  position: relative;
}

.bg-white {
  background-color: var(--bg-white);
}

.bg-gray-50 {
  background-color: var(--bg-gray-50);
}

/* ===================================
   Decorative Elements
   =================================== */

/* Blurred Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(3rem);
  pointer-events: none;
  opacity: 0.35;
}

.orb-purple {
  background: #e9d5ff; /* purple-200 */
}

.orb-blue {
  background: #bfdbfe; /* blue-200 */
}

.orb-top-right {
  top: 2.5rem;
  right: 0;
  width: 18rem;
  height: 18rem;
}

.orb-bottom-left {
  bottom: 2rem;
  left: 2.5rem;
  width: 14rem;
  height: 14rem;
}

.orb-behind {
  inset: 2.5rem 2.5rem auto;
  height: 16rem;
  border-radius: 9999px;
  background: linear-gradient(to right, rgba(37, 99, 235, 0.16), rgba(129, 140, 248, 0.14), rgba(168, 85, 247, 0.16));
  filter: blur(3rem);
  opacity: 0.6;
}

/* Dot Pattern Overlay */
.dot-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.015;
  background-image: radial-gradient(#000 1px, transparent 0);
  background-size: 30px 30px;
  pointer-events: none;
}

/* ===================================
   Navigation (Glass Effect)
   =================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo img {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--theme-primary-from);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

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

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border-default);
  padding: 1.5rem;
  box-shadow: var(--shadow-elevated);
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* ===================================
   Buttons (Viral Suite Style)
   =================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid var(--theme-primary-from);
  outline-offset: 2px;
}

/* Primary Gradient Button */
.btn-primary {
  background: linear-gradient(to right, #2563eb, #9333ea);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px -12px rgba(147, 51, 234, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background: white;
  color: var(--text-primary);
  border: 2px solid #f3f4f6;
}

.btn-secondary:hover {
  border-color: #e5e7eb;
  background: #f9fafb;
}

/* Ghost/Transparent Button (for gradient backgrounds) */
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Button Sizes */
.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ===================================
   Hero Section
   =================================== */

.hero {
  position: relative;
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  padding: 4rem 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #faf5ff 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-headline {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .hero-headline {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-headline {
    font-size: 3.75rem;
  }
}

.hero-subheadline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

@media (min-width: 640px) {
  .hero-subheadline {
    font-size: 1.25rem;
  }
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-ctas {
    flex-direction: row;
  }
}

/* ===================================
   Connected Process Flow (How It Works)
   =================================== */

.process-flow {
  position: relative;
}

/* Connector line */
.process-connector {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, #f5d0fe, #e9d5ff, #bfdbfe);
  transform: translateY(-50%);
  z-index: 0;
}

@media (max-width: 767px) {
  .process-connector {
    display: none;
  }
}

.process-steps {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(1, 1fr);
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process-step {
  text-align: center;
  padding: 0 1rem;
}

.process-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.process-icon {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: white;
  border: 1px solid #e9d5ff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transition: var(--transition-base);
}

.process-step:hover .process-icon {
  transform: scale(1.1);
  background: linear-gradient(to right, #2563eb, #9333ea);
  border-color: transparent;
}

.process-step:hover .process-icon svg {
  color: white;
}

.process-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--theme-primary-from);
  transition: var(--transition-base);
}

.process-step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.process-step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===================================
   Enhanced Feature Cards
   =================================== */

.feature-card {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  background: white;
  padding: 2rem;
  transition: var(--transition-slow);
  overflow: hidden;
}

/* Decorative glow */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 10rem;
  height: 10rem;
  background: linear-gradient(135deg, #fce7f3, #e9d5ff);
  border-radius: 9999px;
  filter: blur(3rem);
  transform: translate(50%, -50%);
  transition: var(--transition-slow);
  opacity: 0.4;
}

.feature-card:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-0.25rem);
}

.feature-card:hover::before {
  transform: translate(50%, -50%) scale(1.5);
  opacity: 0.8;
}

.feature-card-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: #eff6ff;
  color: #2563eb;
  margin-bottom: 1.5rem;
  transition: var(--transition-base);
}

.feature-card:hover .feature-card-icon {
  color: white;
  background: linear-gradient(to bottom right, #2563eb, #9333ea);
}

.feature-card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-card-title {
  position: relative;
  z-index: 1;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-card-description {
  position: relative;
  z-index: 1;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===================================
   Two-Column Layouts
   =================================== */

.two-column {
  display: grid;
  gap: 4rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 1024px) {
  .two-column {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

.two-column-content h2 {
  margin-bottom: 1.5rem;
}

.two-column-content p {
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-list-item {
  display: flex;
  gap: 1rem;
}

.feature-list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--border-default);
  background: white;
  box-shadow: var(--shadow-subtle);
}

.feature-list-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--theme-primary-from);
}

.feature-list-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.feature-list-content p {
  font-size: 0.9375rem;
  margin: 0;
}

/* ===================================
   Gradient CTA Section
   =================================== */

.cta-section-wrapper {
  position: relative;
  overflow: hidden;
}

.cta-gradient-box {
  position: relative;
  border-radius: 2.5rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #9333ea);
  padding: 3rem 2rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .cta-gradient-box {
    padding: 4rem 3.5rem;
  }
}

/* Pattern overlay */
.cta-gradient-box::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: radial-gradient(circle at 2px 2px, white 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

.cta-content h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-content h2 span {
  color: #bfdbfe;
  font-style: italic;
}

.cta-content p {
  color: #dbeafe;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ===================================
   Section Headers
   =================================== */

.section-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 4rem;
}

.section-header-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--theme-primary-from);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* ===================================
   Grid Layouts
   =================================== */

.grid {
  display: grid;
  gap: 2rem;
}

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

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

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===================================
   Footer
   =================================== */

.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

.footer-nav h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--theme-primary-from);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  transition: var(--transition-base);
}

.footer-socials a:hover {
  border-color: var(--theme-primary-from);
  color: var(--theme-primary-from);
}

.footer-socials svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===================================
   Animation Classes
   =================================== */

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.fade-in-up-1 { transition-delay: 0ms; }
.fade-in-up-2 { transition-delay: 100ms; }
.fade-in-up-3 { transition-delay: 200ms; }
.fade-in-up-4 { transition-delay: 300ms; }
.fade-in-up-5 { transition-delay: 400ms; }
.fade-in-up-6 { transition-delay: 500ms; }
.fade-in-up-7 { transition-delay: 600ms; }
.fade-in-up-8 { transition-delay: 700ms; }
.fade-in-up-9 { transition-delay: 800ms; }

/* ===================================
   404 Error Page
   =================================== */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(to right, #2563eb, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.error-message {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* ===================================
   Responsive Utilities
   =================================== */

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .hero-ctas .btn {
    flex: 1;
    min-width: 0;
  }

  .section {
    padding: 3rem 0;
  }
}

/* Print styles */
@media print {
  .nav,
  .footer,
  .btn,
  .orb,
  .dot-pattern {
    display: none;
  }
}

/* ===================================
   Utility Classes
   =================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-0 { padding: 0; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }

.hidden { display: none; }

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
