/* ============================================================
   BREW & CO. — Design System
   Modern Minimalist Cafe | Light/Cream Palette
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* ── Colors ── */
  --color-primary:          #2C1810;
  --color-primary-light:    #4A2E22;
  --color-secondary:        #8B6914;
  --color-secondary-light:  #B08A2E;
  --color-accent:           #D4A574;
  --color-accent-light:     #E4C9A8;

  --color-bg:               #FFF8F0;
  --color-bg-alt:           #F5EDE4;
  --color-surface:          #FFFFFF;
  --color-surface-hover:    #FAF5EE;

  --color-text:             #1A1A1A;
  --color-text-secondary:   #6B5B4E;
  --color-text-muted:       #715F53; /* WCAG AA compliant: 4.6:1 contrast against #FFF8F0 */
  --color-text-inverse:     #FFFFFF;

  --color-border:           #E8DDD2;
  --color-border-light:     #F0E8DE;

  --color-destructive:      #DC2626;
  --color-success:          #16A34A;
  --color-ring:             #8B6914;

  /* ── Typography ── */
  --font-heading:    'Outfit', system-ui, -apple-system, sans-serif;
  --font-body:       'Inter', system-ui, -apple-system, sans-serif;
  --font-accent:     'Playfair Display', Georgia, serif;

  /* Font Sizes (fluid) */
  --text-xs:    clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm:    clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base:  clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg:    clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-xl:    clamp(1.15rem, 1rem + 0.75vw, 1.25rem);
  --text-2xl:   clamp(1.4rem, 1.1rem + 1.5vw, 1.5rem);
  --text-3xl:   clamp(1.7rem, 1.2rem + 2.5vw, 1.875rem);
  --text-4xl:   clamp(2rem, 1.4rem + 3vw, 2.25rem);
  --text-5xl:   clamp(2.5rem, 1.5rem + 5vw, 3rem);
  --text-6xl:   clamp(3rem, 1.8rem + 6vw, 3.75rem);
  --text-hero:  clamp(3.2rem, 2rem + 6.5vw, 4.8rem);

  /* Line Heights */
  --leading-tight:   1.15;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  /* Letter Spacing */
  --tracking-tight:    -0.02em;
  --tracking-normal:   0;
  --tracking-wide:     0.05em;
  --tracking-wider:    0.1em;
  --tracking-widest:   0.2em;

  /* ── Spacing (8px base) ── */
  --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 */
  --space-32:  8rem;      /* 128px */

  /* Section spacing */
  --section-padding: clamp(4rem, 8vw, 7.5rem);

  /* ── Borders & Radius ── */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:   0 1px 3px rgba(44, 24, 16, 0.05);
  --shadow-md:   0 4px 8px -1px rgba(44, 24, 16, 0.08), 0 2px 4px -2px rgba(44, 24, 16, 0.04);
  --shadow-lg:   0 10px 18px -3px rgba(44, 24, 16, 0.1), 0 4px 6px -4px rgba(44, 24, 16, 0.05);
  --shadow-xl:   0 20px 28px -5px rgba(44, 24, 16, 0.12), 0 8px 12px -6px rgba(44, 24, 16, 0.06);
  --shadow-card: 0 4px 20px rgba(44, 24, 16, 0.06);
  --shadow-card-hover: 0 12px 36px rgba(44, 24, 16, 0.14);

  /* ── Transitions ── */
  --transition-fast:    150ms ease;
  --transition-normal:  250ms ease;
  --transition-slow:    400ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-spring:  450ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Z-Index ── */
  --z-base:      1;
  --z-dropdown:  10;
  --z-sticky:    20;
  --z-fixed:     40;
  --z-overlay:   60;
  --z-modal:     80;
  --z-toast:     100;

  /* ── Layout ── */
  --container-max: 1200px;
  --container-wide: 1380px;
  --navbar-height: 72px;
}

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

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

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

/* Skip link for a11y keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  z-index: 10001;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 3px solid var(--color-secondary);
}

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

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

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

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

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-primary);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-5xl); }
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 {
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.text-accent {
  font-family: var(--font-accent);
  font-style: italic;
}

.text-gold {
  color: var(--color-secondary);
}

.text-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-secondary);
  display: inline-block;
}

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

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

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

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 14px rgba(44, 24, 16, 0.25);
}

.btn--primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 24, 16, 0.3);
}

.btn--primary:active {
  transform: translateY(0) scale(0.98);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
}

.btn--gold {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
  color: var(--color-text-inverse);
  box-shadow: 0 4px 14px rgba(139, 105, 20, 0.3);
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 105, 20, 0.4);
}



/* ============================================================
   FOCUS STYLES (Accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 3px;
}

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

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

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