/* ============ base ============ */
html {
  scroll-behavior: smooth;
}

body {
  background-color: #2A1006;
  background-image:
    radial-gradient(ellipse 900px 600px at 15% 0%, rgba(157,102,56,0.14), transparent 60%),
    radial-gradient(ellipse 900px 600px at 85% 40%, rgba(227,168,87,0.08), transparent 60%);
  background-attachment: fixed;
}

/* soft coffee-bean grain texture, very subtle, purely atmospheric */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255,246,224,0.035) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* ============ hero overlay ============ */
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(20, 8, 3, 0.18) 0%,
    rgba(20, 8, 3, 0.05) 22%,
    rgba(20, 8, 3, 0.12) 55%,
    rgba(20, 8, 3, 0.55) 85%,
    rgba(20, 8, 3, 0.85) 100%
  );
}

::selection {
  background: #E3A857;
  color: #2A1006;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #2A1006;
}
::-webkit-scrollbar-thumb {
  background: #9D6638;
  border-radius: 10px;
}

/* ============ navbar ============ */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(42, 16, 6, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px -12px rgba(0,0,0,0.6);
}

.nav-link {
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 1.5px;
  background: #E3A857;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover {
  color: #E3A857;
}
.nav-link:hover::after {
  width: 100%;
}

.footer-link {
  transition: color 0.25s ease;
}
.footer-link:hover {
  color: #E3A857;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(157, 102, 56, 0.5);
  color: #FBF5A7;
  transition: all 0.3s ease;
}
.social-icon:hover {
  background: #E3A857;
  color: #2A1006;
  border-color: #E3A857;
  transform: translateY(-3px);
}

/* ============ hero button ============ */
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 2.5rem;
  padding: 14px 30px;
  border-radius: 999px;
  background: #E3A857;
  color: #2A1006;
  font-family: 'Dosis', sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 34px -14px rgba(227, 168, 87, 0.55);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              background 0.4s ease;
}
.hero-btn svg {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-btn:hover {
  background: #F1C888;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -12px rgba(227, 168, 87, 0.7);
}
.hero-btn:hover svg {
  transform: translateX(4px);
}

/* ============ bean divider ============ */
.bean-divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0;
  background: #2A1006;
}
.bean-divider span {
  width: 7px;
  height: 9px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(160deg, #E3A857, #9D6638);
  opacity: 0.55;
}
.bean-divider span:nth-child(2) {
  width: 9px;
  height: 11px;
  opacity: 0.85;
}
.bean-divider::before,
.bean-divider::after {
  content: "";
  flex: 1;
  max-width: 220px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(157,102,56,0.5), transparent);
}

/* ============ hero animations ============ */
@keyframes bounce-slow {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.9; }
  50% { transform: translate(-50%, 10px); opacity: 0.5; }
}
.animate-bounce-slow {
  animation: bounce-slow 2.2s ease-in-out infinite;
}

/* ============ scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
}
.reveal.is-visible {
  animation: reveal-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ============ coffee cards ============ */
.coffee-card {
  position: relative;
  background: linear-gradient(160deg, rgba(157,102,56,0.12), rgba(42,16,6,0.6));
  border: 1px solid rgba(157, 102, 56, 0.32);
  border-radius: 22px;
  overflow: hidden;          /* single clipping context — child wrappers no longer need their own radius */
  isolation: isolate;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.5s ease,
              box-shadow 0.5s ease;
}
.coffee-card:hover {
  transform: translateY(-10px);
  border-color: #E3A857;
  box-shadow: 0 24px 50px -20px rgba(227, 168, 87, 0.4);
}

.coffee-card__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  font-family: 'Dosis', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  color: #2A1006;
  background: #E3A857;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.5);
}
.coffee-card__tag--cold {
  background: #FBF5A7;
}

.coffee-card__img-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;          /* no border-radius here — parent already clips, avoids double-rounding artifacts */
}
.coffee-card__img-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 55%;
  background: linear-gradient(to bottom, rgba(20,8,3,0.35), transparent);
  pointer-events: none;
}
.coffee-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  filter: saturate(0.95) brightness(0.97);
}
.coffee-card:hover .coffee-card__img-wrap img {
  transform: scale(1.08);
  filter: saturate(1.12) brightness(1);
}

.coffee-card__body {
  position: relative;
  padding: 20px 20px 26px;
}
.coffee-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.coffee-card__bean {
  flex: 0 0 auto;
  width: 14px;
  height: 18px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(160deg, #E3A857, #9D6638);
  position: relative;
  opacity: 0.85;
  transform: rotate(20deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.coffee-card__bean::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.5px;
  height: 78%;
  background: rgba(42,16,6,0.55);
  border-radius: 2px;
}
.coffee-card:hover .coffee-card__bean {
  transform: rotate(200deg);
}

/* ==================================================
   ACCORDION GALLERY (vanilla JS port)
   ================================================== */
.accordion-gallery {
  --ag-accent: #E3A857;
  --ag-overlay: #1B0B04;
  --ag-text: #FFF6E0;
  --ag-gap: 10px;
  --ag-radius: 20px;
  --ag-media-size: 320px;
  display: flex;
  flex-direction: row;
  gap: var(--ag-gap);
  width: 100%;
  max-width: 100%;
  height: 460px;
  perspective: 1400px;
  perspective-origin: 50% 50%;
}

.ag-panel {
  position: relative;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--ag-radius);
  cursor: pointer;
  display: block;
  text-decoration: none;
  outline: none;
  transform-style: preserve-3d;
  transform-origin: center center;
  background: #1B0B04;
  border: 1px solid rgba(227, 168, 87, 0.18);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  transition: flex-grow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.6s ease;
}
.ag-panel:focus-visible {
  box-shadow:
    0 0 0 2px var(--ag-accent),
    0 10px 30px -18px rgba(0, 0, 0, 0.8);
}
.ag-panel--active {
  border-color: rgba(227, 168, 87, 0.55);
}
.ag-panel__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  display: block;
}
.ag-panel__media {
  --ag-gray: 1;
  --ag-dim: 0.35;
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--ag-media-size);
  height: 100%;
  filter: grayscale(var(--ag-gray));
  transform: translate(-50%, -50%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  display: block;
}
.ag-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.ag-panel__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: block;
  background:
    linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--ag-overlay) 78%, transparent) 100%),
    color-mix(in srgb, var(--ag-overlay) calc(var(--ag-dim, 0.35) * 100%), transparent);
  transition: background 0.6s ease;
}
.ag-panel__label {
  position: absolute;
  left: 20px;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  z-index: 2;
}
.ag-panel__bar {
  flex: 0 0 auto;
  width: 3px;
  height: 26px;
  border-radius: 3px;
  background: var(--ag-accent);
  opacity: 0;
  box-shadow: 0 0 12px color-mix(in srgb, var(--ag-accent) 60%, transparent);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateX(-14px);
}
.ag-panel__text {
  color: var(--ag-text);
  font-family: 'Dosis', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateX(-14px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  transition: opacity 0.5s ease 0.05s, transform 0.5s ease 0.05s;
}
.ag-panel--active .ag-panel__bar,
.ag-panel--active .ag-panel__text {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 640px) {
  .accordion-gallery {
    flex-direction: column;
    perspective: none;
    height: auto !important;
  }
  .ag-panel {
    min-height: 90px;
    transform: none !important;
  }
  .ag-panel__media {
    width: 100% !important;
    height: var(--ag-media-size);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-panel,
  .ag-panel__media,
  .reveal {
    transition: none !important;
    animation: none !important;
  }
}