/*
  Global styles for the Jarral's Kitchen website.

  The colour palette uses a crisp white background with vibrant red accents
  to reflect the brand and make content easy to read. Responsive grids
  ensure the site looks good on any device.
*/

/* Colour variables */
:root {
  --primary: #c62828;       /* main red accent */
  --primary-dark: #8e0000;  /* darker shade for hover states */
  --white: #ffffff;
  --gray-light: #f8f8f8;
  --text: #333333;
}

/* Base typography and layout */
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--white);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  color: var(--primary-dark);
}

/* Navigation bar */
nav {
  background-color: var(--white);
  border-bottom: 1px solid #eee;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: navSlideDown 1s cubic-bezier(.25,.8,.25,1) 0.1s both;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav li {
  margin-left: 1rem;
}

nav li a {
  color: var(--primary);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

nav li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1);
}

nav li a:hover {
  color: var(--primary-dark);
}

nav li a:hover::after {
  transform: scaleX(1);
}

/* Hero section */
.hero {
  background-size: cover;
  background-position: center;
  height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: heroFadeIn 1.2s ease-out 0.2s forwards;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--white);
  text-align: center;
  padding: 0 2rem;
}

/* Buttons */
.btn {
  background-color: var(--primary);
  color: var(--white);
  padding: 0.8rem 1.4rem;
  margin: 0.5rem;
  border-radius: 4px;
  display: inline-block;
  font-weight: bold;
  transition: background-color 0.3s ease-in-out;
  animation: btnPulse 2.2s infinite;
}

.btn:hover {
  background-color: var(--primary-dark);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.8rem 1.4rem;
  margin: 0.5rem;
  border-radius: 4px;
  display: inline-block;
  font-weight: bold;
  transition: border-color 0.3s, color 0.3s, background-color 0.3s, transform 0.3s;
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary-dark);
  transform: scale(1.05);
}

/* Section spacing */
section {
  padding: 4rem 2rem;
  opacity: 0;
  animation: sectionFadeIn 1.2s ease-in 0.3s forwards;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
  animation: fadeInUp 1s ease-in 0.5s both;
}

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

/* Animate .card-content fade-in */
.card-content {
  opacity: 0;
  animation: cardContentFadeIn 1s ease-in 0.6s forwards;
}

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

/* Cards layout */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 8px 24px rgba(198,40,40,0.15);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(.25,.8,.25,1);
}

.card img:hover {
  transform: scale(1.08) rotate(-2deg);
}

.card-content {
  padding: 1rem;
  flex: 1;
}

/* Statistics section */
.stats-section {
  background: var(--gray-light);
  padding: 3rem 2rem 2.5rem 2rem;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(198,40,40,0.07);
  text-align: center;
  animation: sectionFadeIn 1.2s ease-in 0.3s forwards;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(198,40,40,0.08);
  padding: 2rem 1rem 1.5rem 1rem;
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s;
  animation: statFadeIn 1s ease-in;
}

.stat:hover {
  transform: scale(1.07) translateY(-6px);
  box-shadow: 0 8px 24px rgba(198,40,40,0.15);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  animation: statNumberPop 0.8s cubic-bezier(.25,.8,.25,1);
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text);
  opacity: 0.85;
}

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

@keyframes statNumberPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Footer */
footer {
  background-color: #f4f4f4;
  padding: 2rem;
  text-align: center;
  color: var(--text);
  font-size: 0.9rem;
  animation: fadeInFooter 1.2s ease-in 1.2s both;
}

footer a {
  color: var(--primary);
}

/* Animations */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes btnPulse {
  0% { box-shadow: 0 0 0 0 rgba(198,40,40,0.3); }
  70% { box-shadow: 0 0 0 10px rgba(198,40,40,0); }
  100% { box-shadow: 0 0 0 0 rgba(198,40,40,0); }
}

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

@keyframes fadeInFooter {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  nav li {
    margin: 0.5rem 0;
  }
  .hero {
    height: 60vh;
  }
}