/* ========================================
   Masa Bakehouse - Styles
   Font Pairing: Castoro Titling + Figtree
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Castoro+Titling&family=Figtree:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --color-cream: #F5EDE3;
  --color-warm-white: #FAF7F2;
  --color-brown-dark: #3B2314;
  --color-brown-mid: #6B4226;
  --color-brown-light: #A67B5B;
  --color-terracotta: #C4754B;
  --color-gold: #D4A656;
  --color-sage: #8A9A7B;
  --color-text: #2C1810;
  --color-text-light: #6B5B50;
  --color-border: rgba(59, 35, 20, 0.1);
  --font-heading: 'Castoro Titling', serif;
  --font-body: 'Figtree', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-warm-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-brown-dark);
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 100px 0;
}

.text-center {
  text-align: center;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(250, 247, 242, 0.98);
  box-shadow: 0 2px 20px rgba(59, 35, 20, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-brown-dark);
  letter-spacing: 0.02em;
}

.nav-logo span {
  color: var(--color-terracotta);
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-light);
  position: relative;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-terracotta);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-brown-dark);
}

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-brown-dark);
  transition: var(--transition);
  border-radius: 2px;
}

.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);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(44, 24, 16, 0.55) 0%,
    rgba(44, 24, 16, 0.40) 50%,
    rgba(44, 24, 16, 0.65) 100%
  );
}

.hero-content {
  text-align: center;
  color: #fff;
  padding: 40px 24px;
  max-width: 800px;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 20px;
  color: var(--color-gold);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-terracotta);
  color: #fff;
  border-color: var(--color-terracotta);
}

.btn-primary:hover {
  background: var(--color-brown-mid);
  border-color: var(--color-brown-mid);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-dark {
  background: var(--color-brown-dark);
  color: #fff;
  border-color: var(--color-brown-dark);
}

.btn-dark:hover {
  background: var(--color-brown-mid);
  border-color: var(--color-brown-mid);
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-terracotta);
  margin-bottom: 12px;
  display: block;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

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

/* --- Story / About Preview --- */
.story-section {
  background: var(--color-cream);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.story-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(59, 35, 20, 0.15);
}

.story-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.story-text .label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-terracotta);
  margin-bottom: 12px;
  display: block;
}

.story-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 20px;
}

.story-text p {
  color: var(--color-text-light);
  margin-bottom: 16px;
  font-weight: 300;
  font-size: 1.02rem;
}

.story-text .btn {
  margin-top: 12px;
}

/* --- Featured Items --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.featured-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(59, 35, 20, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(59, 35, 20, 0.12);
}

.featured-card-image {
  height: 260px;
  overflow: hidden;
}

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

.featured-card:hover .featured-card-image img {
  transform: scale(1.05);
}

.featured-card-body {
  padding: 28px;
}

.featured-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.featured-card-body p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  font-weight: 300;
}

.featured-card-body .price {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-terracotta);
  margin-top: 12px;
  font-size: 1rem;
}

/* --- Locations / Branches --- */
.locations-section {
  background: var(--color-brown-dark);
  color: #fff;
}

.locations-section .section-header h2 {
  color: #fff;
}

.locations-section .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

.locations-section .section-header .label {
  color: var(--color-gold);
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.location-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 36px;
  transition: background var(--transition);
}

.location-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.location-card h3 {
  font-size: 1.3rem;
  color: var(--color-gold);
  margin-bottom: 16px;
}

.location-card p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 300;
}

.location-card .hours {
  color: var(--color-terracotta);
  font-weight: 500;
}

/* --- Instagram / CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-terracotta), var(--color-brown-mid));
  color: #fff;
  text-align: center;
  padding: 80px 24px;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
}

.cta-banner .btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* --- Footer --- */
.footer {
  background: var(--color-brown-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 12px;
  display: inline-block;
}

.footer-brand p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  max-width: 280px;
}

.footer h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul a {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 300;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

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

/* --- About Page --- */
.page-hero {
  position: relative;
  height: 50vh;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--nav-height);
}

.page-hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.page-hero .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.6);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}

.page-hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: #fff;
  margin-bottom: 12px;
}

.page-hero-content p {
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
}

/* About Content */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-story.reverse {
  direction: rtl;
}

.about-story.reverse > * {
  direction: ltr;
}

.about-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(59, 35, 20, 0.12);
}

.about-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.about-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--color-text-light);
  margin-bottom: 16px;
  font-weight: 300;
  font-size: 1.02rem;
}

.about-text blockquote {
  border-left: 3px solid var(--color-terracotta);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--color-brown-mid);
  font-size: 1.1rem;
}

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.value-card {
  text-align: center;
  padding: 40px 28px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(59, 35, 20, 0.06);
}

.value-icon {
  width: 60px;
  height: 60px;
  background: var(--color-cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
}

.value-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.value-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  font-weight: 300;
}

/* --- Menu Page --- */
.menu-categories {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.menu-category-btn {
  padding: 10px 24px;
  border: 2px solid var(--color-border);
  border-radius: 30px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.menu-category-btn:hover,
.menu-category-btn.active {
  background: var(--color-brown-dark);
  border-color: var(--color-brown-dark);
  color: #fff;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.menu-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(59, 35, 20, 0.05);
  transition: transform var(--transition);
}

.menu-item:hover {
  transform: translateY(-2px);
}

.menu-item-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.menu-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-item-info {
  flex: 1;
}

.menu-item-info h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.menu-item-info p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-weight: 300;
  margin-bottom: 8px;
}

.menu-item-price {
  font-weight: 600;
  color: var(--color-terracotta);
  font-size: 1rem;
}

/* --- Gallery Page --- */
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-item-overlay {
  background: rgba(44, 24, 16, 0.3);
}

.gallery-item-overlay span {
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition);
}

.gallery-item:hover .gallery-item-overlay span {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 4px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 16px;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-card {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(59, 35, 20, 0.06);
  margin-bottom: 24px;
}

.contact-info-card h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--color-brown-dark);
}

.contact-info-card p {
  color: var(--color-text-light);
  font-weight: 300;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.contact-info-card .hours-label {
  font-weight: 500;
  color: var(--color-terracotta);
}

.contact-form {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 4px 24px rgba(59, 35, 20, 0.06);
}

.contact-form h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-warm-white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-terracotta);
}

.form-group textarea {
  height: 140px;
  resize: vertical;
}

.contact-map {
  margin-top: 40px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(59, 35, 20, 0.06);
}

.contact-map iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .story-grid,
  .about-story {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-story.reverse {
    direction: ltr;
  }

  .featured-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--color-warm-white);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: 85vh;
  }

  .section-padding {
    padding: 60px 0;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .locations-grid {
    grid-template-columns: 1fr;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .gallery-grid {
    columns: 1;
  }

  .story-image img,
  .about-image img {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .btn {
    padding: 12px 28px;
    font-size: 0.85rem;
  }
}
