/* =============================================
   STR-AWS Cloud Infrastructure Solutions
   Design System & Animations
   ============================================= */

/* --- Custom Properties --- */
:root {
  --navy: #0a1628;
  --navy-light: #0f2234;
  --navy-mid: #132d45;
  --orange: #FF9900;
  --orange-dark: #E8720C;
  --orange-glow: rgba(255, 153, 0, 0.3);
  --teal: #2d8a9e;
  --teal-dark: #1a4a5e;
  --white: #f0f0f0;
  --white-dim: rgba(240, 240, 240, 0.7);
  --glass-bg: rgba(15, 34, 52, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--white);
}

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

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--navy);
}

::-webkit-scrollbar-thumb {
  background: var(--orange-dark);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
}

/* --- Layout Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

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

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.text-center {
  text-align: center;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), padding var(--transition);
}

.nav.scrolled {
  padding: 0.7rem 2rem;
  background: rgba(10, 22, 40, 0.95);
}

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

.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.nav-brand span {
  color: var(--orange);
}

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

.nav-links a {
  color: var(--white-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding-top: 4rem; /* account for fixed nav */
}

.hero-banner {
  width: 100%;
  display: flex;
  justify-content: center;
  background: var(--navy);
}

.hero-banner img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4rem 2rem 6rem;
  max-width: 800px;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--white) 0%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  color: var(--white-dim);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  opacity: 0.7;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: var(--orange);
}

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

/* --- Glassmorphism Cards --- */
.card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 0%, var(--orange-glow) 50%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--orange-glow);
  border-color: rgba(255, 153, 0, 0.2);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.2rem;
  color: var(--orange);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--white);
}

.card p {
  color: var(--white-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Stats Section --- */
.stats {
  background: linear-gradient(135deg, var(--navy-light) 0%, var(--navy-mid) 100%);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- CTA Section --- */
.cta {
  text-align: center;
  padding: 8rem 0;
  position: relative;
}

.cta h2 {
  margin-bottom: 1.5rem;
}

.cta p {
  color: var(--white-dim);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--navy);
  box-shadow: 0 4px 20px var(--orange-glow);
}

.btn-primary:hover {
  background: var(--orange-dark);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 153, 0, 0.4);
}

.btn-pulse {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px var(--orange-glow); }
  50% { box-shadow: 0 4px 40px rgba(255, 153, 0, 0.5); }
}

/* --- Footer --- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--white-dim);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-copy {
  color: rgba(240, 240, 240, 0.4);
  font-size: 0.8rem;
}

/* --- Floating Particles --- */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--teal);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-particle linear infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-duration: 20s; animation-delay: 0s; }
.particle:nth-child(2) { left: 80%; top: 40%; animation-duration: 25s; animation-delay: -5s; }
.particle:nth-child(3) { left: 30%; top: 70%; animation-duration: 18s; animation-delay: -3s; }
.particle:nth-child(4) { left: 60%; top: 10%; animation-duration: 22s; animation-delay: -8s; }
.particle:nth-child(5) { left: 90%; top: 80%; animation-duration: 30s; animation-delay: -12s; }
.particle:nth-child(6) { left: 45%; top: 50%; animation-duration: 28s; animation-delay: -7s; }

@keyframes float-particle {
  0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  25% { transform: translate(30px, -50px) scale(1.2); opacity: 0.5; }
  50% { transform: translate(-20px, -100px) scale(0.8); opacity: 0.3; }
  75% { transform: translate(40px, -150px) scale(1.1); opacity: 0.4; }
  100% { transform: translate(0, -200px) scale(1); opacity: 0; }
}

/* --- Animation Classes --- */
[data-animate] {
  opacity: 0;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate="fade-in"] {
  transform: none;
}

[data-animate="slide-left"] {
  transform: translateX(-40px);
}

[data-animate="slide-right"] {
  transform: translateX(40px);
}

[data-animate="scale-in"] {
  transform: scale(0.9);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* --- Prose (Legal Pages) --- */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.prose h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.prose .last-updated {
  color: var(--white-dim);
  font-size: 0.85rem;
  margin-bottom: 3rem;
}

.prose h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--orange);
}

.prose p, .prose li {
  color: var(--white-dim);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.prose ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

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

.section-header p {
  color: var(--white-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    transition: right var(--transition);
    border-left: 1px solid var(--glass-border);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .section {
    padding: 4rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

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

  .hero-content h1 {
    font-size: 2rem;
  }
}

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