/* ==========================================================
   GLOBAL.CSS — Master Theme & Design System
   United Bros Kitchens
   
   This is THE master file. All design tokens (colors, fonts,
   spacing, shadows, etc.) are defined here as CSS custom
   properties. Changing a value here cascades everywhere.
   ========================================================== */

/* ----- Google Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ==========================================================
   1. DESIGN TOKENS (Custom Properties)
   Change these to retheme the entire site.
   ========================================================== */
:root {
  /* --- Colors --- */
  --color-primary: #1A1A1A;
  /* Near-black — body text, headings */
  --color-secondary: #B8860B;
  /* Dark gold — brand accent (matches logo) */
  --color-accent: #D4A853;
  /* Warm gold — CTAs, hover states */
  --color-accent-light: #E8C97A;
  /* Light gold — subtle highlights */
  --color-bg: #FAFAF8;
  /* Warm off-white — page background */

  --color-bg-alt: #F2F2F2;
  /* Darker gray — alternating sections */
  --color-surface: #FFFFFF;
  /* Pure white — card/section backgrounds */
  --color-muted: #6B7280;
  /* Gray — secondary text, captions */
  --color-border: #E5E7EB;
  /* Light gray — dividers, borders */
  --color-success: #059669;
  /* Green — form success */
  --color-error: #DC2626;
  /* Red — form errors */

  /* --- Typography --- */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Fluid type scale using clamp(min, preferred, max) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.4rem + 2vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.5rem + 3vw, 3.25rem);
  --text-5xl: clamp(2.75rem, 1.8rem + 4vw, 4rem);

  /* --- Spacing Scale --- */
  --space-xs: 0.25rem;
  /* 4px */
  --space-sm: 0.5rem;
  /* 8px */
  --space-md: 1rem;
  /* 16px */
  --space-lg: 1.5rem;
  /* 24px */
  --space-xl: 2rem;
  /* 32px */
  --space-2xl: 3rem;
  /* 48px */
  --space-3xl: 4rem;
  /* 64px */
  --space-4xl: 6rem;
  /* 96px */
  --space-section: clamp(4rem, 3rem + 5vw, 8rem);
  /* Vertical section padding */

  /* --- Layout --- */
  --container-max: 1200px;
  --container-narrow: 800px;
  --container-wide: 1400px;
  --nav-height: 80px;
  --border-radius: 8px;
  --border-radius-lg: 16px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}


/* ==========================================================
   2. CSS RESET (Modern, minimal)
   ========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

ul,
ol {
  list-style: none;
}

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


/* ==========================================================
   3. BASE TYPOGRAPHY
   ========================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-muted);
  max-width: 65ch;
  /* Optimal reading width */
}

strong {
  font-weight: 600;
}

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


/* ==========================================================
   4. LAYOUT UTILITIES
   ========================================================== */

/* Container — centers content with max-width */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* Section — vertical rhythm */
.section {
  padding-block: var(--space-section);
}

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

/* Text alignment */
.text-center {
  text-align: center;
}

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

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

/* Flex utilities */
.flex {
  display: flex;
}

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

.flex-wrap {
  flex-wrap: wrap;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

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

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

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

.gap-xl {
  gap: var(--space-xl);
}

.gap-2xl {
  gap: var(--space-2xl);
}

/* Grid utilities */
.grid {
  display: grid;
}

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

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

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

/* Responsive grid collapse */
@media (max-width: 768px) {

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

@media (min-width: 769px) and (max-width: 1024px) {

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

/* Spacing helpers */
.mb-sm {
  margin-bottom: var(--space-sm);
}

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

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

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mb-2xl {
  margin-bottom: var(--space-2xl);
}

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

/* Visibility helpers */
.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;
}

/* ----- Gold accent line (used under headings) ----- */
.accent-line {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
  border-radius: 2px;
  margin-top: var(--space-sm);
}

.accent-line--center {
  margin-inline: auto;
}

/* ----- Section header pattern (heading + subtext + accent) ----- */
.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header__label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.section-header__title {
  margin-bottom: var(--space-md);
}

.section-header__subtitle {
  font-size: var(--text-lg);
  max-width: 55ch;
}

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

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

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