/* Navbar start*/
.coffee-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #222222;
  font-weight: bolder !important;
  padding: 1em 0;
  max-width: 940px;
  margin: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 3;
}
.coffee-home {
  font-size: 1.2em;
  margin-left: 1.5em;
}
.coffee-navbar ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}
.coffee-navbar li {
  margin: 0 1.5em;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.coffee-navbar a {
  color: #fafafafa;
  text-decoration: none;
  font-weight: 500;
}
.coffee-navbar li:hover {
  transform: scale(1.02);
}

/* coffee-mobile-menu-button start */
.coffee-mobile-menu-button {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 1.5em;
}
.coffee-mobile-menu-button span,
.coffee-mobile-menu-button span::before,
.coffee-mobile-menu-button span::after {
  display: block;
  width: 100%;
  height: 3px;
  background: #fafafafa;
  transition: all 0.3s ease;
}
.coffee-mobile-menu-button span::before {
  content: "";
  transform: translateY(-9px);
}
.coffee-mobile-menu-button span::after {
  content: "";
  transform: translateY(6px);
}
.coffee-mobile-menu-button.toggler-open span {
  background: transparent;
}
.coffee-mobile-menu-button.toggler-open span::before {
  transform: rotate(-45deg) translate(5px, 6px);
}
.coffee-mobile-menu-button.toggler-open span::after {
  transform: rotate(45deg) translate(5px, -6px);
}
/* mobile-menu-button end */
/* Navbar end */

/* Hero Banner */
.hero-banner {
  position: relative;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  height: 300px;
  overflow: visible;
}
.hero-img.desktop {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  filter: brightness(1.1), contrast(1.05);
}
.hero-img.mobile {
  display: none;
}
.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 2;
}
.coffee-hn-logo {
  width: 20em;
  margin-top: 20px;
  -webkit-filter: drop-shadow(5px 5px 5px #ffffff64);
  filter: drop-shadow(5px 5px 5px #ffffff64);
}
.tagline {
  text-transform: uppercase;
  color: #000000;
  font-size: 1.5em;
  margin: 15px 0;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}
.tagline > span {
  font-weight: 400 !important;
}

.cta-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid #ffffff;
  color: #ffffff;
  padding: 0.8em 2em;
  border-radius: 8px 30px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  text-shadow: 0 0px 8px rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: background cubic-bezier(0.87, 0.17, 0.51, 0.79) 0.3s,
    color cubic-bezier(0.87, 0.17, 0.51, 0.79) 0.3s,
    text-shadow 0.3s cubic-bezier(0.87, 0.17, 0.51, 0.79) 0.1s;
}
.cta-btn:hover {
  text-shadow: none;
  background: #ffffff;
  color: #000000;
}

/* Intro */
.intro-text {
  max-width: 700px;
  margin: 2em auto 1em auto;
  text-align: center;
  font-weight: 500;
  font-size: 1.2em;
  color: #000000;
  padding-bottom: 1.2em;
}
.intro-text > h2 {
  font-weight: 800;
  font-size: 1.3em;
  margin: 0;
  padding-bottom: 1.2em;
}

/* Brands Grid */
.brands-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 24px;
  max-width: 940px;
  margin: 0 auto 2em auto;
}
.brand-block {
  padding: 0;
  position: relative;
  background: #ffffff00;
  min-height: 220px;
  max-width: 460px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.brand-block__inner {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand-block__inner:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.brand-block:hover {
  transform: scale(1.01);
  z-index: 1;
}

.brand-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-logo-right,
.brand-logo-left {
  object-fit: contain;
  position: absolute;
  top: 15px;
  width: 98px;
  height: 30px;
  background: rgb(255, 255, 255);
  border-radius: 5px 15px;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.brand-logo-right {
  right: 15px;
}
.brand-logo-left {
  left: 15px;
}
.promo-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  max-width: 940px;
  margin: 2em auto;
  text-align: center;
}
.coffee-promo-banner-item {
  border-radius: 20px;
  margin: auto;
  width: 460px;
}
.coffee-promo-banner-item.orange {
  background-color: #f3651d;
}
.coffee-promo-banner-item.red {
  background-color: #eb1225;
}
.promo-img {
  width: 100%;
  height: 300px;
  object-fit: contain;
}

/* Coffee Icons */
.coffee-icons-header {
  max-width: 940px;
  text-align: center;
  font-weight: 800;
  font-size: 1.8em;
  color: #000000;
  margin-bottom: 0;
}
.coffee-icons-grid-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2em auto;
  padding-top: 1.5em;
  max-width: 940px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.coffee-icons-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 2em auto;
  padding: 1em;
  max-width: 700px;
  max-height: 400px;
  background-color: #ffffff;
}
.coffee-icon {
  position: relative; /* anchor bubble to the icon */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.coffee-icon:hover {
  transform: scale(1.1);
  z-index: 2;
}
.coffee-icon img {
  max-width: 4rem;
  height: auto;
}
.coffee-bubble {
  text-align: center;
  color: #ffffff;
  text-shadow: #000000 0px 0px 80px;
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  min-width: 180px;
  max-width: 360px;
  max-width: min(360px, calc(100vw - 32px));
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.38, 0.19, 0.46, 0.88),
    left 0.12s linear;
  pointer-events: none;
  white-space: normal;
  z-index: 1000;
  box-sizing: border-box;
}
.coffee-icon.show-bubble .coffee-bubble {
  transform: translateX(-50%) scaleY(1);
  pointer-events: auto;
}
/* Coffee bubbles colours */
.purple-bubble {
  background-color: #b0acd5;
}
.green-bubble {
  background-color: #7cccbf;
}
.lime-bubble {
  background-color: #d0e39b;
}
.blue-bubble {
  background-color: #adcdec;
}
.pink-bubble {
  background-color: #f7acad;
}
.yellow-bubble {
  background-color: #fecd67;
}

/* Media queries */
@media (max-width: 700px) {
  /* Navbar */
  .coffee-mobile-menu-button {
    display: block;
  }
  .coffee-navbar {
    min-height: 60px;
  }
  .coffee-navbar ul {
    background-color: rgb(12, 12, 12, 0.8);
    position: absolute;
    width: 100%;
    height: calc(80vh - 60px);
    left: 0;
    top: 60px;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: 0.3s ease;
  }
  .coffee-navbar ul li {
    width: 100%;
    text-align: center;
    padding: 30px;
  }
  .coffee-navbar ul li a {
    font-size: 1.3em;
  }
  .coffee-navbar ul li a:hover {
    background: #333333;
  }
  .coffee-navbar ul.open {
    max-height: calc(80vh - 60px);
    overflow: visible;
  }

  /* Hero banner */
  .hero-img.desktop {
    display: none;
  }
  .hero-img.mobile {
    display: block;
    width: 100%;
    height: 351px;
    object-fit: cover;
  }
  .hero-banner {
    height: 351px;
  }

  /* Finance banner */
  .promo-img.desktop {
    display: none;
  }
  .promo-img.mobile {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    margin: auto;
  }

  /* Brands grid */
  .brands-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 16px;
  }
  .brand-block {
    margin: auto;
    position: sticky;
    top: 55px;
    z-index: 1;
    transition: box-shadow 0.3s, transform 0.3s;
  }
  .brand-img {
    height: 220px;
  }
  .brand-block.is-stuck .brand-block__inner {
    filter: brightness(0.6);
    opacity: 1;
    transform: scale(0.98);
    transition: filter 0.3s, opacity 0.3s, transform 0.3s;
  }
  .brand-block:hover {
    transform: none;
    z-index: none;
  }
  .coffee-icons-grid-wrapper {
    max-width: 460px;
  }
  .coffee-icons-grid {
    max-width: 380px;
  }
}
