:root {
  --bg-cream: #fdf8f0;
  --accent: #f4a261;
  /* Hero & main headings - deep, elegant coffee brown */
  --text-heading: #1f160f;
  /* Nav & body text - warm brown */
  --text-nav: #2c2118;
  --text-body: #6b5e52;
  --shadow-amber: rgba(251, 191, 36, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-cream);
  background-image: radial-gradient(
    circle at top,
    #fffaf5 0,
    #fef9f3 35%,
    #fdf8f0 65%
  );
  color: var(--text-body);
}

/* Artistic Watercolor Brush Strokes */
.artistic-brush::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background-image: 
    radial-gradient(ellipse 420px 160px at 18% 0%, rgba(244, 162, 97, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 320px 130px at 82% 8%, rgba(251, 191, 36, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 260px 110px at 50% 4%, rgba(244, 162, 97, 0.06) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
  /* Overall stroke visibility ~3–5% */
  opacity: 0.22;
}

.section-brush::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  height: 150px;
  background-image: 
    radial-gradient(ellipse 320px 110px at 10% 0%, rgba(244, 162, 97, 0.07) 0%, transparent 63%),
    radial-gradient(ellipse 220px 90px at 90% 0%, rgba(251, 191, 36, 0.06) 0%, transparent 63%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
}

.font-playfair {
  font-family: "Playfair Display", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

/* Headings with Artistic Text Shadow */
h1, h2, h3, .font-playfair {
  color: var(--text-heading);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

h1 {
  font-weight: 800;
}

h2 {
  font-weight: 700;
}

.font-poppins {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

/* Khi modal mở, khóa scroll nền */
body.modal-open {
  overflow: hidden;
}

/* Custom Glowing Cursor - Soft Warm Orange */
#custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(244, 162, 97, 0.9);
  box-shadow:
    0 0 12px rgba(244, 162, 97, 0.8),
    0 0 30px rgba(244, 162, 97, 0.4);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 60;
  mix-blend-mode: screen;
  transition:
    width 0.16s ease-out,
    height 0.16s ease-out,
    border-color 0.2s ease-out,
    box-shadow 0.2s ease-out,
    transform 0.12s ease-out,
    opacity 0.18s ease-out;
}

body.cursor-hidden #custom-cursor {
  opacity: 0;
}

#custom-cursor.cursor-hover {
  width: 32px;
  height: 32px;
  border-width: 1px;
  border-color: rgba(244, 162, 97, 0.95);
  box-shadow:
    0 0 20px rgba(244, 162, 97, 0.9),
    0 0 45px rgba(244, 162, 97, 0.6);
}

@media (max-width: 768px) {
  #custom-cursor {
    display: none;
  }
}

/* Navigation - Bright White with Amber Border */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-nav);
  opacity: 0.85;
  transition:
    color 0.18s ease-out,
    opacity 0.18s ease-out,
    border-color 0.18s ease-out,
    transform 0.16s ease-out;
  border-bottom: 1px solid transparent;
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(244, 162, 97, 0),
    rgba(244, 162, 97, 0.9),
    rgba(244, 162, 97, 0)
  );
  opacity: 0;
  transform: scaleX(0.8);
  transform-origin: center;
  transition:
    opacity 0.18s ease-out,
    transform 0.18s ease-out;
}

.nav-link:hover {
  opacity: 1;
  color: var(--text-heading);
  transform: translateY(-1px);
}

.nav-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-link-active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: rgba(244, 162, 97, 0.95);
}

.nav-link-active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Card body text */
.card-desc {
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-body);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tilt cards - White with Amber Shadow */
.tilt-card {
  transform-style: preserve-3d;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.25s ease-out,
    border-color 0.25s ease-out,
    background-color 0.22s ease-out;
  will-change: transform;
}

.tilt-card:hover {
  box-shadow:
    0 22px 55px rgba(251, 191, 36, 0.25),
    0 0 32px rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
}

.world-card {
  border-radius: 1.5rem;
  border: 1px solid #f5e8d3;
  background: #ffffff;
  padding: 1.15rem;
  box-shadow:
    0 22px 45px rgba(251, 191, 36, 0.4),
    0 0 30px rgba(251, 191, 36, 0.25);
}

.category-card {
  border-radius: 1.5rem;
  border: 1px solid #f5e8d3;
  background: #ffffff;
  padding: 1.25rem 1.3rem;
  box-shadow:
    0 22px 45px rgba(251, 191, 36, 0.4),
    0 0 30px rgba(251, 191, 36, 0.25);
}

/* All Cards - White with Amber Shadow */
.card-white {
  background: #ffffff;
  border-radius: 1.5rem;
  box-shadow:
    0 22px 45px rgba(251, 191, 36, 0.4),
    0 0 30px rgba(251, 191, 36, 0.25);
}

/* Food Images - h-56 with rounded-t-3xl, bright and appetizing */
img[src*="unsplash"], 
img[src*="food"],
.recipe-image,
.food-image,
.food-card img,
.recipe-card img {
  height: 14rem;
  object-fit: cover;
  border-radius: 1.5rem 1.5rem 0 0;
  filter: brightness(1.05) contrast(1.02) saturate(1.1);
  transition: filter 0.3s ease;
}

img[src*="unsplash"]:hover,
img[src*="food"]:hover,
.recipe-image:hover,
.food-image:hover,
.food-card img:hover,
.recipe-card img:hover {
  filter: brightness(1.1) contrast(1.05) saturate(1.15);
}

/* Fade-in on scroll */
.fade-in,
[data-fade] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease-out,
    transform 0.55s ease-out;
}

