/* ================================================================
   NusantaraQuest — Base CSS
   Design System terinspirasi batik & kain tradisional Indonesia
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Warna Utama — Palet Batik & Tenun Tradisional */
  --color-primary:      #6B3F1A;   /* Cokelat Sogan (batik tulis) */
  --color-primary-deep: #4A2810;   /* Sogan tua */
  --color-gold:         #C4831A;   /* Emas Songket Palembang */
  --color-gold-light:   #E8C87A;   /* Kuning gading hangat */
  --color-gold-pale:    #F5E4B8;   /* Emas pucat */

  /* Background & Surface */
  --color-bg:           #FBF5E6;   /* Krem Mori (kain batik natural) */
  --color-bg-warm:      #F5EDD6;   /* Linen hangat */
  --color-surface:      #F0E4C8;   /* Permukaan kartu */
  --color-surface-deep: #E8D5A8;   /* Permukaan lebih dalam */
  --color-border:       #D4B896;   /* Garis batas kulit kayu */

  /* Teks */
  --color-dark:         #2A1506;   /* Sogan paling gelap */
  --color-text:         #3D2210;   /* Teks utama */
  --color-text-muted:   #7A5535;   /* Teks sekunder */
  --color-text-light:   #B8936A;   /* Teks halus */

  /* Status */
  --color-success:      #3D7A45;   /* Hijau daun alami */
  --color-success-bg:   #E8F5EB;
  --color-error:        #9B2335;   /* Merah batik */
  --color-error-bg:     #FBEAEC;

  /* Tipografi */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;

  /* Ukuran Font */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spasi */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Sudut */
  --radius-sm:   0.375rem;
  --radius-md:   0.75rem;
  --radius-lg:   1.25rem;
  --radius-xl:   1.75rem;
  --radius-full: 9999px;

  /* Bayangan */
  --shadow-sm:  0 1px 3px rgba(42, 21, 6, 0.12), 0 1px 2px rgba(42, 21, 6, 0.08);
  --shadow-md:  0 4px 12px rgba(42, 21, 6, 0.15), 0 2px 6px rgba(42, 21, 6, 0.1);
  --shadow-lg:  0 10px 30px rgba(42, 21, 6, 0.2), 0 4px 12px rgba(42, 21, 6, 0.12);
  --shadow-xl:  0 20px 50px rgba(42, 21, 6, 0.25), 0 8px 20px rgba(42, 21, 6, 0.15);
  --shadow-glow: 0 0 30px rgba(196, 131, 26, 0.3);

  /* Transisi */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset Modern ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 131, 26, 0.12) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C4831A' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; }

/* ── Tipografi ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}

.text-display {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-hero {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.text-body { font-family: var(--font-body); }
.text-muted { color: var(--color-text-muted); }
.text-gold  { color: var(--color-gold); }
.text-center { text-align: center; }

/* ── Motif Batik SVG ────────────────────────────────────────── */
.batik-border {
  position: relative;
}
.batik-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    rgba(196, 131, 26, 0.08) 4px,
    rgba(196, 131, 26, 0.08) 8px
  );
  pointer-events: none;
  z-index: 0;
}

/* ── Ornamen Dekoratif ──────────────────────────────────────── */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}
.ornament-divider .ornament-icon {
  color: var(--color-gold);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

/* ── Utilitas Layout ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container--wide {
  max-width: 680px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.hidden { display: none !important; }

/* ── Animasi Global ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 131, 26, 0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(196, 131, 26, 0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes bounce-in {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.1); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes confetti-fall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100px) rotate(360deg); opacity: 0; }
}
@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.animate-fade-up   { animation: fadeUp var(--transition-slow) both; }
.animate-fade-in   { animation: fadeIn var(--transition-slow) both; }
.animate-scale-in  { animation: scaleIn var(--transition-spring) both; }
.animate-bounce-in { animation: bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ── Scrollbar Kustom ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb {
  background: var(--color-gold-light);
  border-radius: var(--radius-full);
}

/* ── Seleksi Teks ───────────────────────────────────────────── */
::selection {
  background: var(--color-gold-pale);
  color: var(--color-dark);
}
