/* Body with persistent hero image */
body {
  background-image: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.1)), url('assets/hero.jpg');
  background-size: cover; /* Full coverage */
  background-position: center 70%; /* Global focus on bottom third */
  background-repeat: no-repeat;
  background-attachment: scroll; /* Scrolls naturally */
  min-height: 100vh;
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  color: #fff;
  position: relative;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Header styling */
header {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), transparent);
  position: fixed;
  width: 100%;
  z-index: 50;
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Transparent sections with subtle dividers */
section {
  background: transparent;
  position: relative;
}

section .container {
  position: relative;
  z-index: 20;
}

section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  z-index: 10;
}

section .bg-gradient-to-r {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Font-specific styling */
h1, h2, .font-['GT_Walsheim'] {
  font-family: 'GT Walsheim', sans-serif;
  font-weight: 700;
  letter-spacing: normal;
}

.font-['IBM_Plex_Sans'] {
  font-family: 'IBM Plex Sans', sans-serif;
}

/* Floating text animation (limited to specific elements) */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

header a.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Spacing and Typography Optimization */
p, blockquote {
  margin-bottom: 1rem;
  text-wrap: balance;
  line-height: 1.4;
}

h2 {
  margin-bottom: 0.75rem;
}

a {
  margin-bottom: 1rem;
}

/* Mobile Optimization (All Modern iPhones: 375px–460px) */
@media (max-width: 460px) {
  h1 { 
    font-size: 2.5rem; /* Restored */
    line-height: 1.2; 
    margin-bottom: 1rem; 
    padding: 0.5rem; 
  }
  p { font-size: 1.2rem; line-height: 1.5; margin-bottom: 1.5rem; padding: 0.5rem; }
  h2 { font-size: 1.6rem; margin-bottom: 1rem; }
  .space-x-4 { flex-direction: column; gap: 1.5rem; }
  a { width: 100%; text-align: center; padding: 0.75rem 1.5rem; margin-bottom: 1rem; }
  header nav { 
    flex-direction: column; 
    gap: 1rem; 
    padding: 0.5rem 0; 
  }
  header nav div { display: none; } /* Hide navigation on mobile */
  .container { padding-left: 1rem; padding-right: 1rem; }
  section { padding-top: 1rem; padding-bottom: 1rem; }
  form { padding: 0; }
  button, a { font-size: 1rem; padding: 0.75rem 1.5rem; }
  footer { padding-top: 0.75rem; padding-bottom: 0.75rem; text-align: center; }
  footer p { font-size: 0.9rem; margin-top: 0.75rem; text-align: center; }
  body { 
    background-position: center 70%; /* Adjusted for mobile */
    background-size: cover;
  }
  .min-h-screen { min-height: 100vh; padding: 2rem 0; }
}

/* iPhone 12 Pro Specific (1170px width) */
@media (width: 1170px) {
  body {
    background-position: center 70%; /* Focused on bottom third */
    background-size: cover;
    background-attachment: scroll;
  }
}

/* Motorola-like Devices (~1080px width) */
@media (width: 1080px) {
  body {
    background-position: center 70%; /* Focused on bottom third */
    background-size: cover;
    background-attachment: scroll;
  }
}

/* Desktop and Tablet Adjustments */
@media (min-width: 461px) {
  h1 { font-size: 4xl md:text-7xl; } /* Restored to original scale */
  p { font-size: lg; }
  h2 { font-size: 3xl; }
  section { padding-top: 4rem; padding-bottom: 4rem; }
  header { padding-top: 1rem; padding-bottom: 1rem; }
  footer { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  header nav { flex-direction: row; justify-content: space-between; }
  header nav div { display: flex; } /* Show navigation on desktop */
  body { background-size: cover; background-position: center 70%; } /* Kept for desktop */
  .space-x-6 a { font-size: 1.1rem; padding: 0.25rem 0; }
}