/* ============================================================
   THE KAFFEE NATION — GLOBAL CSS
   Design System Foundation
   ============================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,700&family=Inter:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* Color Palette */
  --color-primary:       #1A0F0A;
  --color-secondary:     #3D1F0D;
  --color-accent:        #C8A97E;
  --color-highlight:     #F0E6D3;
  --color-bg:            #FAF7F2;
  --color-text-dark:     #2C1810;
  --color-text-light:    #8B6F5E;
  --color-success:       #4A7C59;
  --color-glass:         rgba(255, 248, 240, 0.12);
  --color-glass-border:  rgba(200, 169, 126, 0.25);
  --color-glass-bg:      rgba(255, 248, 240, 0.08);
  --color-white:         #FFFFFF;
  --color-black:         #000000;
  --color-overlay:       rgba(26, 15, 10, 0.6);
  --color-overlay-deep:  rgba(26, 15, 10, 0.85);

  /* Theme System Variables from User Request */
  --bg-color: #FAF7F2;
  --text-color: #1A0F0A;
  --text-primary: #1A0F0A;
  --text-secondary: #3D1F0D;
  --nav-bg: rgba(255, 255, 255, 0.85);

  /* Gradient Definitions */
  --gradient-hero:       linear-gradient(135deg, #1A0F0A 0%, #3D1F0D 40%, #5C2E14 70%, #3D1F0D 100%);
  --gradient-warm:       linear-gradient(135deg, #C8A97E 0%, #F0E6D3 100%);
  --gradient-accent:     linear-gradient(135deg, #C8A97E, #E8C99A);
  --gradient-text:       linear-gradient(135deg, #3D1F0D 0%, #C8A97E 100%);
  --gradient-card-overlay: linear-gradient(to top, rgba(26, 15, 10, 0.5) 0%, rgba(26, 15, 10, 0.2) 60%, rgba(26, 15, 10, 0.05) 100%);

  /* Typography */
  --font-display:        'Playfair Display', Georgia, serif;
  --font-body:           'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-elegant:        'Cormorant Garamond', Georgia, serif;
  --font-mono:           'DM Mono', 'Courier New', monospace;

  /* Font Sizes (fluid) */
  --fs-xs:   clamp(0.65rem, 1.2vw, 0.75rem);
  --fs-sm:   clamp(0.8rem, 1.5vw, 0.875rem);
  --fs-base: clamp(0.9rem, 1.8vw, 1rem);
  --fs-md:   clamp(1rem, 2vw, 1.125rem);
  --fs-lg:   clamp(1.1rem, 2.5vw, 1.25rem);
  --fs-xl:   clamp(1.3rem, 3vw, 1.5rem);
  --fs-2xl:  clamp(1.6rem, 4vw, 2rem);
  --fs-3xl:  clamp(2rem, 5vw, 2.5rem);
  --fs-4xl:  clamp(2.5rem, 6vw, 3.5rem);
  --fs-5xl:  clamp(3rem, 7vw, 5rem);
  --fs-hero: clamp(3.5rem, 9vw, 7.5rem);

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-3xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(44, 24, 16, 0.1), 0 1px 2px rgba(44, 24, 16, 0.08);
  --shadow-md:    0 4px 12px rgba(44, 24, 16, 0.12), 0 2px 6px rgba(44, 24, 16, 0.08);
  --shadow-lg:    0 10px 30px rgba(44, 24, 16, 0.15), 0 4px 10px rgba(44, 24, 16, 0.1);
  --shadow-xl:    0 20px 50px rgba(44, 24, 16, 0.2), 0 8px 20px rgba(44, 24, 16, 0.12);
  --shadow-2xl:   0 30px 80px rgba(44, 24, 16, 0.25), 0 12px 30px rgba(44, 24, 16, 0.15);
  --shadow-glow:  0 0 30px rgba(200, 169, 126, 0.3), 0 0 60px rgba(200, 169, 126, 0.15);
  --shadow-inner: inset 0 2px 8px rgba(44, 24, 16, 0.1);

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-below:    -1;
  --z-base:      0;
  --z-raised:    10;
  --z-floating:  100;
  --z-sticky:    200;
  --z-overlay:   300;
  --z-modal:     400;
  --z-toast:     500;
  --z-cursor:    1000;
  --z-preloader: 9999;

  /* Layout */
  --max-width:      1400px;
  --content-width:  1200px;
  --section-padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 2rem);
  --nav-height:      80px;

  /* Glass Effects */
  --glass-blur:    blur(20px) saturate(180%);
  --glass-border:  1px solid rgba(200, 169, 126, 0.2);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
  transition: all 0.3s ease;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 700;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: var(--z-cursor);
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

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

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

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--fs-base);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text-dark);
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.font-display   { font-family: var(--font-display); }
.font-body      { font-family: var(--font-body); }
.font-elegant   { font-family: var(--font-elegant); }
.font-mono      { font-family: var(--font-mono); }

.text-xs    { font-size: var(--fs-xs); }
.text-sm    { font-size: var(--fs-sm); }
.text-base  { font-size: var(--fs-base); }
.text-md    { font-size: var(--fs-md); }
.text-lg    { font-size: var(--fs-lg); }
.text-xl    { font-size: var(--fs-xl); }
.text-2xl   { font-size: var(--fs-2xl); }
.text-3xl   { font-size: var(--fs-3xl); }
.text-4xl   { font-size: var(--fs-4xl); }
.text-5xl   { font-size: var(--fs-5xl); }

.text-primary   { color: var(--color-primary); }
.text-accent    { color: var(--color-accent); }
.text-light     { color: var(--color-text-light); }
.text-white     { color: var(--color-white); }
.text-gradient  {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  color: var(--color-text-dark);
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-family: var(--font-elegant);
  font-size: var(--fs-xl);
  font-style: italic;
  color: var(--color-text-light);
  line-height: 1.5;
  max-width: 600px;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.content-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

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

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header.left-aligned {
  text-align: left;
}

.grid { display: grid; }
.flex { display: 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; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border: 2px solid transparent;
  outline: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: inherit;
}
.btn:hover::after { opacity: 1; }

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

/* Ripple */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleEffect 0.4s linear;
  pointer-events: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--color-primary);
  box-shadow: var(--shadow-md), 0 0 0 0 rgba(200, 169, 126, 0);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(200, 169, 126, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  border-color: rgba(139, 111, 94, 0.3);
}
.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-white {
  background: white;
  color: var(--color-primary);
}
.btn-white:hover {
  background: var(--color-highlight);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--fs-md);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-xs);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ============================================================
   CARDS BASE
   ============================================================ */
