/*
  ==========================================================================
   CipherStack Consulting, LLC
   styles.css
   Created: 2025-08-03
   Version: 1.3
   Description: Main styling for dark mode layout with feature cards,
   header banner, and top-right navigation.
   ========================================================================== 
*/



/* Universal box-sizing and focus visibility */
*, *::before, *::after {
  box-sizing: border-box;
}

:focus {
  outline: 2px solid #00baff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  background: #0a0a0a;
  color: #f0f0f0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated background particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(57, 121, 184, 0.6);
  border-radius: 50%;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

h1, h2, h3 {
  margin: 0;
  color: #1f4c7c;
}

section {
  padding: 4rem 2rem;
  position: relative;
  z-index: 2;
}

/* Enhanced header with glassmorphism */
.site-header {
  background: rgba(245, 248, 251, 0.95);
  backdrop-filter: blur(20px);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(217, 228, 240, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(245, 248, 251, 0.98);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-container img {
  max-height: 50px;
  transition: transform 0.3s ease;
}

.logo-container:hover img {
  transform: scale(1.05);
}

/* Hamburger Menu */
#menu-toggle {
  display: none;
}

.menu-icon {
  font-size: 1.8rem;
  color: #1f4c7c;
  cursor: pointer;
  display: block;
  transition: transform 0.3s ease;
}

.menu-icon:hover {
  transform: scale(1.1);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(245, 248, 251, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(217, 228, 240, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  padding: 1rem 0;
  flex-direction: column;
  z-index: 999;
  min-width: 150px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 2rem;
  color: #1d1d1d;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu a:hover {
  background: linear-gradient(135deg, rgba(57, 121, 184, 0.1), rgba(0, 186, 255, 0.1));
  color: #1f4c7c;
}

#menu-toggle:checked ~ .mobile-menu {
  display: flex;
}

/* Enhanced hero section with animated gradient */
.hero-section {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 30%, #16213e 60%, #0f3460 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 40%, rgba(57, 121, 184, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(0, 186, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3979b8 0%, #00baff 30%, #1f4c7c 60%, #3979b8 100%);
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  line-height: 1.1;
  letter-spacing: -2px;
  animation: titleGlow 4s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0% { 
    background-position: 0% 50%;
    filter: drop-shadow(0 0 20px rgba(57, 121, 184, 0.3));
  }
  100% { 
    background-position: 100% 50%;
    filter: drop-shadow(0 0 30px rgba(0, 186, 255, 0.5));
  }
}

.hero-subtitle {
  font-size: 1.6rem;
  color: #b8c5d1;
  line-height: 1.6;
  margin-bottom: 3rem;
  font-weight: 300;
  opacity: 0;
  animation: fadeInUp 1s ease 0.5s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-highlights {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 4rem;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  background: rgba(57, 121, 184, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(57, 121, 184, 0.3);
  backdrop-filter: blur(20px);
  transition: all 0.4s ease;
  min-width: 140px;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s ease forwards;
}

.highlight-item:nth-child(1) { animation-delay: 0.8s; }
.highlight-item:nth-child(2) { animation-delay: 1s; }
.highlight-item:nth-child(3) { animation-delay: 1.2s; }

.highlight-item:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 40px rgba(57, 121, 184, 0.4);
  border-color: #00baff;
}

.highlight-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.highlight-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #3979b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Enhanced CTA button - Safari iOS compatible */
.cta-button {
  display: inline-block !important;
  margin: 2rem auto 0 auto;
  padding: 1rem 2.5rem;
  /* Fallback solid background for Safari iOS */
  background-color: #3979b8 !important;
  background-image: linear-gradient(135deg, #3979b8, #00baff) !important;
  background-image: -webkit-linear-gradient(135deg, #3979b8, #00baff) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(57, 121, 184, 0.3);
  -webkit-box-shadow: 0 10px 30px rgba(57, 121, 184, 0.3);
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
  -webkit-animation: fadeInUp 1s ease 1.5s forwards;
  border: none;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
  line-height: 1.4;
  position: relative;
  z-index: 10;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Force hardware acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  /* Ensure text stays white */
  -webkit-text-fill-color: #ffffff;
  /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.cta-button:hover,
.cta-button:focus {
  transform: translateY(-3px) translateZ(0) !important;
  -webkit-transform: translateY(-3px) translateZ(0) !important;
  box-shadow: 0 15px 40px rgba(57, 121, 184, 0.5) !important;
  -webkit-box-shadow: 0 15px 40px rgba(57, 121, 184, 0.5) !important;
  background-color: #00baff !important;
  background-image: linear-gradient(135deg, #00baff, #3979b8) !important;
  background-image: -webkit-linear-gradient(135deg, #00baff, #3979b8) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-decoration: none !important;
}

.cta-button:active {
  transform: translateY(-1px) translateZ(0) !important;
  -webkit-transform: translateY(-1px) translateZ(0) !important;
}

.cta-button:visited {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-decoration: none !important;
}

.cta-button:link {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-decoration: none !important;
}

/* Enhanced features section - iOS Safari compatible */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 0;
}

.feature-item {
  /* Fallback background for iOS */
  background-color: #1a1a1a;
  background-image: linear-gradient(145deg, #1a1a1a, #2a2a2a);
  background-image: -webkit-linear-gradient(145deg, #1a1a1a, #2a2a2a);
  border-radius: 16px;
  border: 1px solid #3979b8;
  width: 300px;
  height: 240px;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  cursor: pointer;
  transition: all 0.4s ease;
  -webkit-transition: all 0.4s ease;
  box-shadow: 0 8px 32px rgba(57, 121, 184, 0.2);
  -webkit-box-shadow: 0 8px 32px rgba(57, 121, 184, 0.2);
  -webkit-tap-highlight-color: transparent;
  /* iOS Safari fixes */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  overflow: hidden;
  position: relative;
  /* Force visibility */
  opacity: 1;
  visibility: visible;
  /* iOS backface visibility fix */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* Flex item properties for better layout */
  flex: 0 0 300px;
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(57, 121, 184, 0.1), transparent);
  background: -webkit-linear-gradient(90deg, transparent, rgba(57, 121, 184, 0.1), transparent);
  transition: left 0.6s ease;
  -webkit-transition: left 0.6s ease;
  z-index: 1;
}

.feature-item:hover::before {
  left: 100%;
}

.feature-item:hover {
  border-color: #00baff;
  transform: translateY(-5px) translateZ(0);
  -webkit-transform: translateY(-5px) translateZ(0);
  box-shadow: 0 15px 50px rgba(57, 121, 184, 0.4);
  -webkit-box-shadow: 0 15px 50px rgba(57, 121, 184, 0.4);
}

.feature-item:hover .feature-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.feature-item.flipped .feature-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.feature-item.flipped {
  border-color: #00baff;
}

.feature-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease-in-out;
  -webkit-transition: -webkit-transform 0.6s ease-in-out;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  /* iOS fix */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  z-index: 2;
}

.feature-front, .feature-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  /* Force content visibility */
  opacity: 1;
  visibility: visible;
}

.feature-front {
  /* Fallback solid background */
  background-color: #f2f6fb;
  background-image: linear-gradient(135deg, #f2f6fb, #e8f4fd);
  background-image: -webkit-linear-gradient(135deg, #f2f6fb, #e8f4fd);
  color: #1f4c7c;
  z-index: 3;
  /* Ensure front is visible */
  transform: rotateY(0deg) translateZ(1px);
  -webkit-transform: rotateY(0deg) translateZ(1px);
}

.feature-front h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1f4c7c;
}

.feature-back {
  /* Fallback solid background */
  background-color: #d9e4f0;
  background-image: linear-gradient(135deg, #d9e4f0, #c8ddef);
  background-image: -webkit-linear-gradient(135deg, #d9e4f0, #c8ddef);
  transform: rotateY(180deg) translateZ(1px);
  -webkit-transform: rotateY(180deg) translateZ(1px);
  color: #1d1d1d;
  z-index: 2;
}

.feature-back p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  font-weight: 500;
  overflow-wrap: break-word;
  word-wrap: break-word;
  color: #1d1d1d;
}

/* Footer */
footer {
  background: #0a0a0a;
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(57, 121, 184, 0.2);
  color: #b8c5d1;
}

/* Responsive design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.8rem;
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .hero-highlights {
    gap: 2rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem;
  }

  .feature-item {
    height: 260px;
    margin: 0 auto;
    max-width: 320px;
    /* Enhanced mobile flip support */
    -webkit-perspective: 1000px;
    perspective: 1000px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    /* Disable hover effects on mobile */
    transition: border-color 0.3s ease;
  }

  .feature-item:hover {
    border-color: #3979b8;
    transform: none;
    box-shadow: 0 8px 32px rgba(57, 121, 184, 0.2);
  }

  .feature-item:hover .feature-inner {
    transform: none;
  }

  .feature-item:hover::before {
    left: -100%;
  }

  /* Mobile flip state */
  .feature-item.flipped .feature-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
  }

  .feature-item.flipped {
    border-color: #00baff;
  }

  .feature-inner {
    transition: transform 0.6s ease-in-out;
    -webkit-transition: -webkit-transform 0.6s ease-in-out;
    will-change: transform;
  }

  .feature-front, .feature-back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    padding: 1.5rem 1.2rem;
  }

  .feature-front h3 {
    font-size: 1.2rem;
  }

  .feature-back p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 6rem 1rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .feature-front, .feature-back {
    padding: 1.5rem 1rem;
  }

  .feature-front h3 {
    font-size: 1.1rem;
  }

  .feature-back p {
    font-size: 0.9rem;
  }
}




/* ===== IT Launchpad ===== */
.launchpad {
  padding: 4rem 2rem;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.launchpad-header h2 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3979b8 0%, #00baff 40%, #1f4c7c 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 0.5rem 0;
}

.launchpad-sub {
  color: #b8c5d1;
  margin: 0 0 1rem 0;
}

.launchpad-search {
  margin: 1rem 0 2rem 0;
}

.launchpad-search input[type="search"] {
  width: 100%;
  max-width: 520px;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(57,121,184,0.35);
  background: rgba(26,26,26,0.8);
  color: #f0f0f0;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.launchpad-search input[type="search"]:focus {
  border-color: #00baff;
  box-shadow: 0 0 0 4px rgba(0,186,255,0.15);
}

.launchpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.lp-card {
  background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
  border: 1px solid rgba(57,121,184,0.5);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 8px 24px rgba(57,121,184,0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lp-card:hover {
  transform: translateY(-4px);
  border-color: #00baff;
  box-shadow: 0 18px 36px rgba(0,186,255,0.25);
}

.lp-card h3 {
  margin: 0 0 0.4rem 0;
  color: #eaf4ff;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.lp-card p {
  margin: 0 0 0.9rem 0;
  color: #c8d7e6;
  font-size: 0.95rem;
}

.lp-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #3979b8, #00baff);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(57, 121, 184, 0.35);
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 186, 255, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(57,121,184,0.6);
  color: #eaf4ff;
}

.btn-outline:hover,
.btn-outline:focus {
  border-color: #00baff;
}

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

@media (max-width: 640px) {
  .launchpad-grid { grid-template-columns: 1fr; }
}



/* ===== GitHub Preview ===== */
.gh-preview { padding: 4rem 2rem; position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; }
.gh-card { background: linear-gradient(145deg, #1a1a1a, #222); border: 1px solid rgba(57,121,184,0.5); border-radius: 16px; padding: 1.25rem; box-shadow: 0 8px 24px rgba(57,121,184,0.18); }
.gh-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.gh-header img { width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(0,186,255,0.4); box-shadow: 0 6px 16px rgba(0,186,255,0.25); }
.gh-meta .gh-name { margin: 0; font-size: 1.4rem; font-weight: 800; background: linear-gradient(135deg, #3979b8, #00baff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gh-bio { margin: 0.25rem 0 0.5rem 0; color: #c8d7e6; }
.gh-stats { display: flex; gap: 1rem; color: #b8c5d1; font-size: 0.95rem; }
.gh-repos h3 { margin: 0.75rem 0 0.75rem 0; color: #eaf4ff; font-size: 1.1rem; }
.gh-repo-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.gh-repo { display: block; text-decoration: none; background: #111; border: 1px solid rgba(57,121,184,0.4); border-radius: 12px; padding: 0.9rem; color: #eaf4ff; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.gh-repo:hover { transform: translateY(-3px); border-color: #00baff; box-shadow: 0 12px 26px rgba(0,186,255,0.25); }
.gh-repo-title { font-weight: 700; margin-bottom: 0.35rem; }
.gh-repo-desc { font-size: 0.95rem; color: #c8d7e6; margin-bottom: 0.5rem; }
.gh-repo-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.85rem; color: #b8c5d1; }
@media (max-width: 1024px) { .gh-repo-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .gh-header img { width: 64px; height: 64px; } .gh-repo-list { grid-template-columns: 1fr; } }
