/* ============================================================
   KitchUp — Global Styles
   ============================================================ */

/* ----- Fonts ----- */

/* ----- CSS Reset / Normalize ----- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

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

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

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

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p {
  overflow-wrap: break-word;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ----- Custom Properties ----- */

:root {
  --background: #ffffff;
  --foreground: #171717;
  --card: #fafafa;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --primary: #D4361B;
  --primary-foreground: #ffffff;
  --secondary: #EE5387;
  --tertiary: #A88E88;
  --border: #e5e5e5;

  --recipes: #D4361B;
  --mealplan: #E86159;
  --groceries: #2E8047;
  --track: #369662;

  --font-sans: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 0.75rem;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.dark {
  --background: #1C1C1C;
  --foreground: #ededed;
  --card: #2E2E2E;
  --muted: #262626;
  --muted-foreground: #a3a3a3;
  --border: #404040;
}

/* ----- Base ----- */

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ----- Container ----- */

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ----- Typography ----- */

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

p {
  line-height: 1.7;
  color: var(--muted-foreground);
}

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

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.75rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.75rem; }
  h2 { font-size: 2.5rem; }
}

/* ----- Buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: #be301a;
  border-color: #be301a;
  color: var(--primary-foreground);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.btn-sm {
  height: 2.25rem;
  padding: 0 1rem;
  font-size: 0.875rem;
  border-radius: 9999px;
}

.btn-lg {
  height: 3rem;
  padding: 0 1.5rem;
  font-size: 1rem;
  border-radius: 9999px;
}

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 7rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 0.15rem;
  text-decoration: none;
  width: max-content;
  max-width: 100%;
}

.navbar-brand:hover {
  color: inherit;
}

.navbar-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 4rem;
  max-width: min(11rem, 38vw);
  object-fit: contain;
}

.navbar-tagline {
  display: block;
  font-family: 'Dancing Script', cursive;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--primary);
  white-space: nowrap;
  text-align: center;
}

.navbar-links {
  display: none;
  align-items: center;
  justify-self: start;
  gap: 1.5rem;
  min-width: 0;
}

.navbar-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.navbar-links a:hover {
  color: var(--foreground);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

@media (min-width: 768px) {
  .navbar-links {
    display: flex;
  }
}

@media (max-width: 767px) {
  .navbar-inner {
    grid-template-columns: 1fr auto 1fr;
  }

  .navbar-logo {
    max-height: 3.5rem;
    max-width: min(9rem, 42vw);
  }

  .navbar-tagline {
    font-size: 0.95rem;
  }
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.dark .navbar.scrolled {
  background-color: rgba(28, 28, 28, 0.85);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  color: var(--muted-foreground);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.theme-icon--sun {
  display: none;
}

.dark .theme-icon--moon {
  display: none;
}

.dark .theme-icon--sun {
  display: block;
}

/* Mobile Toggle */

.navbar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  order: 2;
  color: var(--foreground);
}

.navbar-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (min-width: 768px) {
  .navbar-toggle {
    display: none;
  }
}

/* Mobile Menu */

.navbar-mobile {
  display: none;
  position: fixed;
  top: 7rem;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background);
  z-index: 999;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.navbar-mobile.open {
  display: flex;
}

@media (min-width: 768px) {
  .navbar-mobile,
  .navbar-mobile.open {
    display: none !important;
  }
}

.navbar-mobile a {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--foreground);
  border-radius: calc(var(--radius) - 2px);
  transition: background-color 0.15s ease;
}

.navbar-mobile a:hover {
  background-color: var(--muted);
}

.navbar-mobile .btn {
  margin-top: 1rem;
  width: 100%;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  background-color: rgba(245, 245, 245, 0.3);
  padding: 3rem 0 1.5rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }

  .footer-brand {
    grid-column: span 1;
  }
}

.footer-brand p {
  font-size: 0.875rem;
  margin-top: 0.75rem;
  max-width: 16rem;
}

.footer-logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  text-decoration: none;
  width: max-content;
  max-width: 100%;
}

.footer-logo-link:hover {
  color: inherit;
}

.footer-logo {
  width: auto;
  height: auto;
  max-height: 2.75rem;
  max-width: min(8.75rem, 100%);
  object-fit: contain;
}

.footer-tagline {
  display: block;
  font-family: 'Dancing Script', cursive;
  font-size: 1rem;
  line-height: 1;
  color: var(--primary);
  white-space: nowrap;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--foreground);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: var(--foreground);
}

/* ============================================================
   Scroll Reveal Animation
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Breadcrumbs
   ============================================================ */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  padding: 1rem 0;
}

.breadcrumbs a {
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

.breadcrumbs .separator {
  color: var(--border);
}

.breadcrumbs .current {
  color: var(--foreground);
  font-weight: 500;
}

/* ============================================================
   Category Badge
   ============================================================ */

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* ============================================================
   Marquee Animation
   ============================================================ */

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 40s linear infinite;
}

/* ============================================================
   Utility Classes
   ============================================================ */

.hide-mobile {
  display: none;
}

@media (min-width: 640px) {
  .hide-mobile {
    display: block;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Blog Cards (shared)
   ============================================================ */

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background-color: var(--background);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--muted);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.03);
}

.blog-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--muted);
  color: var(--muted-foreground);
}

.blog-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.blog-card-body p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.read-more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s ease;
}

.read-more:hover {
  gap: 0.5rem;
  color: var(--primary);
}

/* ============================================================
   Prose (article content)
   ============================================================ */

.prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--foreground);
}

.prose h1 {
  font-size: 2.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-size: 1.375rem;
  margin-top: 1.75rem;
  margin-bottom: 0.625rem;
}

.prose h4 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  color: var(--foreground);
  margin-bottom: 1.25rem;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--primary);
  opacity: 0.8;
}

.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li {
  margin-bottom: 0.375rem;
}

.prose blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--muted-foreground);
  font-style: italic;
}

.prose img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.prose pre {
  background-color: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose code {
  background-color: var(--muted);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.prose table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  margin: 1.25rem 0;
}

.prose th,
.prose td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.prose th {
  background-color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ============================================================
   Responsive Breakpoints Reference
     sm: 640px
     md: 768px
     lg: 1024px
     xl: 1280px
   ============================================================ */
