/* =========================================================
   Kelas Visual — Stylesheet
   White Claymorphism · Animated blob gradient · Outline icons
   Desktop-priority, tetap nyaman di mobile
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* --- color tokens --- */
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-soft: #FBFCFE;
  --ink: #2B2D3A;
  --ink-soft: #6B7080;
  --ink-faint: #A0A4B4;
  --line: #E7E9F2;

  --accent: #6E8CF0;       /* periwinkle blue */
  --accent-ink: #3B54B4;
  --accent-soft: #E8ECFD;

  --accent-2: #F2A07A;     /* soft coral */
  --accent-2-soft: #FCEBE0;

  --accent-3: #7AC7A4;     /* mint */
  --accent-3-soft: #E5F6EE;

  --accent-4: #C79BE0;     /* soft lavender */
  --accent-4-soft: #F3E9FA;

  --danger: #E1665E;

  /* --- clay shadow tokens --- */
  --clay-dark: rgba(150, 158, 190, 0.35);
  --clay-light: rgba(255, 255, 255, 0.9);

  /* --- radii / spacing --- */
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --gutter: clamp(20px, 3vw, 40px);

  --font-display: 'Baloo 2', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font-family: inherit; color: inherit; }

a { color: var(--accent-ink); }

.icon { display: block; flex-shrink: 0; }

/* =========================================================
   Animated blob background
   ========================================================= */

.blob-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}

.blob-1 {
  width: 42vw; height: 42vw;
  top: -12vw; left: -8vw;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%);
  animation: float-a 26s ease-in-out infinite;
}
.blob-2 {
  width: 36vw; height: 36vw;
  top: 40vh; right: -10vw;
  background: radial-gradient(circle at 60% 40%, var(--accent-2-soft), transparent 70%);
  animation: float-b 32s ease-in-out infinite;
}
.blob-3 {
  width: 30vw; height: 30vw;
  bottom: -10vw; left: 18vw;
  background: radial-gradient(circle at 50% 50%, var(--accent-3-soft), transparent 70%);
  animation: float-c 30s ease-in-out infinite;
}
.blob-4 {
  width: 24vw; height: 24vw;
  top: 5vh; right: 22vw;
  background: radial-gradient(circle at 40% 60%, var(--accent-4-soft), transparent 70%);
  animation: float-a 22s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4vw, 6vh) scale(1.08); }
  66%      { transform: translate(-3vw, 3vh) scale(0.96); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-6vw, -4vh) scale(1.1); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(5vw, -5vh) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* =========================================================
   Clay surface utility
   ========================================================= */

.clay {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow:
    9px 9px 20px var(--clay-dark),
    -9px -9px 18px var(--clay-light),
    inset 0 0 0 rgba(0,0,0,0);
}

.clay-inset {
  background: var(--surface-soft);
  border-radius: var(--r-md);
  box-shadow:
    inset 4px 4px 10px var(--clay-dark),
    inset -4px -4px 10px var(--clay-light);
}

.clay-press {
  transition: box-shadow .18s ease, transform .18s ease;
}
.clay-press:active {
  box-shadow:
    inset 4px 4px 10px var(--clay-dark),
    inset -4px -4px 10px var(--clay-light);
  transform: translateY(1px);
}

/* =========================================================
   Layout shell
   ========================================================= */

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px; height: 46px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: 4px 4px 10px var(--clay-dark), -4px -4px 10px var(--clay-light);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: .2px;
}

.brand-text p {
  margin: 0;
  font-size: .82rem;
  color: var(--ink-soft);
}

.brand-domain {
  font-size: .78rem;
  color: var(--ink-faint);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 4px 4px 10px var(--clay-dark), -4px -4px 10px var(--clay-light);
}

/* =========================================================
   Stepper
   ========================================================= */

.stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 22px 0 34px;
  padding: 10px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 6px 6px 16px var(--clay-dark), -6px -6px 16px var(--clay-light);
  overflow-x: auto;
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 118px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
  cursor: default;
  transition: color .2s ease, background .2s ease;
}

.step-pill .num {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .74rem;
  background: var(--line);
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: background .2s ease, color .2s ease;
}

.step-pill.is-active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.step-pill.is-active .num { background: var(--accent); color: #fff; }

.step-pill.is-done .num { background: var(--accent-3); color: #fff; }
.step-pill.is-done { color: var(--ink); cursor: pointer; }

/* =========================================================
   Panel / card
   ========================================================= */

.panel {
  padding: clamp(22px, 3vw, 40px);
  margin-bottom: 28px;
}

.panel-head {
  margin-bottom: 22px;
}

.panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  margin: 0 0 6px;
}

.panel-desc {
  color: var(--ink-soft);
  margin: 0;
  max-width: 62ch;
  line-height: 1.55;
}

/* category grid (content picker) */

.group-block { margin-bottom: 26px; }
.group-block:last-child { margin-bottom: 0; }

.group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 14px;
}

.group-label .glyph {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: none;
  box-shadow: 5px 5px 12px var(--clay-dark), -5px -5px 12px var(--clay-light);
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  transition: box-shadow .18s ease, color .18s ease, transform .12s ease;
}

.option-card:hover { transform: translateY(-1px); }

.option-card .dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--line);
  display: grid; place-items: center;
  transition: border-color .18s ease, background .18s ease;
}

.option-card.is-selected {
  color: var(--accent-ink);
  box-shadow:
    inset 4px 4px 10px var(--clay-dark),
    inset -4px -4px 10px var(--clay-light);
}
.option-card.is-selected .dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.option-card small {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: .76rem;
  margin-top: 2px;
}

/* radio-style compact list (mood/quality/assessment) */

