@tailwind base;
@tailwind components;
@tailwind utilities;

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --color-saffron: #00a651;
  --color-pomegranate: #c0392b;
  --color-cedar: #1a1a1a;
  --color-cedar-mid: #444444;
  --color-cedar-light: #666666;
  --color-camel: #c0392b;
  --color-camel-light: #d9534f;
  --color-camel-dark: #922b21;
  --color-mint: #00a651;
  --color-cream: #ffffff;
  --color-cream-dark: #f0f0f0;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Playfair Display', serif;
}

* {
  box-sizing: border-box;
}

/*
  Native <select> uses line-height:normal and platform chrome, so it renders
  shorter than <input> even when both share the same padding utility classes.
  Normalize appearance + line-height site-wide; keep background-color free for utilities.
*/
html body select {
  line-height: 1.25rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238b7355' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.75rem;
  padding-inline-end: 2.25rem;
}

html body input[type='date'],
html body input[type='time'],
html body input[type='datetime-local'],
html body input[type='month'],
html body input[type='week'] {
  line-height: 1.25rem;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-cream);
  color: var(--color-cedar);
  font-family: var(--font-body);
  font-style: italic;
  overflow-x: hidden;
}

/* Grain overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* Lebanese flag stripe accent — top of key sections */
.lebanese-stripe {
  position: relative;
}
.lebanese-stripe::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #c0392b 33.33%,
    #ffffff 33.33%,
    #ffffff 66.66%,
    #00a651 66.66%
  );
  z-index: 1;
}

/* Hero section */
.hero-section {
  position: relative;
  /* Always grow with content so nothing slides under the fixed header */
  height: auto;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Clear fixed mobile/tablet header (h-16) */
  padding-top: 5.5rem;
  box-sizing: border-box;
}

@media (min-width: 1280px) {
  .hero-section {
    min-height: 600px;
    min-height: 100svh;
    min-height: 100dvh;
    /* Clear fixed desktop header (h-[88px]) */
    padding-top: 7.5rem;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #111111 0%, #2a0a0c 55%, #111111 100%);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: heroBreath 12s ease-in-out infinite;
}

.hero-bg img.hero-bg-img-enter {
  opacity: 0;
  animation:
    heroImgFadeIn 0.45s ease-out forwards,
    heroBreath 12s ease-in-out 0.45s infinite;
}

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

@keyframes heroBreath {
  0%,
  100% {
    transform: scale(1.05);
  }
  50% {
    transform: scale(1.08);
  }
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(238, 22, 31, 0.1) 0%,
    rgba(17, 17, 17, 0.2) 30%,
    rgba(17, 17, 17, 0.72) 70%,
    rgba(17, 17, 17, 0.92) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  /* Bottom-align when viewport has room; otherwise sit below padding-top */
  margin-top: auto;
  padding: 1.25rem 1.25rem 2.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  .hero-content {
    padding: 2rem 1.5rem 3.5rem;
  }
}

@media (min-width: 768px) {
  .hero-content {
    padding: 4rem 4rem 5rem;
  }
}

/* Marquee */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  animation: marqueeScroll 30s linear infinite;
  display: flex;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Homepage menu mosaic.
   CSS columns reflow when card height changes (language, fonts, images),
   so this is an explicit grid: positions stay the same across languages. */
.masonry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 640px) {
  .masonry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      'story1 story2 order'
      'reserve story3 .';
  }

  .masonry-item--story-1 {
    grid-area: story1;
  }

  .masonry-item--story-2 {
    grid-area: story2;
  }

  .masonry-item--story-3 {
    grid-area: story3;
  }

  .masonry-item--cta-reserve {
    grid-area: reserve;
  }

  .masonry-item--cta-order {
    grid-area: order;
  }
}

.masonry-item {
  min-width: 0;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}
.reveal-delay-6 {
  transition-delay: 0.6s;
}

/* Food tile */
.food-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 1rem;
}

.food-tile img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.food-tile:hover img {
  transform: scale(1.06);
}

.food-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(238, 22, 31, 0.82) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.food-tile:hover .food-tile-overlay {
  opacity: 1;
}

.food-tile-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.food-tile:hover .food-tile-label {
  transform: translateY(0);
  opacity: 1;
}

/* Story card */
.story-card {
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Buttons */
.btn-primary {
  background-color: var(--color-pomegranate);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #c0000a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(238, 22, 31, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-cedar);
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  border: 2px solid var(--color-cedar);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-cedar);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  animation: floatPulse 3s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(238, 22, 31, 0.45);
}

@keyframes floatPulse {
  0%,
  100% {
    box-shadow: 0 8px 32px rgba(238, 22, 31, 0.45);
  }
  50% {
    box-shadow: 0 12px 40px rgba(238, 22, 31, 0.6);
  }
}

