@import url('https://fonts.googleapis.com/css2?family=Parisienne&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --brand-black: #2E2D2C;
  --brand-white: #FFFFFF;

  --cream: #F3E8DD;
  --sand: #D8C2AE;
  --latte: #C79A74;
  --caramel: #A66F45;
  --espresso: #5C3A27;
  --deep-brown: #241713;
  --soft-gray: #E7E3DE;
  --muted-gray: #8C8780;

  --font-main: "Myriad Pro", "Source Sans 3", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-signature: "Pastel Trunk", "Allura", "Parisienne", cursive;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --ease-out-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-premium: cubic-bezier(0.65, 0, 0.35, 1);

  --container: 1280px;
  --page-margin: clamp(20px, 5vw, 80px);

  --text-xs: clamp(0.75rem, 0.72rem + 0.1vw, 0.8rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.95rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --text-2xl: clamp(2.25rem, 1.5rem + 3vw, 4.75rem);
  --text-hero: clamp(3rem, 2rem + 6vw, 8.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--brand-black);
  color: var(--brand-white);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  font-size: var(--text-base);
  line-height: 1.65;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.1;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease-out-premium);
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}

/* Focus state */
*:focus-visible {
  outline: 2px solid var(--latte);
  outline-offset: 4px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--brand-black);
}
::-webkit-scrollbar-thumb {
  background: var(--espresso);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--caramel);
}

/* Utility Layouts */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-margin);
  width: 100%;
}

section {
  padding: clamp(72px, 10vw, 150px) 0;
  position: relative;
  transition: background-color 0.8s var(--ease-in-out-premium), color 0.8s var(--ease-in-out-premium);
}

section.dark {
  background-color: var(--brand-black);
  color: var(--brand-white);
}

section.light {
  background-color: var(--cream);
  color: var(--brand-black);
}

/* Text utility classes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-hero { font-size: var(--text-hero); }

/* Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* --- ANIMATIONS & TRANSITIONS --- */
.fade-in {
  opacity: 0;
  animation: fadeIn 1.2s var(--ease-out-premium) forwards;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.2s var(--ease-out-premium) forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s var(--ease-out-premium), transform 1.2s var(--ease-out-premium);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatSteam {
  0% { stroke-dashoffset: 200; opacity: 0; }
  15% { opacity: 0.4; }
  50% { opacity: 0.8; }
  85% { opacity: 0.4; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.steam-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: floatSteam 10s linear infinite;
}

.steam-path-delayed {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: floatSteam 12s linear infinite;
  animation-delay: 3s;
}

.timeline-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s var(--ease-in-out-premium);
}

.timeline-path.draw {
  stroke-dashoffset: 0;
}

/* Preloader Keyframes */
@keyframes textGlow {
  0%, 100% { opacity: 0.8; letter-spacing: 0.22em; }
  50% { opacity: 1; letter-spacing: 0.28em; }
}

/* Hover effects */
.hover-lift {
  transition: transform 0.4s var(--ease-out-premium), border-color 0.4s var(--ease-out-premium), box-shadow 0.4s var(--ease-out-premium) !important;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Header styles */
.nav-link {
  font-family: var(--font-main);
  fontSize: var(--text-sm);
  font-weight: 600;
  color: var(--brand-white);
  opacity: 0.8;
  position: relative;
  padding: var(--space-2) 0;
  transition: color 0.3s var(--ease-out-premium), opacity 0.3s var(--ease-out-premium);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--latte);
  transition: width 0.3s var(--ease-out-premium);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  opacity: 1;
  color: var(--latte);
}

.desktop-cta {
  font-family: var(--font-main);
  font-size: var(--text-sm);
  font-weight: 700;
  background-color: var(--brand-white);
  color: var(--brand-black);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease-out-premium), background-color 0.3s var(--ease-out-premium);
}

.desktop-cta:hover {
  transform: translateY(-2px);
  background-color: var(--cream);
}

