/* ===================================
   Scrap Raiders: Air Combat
   Apocalyptic Grit Style
   Mobile-First Responsive Design
   =================================== */

/* ===================================
   CSS Variables & Reset
   =================================== */

:root {
  /* Color Palette - Rust & Steel */
  --color-rust-primary: #D35400;
  --color-rust-dark: #A04000;
  --color-steel-light: #5D6D7E;
  --color-steel-dark: #34495E;
  --color-steel-darker: #2C3E50;
  --color-accent-orange: #E67E22;
  --color-bg-light: #ECF0F1;
  --color-bg-dark: #1A1A1A;
  --color-text-dark: #2C2C2C;
  --color-text-light: #FFFFFF;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Impact", "Haettenschweiler", "Franklin Gothic Bold", sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* Layout */
  --max-width: 1200px;
  --header-height-mobile: 48px;
  --header-height-desktop: 64px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
  --shadow-steel: 0 4px 12px rgba(93, 109, 126, 0.3);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===================================
   Sticky Header
   =================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height-mobile);
  background: var(--color-steel-darker);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: background var(--transition-normal);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.header-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.header-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav-link {
  display: none;
  color: var(--color-text-light);
  font-size: 14px;
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  transition: color var(--transition-fast);
}

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

.cta-button-small {
  background: var(--color-rust-primary);
  color: var(--color-text-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
  min-width: 44px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-button-small:hover {
  background: var(--color-rust-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.cta-button-small:active {
  transform: translateY(0);
}

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

.hero {
  margin-top: var(--header-height-mobile);
  padding: var(--spacing-xl) var(--spacing-sm);
  background: linear-gradient(135deg, var(--color-steel-darker) 0%, var(--color-steel-dark) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, rgba(211, 84, 0, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(211, 84, 0, 0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(211, 84, 0, 0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(211, 84, 0, 0.03) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  position: relative;
  z-index: 1;
}

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

.hero-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-steel);
  animation: heroIconEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heroIconEntrance {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-rust-primary);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: fadeInUp 0.8s ease 0.3s backwards;
}

.hero-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-bg-light);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-visual {
  animation: fadeInUp 0.8s ease 0.5s backwards;
}

.hero-banner {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--color-rust-primary);
}

/* ===================================
   Download Buttons
   =================================== */

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.store-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 12px 24px;
  background: var(--color-steel-dark);
  border: 2px solid var(--color-rust-primary);
  border-radius: var(--radius-md);
  color: var(--color-text-light);
  min-height: 56px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

.store-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.store-button:hover::before {
  left: 100%;
}

.store-button.google-play {
  background: var(--color-rust-primary);
  border-color: var(--color-rust-dark);
}

.store-button.google-play:hover {
  background: var(--color-rust-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(211, 84, 0, 0.4);
}

.store-button.google-play:active {
  transform: translateY(-1px);
}

.store-button.app-store.coming-soon {
  background: #2a2a2a;
  border-color: #444;
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
}

.store-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.store-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.store-name {
  font-size: 16px;
  font-weight: 700;
}

.coming-soon-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-rust-primary);
  color: var(--color-text-light);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===================================
   Features Section
   =================================== */

.features {
  padding: var(--spacing-xxl) var(--spacing-sm);
  background: var(--color-bg-light);
}

.features-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  color: var(--color-steel-darker);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-subtitle {
  font-size: 16px;
  text-align: center;
  color: var(--color-steel-light);
  margin-bottom: var(--spacing-xl);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.feature-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-steel-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-rust-primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition-normal);
}

.feature-card:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-steel);
  border-color: var(--color-rust-primary);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-sm);
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-steel-darker);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feature-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-steel-light);
}

/* ===================================
   Download CTA Section
   =================================== */

.download-cta {
  padding: var(--spacing-xxl) var(--spacing-sm);
  background: linear-gradient(135deg, var(--color-rust-dark) 0%, var(--color-rust-primary) 100%);
  position: relative;
  overflow: hidden;
}

