/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

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

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.text-display {
  font-family: var(--font-display);
  font-style: italic;
}

.text-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.text-muted { color: var(--color-text-muted); }
.text-faint  { color: var(--color-text-faint); }
.text-primary { color: var(--color-primary); }
.text-accent  { color: var(--color-accent); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--section-pad);
}

.section--alt {
  background-color: var(--color-bg-3);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ============================================================
   BUTTONS — REUSABLE COMPONENT
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.btn:hover::before { opacity: 1; }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(200,51,10,0.4);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200,51,10,0.5);
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 4px 20px rgba(245,166,35,0.3);
}

.btn--accent:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-hover);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding-inline: var(--space-4);
}

.btn--ghost:hover { color: var(--color-text); }

.btn--sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}

.btn--lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-base);
}

/* ============================================================
   BADGE / TAG COMPONENT
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge--hot {
  background: rgba(200,51,10,0.2);
  color: #FF6B4A;
  border: 1px solid rgba(200,51,10,0.4);
}

.badge--new {
  background: rgba(245,166,35,0.15);
  color: var(--color-accent);
  border: 1px solid rgba(245,166,35,0.3);
}

.badge--veg {
  background: rgba(34,197,94,0.15);
  color: #4ADE80;
  border: 1px solid rgba(34,197,94,0.3);
}

.badge--spicy {
  background: rgba(239,68,68,0.15);
  color: #F87171;
  border: 1px solid rgba(239,68,68,0.3);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  margin-block: var(--space-4);
}

.divider--center { margin-inline: auto; }

/* ============================================================
   SECTION HEADER UTILITY
   ============================================================ */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
}

.section-header--center .divider { margin-inline: auto; }

.section-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.7;
}

.section-header--center .section-subtitle { margin-inline: auto; }

/* ============================================================
   CARD BASE — Extended in components
   ============================================================ */
.card {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

/* ============================================================
   NOISE TEXTURE OVERLAY
   ============================================================ */
.noise-overlay {
  position: relative;
}

.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: var(--color-primary);
  color: #fff;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-pad: var(--space-16); }
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
  .container { padding-inline: var(--space-4); }
}
