@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg: #F5F7F6;
  --surface: #FFFFFF;
  --surface-subtle: #EDF2EF;
  --text: #192A24;
  --muted: #62726B;
  --stroke: #E0E7E3;
  --accent-sage: #5E8C76;
  --accent-slate: #4A6E82;
  --accent-warm: #C68B71;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Optimasi Performa Rendering Browser */
section, footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

.font-display {
  font-family: 'Instrument Serif', serif;
}

.font-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Smooth Dynamic Role Transition */
.role-transition {
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  will-change: opacity, transform, filter;
}

.role-hidden {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  filter: blur(6px);
}

/* iPhone Glass Navbar & Draggable Styles */
.glass-nav {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 10px 30px rgba(25, 42, 36, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* Mencegah Teks Terblok / Copas Saat Ditarik */
.glass-nav, .nav-link, #nav-links-container {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#nav-links-container {
  cursor: grab;
  touch-action: pan-y;
}

#nav-links-container.is-dragging {
  cursor: grabbing;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(94, 140, 118, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 1);
  transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              top 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: left, width, transform;
}

/* Animasi Karet / Jelly Bounce */
.glass-pill.jelly-anim {
  animation: jelly-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes jelly-bounce {
  0% { transform: scale(1, 1); }
  25% { transform: scale(1.18, 0.82); }
  50% { transform: scale(0.92, 1.08); }
  75% { transform: scale(1.04, 0.96); }
  100% { transform: scale(1, 1); }
}

/* Gradients */
.pastel-gradient {
  background: linear-gradient(135deg, #5E8C76 0%, #4A6E82 100%);
}

.pastel-gradient-soft {
  background: linear-gradient(135deg, #E6EFEA 0%, #E2EBF0 100%);
}

.pastel-text-gradient {
  background: linear-gradient(135deg, #3A6351 0%, #2D4C5D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards & Hardware Acceleration */
.pastel-card {
  background: #FFFFFF;
  border: 1px solid var(--stroke);
  box-shadow: 0 4px 20px -2px rgba(25, 42, 36, 0.04);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
  transform: translateZ(0);
}

.pastel-card:hover {
  border-color: #B5CAC0;
  box-shadow: 0 20px 40px -12px rgba(74, 110, 130, 0.12);
  transform: translateY(-4px) translateZ(0);
}

/* Sheen Effect */
.sheen-effect {
  position: relative;
  overflow: hidden;
}

.sheen-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 30%;
  height: 200%;
  background: linear-gradient(
    90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.6) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  transition: left 0.75s ease;
  pointer-events: none;
}

.sheen-effect:hover::after {
  left: 130%;
}

/* Marquee Animations (GPU Accelerated) */
@keyframes marquee-left {
  0% { transform: translate3d(0%, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marquee-right {
  0% { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0%, 0, 0); }
}

.animate-marquee-left {
  display: flex;
  width: max-content;
  animation: marquee-left 85s linear infinite;
  will-change: transform;
}

.animate-marquee-right {
  display: flex;
  width: max-content;
  animation: marquee-right 85s linear infinite;
  will-change: transform;
}

.animate-marquee-left:hover,
.animate-marquee-right:hover {
  animation-play-state: paused;
}

/* Keyframes */
@keyframes float-slow {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(2deg); }
}

.animate-float {
  animation: float-slow 6s ease-in-out infinite;
  will-change: transform;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.animate-pulse-soft {
  animation: pulse-soft 3.5s ease-in-out infinite;
}

@keyframes scroll-down {
  0% { transform: translate3d(0, -100%, 0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate3d(0, 200%, 0); opacity: 0; }
}

.animate-scroll-down {
  animation: scroll-down 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  will-change: transform;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F0F4F2;
}
::-webkit-scrollbar-thumb {
  background: #C3D3CC;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5E8C76;
}

/* Reveal utility */
.reveal-element {
  transition: transform 800ms ease-out, opacity 800ms ease-out, filter 800ms ease-out;
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  filter: blur(4px);
  will-change: transform, opacity, filter;
}
.reveal-element.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: none;
}