/* Global Design Tokens & Font Declarations */
@font-face {
  font-family: 'Harlow Solid Italic';
  src: url('font/harlow/HARLOWSI_1.TTF') format('truetype');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'MADE Tommy Soft';
  src: url('font/made_tommy/MADE Tommy Soft Regular PERSONAL USE.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MADE Tommy Soft';
  src: url('font/made_tommy/MADE Tommy Soft Medium PERSONAL USE.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MADE Tommy Soft';
  src: url('font/made_tommy/MADE Tommy Soft Bold PERSONAL USE.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-cream: #F8E2B9;
  --color-maroon: #912A2D;
  --font-harlow: 'Harlow Solid Italic', cursive, serif;
  --font-tommy: 'MADE Tommy Soft', 'Segoe UI', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  background-color: var(--color-cream);
  font-family: var(--font-tommy);
  color: var(--color-maroon);
}

body {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--color-cream);
  font-family: var(--font-tommy);
  color: var(--color-maroon);
  display: flex;
  flex-direction: column;
}

/* Fixed 100vh single-screen layout for index, profil, kontak */
body.fixed-page {
  height: 100vh;
  overflow: hidden;
}

/* Scrollable layout for produk page */
body.scrollable-page {
  min-height: 100vh;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Site Wrapper */
.site-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--color-cream);
  overflow: hidden;
}

/* Scrollable site wrapper for produk page */
.site-wrapper-scroll {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--color-cream);
}

.main-content-scroll {
  flex: 1;
  width: 100%;
  background-color: var(--color-maroon);
}

.produk-section-block {
  width: 100%;
  min-height: calc(100vh - 125px);
  padding: 40px 60px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header Navbar */
.site-header {
  background-color: var(--color-cream);
  height: 85px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.logo-container img {
  height: 64px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo-container img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-maroon);
  font-family: var(--font-tommy);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: var(--color-maroon);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.nav-links a.active {
  font-weight: 800;
}

/* Footer */
.site-footer {
  background-color: var(--color-cream);
  height: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-tommy);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-maroon);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

/* Main Content Section - Fills remaining height */
.main-content {
  flex: 1;
  width: 100%;
  height: calc(100vh - 125px);
  display: flex;
  position: relative;
  background-color: var(--color-maroon);
  overflow: hidden;
}

/* ------------------- BERANDA ------------------- */
.main-content.beranda-content {
  background-color: var(--color-cream);
  padding: 0;
  width: 100%;
  height: calc(100vh - 125px);
  overflow: hidden;
}

.hero-banner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-banner img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-banner:hover img.hero-bg {
  transform: scale(1.02);
}

.hero-overlay-text {
  position: absolute;
  bottom: 35px;
  right: 50px;
  text-align: right;
  z-index: 2;
  pointer-events: none;
}

.hero-overlay-text h2 {
  font-family: var(--font-harlow);
  font-size: 44px;
  color: var(--color-cream);
  line-height: 1.2;
  font-weight: normal;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

/* ------------------- PROFIL ------------------- */
.profil-container {
  display: flex;
  width: 100%;
  height: 100%;
}

.profil-left {
  flex: 1.1;
  padding: 35px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.profil-title {
  font-family: var(--font-harlow);
  font-size: 54px;
  color: var(--color-cream);
  font-weight: normal;
  margin-bottom: 18px;
}

.profil-desc {
  color: var(--color-cream);
  font-family: var(--font-tommy);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
  text-align: justify;
  margin-bottom: 30px;
  max-width: 620px;
}

.visi-misi-grid {
  display: flex;
  gap: 20px;
  max-width: 620px;
}

.card-box {
  flex: 1;
  background-color: var(--color-cream);
  border-radius: 30px;
  padding: 20px 20px;
  color: var(--color-maroon);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.card-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}

.card-box h3 {
  font-family: var(--font-harlow);
  font-size: 34px;
  text-align: center;
  font-weight: normal;
  margin-bottom: 8px;
  color: var(--color-maroon);
}

.card-box p {
  font-family: var(--font-tommy);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
}

.profil-right {
  flex: 0.9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.profil-right img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center right;
  mask-image: linear-gradient(to right, transparent 0%, black 15%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%);
}

/* ------------------- PRODUK ------------------- */
.produk-header {
  text-align: center;
  margin-bottom: 25px;
  z-index: 2;
}

.produk-header h2 {
  font-family: var(--font-harlow);
  font-size: 44px;
  color: var(--color-cream);
  font-weight: normal;
  margin-bottom: 8px;
}

.produk-header p {
  font-family: var(--font-tommy);
  font-size: 15px;
  color: var(--color-cream);
  font-weight: 500;
}

.produk-body {
  display: flex;
  flex: 1;
  position: relative;
  align-items: center;
}

.produk-left {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  max-width: 850px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 60px;
}

.product-card {
  display: flex;
  align-items: center;
  gap: 22px;
}

.product-img-wrapper {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.45));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.12) rotate(2deg);
  filter: drop-shadow(0px 14px 22px rgba(0, 0, 0, 0.55));
}