.card {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(200, 169, 126, 0.15);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(200, 169, 126, 0.35);
}

.card-glass {
  background: var(--color-glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   GLASSMORPHISM
   ============================================================ */
.glass {
  background: var(--color-glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
}

.glass-warm {
  background: rgba(240, 230, 211, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(200, 169, 126, 0.25);
}

/* ============================================================
   NOISE TEXTURE SVG OVERLAY
   ============================================================ */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.badge-accent {
  background: rgba(200, 169, 126, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(200, 169, 126, 0.3);
}

.badge-success {
  background: rgba(74, 124, 89, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(74, 124, 89, 0.3);
}

.badge-dark {
  background: rgba(26, 15, 10, 0.8);
  color: var(--color-accent);
  border: 1px solid rgba(200, 169, 126, 0.2);
}

.badge-glass {
  background: rgba(255, 248, 240, 0.12);
  backdrop-filter: blur(10px);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-open {
  background: rgba(74, 124, 89, 0.2);
  color: #5E9E73;
  border: 1px solid rgba(74, 124, 89, 0.3);
}

.badge-open::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse-dot 1.5s infinite;
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.divider {
  width: 60px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  margin: var(--space-6) auto;
}

.divider.left { margin-left: 0; }

/* ============================================================
   IMAGES
   ============================================================ */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-blur-up {
  filter: blur(8px);
  transition: filter var(--transition-slow);
}
.img-blur-up.loaded { filter: blur(0); }

/* ============================================================
   SECTION BACKGROUNDS
   ============================================================ */
.bg-primary { background: var(--color-primary); }
.bg-secondary { background: var(--color-secondary); }
.bg-accent { background: var(--color-accent); }
.bg-highlight { background: var(--color-highlight); }
.bg-linen { background: var(--color-bg); }
.bg-espresso {
  background: #0D0805;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

.bg-warm-gradient {
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-highlight) 100%);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-dark);
  letter-spacing: 0.02em;
}

.form-input {
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid rgba(139, 111, 94, 0.25);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  color: var(--color-text-dark);
  font-size: var(--fs-base);
  transition: all var(--transition-base);
  outline: none;
  width: 100%;
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 126, 0.15);
}

.form-input::placeholder {
  color: var(--color-text-light);
  opacity: 0.7;
}

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

/* ============================================================
   STAR RATINGS
   ============================================================ */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-accent);
  font-size: var(--fs-sm);
}

/* ============================================================
   SOCIAL ICONS
   ============================================================ */
.social-links {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: rgba(200, 169, 126, 0.1);
  border: 1px solid rgba(200, 169, 126, 0.2);
  color: var(--color-accent);
  font-size: var(--fs-md);
  transition: all var(--transition-spring);
  text-decoration: none;
}

.social-link:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(200, 169, 126, 0.3);
}

/* ============================================================
   LOADING STATES
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, #f0e6d3 0%, #faf7f2 50%, #f0e6d3 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-secondary); }

/* ============================================================
   SELECTION STYLING
   ============================================================ */
::selection {
  background: rgba(200, 169, 126, 0.3);
  color: var(--color-primary);
}

/* ============================================================
   FOCUS STYLES
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.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;
}

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.z-1 { z-index: 1; }
.z-10 { z-index: 10; }
.pointer-events-none { pointer-events: none; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.block { display: block; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* ============================================================
   RESPONSIVE GRID SYSTEMS
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

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

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

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

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section-title { font-size: var(--fs-3xl); }
}

/* Tablet styles */
@media (max-width: 1024px) {
  :root { --nav-height: 70px; }
}

/* Mobile styles */
@media (max-width: 768px) {
  :root { --nav-height: 60px; }
  body { cursor: auto; }
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
