/* ==========================================================
   KADOIN — Frontend Stylesheet
   Konsep: "wax seal on a gift card" — warna wine-red sebagai
   aksen tunggal (seperti segel lilin di amplop), tipografi serif
   untuk judul, kertas hangat sebagai latar. CSS native, tanpa
   dependency eksternal (section BC & DP masterprompt).
   ========================================================== */

:root {
  --primary: #7a2e3a;
  --primary-dark: #5e2029;
  --secondary: #b8935a;
  --background: #f6f3ee;
  --surface: #ffffff;
  --surface-alt: #fbf8f3;
  --text: #23211d;
  --muted: #8a8579;
  --border: #e4ded2;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(35, 33, 29, 0.07);
  --shadow-lg: 0 12px 40px rgba(35, 33, 29, 0.12);
  --success: #4f6f4f;
  --danger: #a13d3d;
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Courier New', Courier, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--text); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}

.muted { color: var(--muted); }

/* ---------- Wax seal signature (logo & numbered markers) ---------- */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #8f3a47, var(--primary) 70%, var(--primary-dark) 100%);
  color: #f6ece2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(94, 32, 41, 0.35), inset 0 1px 1px rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.seal--lg { width: 56px; height: 56px; font-size: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 0.94rem; color: var(--text); }
.nav a:hover { color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(122,46,58,0.28); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-whatsapp { background: #2f6b4f; color: #fff; }
.btn-whatsapp:hover { background: #24543e; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(122,46,58,0.08), transparent 60%),
    radial-gradient(500px 260px at 5% 110%, rgba(184,147,90,0.12), transparent 60%);
  pointer-events: none;
}
.hero__content { position: relative; max-width: 700px; }
.hero__cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero__lede { font-size: 1.15rem; color: var(--muted); max-width: 560px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { max-width: 620px; margin: 0 0 40px; }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Cards (template — dengan sudut "gift tag") ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.template-card__media {
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #efe6d8, #f8f4ee);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}
.template-card__media img { width: 100%; height: 100%; object-fit: cover; }
.template-card__tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--primary);
  font-weight: 600;
}
.template-card__body { padding: 20px; }
.template-card__price { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary); font-weight: 700; margin-top: 8px; }

.category-pill {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  background: var(--surface);
}
.category-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; }
.step { text-align: left; }
.step .seal { margin-bottom: 14px; }
.step h4 { margin-bottom: 4px; font-size: 1rem; }
.step p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-display); font-size: 1.4rem; color: var(--secondary); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin-top: 12px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: #23211d; color: #cfc9bd; padding: 56px 0 28px; margin-top: 40px; }
.site-footer a { color: #f1ece1; }
.site-footer .brand { color: #fff; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #3a3730; font-size: 0.82rem; color: #928c7e; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=url], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122,46,58,0.12);
}
textarea { resize: vertical; min-height: 90px; }
.password-wrap { position: relative; }
.password-wrap .toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted); font-size: 0.82rem; font-weight: 600;
}

/* ---------- Alerts / Flash ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: #eef3ea; color: #3d5c3d; border: 1px solid #cfe0c9; }
.alert-error { background: #f7e9e9; color: var(--danger); border: 1px solid #edc9c9; }

/* ---------- Checkout summary ---------- */
.summary-box { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.94rem; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; font-weight: 700; font-family: var(--font-display); font-size: 1.15rem; }

/* ---------- Order status / payment page ---------- */
.receipt {
  max-width: 480px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.receipt__head { background: var(--primary); color: #fff; padding: 22px 26px; text-align: center; }
.receipt__head .order-number { font-family: var(--font-mono); letter-spacing: 0.05em; opacity: 0.9; font-size: 0.85rem; }
.receipt__body { padding: 26px; text-align: center; }
.receipt__qr { background: #fff; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); display: inline-block; }
.receipt__qr img { width: 220px; height: 220px; }
.receipt__amount { font-family: var(--font-display); font-size: 1.8rem; color: var(--primary); font-weight: 700; margin: 14px 0 4px; }
.receipt__countdown { font-family: var(--font-mono); font-size: 1.4rem; letter-spacing: 0.05em; margin: 10px 0; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.status-diproses, .status-pesanan_baru, .status-menunggu_pembayaran { background: #f3ecd9; color: #8a6a1f; }
.status-berhasil, .status-selesai, .status-terkirim { background: #e6f0e2; color: var(--success); }
.status-gagal, .status-dibatalkan { background: #f7e9e9; color: var(--danger); }
.status-kadaluarsa { background: #eee; color: #777; }
.status-menunggu_dikerjakan, .status-sedang_dikerjakan, .status-revisi, .status-dikembalikan { background: #ece3f3; color: #6a4c8a; }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
