/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
  --primary-blue: #1e6c93;
  --white: #ffffff;
  --overlay: rgba(0, 0, 0, 0.7);
  /* New Variable: Standardized spacing for consistency */
  --spacing-unit: 1rem;
}

* {
  box-sizing: border-box; /* Crucial: padding doesn't add to width */
}

body {
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--white);
  /* Operational Fix: Base background setup */
  background: 
     linear-gradient(var(--overlay), var(--overlay)),
     url("../assets/images/herojpeg.jpeg") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================
   2. ACCESSIBILITY & UTILITIES
   ========================================= */
/* Skip Link: Essential for keyboard-only users to bypass nav */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--primary-blue);
  color: white;
  padding: 10px;
  z-index: 1000; /* Ensures it sits on top of everything */
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Global Focus: High visibility for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
nav a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 4px;
  background-color: rgba(0, 95, 204, 0.1);
}

/* =========================================
   3. DESKTOP LAYOUT (Default)
   ========================================= */
header {
  padding: 2rem;
  text-align: center;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 2rem; /* Consistent spacing between links */
}

nav a {
  color: #faf8f8;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Visual feedback on hover */
}

main {
  flex: 1; /* Pushes footer down */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  width: 100%; /* Ensure main container doesn't collapse */
  max-width: 1200px; /* Readability cap for wide screens */
  margin: 0 auto; /* Centers the container */
}

h1 {
  font-size: 4rem;
  margin: 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 4px;
  line-height: 1.1; /* Prevents descenders from clipping */
}

h2 {
  font-weight: 300;
  font-size: 1.5rem;
  margin: 0;
}

.promo-text {
  font-size: 1.4rem;
  margin: 2rem 0;
  line-height: 1.6;
  max-width: 800px; /* Prevents lines from becoming too long to read */
}

address {
  font-style: normal;
  margin-bottom: 2rem;
}

address a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.2rem;
  display: inline-block; /* Allows padding/margins to work */
  padding: 5px; /* Increases hit area slightly */
}

.delivery-btn {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 1rem 2.5rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  border: 2px solid var(--white);
  transition: background 0.3s;
  display: inline-block;
}

.delivery-btn:hover,
.delivery-btn:focus {
  background-color: #14506d;
}

footer {
  padding: 1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
}

/* =========================================
   4. RESPONSIVE BREAKPOINTS (The Fix)
   ========================================= */

/* --- LAPTOP / TABLET (Max-Width: 1024px) --- */
@media (max-width: 1024px) {
  h1 {
    font-size: 3rem; /* Scale down header */
  }

  .promo-text {
    font-size: 1.2rem;
    padding: 0 1rem; /* Add gutters so text doesn't touch edges */
  }
}

/* --- MOBILE (Max-Width: 768px) --- */
@media (max-width: 768px) {
  /* Layout: Switch navigation to vertical stack */
  nav ul {
    flex-direction: column;
    gap: 1rem;
    width: 100%; /* Take full width */
  }

  nav a {
    display: block; /* Make the link a full-width block */
    padding: 15px; /* Large touch target (min 44px height) */
    background-color: rgba(
      0,
      0,
      0,
      0.2
    ); /* Contrast background for separation */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle definition */
  }

  /* Typography: Aggressive scaling for narrow screens */
  h1 {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }

  h2 {
    font-size: 1.2rem;
  }

  /* Operational Fix: Disable fixed background */
  /* Fixed backgrounds cause jitter/repaint issues on mobile browsers */
  body {
    background-attachment: scroll;
  }

  .delivery-btn {
    width: 100%; /* Full width button for easy thumb access */
    max-width: 350px; /* Cap width on larger phones */
    padding: 1.2rem;
  }
}

/* --- SMALL MOBILE (Max-Width: 400px) --- */
@media (max-width: 400px) {
  h1 {
    font-size: 1.8rem; /* Prevent overflow on iPhone SE/old Androids */
  }

  header {
    padding: 1rem; /* Reduce vertical whitespace */
  }
}






