/* ========================================================================
   Variables
   ======================================================================== */

:root {
  /* Color palette - warm, trustworthy, gastronomic */
  --color-bg: #faf5f0;
  --color-surface: #ffffff;
  --color-text: #1f130e;
  --color-text-muted: #6b4b3a;

  --color-primary: #b43b1f; /* pizza oven / tomato */
  --color-primary-soft: #fbe1d9;
  --color-success: #2e7d32;
  --color-warning: #f9a825;
  --color-danger: #c62828;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Playfair Display", "Times New Roman", serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 15px 35px rgba(15, 23, 42, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 220ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-width: 1120px;
  --container-padding-x: var(--space-4);
}

@media (min-width: 768px) {
  :root {
    --container-padding-x: var(--space-6);
  }
}

/* ========================================================================
   Reset / Normalize
   ======================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

img,
video,
canvas,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
  margin: 0;
}

/* Remove default link styles */

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

/* ========================================================================
   Base Styles
   ======================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

/* Headings - warm, gastronomic feel */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 3vw, 2.75rem);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.125rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
}

strong {
  font-weight: 600;
}

/* Links - subtle, trustworthy */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: #922f19;
}

a:active {
  opacity: 0.9;
}

/* ========================================================================
   Accessibility & Motion
   ======================================================================== */

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Screen reader only */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================================================
   Utilities
   ======================================================================== */

/* Container for centered, readable layouts */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
}

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section--soft {
  background-color: #f7eee6;
}

/* Flex utilities */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex-column {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: var(--space-3);
}

.gap-md {
  gap: var(--space-4);
}

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

/* Grid utilities */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Alignment & spacing helpers */

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

.text-right {
  text-align: right;
}

.mt-0 {
  margin-top: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-sm {
  margin-bottom: var(--space-3) !important;
}

.mb-md {
  margin-bottom: var(--space-6) !important;
}

.mb-lg {
  margin-bottom: var(--space-10) !important;
}

.py-section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

/* ========================================================================
   Components
   ======================================================================== */

/* Buttons - primary actions like rendelés / foglalás */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.btn:hover {
  background-color: #922f19;
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn:focus-visible {
  outline: 3px solid #fbc19f;
  outline-offset: 3px;
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-primary)!important;
  border-color: rgba(180, 59, 31, 0.2);
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: var(--color-primary-soft);
  box-shadow: none;
}

.btn--secondary {
  background-color: #f7eee6;
  color: var(--color-text)!important;
  border-color: #e1c9b5;
  box-shadow: none;
}

.btn--secondary:hover {
  background-color: #f1e0d3;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Form controls - for foglalás, kapcsolat, rendelés */

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--gray-400);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(180, 59, 31, 0.15);
  outline: none;
}

.input[disabled],
.textarea[disabled],
.select[disabled] {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Card - for pizza, menü, ajánlatok, info blokkok */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
}

.card--soft {
  background-color: #fff8f1;
}

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card__body {
  font-size: var(--font-size-sm);
}

/* Simple tag-style badge for labels like "Új", "Akció" */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Media framing - for pizza photos */

.media-rounded {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.media-rounded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Header / Nav helpers (without full layout opinion) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(250, 245, 240, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 120, 96, 0.1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding-bottom: 0.1rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 999px;
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  width: 100%;
}

/* Footer helper */

.site-footer {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  background-color: #201310;
  color: #fdf7f1;
  font-size: var(--font-size-sm);
}

.site-footer a {
  color: #fdf7f1;
}

.site-footer a:hover {
  color: #f1c0a7;
}
