/* ============================================
   Jorja's Kitchen — Design System & Base Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --color-primary: #92400E;
  --color-secondary: #B45309;
  --color-bg: #FAF7F2;
  --color-bg-alt: #F5F0E8;
  --color-text: #3D2B1F;
  --color-text-muted: #7A6555;
  --color-cta: #FAFAF8;
  --color-border: #D4C4B0;
  --color-overlay: rgba(26, 20, 18, 0.82);
  --color-overlay-light: rgba(26, 20, 18, 0.55);
  --color-dark: #1A1412;
  --color-dark-surface: #241C18;
  --color-dark-text: #E8DDD0;
  --color-gold: #C8956C;
  --color-gold-light: rgba(200, 149, 108, 0.15);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;

  --transition-micro: 150ms ease;
  --transition-standard: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-reveal: 600ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 800ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.1);

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --navbar-height: 80px;
}

/* --- Base Reset & Defaults --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-micro);
}

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

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.375rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.375rem); }

.display-text {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.font-accent {
  font-family: var(--font-accent);
  font-style: italic;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-balance {
  text-wrap: balance;
}

/* --- Skip to Content --- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-cta);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 9999;
  transition: top var(--transition-standard);
}
.skip-to-content:focus {
  top: 0;
  color: var(--color-cta);
}

/* --- Navbar --- */
#site-nav {
  min-height: 0;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2.5rem;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color var(--transition-standard), box-shadow var(--transition-standard), padding var(--transition-standard);
}

.navbar.transparent {
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.nav-logo-tagline {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.navbar.transparent .nav-logo { color: var(--color-cta); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.navbar.transparent .nav-logo-tagline { color: rgba(250, 250, 248, 0.7); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.navbar.transparent .nav-link { color: rgba(250, 250, 248, 0.9); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.navbar.transparent .nav-link:hover { color: var(--color-cta); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--color-text);
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition-micro);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition-standard);
}

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

/* --- Mobile Menu --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform var(--transition-standard), opacity var(--transition-micro);
}

.navbar.transparent .hamburger span { background: var(--color-cta); filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-standard);
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-overlay a {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-cta);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.mobile-overlay.active a {
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition-standard);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-cta);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-cta);
}

.btn-ghost {
  background: transparent;
  color: var(--color-cta);
  border-color: var(--color-cta);
}
.btn-ghost:hover {
  background: var(--color-cta);
  color: var(--color-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-cta);
}

.btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
}

/* --- Section Utilities --- */
.section {
  padding: 7rem 2rem;
}

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

.section-dark {
  background-color: var(--color-dark);
  color: var(--color-dark-text);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-cta);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  margin: 1.5rem auto;
}

.gold-line {
  width: 40px;
  height: 1px;
  background: var(--color-gold);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,20,18,0.88) 0%, rgba(26,20,18,0.5) 50%, rgba(26,20,18,0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 2rem;
  color: var(--color-cta);
}

.hero-content h1 {
  color: var(--color-cta);
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  opacity: 0.85;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Page Hero (shorter, for inner pages) */
.page-hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-hero .hero-overlay {
  background: linear-gradient(to top, rgba(26,20,18,0.85) 0%, rgba(26,20,18,0.45) 60%, rgba(26,20,18,0.3) 100%);
}

.page-hero .hero-content h1 {
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.9rem;
  color: rgba(248, 250, 252, 0.7);
  margin-top: 0.75rem;
}

.breadcrumb a {
  color: rgba(248, 250, 252, 0.7);
  transition: color var(--transition-micro);
}

.breadcrumb a:hover {
  color: var(--color-cta);
}

/* --- Cards --- */
.card {
  background: white;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: border-color var(--transition-standard);
  cursor: pointer;
}

.card:hover {
  border-color: var(--color-gold);
}

.card-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.card-body {
  padding: 1.75rem;
}

.card-body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.card-body p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Editorial card — no border, text overlay */
.card-editorial {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.card-editorial img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-editorial:hover img {
  transform: scale(1.04);
}

.card-editorial .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,20,18,0.7) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: var(--color-cta);
}

/* --- Footer --- */
.footer {
  background: var(--color-dark);
  color: var(--color-dark-text);
  padding: 5rem 2rem 1.5rem;
}

.footer h4 {
  color: var(--color-cta);
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer a {
  color: rgba(232, 221, 208, 0.7);
  font-size: 0.9rem;
  transition: color var(--transition-micro);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-bottom {
  border-top: 1px solid rgba(232, 221, 208, 0.1);
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(232, 221, 208, 0.4);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 0;
  border: 1px solid rgba(232, 221, 208, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-micro);
}

.footer-social a:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.footer-social a:hover svg {
  stroke: var(--color-dark);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: var(--color-dark);
  color: var(--color-cta);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-standard);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

/* --- Form --- */
.form-group {
  margin-bottom: 1.75rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: white;
  transition: border-color var(--transition-micro);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-input.error {
  border-color: #DC2626;
}

.form-error {
  color: #DC2626;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

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

/* --- Accordion --- */
.accordion-item {
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  width: 100%;
  padding: 1.5rem 0;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color var(--transition-micro);
}

.accordion-trigger:hover {
  color: var(--color-gold);
}

.accordion-trigger svg {
  transition: transform var(--transition-standard);
  flex-shrink: 0;
  color: var(--color-gold);
}

.accordion-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-standard) ease;
}

.accordion-content-inner {
  padding: 0 0 1.5rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-standard);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-micro), color var(--transition-micro);
}

.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
  font-family: var(--font-body);
}

/* --- Filter Buttons --- */
.filter-btn {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0;
  margin: 0 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition-micro), border-color var(--transition-micro);
  cursor: pointer;
}

.filter-btn:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}

.filter-btn.active {
  color: var(--color-text);
  border-bottom-color: var(--color-gold);
}

/* --- Animation Utility Classes --- */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale,
.reveal-lines,
.reveal-image {
  opacity: 0;
}

.reveal-up { transform: translateY(30px); }
.reveal-left { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }
.reveal-scale { transform: scale(0.97); }
.reveal-lines { transform: translateY(20px); clip-path: inset(100% 0 0 0); }
.reveal-image { clip-path: inset(0 100% 0 0); }

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--color-gold);
  z-index: 9999;
  transform-origin: left;
  transform: scaleX(0);
}

/* Magnetic hover utility */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .display-text {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: 4rem 1.25rem; }
  .hero-content { padding: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .navbar { padding: 0 1.25rem; }
  .filter-btn { margin: 0 0.5rem; font-size: 0.75rem; }
  .display-text { font-size: clamp(2rem, 8vw, 3rem); }
  .card-editorial { min-height: 300px; }
}

@media (max-width: 480px) {
  .section { padding: 3rem 1rem; }
  .page-hero { min-height: 35vh; }
  .hero { min-height: 85vh; }
  .btn { padding: 0.85rem 2rem; font-size: 0.75rem; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal-up, .reveal-left, .reveal-right, .reveal-scale,
  .reveal-lines, .reveal-image {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
  .scroll-progress { display: none; }
  .magnetic { transition: none; }
}

/* --- Print --- */
@media print {
  .navbar, .footer, .back-to-top, .mobile-overlay { display: none; }
  body { background: white; color: black; }
  .hero { min-height: auto; }
}

/* --- Keyframes --- */
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.7; transform: scaleY(1.3); }
}