@media (min-width: 1024px) {
  .floating-cta {
    display: none;
  }
}

/* Scan line animation */
@keyframes scanLine {
  0% {
    top: 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 166, 81, 0.6), transparent);
  animation: scanLine 4s ease-in-out infinite;
  pointer-events: none;
}

/* Testimonial card */
.testimonial-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 2rem;
  border: 1px solid #f0f0f0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--color-saffron), var(--color-pomegranate));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.testimonial-card:hover::before {
  transform: scaleX(1);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(238, 22, 31, 0.1);
}

/* Nav link */
.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
  letter-spacing: 0.01em;
}

@media (min-width: 1280px) {
  .nav-link {
    font-size: 0.9375rem;
  }
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-saffron);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-transparent {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.15) 80%,
    transparent 100%
  );
}

.nav-transparent .nav-link {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.nav-scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-link {
  color: var(--color-cedar);
  text-shadow: none;
}

/* Quiet DE · EN language toggle */
.lang-switcher {
  font-family: var(--font-body);
}

.lang-switcher-sep {
  font-size: 0.7rem;
  opacity: 0.45;
  user-select: none;
  line-height: 1;
}

.lang-switcher-btn {
  background: none;
  border: none;
  padding: 0.15rem 0.1rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: inherit;
  opacity: 0.55;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    border-color 0.2s ease;
}

.lang-switcher-btn:hover {
  opacity: 0.9;
}

.lang-switcher-btn.is-active {
  opacity: 1;
  color: var(--color-pomegranate);
  border-bottom-color: var(--color-pomegranate);
}

.nav-transparent .lang-switcher {
  color: #ffffff;
}

.nav-transparent .lang-switcher-btn.is-active {
  color: #ffffff;
  border-bottom-color: var(--color-pomegranate);
}

.nav-scrolled .lang-switcher {
  color: var(--color-cedar);
}

.lang-switcher--mobile {
  color: var(--color-cedar);
}

.lang-switcher--mobile .lang-switcher-btn {
  color: var(--color-cedar);
  opacity: 0.55;
}

.lang-switcher--mobile .lang-switcher-btn.is-active {
  color: var(--color-pomegranate);
  opacity: 1;
  border-bottom-color: var(--color-pomegranate);
}

/* Keep mobile menu language readable even if the top bar was transparent */
.nav-transparent .lang-switcher--mobile,
.nav-transparent .lang-switcher--mobile .lang-switcher-btn {
  color: var(--color-cedar);
}

.nav-transparent .lang-switcher--mobile .lang-switcher-btn.is-active {
  color: var(--color-pomegranate);
  border-bottom-color: var(--color-pomegranate);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Form input */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #f0f0f0;
  border-radius: 0.75rem;
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-cedar);
  transition: border-color 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-saffron);
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.15);
}

/* Occasion card */
.occasion-card {
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.occasion-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.occasion-card:hover img {
  transform: scale(1.06);
}

.occasions-load-more {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.occasions-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.45rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-body, system-ui, sans-serif);
  cursor: pointer;
}

.occasions-load-more-btn:hover,
.occasions-load-more-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  outline: none;
}

/* Saffron blob */
.saffron-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.18;
}

/* Shimmer button */
@keyframes shimmer {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}

.shimmer-btn {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}

/* Lebanese red section backgrounds */
.bg-camel-section {
  background-color: var(--color-pomegranate);
}

/* Lebanese cedar tree decorative SVG watermark */
.cedar-watermark {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #ffffff;
}
::-webkit-scrollbar-thumb {
  background: #c0392b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #922b21;
}

::selection {
  background: var(--color-saffron);
  color: #fff;
}

/* Hero CTA buttons */
.hero-cta-primary {
  background: linear-gradient(135deg, #ee161f 0%, #c0000a 100%);
  box-shadow: 0 4px 24px rgba(238, 22, 31, 0.45);
  color: #fff;
  transition: all 0.3s ease;
}

.hero-cta-primary:hover {
  background: linear-gradient(135deg, #c0000a 0%, #a00008 100%);
  box-shadow: 0 8px 32px rgba(238, 22, 31, 0.6);
  transform: scale(1.05);
  color: #fff;
}

.hero-cta-primary:active {
  transform: scale(0.95);
}

.hero-cta-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  border-color: #fff;
  transform: scale(1.05);
}

.hero-cta-secondary:active {
  transform: scale(0.95);
}

/* White CTA on red card backgrounds */
.card-cta-white {
  background: #fff;
  color: #1a1a1a;
  transition: all 0.3s ease;
}

.card-cta-white:hover {
  background: #f5f5f5;
  color: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
