/* Serendibz - Premium Sri Lankan Cuisine */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;700&family=League+Spartan:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #ff6d4d;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-text-light: #555555;
  --color-card-bg: #f9f9f9;

  --font-heading: 'League Spartan', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);

  --container-width: 1200px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  /* Prevent horizontal scroll */
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-black);
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.header-container {
  max-width: 95%;
  /* Wider than standard container for header */
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
header {
  padding: 1.5rem 0;
  position: fixed;
  /* Fixed for better mobile experience */
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  /* Dark background for readability */
  backdrop-filter: blur(10px);
  transition: padding 0.3s ease, background 0.3s ease;
}

header.scrolled {
  padding: 1rem 0;
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 90px;
  /* Increased from 60px */
  width: auto;
  object-fit: contain;
}

/* Mobile sizing */
@media (max-width: 768px) {
  .logo-img {
    height: 120px;
    /* Increased to 120px per user request */
  }
}

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

.nav-links a {
  color: var(--color-white);
  font-weight: 500;
  font-size: 1.1rem;
}

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

.btn-primary {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 109, 77, 0.3);
}

.mobile-menu-toggle {
  display: none;
  /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Menu State */
.nav-active {
  transform: translateX(0) !important;
}

.toggle .line1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
  opacity: 0;
}

.toggle .line3 {
  transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-only-btn {
  display: none;
}

.desktop-only-btn {
  display: inline-block;
}


/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-black);
  padding-top: 80px;
  /* Parallax is handled via JS on .hero-bg-parallax */
}

.hero-bg-parallax {
  position: absolute;
  top: -5%;
  /* Reduced buffer */
  left: 0;
  width: 100%;
  height: 110%;
  /* Reduced from 120% to minimize upscaling/pixelation */
  background-image: url('images/uploaded_image_1767139100355.jpg');
  background-position: center 25%;
  /* Shifted down to reveal rice (25% from top) */
  background-repeat: no-repeat;
  background-size: cover;
  /* Ensures aspect ratio is maintained (no distortion) */
  z-index: 0;
  will-change: transform;
  /* Optimize for animation */
}

/* Dark Overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Removed inline .hero-bg styles as we use background-image now */

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1000px;
  /* Increased from 800px to fit text */
  color: var(--color-white);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  /* Reduced to prevent wrapping */
  color: var(--color-white);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

/* Reveal Animation Styles */
.reveal-line {
  display: block;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.reveal-line span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.hero-title.active .reveal-line span {
  transform: translateY(0);
}

/* Staggered Delays for Lines */
.hero-title .reveal-line:nth-child(2) span {
  transition-delay: 0.1s;
}

.hero-title .reveal-line:nth-child(3) span {
  transition-delay: 0.2s;
}

/* Higher specificity to ensure these win over base styles */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px) scale(0.98);
  filter: blur(5px);
  transition:
    opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.animate-on-scroll.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* Sections */
section {
  padding: 5rem 0;
}

/* Staggered Grid Animations */
.grid-3 .menu-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.grid-3.active .menu-card {
  opacity: 1;
  transform: translateY(0);
}

/* Specific delays for first 6 items to ensure stagger is seen */
.grid-3 .menu-card:nth-child(1) {
  transition-delay: 0.1s;
}

.grid-3 .menu-card:nth-child(2) {
  transition-delay: 0.2s;
}

.grid-3 .menu-card:nth-child(3) {
  transition-delay: 0.3s;
}

.grid-3 .menu-card:nth-child(4) {
  transition-delay: 0.4s;
}

.grid-3 .menu-card:nth-child(5) {
  transition-delay: 0.5s;
}

.grid-3 .menu-card:nth-child(6) {
  transition-delay: 0.6s;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.split-content p {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 4/3;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-wrapper:hover img {
  transform: scale(1.05);
}

/* Menu Preview */
.menu-preview {
  background-color: var(--color-card-bg);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

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

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


.menu-card {
  background: var(--color-white);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease;
}

.menu-card:hover {
  transform: translateY(-8px);
}

.menu-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
}

.menu-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.menu-card p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.price {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.popular-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(255, 109, 77, 0.4);

  box-shadow: 0 4px 10px rgba(255, 109, 77, 0.4);
  letter-spacing: 0.5px;
}

/* Modal Styles */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  padding: 2rem 0;
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 800px;
}

.modal-content img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto 2rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Testimonial Styles */
.press-section {
  background-color: var(--color-white);
  padding: 6rem 0;
  text-align: center;
}

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

@media (min-width: 1024px) {
  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
    margin: 3rem auto 0;
  }
}

/* Catering Section */
.catering-section {
  padding: 5rem 0;
  background-color: var(--color-white);
  text-align: center;
}

.catering-section h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.catering-section p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.catering-section ul {
  list-style: none;
  margin: 0 auto 2.5rem;
  padding: 0;
  color: var(--color-text-light);
  display: block;
  text-align: left;
  width: 100%;
  max-width: 400px;
}

.catering-section ul li {
  margin-bottom: 1rem;
}

.catering-section ul li strong {
  color: var(--color-primary);
  margin-right: 0.5rem;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  justify-items: center;
}

.split-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
}

@media (min-width: 1024px) {
  .catering-section {
    padding: 7rem 0;
    text-align: left;
  }

  .catering-section h2 {
    font-size: 3.5rem;
  }

  .catering-section p {
    font-size: 1.2rem;
  }

  .catering-section ul {
    margin: 0 0 2.5rem;
    display: block;
  }

  .split-section {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    justify-items: start;
  }
}

.testimonial-card {
  background: var(--color-card-bg);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.quote-icon {
  font-size: 3rem;
  color: var(--color-primary);
  opacity: 0.3;
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  line-height: 1;
}

.quote-text {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-black);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.source-name {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.source-detail {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.press-link {
  font-size: 0.85rem;
  color: var(--color-black);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s;
}

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

.close-modal {
  position: fixed;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 2001;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  border-radius: 50%;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.footer-col p,
.footer-col a {
  color: #999;
  display: block;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

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

.copyright {
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 2rem;
  color: #555;
  font-size: 0.9rem;
}

/* Utilities */
.text-primary {
  color: var(--color-primary);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  body {
    font-size: 15px;
  }

  /* Navigation */
  nav {
    position: relative;
    justify-content: center;
    /* Center logo in the header */
  }

  .mobile-menu-toggle {
    display: flex;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  .nav-links {
    position: fixed;
    right: 0;
    /* Slide from right */
    top: 0;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background-color: var(--color-black);
    flex-direction: column;
    align-items: flex-start;
    /* Left align items */
    padding: 6rem 2rem;
    /* Top padding for breathing room */
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 999;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  }

  .nav-links a {
    font-size: 1.5rem;
    /* Larger touch targets */
    font-weight: 600;
  }

  .mobile-only-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
  }

  .desktop-only-btn {
    display: none;
  }

  /* Layout */
  .split-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .split-content {
    order: 2;
    /* Image first on mobile? Lets keep text first for intro */
  }

  /* Hero */
  .hero {
    text-align: center;
    /* Center text on mobile */
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.1rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 1rem !important;
  }

  /* Typography Adjustments */
  .section-header h2,
  .split-content h2 {
    font-size: 2.2rem;
  }

  section {
    padding: 3.5rem 0;
  }

  .footer-grid {
    gap: 2rem;
  }
}