.fade-in.visible,
[data-fade].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero parallax */
.js-hero-parallax {
  perspective: 1200px;
}

.hero-layer {
  transform-origin: center;
  transition: transform 0.16s ease-out;
  will-change: transform;
}

/* Hero Overlay - Warm Cream Dreamy */
.hero-overlay {
  background: rgba(253, 248, 240, 0.72);
}

.hero-bg-image {
  filter: brightness(1.1) contrast(0.95) saturate(1.05);
  mix-blend-mode: multiply;
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 6px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 70;
  animation: confetti-fall 900ms forwards ease-out;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, 0, 0) rotateZ(0deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--confetti-x, 0px), 120px, 0)
      rotateZ(var(--confetti-rotate, 12deg));
    opacity: 0;
  }
}

/* Small glow animation - Warm Orange */
@keyframes glowPulse {
  0% {
    box-shadow:
      0 0 12px rgba(244, 162, 97, 0.6),
      0 0 28px rgba(244, 162, 97, 0.2);
  }
  50% {
    box-shadow:
      0 0 18px rgba(244, 162, 97, 0.9),
      0 0 36px rgba(244, 162, 97, 0.35);
  }
  100% {
    box-shadow:
      0 0 12px rgba(244, 162, 97, 0.6),
      0 0 28px rgba(244, 162, 97, 0.2);
  }
}

.glow-soft {
  animation: glowPulse 2.6s ease-in-out infinite;
}

/* Modal công thức - Professional & Beautiful Design */
.recipe-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(253, 248, 240, 0.97);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem;
}

.recipe-modal-overlay.is-open {
  display: flex;
  opacity: 1;
}

.recipe-modal {
  position: relative;
  width: 100%;
  max-width: 1000px;
  max-height: 88vh;
  border-radius: 2rem;
  background: white;
  border: 1px solid rgba(251, 191, 36, 0.2);
  box-shadow:
    0 40px 100px rgba(251, 191, 36, 0.15),
    0 0 60px rgba(244, 162, 97, 0.1),
    0 20px 40px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.recipe-modal-overlay.is-open .recipe-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.recipe-modal-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 88vh;
  scroll-behavior: smooth;
}

.recipe-modal-inner::-webkit-scrollbar {
  width: 10px;
}

.recipe-modal-inner::-webkit-scrollbar-track {
  background: rgba(251, 191, 36, 0.08);
  border-radius: 10px;
  margin: 8px 0;
}

.recipe-modal-inner::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, rgba(251, 191, 36, 0.4), rgba(244, 162, 97, 0.4));
  border-radius: 10px;
  transition: background 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.recipe-modal-inner::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, rgba(251, 191, 36, 0.6), rgba(244, 162, 97, 0.6));
}

@media (max-width: 768px) {
  .recipe-modal-inner {
    display: flex;
    flex-direction: column;
    max-height: 88vh;
  }
  
  .recipe-modal {
    max-height: 90vh;
    border-radius: 1.5rem;
  }
  
  .recipe-modal-overlay {
    padding: 0.5rem;
  }
}

.recipe-modal-image-wrap {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  background: linear-gradient(135deg, #fef9f3 0%, #fdf8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-modal-image {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 0.4s ease;
}

.recipe-modal-image-wrap:hover .recipe-modal-image {
  transform: scale(1.08);
}

.recipe-modal-content {
  padding: 2.5rem 2.5rem 2rem;
  background: white;
  overflow-y: auto;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .recipe-modal-content {
    padding: 1.4rem 1.4rem 1.6rem;
  }
}

.recipe-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.25);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  box-shadow:
    0 4px 12px rgba(251, 191, 36, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.08);
  transition:
    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-modal-close:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px) scale(1.05);
  border-color: var(--accent);
  box-shadow:
    0 6px 20px rgba(244, 162, 97, 0.4),
    0 4px 12px rgba(251, 191, 36, 0.3);
}

.recipe-modal-close:active {
  transform: translateY(0) scale(0.98);
}

.recipe-modal-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  font-weight: 600;
  opacity: 0.9;
}

.recipe-modal-title {
  font-size: 2rem;
  line-height: 1.25;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .recipe-modal-title {
    font-size: 1.65rem;
  }
  
  .recipe-modal-content {
    padding: 1.75rem 1.5rem 1.5rem;
  }
}

.recipe-modal-meta {
  font-size: 0.85rem;
  color: var(--text-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.85;
  font-weight: 500;
  line-height: 1.6;
}

.recipe-modal-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem;
  flex: 1;
}

@media (max-width: 768px) {
  .recipe-modal-sections {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

.recipe-modal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(251, 191, 36, 0.2);
}

.recipe-modal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.75;
}

.recipe-modal-ingredients li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.4rem 0;
  position: relative;
  padding-left: 1.25rem;
}

.recipe-modal-ingredients li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1.4;
}

.recipe-modal-ingredients li span.recipe-icon {
  font-size: 0.9rem;
  opacity: 0.9;
  color: var(--accent);
}

.recipe-modal-steps li {
  padding: 0.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.recipe-modal-steps li:hover {
  border-left-color: rgba(251, 191, 36, 0.3);
  background-color: rgba(251, 191, 36, 0.03);
  padding-left: 0.75rem;
}

.recipe-step-index {
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 0.1rem;
  font-weight: 700;
  min-width: 1.75rem;
  flex-shrink: 0;
}

.recipe-step-text {
  line-height: 1.75;
  color: var(--text-body);
  flex: 1;
}