.product-info {
  color: var(--color-cream);
  text-align: center;
}

.product-info h3 {
  font-family: var(--font-harlow);
  font-size: 32px;
  font-weight: normal;
  margin-bottom: 4px;
  white-space: nowrap;
  text-align: center;
}

.product-info p.desc {
  font-family: var(--font-tommy);
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 500;
  margin-bottom: 6px;
  text-align: center;
}

.product-info p.price {
  font-family: var(--font-tommy);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.produk-right {
  position: absolute;
  right: -60px;
  bottom: -40px;
  top: -40px;
  width: 48%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.produk-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  filter: drop-shadow(-10px 0 20px rgba(0,0,0,0.3));
}

/* ------------------- KONTAK ------------------- */
.kontak-container {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 40px 70px;
  position: relative;
}

.kontak-left {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  max-width: 540px;
}

.kontak-left h2 {
  font-family: var(--font-harlow);
  font-size: 56px;
  color: var(--color-cream);
  font-weight: normal;
  margin-bottom: 18px;
}

.kontak-left p {
  color: var(--color-cream);
  font-family: var(--font-tommy);
  font-size: 15.5px;
  line-height: 1.55;
  font-weight: 500;
  margin-bottom: 38px;
  max-width: 490px;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 340px;
}

.btn-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 64px;
  background-color: var(--color-cream);
  color: var(--color-maroon);
  text-decoration: none;
  font-family: var(--font-tommy);
  font-weight: 700;
  font-size: 22px;
  border-radius: 50px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-contact svg {
  flex-shrink: 0;
  fill: var(--color-maroon);
  transition: transform 0.25s ease;
}

.btn-contact:hover {
  transform: translateY(-4px) scale(1.02);
  background-color: #ffffff;
  box-shadow: 0 14px 28px rgba(0,0,0,0.3);
}

.btn-contact:hover svg {
  transform: scale(1.15) rotate(-4deg);
}

.kontak-right {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: 50%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  z-index: 1;
}

.kontak-right img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  object-position: bottom right;
  filter: drop-shadow(-10px 0 25px rgba(0,0,0,0.2));
}

/* ------------------- PAGE ANIMATIONS ------------------- */
@keyframes pageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.995);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes pageFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.995);
    filter: blur(3px);
  }
}

@keyframes staggerUp {
  0% {
    opacity: 0;
    transform: translateY(22px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content, .main-content-scroll {
  animation: pageFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.page-exiting .main-content,
body.page-exiting .main-content-scroll {
  animation: pageFadeOut 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.hero-overlay-text, 
.profil-left, 
.profil-right, 
.kontak-left, 
.kontak-right, 
.produk-header, 
.products-grid {
  animation: staggerUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .site-header {
    padding: 0 25px;
  }
  .profil-left, .kontak-left, .produk-container {
    padding: 30px 25px;
  }
  .hero-overlay-text {
    right: 30px;
    bottom: 30px;
  }
  .hero-overlay-text h2 {
    font-size: 36px;
  }
}