.option-list {
  display: grid;
  gap: 10px;
}

.option-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 5px 5px 12px var(--clay-dark), -5px -5px 12px var(--clay-light);
  cursor: pointer;
  transition: box-shadow .18s ease;
}

.option-row.is-selected {
  box-shadow: inset 4px 4px 10px var(--clay-dark), inset -4px -4px 10px var(--clay-light);
}

.option-row .radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  margin-top: 2px;
  display: grid; place-items: center;
}
.option-row.is-selected .radio { border-color: var(--accent); }
.option-row.is-selected .radio::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.option-row .txt strong { display: block; font-size: .95rem; }
.option-row .txt span { color: var(--ink-soft); font-size: .82rem; }

/* form fields */

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .86rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.field .hint { color: var(--ink-faint); font-size: .76rem; font-weight: 400; margin-left: 6px; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

input[type=text], input[type=search], select, textarea {
  width: 100%;
  border: none;
  border-radius: var(--r-sm);
  padding: 13px 16px;
  background: var(--surface-soft);
  box-shadow: inset 3px 3px 8px var(--clay-dark), inset -3px -3px 8px var(--clay-light);
  font-size: .92rem;
  outline: none;
}
input[type=text]:focus, select:focus, textarea:focus {
  box-shadow: inset 3px 3px 8px var(--clay-dark), inset -3px -3px 8px var(--clay-light), 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }

select { appearance: none; -webkit-appearance: none; background-image: none; padding-right: 40px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px; top: 50%;
  width: 12px; height: 12px;
  transform: translateY(-60%) rotate(45deg);
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  pointer-events: none;
}
select:disabled { opacity: .55; }

.chip-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: inset 3px 3px 7px var(--clay-dark), inset -3px -3px 7px var(--clay-light);
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
  cursor: pointer;
  margin: 4px 6px 4px 0;
  transition: color .18s ease, background .18s ease;
}
.chip-toggle.is-selected { background: var(--accent-soft); color: var(--accent-ink); }

/* upload dropzone */

.dropzone {
  border-radius: var(--r-md);
  padding: 28px;
  text-align: center;
  background: var(--surface-soft);
  box-shadow: inset 3px 3px 8px var(--clay-dark), inset -3px -3px 8px var(--clay-light);
  cursor: pointer;
  color: var(--ink-soft);
}
.dropzone .glyph {
  width: 54px; height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.dropzone strong { color: var(--ink); display: block; margin-bottom: 4px; }
.dropzone small { font-size: .78rem; color: var(--ink-faint); }
.dropzone input { display: none; }

.file-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 4px 4px 10px var(--clay-dark), -4px -4px 10px var(--clay-light);
  font-size: .82rem; font-weight: 600;
  margin-top: 12px;
}
.file-pill button { background: none; border: none; cursor: pointer; color: var(--ink-faint); display: grid; }

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 5px 5px 14px rgba(110,140,240,0.45), -4px -4px 10px rgba(255,255,255,0.5);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); box-shadow: inset 3px 3px 8px rgba(0,0,0,0.25); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 5px 5px 12px var(--clay-dark), -5px -5px 12px var(--clay-light);
}
.btn-ghost:active { box-shadow: inset 3px 3px 8px var(--clay-dark), inset -3px -3px 8px var(--clay-light); }

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.btn-sm { padding: 9px 16px; font-size: .8rem; }
.btn-full { width: 100%; }

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}
.nav-row .spacer { flex: 1; }

/* summary sidebar */

.layout-two {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.summary-card {
  position: sticky;
  top: 24px;
  padding: 26px;
}

.summary-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 16px;
}

.summary-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: .82rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row .k { color: var(--ink-faint); min-width: 92px; flex-shrink: 0; }
.summary-row .v { color: var(--ink); font-weight: 600; }

/* modal selector */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(43,45,58,0.35);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 60;
  padding: 0;
}
@media (min-width: 860px) {
  .modal-overlay { align-items: center; padding: 24px; }
}

.modal-sheet {
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(43,45,58,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 860px) {
  .modal-sheet { border-radius: 28px; max-height: 80vh; }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.1rem; }
.modal-close {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-soft);
  box-shadow: 3px 3px 8px var(--clay-dark), -3px -3px 8px var(--clay-light);
  border: none; display: grid; place-items: center; cursor: pointer; color: var(--ink-soft);
}

.modal-body { padding: 18px 22px 26px; overflow-y: auto; }

/* prompt output */

.prompt-box {
  background: var(--surface-soft);
  border-radius: var(--r-md);
  box-shadow: inset 3px 3px 8px var(--clay-dark), inset -3px -3px 8px var(--clay-light);
  padding: 20px 22px;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: .88rem;
  max-height: 420px;
  overflow-y: auto;
}

.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
}
.badge-mint { background: var(--accent-3-soft); color: #2C7A57; }
.badge-coral { background: var(--accent-2-soft); color: #B9542C; }

.toast {
  position: fixed;
  bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 90;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* footer */
.app-footer {
  text-align: center;
  color: var(--ink-faint);
  font-size: .78rem;
  margin-top: 40px;
}

/* responsive */
@media (max-width: 980px) {
  .layout-two { grid-template-columns: 1fr; }
  .summary-card { position: static; }
}

@media (max-width: 640px) {
  .app-shell { padding: 0 16px 60px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .brand-domain { display: none; }
  .step-pill { min-width: 0; padding: 10px 12px; }
  .step-pill span.label { display: none; }
  .panel { padding: 20px; border-radius: 22px; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .nav-row { flex-wrap: wrap; }
  .btn { padding: 13px 20px; font-size: .88rem; }
}