/* Hero Button effects */
.hero-primary-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--latte);
  color: var(--brand-black);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  fontWeight: 700;
  fontSize: var(--text-sm);
  transition: background-color 0.3s var(--ease-out-premium), transform 0.3s var(--ease-out-premium);
}

.hero-primary-btn:hover {
  background-color: var(--sand);
  transform: translateY(-2px);
}

.hero-primary-btn:hover .arrow-icon {
  transform: translateX(4px);
}

.arrow-icon {
  transition: transform 0.3s var(--ease-out-premium);
}

.hero-secondary-btn {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--brand-white);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  fontWeight: 700;
  fontSize: var(--text-sm);
  transition: background-color 0.3s var(--ease-out-premium), border-color 0.3s var(--ease-out-premium);
}

.hero-secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--brand-white);
}

/* Value Cards in Intro */
.value-card {
  transition: border-color 0.4s var(--ease-out-premium);
}

.value-card:hover {
  border-left-color: var(--espresso) !important;
}

/* Menu category tabs */
.menu-tab-btn {
  font-family: var(--font-main);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-gray);
  padding: var(--space-2) var(--space-4);
  position: relative;
  transition: color 0.3s var(--ease-out-premium);
}

.menu-tab-btn.active {
  color: var(--brand-black);
}

.menu-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background-color: var(--caramel);
}

/* Menu cards */
.menu-item-card {
  background-color: var(--brand-white);
  border: 1px solid rgba(46, 45, 44, 0.06);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justifyContent: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out-premium), border-color 0.4s var(--ease-out-premium), box-shadow 0.4s var(--ease-out-premium) !important;
}

.menu-item-card:hover {
  border-color: var(--sand) !important;
  box-shadow: 0 12px 30px rgba(46, 45, 44, 0.04) !important;
}

.menu-item-card:hover .deco-icon-hover {
  opacity: 0.08 !important;
  color: var(--caramel);
  transition: opacity 0.4s var(--ease-out-premium), color 0.4s var(--ease-out-premium);
}

/* Coffee Experience */
.step-icon-box {
  transition: transform 0.4s var(--ease-out-premium), border-color 0.4s var(--ease-out-premium);
}

.experience-step:hover .step-icon-box {
  transform: scale(1.05);
  border-color: var(--latte) !important;
}

/* Contact Links */
.contact-link {
  transition: color 0.3s var(--ease-out-premium);
}

.contact-link:hover {
  color: var(--caramel);
}

.contact-primary-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--brand-black);
  color: var(--brand-white);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  fontWeight: 700;
  fontSize: var(--text-sm);
  transition: background-color 0.3s var(--ease-out-premium), transform 0.3s var(--ease-out-premium);
}

.contact-primary-btn:hover {
  background-color: var(--espresso);
  transform: translateY(-2px);
}

.contact-secondary-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid rgba(46, 45, 44, 0.2);
  color: var(--brand-black);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  fontWeight: 700;
  fontSize: var(--text-sm);
  transition: background-color 0.3s var(--ease-out-premium), border-color 0.3s var(--ease-out-premium);
}

.contact-secondary-btn:hover {
  background-color: rgba(46, 45, 44, 0.03);
  border-color: var(--brand-black);
}

/* Footer link effects */
.footer-link {
  transition: color 0.3s var(--ease-out-premium), opacity 0.3s var(--ease-out-premium);
}

.footer-link:hover {
  color: var(--latte) !important;
  opacity: 1 !important;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (min-width: 768px) {
  .desktop-nav { display: block !important; }
  .mobile-menu-toggle { display: none !important; }
  .desktop-cta { display: block !important; }
  
  .grid-span-5 { grid-column: span 5; }
  .grid-span-7 { grid-column: span 7; }
}

@media (max-width: 767px) {
  .desktop-cta { display: none !important; }
  .desktop-timeline-line { display: none !important; }
  .gallery-card {
    grid-column: span 12 !important;
    aspect-ratio: 4/3 !important;
  }
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .steam-path, .steam-path-delayed {
    animation: none !important;
    opacity: 0.5 !important;
    stroke-dashoffset: 0 !important;
  }

  .timeline-path {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
}