.download-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.download-cta-container {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.download-cta-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.download-cta-subtitle {
  font-size: 18px;
  color: var(--color-bg-light);
  margin-bottom: var(--spacing-xl);
}

.download-buttons-large .store-button {
  font-size: 18px;
  padding: 16px 32px;
  min-height: 64px;
}

.download-buttons-large .store-icon {
  width: 32px;
  height: 32px;
}

.download-buttons-large .store-name {
  font-size: 18px;
}

/* ===================================
   About Section
   =================================== */

.about {
  padding: var(--spacing-xxl) var(--spacing-sm);
  background: var(--color-bg-light);
}

.about-container {
  max-width: 800px;
  margin: 0 auto;
}

.about-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-steel-dark);
}

.about-content p {
  margin-bottom: var(--spacing-md);
}

.about-content strong {
  color: var(--color-steel-darker);
  font-weight: 700;
}

.contact-info {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--color-steel-light);
}

.contact-link {
  color: var(--color-rust-primary);
  font-weight: 600;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.contact-link:hover {
  color: var(--color-rust-dark);
}

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

.footer {
  background: var(--color-steel-darker);
  color: var(--color-text-light);
  padding: var(--spacing-xl) var(--spacing-sm) var(--spacing-lg);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.footer-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.footer-brand-name {
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-contact {
  font-size: 14px;
}

.footer-link {
  color: var(--color-rust-primary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent-orange);
  text-decoration: underline;
}

.footer-legal {
  font-size: 14px;
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.footer-separator {
  color: var(--color-steel-light);
}

.footer-copyright {
  font-size: 12px;
  color: var(--color-steel-light);
  margin-top: var(--spacing-sm);
}

/* ===================================
   Floating CTA (Mobile)
   =================================== */

.floating-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-steel-darker);
  padding: var(--spacing-sm);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.floating-cta.visible {
  transform: translateY(0);
}

.floating-cta-button {
  display: block;
  width: 100%;
  background: var(--color-rust-primary);
  color: var(--color-text-light);
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 48px;
  transition: all var(--transition-fast);
}

.floating-cta-button:active {
  background: var(--color-rust-dark);
  transform: scale(0.98);
}

/* ===================================
   Responsive Design - Tablet
   =================================== */

@media (min-width: 768px) {
  .header {
    height: var(--header-height-desktop);
  }
  
  .header-icon {
    width: 40px;
    height: 40px;
  }
  
  .header-title {
    font-size: 16px;
  }
  
  .nav-link {
    display: block;
  }
  
  .cta-button-small {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 40px;
  }
  
  .hero {
    margin-top: var(--header-height-desktop);
    padding: var(--spacing-xxl) var(--spacing-md);
  }
  
  .hero-container {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-xxl);
  }
  
  .hero-content {
    flex: 1;
    text-align: left;
  }
  
  .hero-icon {
    margin-left: 0;
  }
  
  .hero-visual {
    flex: 1;
  }
  
  .hero-title {
    font-size: 42px;
  }
  
  .hero-subtitle {
    font-size: 20px;
  }
  
  .hero-description {
    margin-left: 0;
  }
  
  .download-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }
  
  .store-button {
    flex: 1;
    max-width: 200px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .download-cta-title {
    font-size: 42px;
  }
  
  .download-buttons-large {
    flex-direction: row;
    justify-content: center;
  }
  
  .download-buttons-large .store-button {
    flex: 0 0 auto;
    max-width: 240px;
  }
  
  .floating-cta {
    display: none;
  }
}

/* ===================================
   Responsive Design - Desktop
   =================================== */

@media (min-width: 1024px) {
  .hero-title {
    font-size: 52px;
  }
  
  .hero-subtitle {
    font-size: 24px;
  }
  
  .hero-description {
    font-size: 18px;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .section-title {
    font-size: 36px;
  }
  
  .section-subtitle {
    font-size: 18px;
  }
  
  .download-cta-title {
    font-size: 52px;
  }
  
  .download-cta-subtitle {
    font-size: 20px;
  }
  
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .footer-brand {
    justify-content: flex-start;
  }
  
  .footer-legal {
    justify-content: flex-end;
  }
}

/* ===================================
   Accessibility & Print
   =================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .header,
  .floating-cta,
  .download-buttons {
    display: none;
  }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-rust-primary);
  outline-offset: 2px;
}
