/* ========================================
   BREW HAVEN CAFE — STARTER PACKAGE
   HTML5 + CSS3 + Vanilla JS
   ======================================== */

/* CSS Variables */
:root {
  --cream: #F5F1E8;
  --coffee: #6B4423;
  --caramel: #D4A373;
  --espresso: #2C1810;
  --milk: #FFFBF5;
  --latte: #E6DCCF;
  --white: #FFFFFF;
  --shadow: rgba(44, 24, 16, 0.06);
  --shadow-hover: rgba(44, 24, 16, 0.12);
  
  --font-heading: 'Quicksand', serif;
  --font-body: 'Nunito Sans', sans-serif;

  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  --container: 1140px;
}

/* Reset */
*, *::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(--espresso);
  background-color: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

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

.section {
  padding: 80px 0;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--caramel);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 2px 2px 0px var(--caramel);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-header p {
  color: var(--coffee);
  font-size: 1.05rem;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--caramel);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--coffee);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

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

.btn-full {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--coffee);
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap var(--transition);
}

.link-arrow:hover {
  gap: 10px;
  color: var(--espresso);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(245, 241, 232, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--latte);
  box-shadow: 0 2px 16px var(--shadow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--espresso);
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--coffee);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

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

.nav-link:hover {
  letter-spacing: 0.08em;
  color: var(--espresso);
}

.nav-link.active {
  color: var(--espresso);

}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--espresso);
  transition: all var(--transition);
}

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

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

.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.5), rgba(44,24,16,0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding-top: 80px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 400;
  background: linear-gradient(135deg, #FFF8F0 0%, #D4A373 50%, #FFF8F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  -webkit-text-stroke: 2px var(--caramel); 
  text-shadow: 
    4px 4px 0px var(--espresso),            
    6px 6px 12px rgba(44, 24, 16, 0.4);
}

.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 36px;
  opacity: 0.95;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

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

/* About */
.about {
  background-color: var(--milk);
}

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

.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow);
}

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

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

.about-content p {
  margin-bottom: 16px;
  color: var(--coffee);
  font-size: 1.05rem;
}

.about-content .link-arrow {
  margin-top: 8px;
}

/* Menu */
.menu {
  background-color: var(--cream);
}

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

.menu-card {
  background-color: var(--milk);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-hover);
}

.menu-img {
  height: 220px;
  overflow: hidden;
}

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

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

.menu-info {
  padding: 24px;
}

.menu-info h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--espresso);
}

.menu-desc {
  font-size: 0.9rem;
  color: var(--coffee);
  margin-bottom: 16px;
  line-height: 1.6;
}

.menu-price {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  background: var(--caramel);
  padding: 6px 14px;
  border-radius: 6px;
  box-shadow: 3px 3px 0px var(--espresso);
  transition: all 0.2s ease;
}

.menu-price:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--espresso);
}

.section-footer {
  text-align: center;
  margin-top: 40px;
}

/* Gallery */
.gallery {
  background-color: var(--milk);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 240px);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

/* Why */
.why {
  background-color: var(--cream);
}

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

.why-card {
  text-align: center;
  padding: 40px 28px;
  background-color: var(--milk);
  border-radius: var(--radius-lg);
  transition: transform var(--transition);
}

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

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--latte);
  color: var(--coffee);
  margin-bottom: 20px;
}

.why-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.why-card p {
  font-size: 0.95rem;
  color: var(--coffee);
  line-height: 1.7;
}

/* Location */
.location {
  background-color: var(--milk);
}

.location-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.location-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow);
  height: 100%;
  min-height: 400px;
}

.location-map iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: var(--radius-lg);
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.info-block h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--espresso);
}

.info-block p,
.info-block address {
  color: var(--coffee);
  font-style: normal;
  line-height: 1.7;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--latte);
  color: var(--coffee);
  font-size: 0.95rem;
}

.hours-list li:last-child {
  border-bottom: none;
}

/* FAQ */
.faq {
  background-color: var(--cream);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--milk);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px var(--shadow);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--espresso);
  text-align: left;
  transition: background-color var(--transition);
}

.faq-question:hover {
  background-color: var(--latte);
}

.faq-icon {
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform var(--transition);
  color: var(--caramel);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}

.faq-answer p {
  color: var(--coffee);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Contact */
.contact {
  background-color: var(--milk);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info p {
  color: var(--coffee);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background-color: var(--cream);
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-method:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px var(--shadow);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--latte);
  color: var(--coffee);
  flex-shrink: 0;
}

.method-label {
  display: block;
  font-size: 0.8rem;
  color: var(--coffee);
  margin-bottom: 2px;
}

.method-value {
  display: block;
  font-weight: 600;
  color: var(--espresso);
}

/* Form */
.contact-form-wrapper {
  background-color: var(--cream);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px var(--shadow);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--latte);
  border-radius: var(--radius);
  background-color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--espresso);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b8a99a;
}

/* Footer */
.footer {
  background-color: var(--espresso);
  color: var(--latte);
  padding: 64px 0 24px;
}

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

.footer-brand .logo {
  color: var(--milk);
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--latte);
  opacity: 0.8;
  max-width: 280px;
}

.footer-links h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--milk);
  margin-bottom: 20px;
}

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

.footer-links a {
  color: var(--latte);
  opacity: 0.8;
  transition: opacity var(--transition);
  font-size: 0.95rem;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--caramel);
}

.footer-bottom {
  border-top: 1px solid rgba(230, 220, 207, 0.15);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-bottom a {
  color: var(--caramel);
  transition: opacity var(--transition);
}

.footer-bottom a:hover {
  opacity: 0.8;
}

/* WhatsApp Float */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: pulse 3s infinite;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.5); }
}

/* Responsive */
@media (max-width: 992px) {
  .about-grid,
  .location-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-img {
    max-height: 400px;
  }
  
  .location-map iframe {
    min-height: 300px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 200px);
  }
  
  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 320px;
  }
  
  .nav-menu {
    position: fixed;
    top: 72px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 72px);
    background-color: var(--milk);
    flex-direction: column;
    padding: 32px 24px;
    gap: 0;
    box-shadow: -4px 0 24px var(--shadow);
    transition: right 0.3s ease;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--latte);
    font-size: 1rem;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .menu-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  
  .gallery-item,
  .gallery-item.large {
    grid-column: span 1;
    grid-row: span 1;
    height: 240px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .contact-form-wrapper {
    padding: 28px;
  }
  
  .wa-float {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-title {
    font-size: 1.9rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}

.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.ig-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; transition: transform 0.3s ease; }
.ig-grid img:hover { transform: scale(1.05); }
.ig-note { text-align: center; font-size: 0.9rem; color: var(--coffee); font-style: italic; }

.testimonials { background-color: var(--milk); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi-card { background-color: var(--white); padding: 24px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.testi-card p { font-style: italic; color: var(--espresso); line-height: 1.7; margin-bottom: 16px; font-size: 0.95rem; }
.testi-author strong { display: block; font-weight: 600; color: var(--espresso); }
.testi-author span { font-size: 0.8rem; color: var(--coffee); }

@media (max-width: 768px) {
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .testi-grid { grid-template-columns: 1fr; }
}