
:root {
  --potato-bg: #FBF9ED;
  --potato-brown: #7b3a26;
  --loader-width: min(420px, 60vw);
  --panel-flex-duration: 0.75s;
  --panel-ease: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ====== BASE LAYOUT ====== */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont,
  "SF Pro Text", "Segoe UI", sans-serif;
  background-color: var(--potato-bg);
}

.site-body {
  min-height: 100vh;
  background-color: var(--potato-bg);
}

.site-main {
  min-height: 100vh;
}

body:not(.is-loaded) #hero-screen {
  opacity: 0;
  pointer-events: none;
}

body.is-loaded #hero-screen {
  opacity: 1;
  transition: opacity 0.7s ease;
}

/* ====== LOADER ====== */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  overflow: hidden;

  background-color: var(--potato-bg);
  background-image: url("../images/background.webp");
  background-size: cover;
  background-position: center;
}

.loader__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.04);
  mix-blend-mode: multiply;
}

.loader__logo-wrap {
  position: relative;
  z-index: 1;
  width: var(--loader-width);
  max-width: 520px;
  overflow: hidden;
}

.loader__logo {
  display: block;
  width: 100%;
  opacity: 0;
  transform: translateY(8px);
  filter: blur(2px);
  animation: logo-fade-rise 0.8s ease-out forwards;
}

@keyframes logo-fade-rise {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* LOADING BAR */

.loader__bar {
  position: relative;
  z-index: 1;
  width: var(--loader-width);
  height: 4px;
  border-radius: 999px;
  background-color: rgba(123, 58, 38, 0.18);
  overflow: hidden;
}

.loader__bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background-color: var(--potato-brown);
  transform-origin: left center;
  animation: loader-bar-fill 3.5s ease-out forwards;
}

@keyframes loader-bar-fill {
  0% {
    width: 0%;
  }
  12% {
    width: 22%;
  }
  40% {
    width: 55%;
  }
  75% {
    width: 85%;
  }
  100% {
    width: 100%;
  }
}

.loader--hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

/* ====== BRAND STRIP (3 PANEL INDEX) ====== */

.brand-strip {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #050505;
}

.brand-panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
  color: #f5f5f5;
  isolation: isolate;
  transition:
    flex var(--panel-flex-duration) var(--panel-ease),
    filter 0.45s ease;
  will-change: flex, filter;
}

/* wrapper gambar */
.brand-panel__image-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.brand-panel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition:
    transform 0.9s var(--panel-ease),
    filter 0.6s ease-out;
  will-change: transform;
}

.brand-panel:hover .brand-panel__image {
  transform: scale(1.06) translateY(-4px);
}

.brand-panel--active .brand-panel__image {
  transform: scale(1.08) translateY(-6px);
}

.brand-panel__scrim-top,
.brand-panel__scrim-bottom {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 1;
}

.brand-panel__scrim-top {
  top: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
}

.brand-panel__scrim-bottom {
  bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}

.brand-panel__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1.75rem 1.75rem 2.5rem;
  transition:
    padding 0.45s ease,
    transform 0.45s ease;
}

.brand-panel--active .brand-panel__content {
  transform: translateY(-6px);
  padding-bottom: 3rem;
}

.brand-panel__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.brand-panel--active .brand-panel__meta-row {
  opacity: 0.95;
}

.brand-panel__title-block {
  margin-top: auto;
  max-width: 15rem;
  transition:
    max-width 0.45s ease,
    transform 0.45s ease;
}

.brand-panel__logo {
  max-width: 180px;
  width: 100%;
  display: block;
  transition:
    max-width 0.45s ease,
    transform 0.45s ease;
}

.brand-panel--active .brand-panel__title-block {
  max-width: 20rem;
  transform: translateY(-4px);
}

.brand-panel--active .brand-panel__logo {
  max-width: 210px;
}

.brand-panel__title-text {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 0.9;
}

.brand-panel__body {
  text-shadow: 1px 1px rgba(17, 24, 39, 0.75);
  margin-top: 1rem;
  font-size: 0.78rem;
  line-height: 1.7;
  max-width: 21rem;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.brand-panel--active .brand-panel__body {
  opacity: 1;
  transform: translateY(0);
}

.brand-panel__button {
  text-shadow: 1px 1px rgba(17, 24, 39, 0.75);
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.9rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 245, 245, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  background: transparent;
  color: #f5f5f5;
  text-decoration: none;

  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.brand-panel__button:hover {
  background: #f5f5f5;
  color: #111827;
  border-color: #f5f5f5;
  text-shadow: 1px 1px rgba(17, 24, 39, 0.25);
}

.brand-panel--active .brand-panel__button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.brand-panel__label {
  display: none;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .brand-strip {
    flex-direction: column;
    min-height: auto;
  }

  .brand-panel {
    min-height: 70vh;
    /* TAMBAHKAN INI: Agar panel menjadi flex container */
    display: flex; 
    flex-direction: column;
  }
  
  /* Update class ini */
  .brand-panel__content {
    padding: 1.5rem 1.5rem 2.25rem;
    /* TAMBAHKAN INI: Agar konten mengisi tinggi penuh panel */
    flex: 1; 
    width: 100%;
    /* Pastikan justify-content tetap space-between atau flex-end */
    justify-content: space-between; 
  }

  .brand-panel__title-block {
    max-width: 12rem;
    /* Pastikan margin-top auto tetap ada agar dia terdorong ke paling bawah */
    margin-top: auto; 
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-panel,
  .brand-panel__image,
  .brand-panel__content,
  .brand-panel__title-block,
  .brand-panel__logo,
  .brand-panel__body,
  .brand-panel__button {
    transition: none !important;
  }
}

  .flip-card {
    display: block;
    perspective: 1000px;
  }

  .flip-card-inner {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
  }

  .flip-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .flip-card-back {
    transform: rotateY(180deg);
  }

  .flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
  }
  .hide-scrollbar::-webkit-scrollbar {
    display: none;
  }
  .hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .cursor-grab { cursor: grab; }
  .no-scrollbar::-webkit-scrollbar { display: none; }
  .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
  .cursor-grabbing { cursor: grabbing !important; }