/* NorthPour Coffee Canada - Main Stylesheet */

/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Design Tokens - Color Palette */
:root {
  /* Primary - Espresso */
  --espresso-900: #3B2A23;
  --espresso-700: #5C4438;
  --espresso-500: #7D5E4D;
  --espresso-300: #A78972;
  --espresso-100: #D1BFB1;
  
  /* Accent - Caramel */
  --caramel-700: #A57452;
  --caramel-500: #C28B62;
  --caramel-300: #D9A982;
  
  /* Accent - Pistachio */
  --pistachio-700: #6D8A63;
  --pistachio-500: #8AA97D;
  --pistachio-300: #A7C29B;
  
  /* Neutral - Slate */
  --slate-700: #5B6370;
  --slate-500: #7B8490;
  --slate-300: #9BA3AE;
  
  /* Background */
  --parchment: #F7F1E8;
  --parchment-light: #FDFAF5;
  --white: #FFFFFF;
  
  /* Typography */
  --font-heading: 'Crimson Text', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Quicksand', sans-serif;
  
  /* Font Sizes */
  --text-xs: 13px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;
  
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  /* Shadows */
  --shadow-soft: 0 2px 8px rgba(59, 42, 35, 0.08);
  --shadow-soft-hover: 0 4px 16px rgba(59, 42, 35, 0.12);
  --shadow-modal: 0 8px 32px rgba(59, 42, 35, 0.16);
  --shadow-inset: inset 0 2px 4px rgba(59, 42, 35, 0.06);
  
  /* Animation */
  --duration-fast: 140ms;
  --duration-normal: 180ms;
  --duration-slow: 200ms;
  --easing: ease-out;
}

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=Inter:wght@400;500;600;700&family=Quicksand:wght@400;500;600;700&display=swap');

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--espresso-900);
  background-color: var(--parchment);
  background-image: url('../assets/patterns/grain.svg');
  background-repeat: repeat;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

a {
  color: var(--espresso-700);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing);
}

a:hover {
  color: var(--caramel-500);
}

/* Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--parchment-light);
  border-bottom: 1px solid var(--espresso-100);
  height: 72px;
  transition: box-shadow var(--duration-fast) var(--easing);
}

.site-header.scrolled {
  box-shadow: var(--shadow-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--espresso-900);
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.main-nav a {
  font-size: var(--text-base);
  color: var(--espresso-700);
  position: relative;
  padding: var(--space-sm) 0;
  transition: color var(--duration-fast) var(--easing);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--caramel-500);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--caramel-500);
}

.burger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.burger-menu svg {
  width: 24px;
  height: 24px;
  color: var(--espresso-900);
}

/* Mobile Menu */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background-color: var(--white);
  box-shadow: var(--shadow-modal);
  padding: var(--space-2xl) var(--space-lg);
  transition: right var(--duration-normal) var(--easing);
  z-index: 200;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav ul {
  list-style: none;
}

.mobile-nav li {
  margin-bottom: var(--space-lg);
}

.mobile-nav a {
  font-size: var(--text-lg);
  color: var(--espresso-900);
  display: block;
  padding: var(--space-sm) 0;
}

.mobile-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

/* Hero Section */
.hero {
  background-color: var(--parchment);
  padding: var(--space-4xl) 0;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: var(--text-4xl);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  color: var(--espresso-900);
}

.hero p {
  font-size: var(--text-lg);
  color: var(--espresso-700);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing);
  text-decoration: none;
  min-height: 48px;
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--caramel-500);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.btn-primary:active {
  box-shadow: var(--shadow-inset);
  transform: translateY(0);
}

.btn-primary:focus {
  outline: 3px solid var(--pistachio-500);
  outline-offset: 2px;
}

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

.btn-secondary:hover {
  background-color: var(--espresso-900);
  color: var(--white);
}

/* Stats Section */
.stats-section {
  background-color: var(--white);
  padding: var(--space-3xl) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  text-align: center;
}

.stat-item h3 {
  font-family: var(--font-accent);
  font-size: var(--text-4xl);
  color: var(--caramel-500);
  margin-bottom: var(--space-sm);
}

.stat-item p {
  font-size: var(--text-base);
  color: var(--espresso-700);
}

/* Section Styles */
section {
  padding: var(--space-3xl) 0;
}

.section-title {
  text-align: center;
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2xl);
  color: var(--espresso-900);
}

.section-subtitle {
  text-align: center;
  font-size: var(--text-lg);
  color: var(--espresso-700);
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
}

/* Article Card */
.article-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: all var(--duration-normal) var(--easing);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-hover);
}

.article-card:focus-within {
  outline: 3px solid var(--pistachio-500);
  outline-offset: 2px;
}

.article-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.article-content {
  padding: var(--space-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-badge {
  display: inline-block;
  background-color: var(--pistachio-500);
  color: var(--white);
  padding: 4px var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--space-md);
  width: fit-content;
  letter-spacing: 0.5px;
}

.article-card h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
  color: var(--espresso-900);
}

.article-excerpt {
  color: var(--espresso-700);
  margin-bottom: var(--space-lg);
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  color: var(--slate-700);
  margin-top: auto;
}

