/* =============================================
   Variables
   ============================================= */
:root {
  /* Colors */
  --color-bg: #0E0F12; /* primary background */
  --color-bg-secondary: #1C1F26; /* section background */
  --color-bg-card: #23252B; /* content cards */

  --color-text: #F5EFE6; /* primary text (warm ivory) */
  --color-heading: #C8A45A; /* antique gold */

  --color-primary: #B45E3C; /* deep copper (CTAs) */
  --color-primary-hover: #7A3E2A; /* dark bronze */

  --color-success: #1F4D4D; /* muted emerald */
  --color-warning: #CBB08A; /* champagne beige */
  --color-danger: #D9534F; /* refined red for alerts */

  --gray-50: #f8f8f8;
  --gray-100: #e1e1e1;
  --gray-200: #c7c7c7;
  --gray-300: #a3a3a3;
  --gray-400: #818181;
  --gray-500: #5f5f5f;
  --gray-600: #3f3f3f;
  --gray-700: #2e2e2e;
  --gray-800: #1e1e1e;
  --gray-900: #121212;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", "Playfair Display", "Georgia", serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px – comfortable reading */
  --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 */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* 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-7: 1.75rem;  /* 28px */
  --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 (subtle, cinematic) */
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 26px 80px rgba(0, 0, 0, 0.75);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --max-width: 1200px;
  --max-width-wide: 1440px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================
   Reset / Normalize
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

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

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

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   Base Styles
   ============================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-heading);
  line-height: var(--line-height-tight);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl));
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-4xl));
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

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

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  }

p + p {
  margin-top: -0.5rem;
}

strong {
  font-weight: 600;
}

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

a {
  position: relative;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary);
}

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

hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: var(--space-8) 0;
}

/* =============================================
   Accessibility & Focus Styles
   ============================================= */
:focus:not(:focus-visible) {
  outline: none;
}

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

.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 {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

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

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

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

/* 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-col {
  display: flex;
  flex-direction: column;
}

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

.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-8);
}

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

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

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

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

.mt-0 { margin-top: 0 !important; }
.mt-sm { margin-top: var(--space-3) !important; }
.mt-md { margin-top: var(--space-6) !important; }
.mt-lg { margin-top: var(--space-10) !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; }

/* =============================================
   Components
   ============================================= */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-elevated);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(200, 164, 90, 0.5);
}

.btn-outline:hover {
  background: rgba(200, 164, 90, 0.08);
  border-color: var(--color-heading);
}

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

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

.btn:focus-visible {
  outline: 2px solid var(--color-warning);
  outline-offset: 3px;
}

/* Form elements */
.input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(12, 12, 16, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: 1.4;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

.input::placeholder,
textarea::placeholder {
  color: rgba(245, 239, 230, 0.45);
}

.input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(180, 94, 60, 0.5);
  background-color: rgba(14, 15, 18, 1);
}

.input[disabled],
textarea[disabled],
select[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.8);
}

/* Card */
.card {
  background-color: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.card--soft {
  background: radial-gradient(circle at top, rgba(200, 164, 90, 0.06), transparent 55%),
              var(--color-bg-card);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-2xl);
  color: var(--color-heading);
}

.card-meta {
  font-size: var(--font-size-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.6);
}

/* Age verification modal (21+) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(200, 164, 90, 0.18), transparent 65%),
              rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal {
  max-width: 480px;
  width: 100%;
  background: #f8f4ec;
  color: #1b1b1e;
  border-radius: 18px;
  padding: var(--space-8);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85);
  position: relative;
}

.modal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(180, 94, 60, 0.5);
  pointer-events: none;
}

.modal-header {
  margin-bottom: var(--space-4);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-snug);
  color: #1b1b1e;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-subtitle {
  font-size: var(--font-size-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
  margin-top: var(--space-1);
}

.modal-body {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: rgba(0, 0, 0, 0.82);
  margin-bottom: var(--space-6);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.modal-actions .btn-primary {
  background-color: #1b1b1e;
  color: #f8f4ec;
}

.modal-actions .btn-primary:hover {
  background-color: #000;
}

.modal-actions .btn-outline {
  border-color: rgba(27, 27, 30, 0.4);
  color: #1b1b1e;
}

.modal-actions .btn-outline:hover {
  background-color: rgba(27, 27, 30, 0.04);
  border-color: rgba(27, 27, 30, 0.65);
}

@media (max-width: 600px) {
  .modal {
    margin: 0 var(--space-4);
    padding: var(--space-6);
  }
}

/* Hero imagery helpers (cinematic) */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: var(--color-text);
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(200, 164, 90, 0.22), transparent 55%),
              linear-gradient(to bottom, rgba(14, 15, 18, 0.05), rgba(14, 15, 18, 0.9));
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-overlay-dark {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), rgba(14, 15, 18, 1));
}

/* Image treatment */
.img-soft-edge {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.img-soft-edge img {
  transform: scale(1.02);
  transition: transform 600ms ease-out;
}

.img-soft-edge:hover img {
  transform: scale(1.05);
}

/* Wine / menu list helpers */
.list-subtle {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-subtle li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.list-subtle li:last-child {
  border-bottom: none;
}

.list-subtle-name {
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
}

.list-subtle-meta {
  font-size: var(--font-size-sm);
  color: rgba(245, 239, 230, 0.65);
}

.list-subtle-price {
  font-size: var(--font-size-sm);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-heading);
  white-space: nowrap;
}

/* Toast / message helper */
.toast {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background-color: rgba(35, 37, 43, 0.96);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: var(--font-size-sm);
  z-index: 9000;
}

.toast--success {
  border-color: rgba(31, 77, 77, 0.8);
}

.toast--danger {
  border-color: rgba(217, 83, 79, 0.85);
}
