/* ZuperKos UI — shared tokens and components for index, penghuni, and bayar pages (2026-10 refresh). */

:root {
  /* Palette */
  --bg: #f5efe1;
  --surface: #ffffff;
  --ink: #2b1a1b;
  --text: #4a0a10;
  --muted: #7a6662;
  --line: #ebe1cb;
  --line-strong: #e5d3af;
  --forest: #790d16;
  --forest-2: #9b2c34;
  --forest-3: #4a0a10;
  --lime: #aec4d4;
  --lime-soft: #dfe8ef;
  --amber: #aec4d4;
  --terracotta: #e0694a;
  --danger: #c2412d;
  --success: #2f8f5b;

  /* Legacy names still referenced by inline styles and JS templates */
  --cream: #f3ead6;
  --cream-deep: #ebe1cb;
  --moss: #7a6662;
  --sage: #efe4cc;
  --white: #ffffff;
  --shadow: rgba(43, 26, 27, 0.08);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.34, 1.45, .64, 1);
  --shadow-sm: 0 1px 2px rgba(43, 26, 27, .05), 0 0 0 1px rgba(43, 26, 27, .05);
  --shadow-md: 0 18px 40px -24px rgba(43, 26, 27, .28), 0 0 0 1px rgba(43, 26, 27, .05);
  --shadow-lg: 0 40px 80px -40px rgba(43, 26, 27, .4), 0 0 0 1px rgba(43, 26, 27, .05);
  --font-display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --font-body: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(229, 211, 175, .45); outline-offset: 3px; border-radius: 10px; }

/* Brand wordmark: <a|div class="logo">Zuper<span>Kos</span></a> */
.logo {
  display: inline-block;
  font-family: 'Fraunces', Georgia, serif; font-weight: 900; font-style: italic; font-size: 24px; letter-spacing: -.02em; line-height: 1;
  color: var(--ink); user-select: none;
}
.logo span { font-weight: 400; font-style: normal; color: inherit; }

/* Section label */
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .01em; text-transform: none;
  color: var(--forest-2);
}
.section-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(174, 196, 212, .35); }

/* Buttons (portal / bayar use .btn + variant) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: transform .3s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .3s var(--ease);
}
.btn svg { transition: transform .3s var(--spring); }
.btn:hover svg { transform: translateX(3px); }
.btn.btn-primary { background: var(--forest); color: #fff; box-shadow: 0 12px 24px -14px rgba(121, 13, 22, .8); }
.btn.btn-primary:hover { background: var(--forest-2); transform: translateY(-2px); }
.btn.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.btn-secondary:hover { border-color: var(--forest); color: var(--forest); background: #fff; }
.btn.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.btn-ghost:hover { border-color: var(--forest); color: var(--forest); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* Forms */
.form-label {
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text);
}
.form-input, .form-select, .form-textarea, .form-file {
  width: 100%; max-width: 100%; min-width: 0;
  padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 14px;
  font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  box-shadow: 0 1px 2px rgba(43, 26, 27, .04);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-input::placeholder, .form-textarea::placeholder { color: #ab9e98; }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: #d6c39a; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(229, 211, 175, .14);
}
.form-textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"] { accent-color: var(--forest); width: 18px; height: 18px; }

/* Custom select (DOM built by init3DSelects) */
.zk-3d-select-wrapper { position: relative; width: 100%; user-select: none; }
.zk-3d-select-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 12px 12px 16px; min-height: 50px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(43, 26, 27, .04);
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.zk-3d-select-trigger:hover { border-color: #d6c39a; }
.zk-3d-select-wrapper.open .zk-3d-select-trigger { border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(229, 211, 175, .14); }
.zk-3d-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zk-3d-select-arrow {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 9px;
  background: var(--cream); color: var(--forest); transition: transform .3s var(--spring), background .2s, color .2s;
}
.zk-3d-select-wrapper.open .zk-3d-select-arrow { transform: rotate(180deg); background: var(--forest); color: #fff; }
.zk-3d-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1050; padding: 6px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top center; pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.zk-3d-select-wrapper.open .zk-3d-dropdown-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.zk-3d-dropdown-scroll { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.zk-3d-dropdown-scroll::-webkit-scrollbar { width: 6px; }
.zk-3d-dropdown-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
.zk-3d-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; border-radius: 11px; font-size: 14.5px; font-weight: 500; color: var(--ink); cursor: pointer;
  transition: background .15s, color .15s;
}
.zk-3d-option:hover { background: var(--cream); }
.zk-3d-option.selected { background: var(--lime-soft); color: var(--forest); font-weight: 600; }
.zk-3d-option .zk-3d-check-icon { display: none; }
.zk-3d-option.selected .zk-3d-check-icon { display: inline-block; }
.zk-3d-option.selected .zk-3d-check-icon path { stroke: var(--forest-2); }

/* Messages */
.message-box { display: none; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.55; margin-bottom: 12px; }
.message-box.show { display: block; animation: zkFadeIn .3s var(--ease); }
.message-box.error { background: #fdeee9; color: #94301f; border: 1px solid #f6cfc4; }
.message-box.success { background: #e9f7ee; color: #145c38; border: 1px solid #c4e8d2; }

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

/* Simple footer used by portal and checkout */
.zk-footer, footer.zk-footer {
  background: var(--forest-3); color: #f7f1e4; margin-top: 56px; padding: 40px 32px 28px;
}
.zk-footer .footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 14px; color: #efe4cc; }
.zk-footer .footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.03em; color: #fff; }
.zk-footer .footer-brand em { font-style: normal; color: var(--lime); }
.zk-footer .footer-inner a { color: var(--lime); font-weight: 600; font-size: 14px; letter-spacing: 0; text-transform: none; font-family: var(--font-body); }
.zk-footer .footer-inner a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Reveal helper (JS adds .reveal/.visible) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes zkFadeIn { from { opacity: 0; transform: translateY(-4px); } }
@keyframes zkPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }
@keyframes zkFloat { 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
