/* =========================================================
   Keroket Landing Page — tema cokelat cerah gorengan
   ========================================================= */
:root {
  --cream: #fff4e0;
  --cream-2: #fce9c1;
  --golden: #d9892b;
  --golden-2: #f2a93b;
  --brown: #7a4a1e;
  --brown-dark: #4e2d10;
  --header-h: 76px;
  --card: clamp(210px, 32vw, 380px);
  --radius: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: "Baloo 2", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--brown);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.7) 0, transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(242, 169, 59, 0.35) 0, transparent 45%),
    radial-gradient(ellipse at center, var(--cream) 0%, #f9dfae 60%, #f1c27a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Tekstur remah gorengan halus */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(122, 74, 30, 0.09) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  z-index: 0;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-2);
  border-bottom: 3px solid rgba(217, 137, 43, 0.35);
  box-shadow: 0 6px 20px -10px rgba(78, 45, 16, 0.35);
}

.logo {
  display: inline-flex;
  height: calc(var(--header-h) - 14px);
  border-radius: 12px;
  transition: transform 0.25s ease;
}

.logo:hover {
  transform: scale(1.05) rotate(-1.5deg);
}

.logo:focus-visible {
  outline: 3px solid var(--golden);
  outline-offset: 3px;
}

.logo img {
  height: 100%;
  width: auto;
  display: block;
}

/* ---------------- Hero / Carousel ---------------- */
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 24px;
  min-height: calc(100vh - var(--header-h) - 64px);
}

/* Blob dekoratif melayang */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}

.blob--1 {
  width: 260px;
  height: 260px;
  background: var(--golden-2);
  top: 8%;
  left: 6%;
}

.blob--2 {
  width: 320px;
  height: 320px;
  background: #e8a35a;
  bottom: 6%;
  right: 4%;
  animation-delay: -3s;
}

.blob--3 {
  width: 180px;
  height: 180px;
  background: #fff1cf;
  top: 20%;
  right: 22%;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -24px, 0); }
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: calc(var(--card) * 1.35);
  perspective: 1400px;
  perspective-origin: 50% 40%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  outline: none;
}

.carousel.is-dragging {
  cursor: grabbing;
}

.carousel:focus-visible .card.is-active .card__inner {
  box-shadow:
    0 0 0 4px var(--golden),
    0 30px 60px -20px rgba(78, 45, 16, 0.55);
}

.stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card);
  height: var(--card);
  margin: calc(var(--card) / -2) 0 0 calc(var(--card) / -2);
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: var(--cream-2);
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, box-shadow 0.3s ease;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.85),
    0 30px 60px -20px rgba(78, 45, 16, 0.55),
    0 12px 24px -12px rgba(78, 45, 16, 0.4);
}

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  pointer-events: none;
  -webkit-user-drag: none;
  transform: translateZ(30px);
}

.card.is-active .card__img {
  animation: bob 4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateZ(30px) translateY(0); }
  50% { transform: translateZ(30px) translateY(-8px); }
}

/* Kilau minyak yang mengikuti kursor */
.card__glare {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  transform: translateZ(31px);
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 30%),
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0) 55%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: soft-light;
}

.card.is-active .card__glare {
  opacity: 1;
}

/* Bayangan di "lantai" */
.floor-shadow {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: calc(var(--card) * 1.1);
  height: 34px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(78, 45, 16, 0.35) 0%, transparent 70%);
  filter: blur(4px);
  pointer-events: none;
}

/* Kontrol */
.controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.nav-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid var(--brown);
  background: var(--golden-2);
  color: var(--brown-dark);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 0 var(--brown);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.nav-btn:hover {
  background: #ffbf55;
}

.nav-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--brown);
}

.nav-btn:focus-visible {
  outline: 3px solid var(--brown-dark);
  outline-offset: 3px;
}

.dots {
  display: flex;
  gap: 10px;
}

.dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--brown);
  background: transparent;
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.dot.is-active {
  width: 34px;
  background: var(--golden);
}

.dot:focus-visible {
  outline: 3px solid var(--brown-dark);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- Footer ---------------- */
.site-footer {
  position: relative;
  z-index: 1;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brown);
  color: var(--cream-2);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-top: 4px solid var(--golden);
  text-align: center;
  padding: 0 16px;
}

.site-footer p {
  margin: 0;
}

/* ---------------- Responsif ---------------- */
@media (max-width: 640px) {
  :root {
    --header-h: 64px;
    --card: min(62vw, 300px);
    --radius: 22px;
  }

  .nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .card.is-active .card__img {
    animation: none;
  }

  .card__inner,
  .logo {
    transition: none;
  }
}