.read-more {
  color: var(--caramel-500);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.read-more:hover {
  color: var(--caramel-700);
}

/* Advantages Grid */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.advantage-card {
  background-color: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: all var(--duration-normal) var(--easing);
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-hover);
}

.advantage-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-lg);
  color: var(--caramel-500);
}

.advantage-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.advantage-card p {
  color: var(--espresso-700);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.category-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all var(--duration-normal) var(--easing);
  text-decoration: none;
  display: block;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-hover);
}

.category-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-content {
  padding: var(--space-lg);
  text-align: center;
}

.category-card h3 {
  font-size: var(--text-xl);
  color: var(--espresso-900);
  margin-bottom: var(--space-sm);
}

.category-card p {
  font-size: var(--text-sm);
  color: var(--espresso-700);
}

/* Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.review-card {
  background-color: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.review-text {
  font-size: var(--text-lg);
  color: var(--espresso-700);
  font-style: italic;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.review-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--pistachio-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--espresso-900);
}

.review-info h4 {
  font-size: var(--text-base);
  margin-bottom: 4px;
}

.review-info p {
  font-size: var(--text-sm);
  color: var(--slate-700);
}

/* Interactive Tool Cards */
.tool-card {
  background: linear-gradient(135deg, rgba(138, 169, 125, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft-hover);
  margin: var(--space-2xl) 0;
}

.tool-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.tool-display {
  font-family: var(--font-accent);
  font-size: var(--text-4xl);
  font-weight: 700;
  text-align: center;
  color: var(--espresso-900);
  margin: var(--space-xl) 0;
  font-variant-numeric: tabular-nums;
}

.tool-controls {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.tool-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.preset-btn {
  padding: var(--space-md);
  background-color: var(--white);
  border: 2px solid var(--pistachio-500);
  color: var(--espresso-900);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--duration-fast) var(--easing);
}

.preset-btn:hover {
  background-color: var(--pistachio-500);
  color: var(--white);
}

/* Form Styles */
.newsletter-form {
  max-width: 500px;
  margin: var(--space-2xl) auto;
  display: flex;
  gap: var(--space-md);
}

.form-input {
  flex: 1;
  padding: var(--space-md);
  border: 2px solid var(--espresso-100);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-family: var(--font-body);
  background-color: var(--white);
  transition: all var(--duration-fast) var(--easing);
}

.form-input:focus {
  outline: none;
  border-color: var(--pistachio-500);
  box-shadow: 0 0 0 2px rgba(138, 169, 125, 0.2);
}

.form-message {
  text-align: center;
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  display: none;
}

.form-message.success {
  background-color: var(--pistachio-300);
  color: var(--espresso-900);
  display: block;
}

.form-message.error {
  background-color: var(--caramel-300);
  color: var(--espresso-900);
  display: block;
}

/* Calculator Input Grid */
.calculator-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.input-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--espresso-700);
}

.input-with-unit {
  display: flex;
  gap: var(--space-sm);
}

.unit-toggle {
  padding: 0 var(--space-md);
  background-color: var(--espresso-100);
  border: 2px solid var(--espresso-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing);
  font-weight: 600;
}

.unit-toggle.active {
  background-color: var(--pistachio-500);
  border-color: var(--pistachio-500);
  color: var(--white);
}

/* Footer */
.site-footer {
  background-color: var(--espresso-900);
  color: var(--parchment);
  padding: var(--space-3xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-column h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-lg);
  color: var(--caramel-300);
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: var(--space-sm);
}

.footer-column a {
  color: var(--parchment);
  font-size: var(--text-base);
}

.footer-column a:hover {
  color: var(--caramel-300);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--espresso-700);
  color: var(--espresso-300);
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--espresso-700);
  border-radius: 50%;
  transition: all var(--duration-fast) var(--easing);
}

.social-links a:hover {
  background-color: var(--caramel-500);
  transform: translateY(-2px);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 56px;
  height: 56px;
  background-color: var(--caramel-500);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft-hover);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--easing);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--caramel-700);
  transform: translateY(-4px);
}

/* Page Header (for category pages) */
.page-header {
  background: linear-gradient(135deg, var(--parchment) 0%, var(--parchment-light) 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--espresso-100);
}

.page-header h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

.page-header p {
  font-size: var(--text-lg);
  color: var(--espresso-700);
  max-width: 700px;
  margin: 0 auto;
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all var(--duration-slow) var(--easing);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --text-4xl: 36px;
    --text-3xl: 28px;
    --text-2xl: 22px;
  }
  
  .main-nav {
    display: none;
  }
  
  .burger-menu {
    display: block;
  }
  
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
  }
  
  .advantages-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .calculator-inputs {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Print Styles for Recipe Cards */
@media print {
  .site-header,
  .site-footer,
  .back-to-top,
  .burger-menu,
  .mobile-nav {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .article-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Safety Warning Box */
.safety-warning {
  background-color: rgba(194, 139, 98, 0.1);
  border-left: 4px solid var(--caramel-500);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  border-radius: var(--radius-sm);
}

.safety-warning h4 {
  color: var(--caramel-700);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.safety-warning p {
  color: var(--espresso-900);
  font-size: var(--text-sm);
}
