/* ==========================================================================
   Pizzeria Maniva Da Matteo - Core Styles & Design System
   ========================================================================== */

:root {
  --background: 40 30% 96%;
  --foreground: 0 0% 10%;
  --card: 40 26% 98%;
  --card-foreground: 0 0% 10%;
  --popover: 40 26% 98%;
  --popover-foreground: 0 0% 10%;
  --primary: 13 66% 45%;
  --primary-foreground: 40 30% 98%;
  --secondary: 40 18% 90%;
  --secondary-foreground: 0 0% 12%;
  --muted: 40 14% 93%;
  --muted-foreground: 20 8% 38%;
  --accent: 13 42% 93%;
  --accent-foreground: 13 60% 30%;
  --destructive: 0 72% 45%;
  --destructive-foreground: 40 30% 98%;
  --border: 40 14% 88%;
  --input: 40 14% 88%;
  --ring: 13 66% 45%;
  --radius: 0.375rem;

  --font-heading: 'Playfair Display', ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dark {
  --background: 0 0% 7%;
  --foreground: 38 24% 87%;
  --card: 0 0% 10%;
  --card-foreground: 38 24% 87%;
  --popover: 0 0% 10%;
  --popover-foreground: 38 24% 87%;
  --primary: 29 86% 64%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 15%;
  --secondary-foreground: 38 24% 90%;
  --muted: 0 0% 16%;
  --muted-foreground: 38 14% 64%;
  --accent: 29 42% 18%;
  --accent-foreground: 29 86% 72%;
  --destructive: 0 60% 45%;
  --destructive-foreground: 38 24% 90%;
  --border: 0 0% 20%;
  --input: 0 0% 20%;
  --ring: 29 86% 64%;
}

/* Base Reset & Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

p {
  color: hsl(var(--muted-foreground));
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

/* Container & Grid Utilities */
.container {
  width: 100%;
  max-width: 80rem; /* 1280px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Typography Helpers */
.font-heading {
  font-family: var(--font-heading);
}

.text-balance {
  text-wrap: balance;
}

.eyebrow {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: hsl(var(--primary));
  display: inline-block;
}

.text-primary {
  color: hsl(var(--primary)) !important;
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground)) !important;
}

.text-foreground {
  color: hsl(var(--foreground)) !important;
}

/* General Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px 0 hsla(var(--primary), 0.3);
  text-decoration: none;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 hsla(var(--primary), 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary));
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-hero-secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  color: #ffffff;
}

/* Icon Buttons (Theme & Lang Switchers) */
.icon-btn {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  background-color: hsl(var(--secondary));
}

.lang-toggle-btn {
  display: inline-flex;
  height: 2.75rem;
  min-width: 3.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: hsl(var(--foreground));
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lang-toggle-btn:hover {
  background-color: hsl(var(--secondary));
}

/* Scroll-triggered reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Fallback for when JS is not ready or disabled */
html:not(.js-ready) .reveal {
  opacity: 1;
  transform: none;
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.15s;
}

.delay-3 {
  transition-delay: 0.22s;
}

.delay-4 {
  transition-delay: 0.3s;
}

.delay-5 {
  transition-delay: 0.38s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground));
}