/* ==========================================================================
   ColorDock — SaaS-style design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --border: #eaeaf1;
  --border-strong: #dcdce6;
  --text: #0b0b12;
  --text-2: #6b6b7c;
  --text-3: #a3a3b0;
  --primary: #5b52f6;
  --primary-600: #4842d6;
  --primary-soft: #eeecff;
  --accent: #ff5d73;
  --accent-soft: #ffe9ec;
  --success: #17a06a;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15,15,25,0.04), 0 2px 8px -2px rgba(15,15,25,0.06);
  --shadow-md: 0 4px 16px -4px rgba(15,15,25,0.10), 0 12px 32px -12px rgba(15,15,25,0.12);
  --shadow-lg: 0 8px 24px -6px rgba(15,15,25,0.14), 0 24px 60px -20px rgba(15,15,25,0.22);
  --shadow-glow: 0 8px 28px -8px rgba(91,82,246,0.45);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #08080c;
  --bg-subtle: #0d0d13;
  --surface: #121219;
  --surface-2: #16161e;
  --border: #212129;
  --border-strong: #2b2b36;
  --text: #f5f5f8;
  --text-2: #9a9aab;
  --text-3: #64647a;
  --primary: #8b81ff;
  --primary-600: #a39aff;
  --primary-soft: #201d47;
  --accent: #ff7688;
  --accent-soft: #3a1620;
  --success: #34d399;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 2px 8px -2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px -4px rgba(0,0,0,0.45), 0 12px 32px -12px rgba(0,0,0,0.55);
  --shadow-lg: 0 8px 24px -6px rgba(0,0,0,0.5), 0 24px 60px -20px rgba(0,0,0,0.65);
  --shadow-glow: 0 8px 32px -6px rgba(139,129,255,0.5);
  color-scheme: dark;
}

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

#gallery, #studio, #contrast {
  scroll-margin-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 28px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3%, 4%) scale(1.06); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.reveal { animation: fadeUp 0.6s var(--ease) both; }

/* ---------------------------------- Nav ---------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 17.5px;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 5px;
  background: var(--bg);
  opacity: 0.16;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--bg-subtle); }

.nav-search {
  flex: 1;
  max-width: 320px;
  position: relative;
  margin-left: auto;
}
.nav-search input {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  padding: 0 14px 0 38px;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-search input::placeholder { color: var(--text-3); }
.nav-search input:focus { border-color: var(--primary); background: var(--surface); }
.nav-search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-3); pointer-events: none;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.icon-btn:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .icon-moon { display: none; }
html[data-theme="dark"] .icon-btn .icon-sun { display: none; }
html[data-theme="dark"] .icon-btn .icon-moon { display: block; }

/* ---------------------------------- Buttons ---------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.15s var(--ease);
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
html[data-theme="dark"] .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { box-shadow: var(--shadow-glow); }

.btn-accent {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-accent:hover { box-shadow: var(--shadow-glow); }

.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--border); }

.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}

.hero-blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: floatBlob 14s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; background: var(--primary); top: -160px; left: -80px; }
.blob-2 { width: 380px; height: 380px; background: var(--accent); top: -100px; right: -120px; animation-delay: -6s; }
html[data-theme="dark"] .blob { opacity: 0.22; }

.hero .wrap { position: relative; z-index: 1; text-align: center; max-width: 780px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow svg { width: 15px; height: 15px; }

.hero h1 {
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 17.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0 auto 32px;
  max-width: 560px;
}

.hero-ctas { display: flex; gap: 12px; justify-content: center; margin-bottom: 46px; }
.hero-ctas .btn { padding: 13px 22px; font-size: 14.5px; }

.hero-preview {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.preview-chip {
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  width: 128px;
  height: 64px;
  transition: transform 0.25s var(--ease);
}
.preview-chip:hover { transform: translateY(-4px) scale(1.03); }
.preview-chip span { flex: 1; }

/* ---------------------------------- Section shell ---------------------------------- */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head .tag-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-head .tag-label svg { width: 14px; height: 14px; }

.section-head h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.section-head p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 480px; }

/* ---------------------------------- Color Studio (signature) ---------------------------------- */

.studio {
  background: linear-gradient(180deg, var(--bg-subtle), var(--bg));
}

.studio-first {
  border-top: none;
  padding-top: 56px;
}

#contrast {
  border-top: none;
  padding-top: 0;
}

.photo-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.photo-panel-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 0 0 14px;
}

.photo-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-2);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.photo-dropzone[hidden] { display: none; }
.photo-dropzone:hover,
.photo-dropzone.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.photo-dropzone-icon { width: 30px; height: 30px; margin-bottom: 6px; }
.photo-dropzone p { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.photo-dropzone span { font-size: 12.5px; color: var(--text-3); }

.photo-result-inner {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.photo-thumb {
  width: 180px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.photo-palette-preview {
  width: 180px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 560px) {
  .photo-result-inner { flex-direction: column; align-items: stretch; }
  .photo-thumb, .photo-palette-preview { width: 100%; max-width: 240px; }
  .photo-result-actions { flex-direction: row; flex-wrap: wrap; }
}

.studio-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.studio-top {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.studio-name-input {
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  width: 220px;
  transition: background 0.15s var(--ease);
}
.studio-name-input:focus { background: var(--bg-subtle); outline: none; }

.studio-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.studio-strip {
  display: flex;
  height: 220px;
}

.studio-swatch {
  flex: 1;
  position: relative;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: flex 0.3s var(--ease);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}
.studio-swatch.active { flex: 1.4; }
.studio-swatch:not(.active):hover { flex: 1.15; }

.studio-swatch code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.studio-swatch.active code,
.studio-swatch:hover code { opacity: 1; transform: translateY(0); }

.studio-swatch .studio-ring {
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.9);
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.studio-swatch.active .studio-ring { opacity: 1; }

.studio-swatch .remove-swatch {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s var(--ease), background 0.15s var(--ease);
}
.studio-swatch:hover .remove-swatch { opacity: 1; }
.studio-swatch .remove-swatch:hover { background: rgba(0,0,0,0.55); }
.studio-swatch .remove-swatch svg { width: 13px; height: 13px; }

.studio-add {
  width: 52px;
  border: none;
  background: var(--bg-subtle);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.studio-add:hover { background: var(--primary-soft); color: var(--primary); }
.studio-add:disabled { opacity: 0.35; cursor: not-allowed; }
.studio-add svg { width: 20px; height: 20px; }

.studio-controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}

.studio-sliders {
  padding: 24px;
  border-right: 1px solid var(--border);
}

.slider-row { margin-bottom: 18px; }
.slider-row:last-child { margin-bottom: 0; }

.slider-row .slider-label {
  display: flex; justify-content: space-between;
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.slider-row .slider-label span:last-child { font-family: var(--font-mono); color: var(--text); font-weight: 600; }

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  outline: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
input[type="range"]#slider-hue {
  background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  border: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.12s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--text);
  cursor: pointer;
}

.studio-formats { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.format-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-subtle);
}
.format-row .format-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3);
  width: 40px;
  flex-shrink: 0;
}
.format-row .format-input {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
}
.format-row .format-input:focus { color: var(--primary); }
.format-row button {
  border: none; background: transparent; color: var(--text-3);
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
  flex-shrink: 0;
}
.format-row button:hover { color: var(--primary); background: var(--primary-soft); }
.format-row button svg { width: 14px; height: 14px; }

/* ---------------------------------- Tabs ---------------------------------- */

.gallery-layout {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 40px;
  align-items: start;
  padding: 36px 0 20px;
  min-width: 0;
}

.gallery-layout > * { min-width: 0; }

.gallery-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-block h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 0 0 12px;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tab {
  display: flex; align-items: center; gap: 10px;
  border: none; background: transparent;
  color: var(--text-2);
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  text-align: left;
  width: 100%;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.tab.active { background: var(--primary-soft); color: var(--primary); }
.tab:not(.active):hover { background: var(--bg-subtle); color: var(--text); }

.tag-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tag-chip:hover {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}
.tag-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

@media (max-width: 900px) {
  .gallery-layout { grid-template-columns: 1fr; gap: 22px; padding-top: 24px; }
  .gallery-sidebar {
    position: static;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .tabs { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .tab { flex-shrink: 0; width: auto; }
}

/* ---------------------------------- Gallery grid ---------------------------------- */

.tabs-bar { top: 60px; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
  animation: fadeUp 0.5s var(--ease) both;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }

.card-colors {
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  width: 100%;
  position: relative;
}
.color-band {
  flex: 1;
  width: 100%;
  position: relative;
  cursor: pointer;
}
.color-band .band-hex {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  position: absolute;
  left: 10px;
  bottom: 10px;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transform: translateY(4px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease), background 0.15s var(--ease);
  white-space: nowrap;
}
.color-band:hover .band-hex { opacity: 1; pointer-events: auto; transform: translateY(0); }
.color-band .band-hex:hover { background: rgba(0,0,0,0.55); }

/* proporsi tidak rata: warna 1 paling besar, lalu mengecil ke bawah */
.card-colors .color-band:nth-child(1) { flex: 3; }
.card-colors .color-band:nth-child(2) { flex: 2; }
.card-colors .color-band:nth-child(3) { flex: 1.2; }
.card-colors .color-band:nth-child(4) { flex: 1; }

.card-quick-like {
  position: absolute;
  right: 10px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), background 0.18s var(--ease);
}
.card:hover .card-quick-like { opacity: 1; pointer-events: auto; transform: translateY(0); }
.card-quick-like svg { width: 14px; height: 14px; }
.card-quick-like.liked { background: rgba(0,0,0,0.55); }
.card-quick-like.liked svg { fill: var(--accent); filter: drop-shadow(0 0 1px rgba(0,0,0,0.5)); }
.card-quick-like.pop { animation: popIn 0.3s var(--ease); }

/* dipakai lagi di dalam modal detail */
.tool-btn {
  width: 33px; height: 33px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.12s var(--ease);
}
.tool-btn svg { width: 15px; height: 15px; }
.tool-btn:hover { color: var(--text); border-color: var(--border-strong); }
.tool-btn:active { transform: scale(0.9); }

.empty-state { grid-column: 1 / -1; padding: 70px 20px; text-align: center; color: var(--text-2); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--text-3); }
.empty-state strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 32px; }

/* ---------------------------------- Modal detail palet ---------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,8,12,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s var(--ease);
}
.modal-overlay.show .modal-panel { transform: translateY(0) scale(1); }

.modal-colors { display: flex; flex-direction: column; height: 240px; }
.modal-colors .color-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
.modal-colors .color-band code {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 700;
  padding: 6px 11px; border-radius: 8px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
}
.modal-colors .color-band button {
  border: none; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s var(--ease), background 0.15s var(--ease);
}
.modal-colors .color-band button:hover { transform: scale(1.08); background: rgba(0,0,0,0.55); }
.modal-colors .color-band button svg { width: 15px; height: 15px; }

.modal-body { padding: 22px 24px 26px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.modal-head h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }

.modal-close {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-subtle);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }
.modal-close svg { width: 16px; height: 16px; }

.modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-tags span {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--bg-subtle); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px;
}

.modal-desc { font-size: 14.5px; color: var(--text-2); line-height: 1.6; margin: 0 0 20px; }

.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-like-btn.liked { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.modal-like-btn.liked svg { fill: var(--accent); }

/* ---------------------------------- Toast ---------------------------------- */

.toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(24px);
  background: var(--text); color: var(--bg);
  padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 300;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }

/* ---------------------------------- Footer ---------------------------------- */

/* ---------------------------------- Gradient generator ---------------------------------- */

.gradient-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-top: 24px;
}

.gradient-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.gradient-type-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 999px;
}
.gradient-type-btn {
  border: none;
  background: transparent;
  color: var(--text-2);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.gradient-type-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.gradient-preview {
  height: 160px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

#gradient-angle-row { margin-bottom: 18px; }

/* ---------------------------------- Style guide (print/PDF) ---------------------------------- */

.style-guide-print { display: none; }

@media print {
  body * { visibility: hidden; }
  .style-guide-print, .style-guide-print * { visibility: visible; }
  .style-guide-print {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    color: #0b0b12;
    padding: 48px 56px;
    font-family: 'Inter', sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sg-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 2px solid #0b0b12;
    padding-bottom: 20px;
    margin-bottom: 32px;
  }
  .sg-brand { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
  .sg-meta { text-align: right; }
  .sg-meta h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
  .sg-meta p { font-size: 12px; color: #6b6b7c; margin: 0; }

  .sg-swatches { display: flex; flex-direction: column; gap: 16px; }
  .sg-row {
    display: flex;
    align-items: center;
    gap: 24px;
    border: 1px solid #e0e0e6;
    border-radius: 10px;
    overflow: hidden;
  }
  .sg-color-block { width: 120px; height: 90px; flex-shrink: 0; }
  .sg-color-info { padding: 12px 4px; }
  .sg-color-name { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b6b7c; margin-bottom: 6px; }
  .sg-color-codes { display: flex; gap: 20px; }
  .sg-color-codes span { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; }

  .sg-footer { margin-top: 40px; font-size: 11px; color: #9a9aab; text-align: center; }
}

/* ---------------------------------- Contrast checker ---------------------------------- */

.contrast-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.contrast-inputs {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.contrast-color-field { flex: 1; min-width: 200px; }
.contrast-color-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.contrast-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 12px;
  background: var(--bg-subtle);
}
.contrast-color-row input[type="color"] {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  padding: 0;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.contrast-hex-input {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
}

.contrast-swap {
  flex-shrink: 0;
  margin-bottom: 4px;
}

.contrast-preview {
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.contrast-preview-large { font-size: 26px; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.02em; }
.contrast-preview-small { font-size: 14px; font-weight: 500; margin: 0; }

.contrast-results {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.contrast-ratio-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 100px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.contrast-ratio-badge span:first-child { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.contrast-ratio-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.contrast-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  flex: 1;
  min-width: 260px;
}
.contrast-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.contrast-check-item.pass { border-color: var(--success); color: var(--success); }
.contrast-check-item.fail { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .contrast-inputs { flex-direction: column; align-items: stretch; }
  .contrast-swap { align-self: center; margin: -6px 0; transform: rotate(90deg); }
  .contrast-checks { grid-template-columns: 1fr; }
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 64px 0 32px;
  margin-top: 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col ul a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s var(--ease);
}
.footer-col ul a:hover { color: var(--primary); }

.footer-note {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p { margin: 0; font-size: 13px; color: var(--text-3); }

.footer-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.footer-top-btn svg { width: 14px; height: 14px; }
.footer-top-btn:hover { color: #ffffff; border-color: var(--primary); background: var(--primary); transform: translateY(-1px); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------- Responsive ---------------------------------- */

.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle.active .icon-menu { display: none; }
.menu-toggle.active .icon-close { display: block; }

@media (max-width: 960px) {
  .menu-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 18px 18px;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    z-index: 49;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; }

  .studio-controls { grid-template-columns: 1fr; }
  .studio-sliders { border-right: none; border-bottom: 1px solid var(--border); }

  .studio-name-input { width: 100%; flex: 1 1 100%; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav-search { display: none; }
  .site-nav .wrap { height: 60px; }
  #gallery, #studio, #contrast { scroll-margin-top: 76px; }
  .nav-links { top: 60px; }
  .tabs-bar { top: 60px; }
  .hero { padding: 56px 0 44px; }
  .hero-ctas { flex-direction: column; }
  .hero-preview { display: none; }
  .section { padding: 52px 0; }
  .studio-strip { height: 170px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(45%, 1fr)); gap: 12px; }
  .modal-colors { height: 180px; }
}

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

/* ---------------------------------- LOGO ---------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 1.4rem;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 10px; /* opsional, jika logo tidak sudah rounded */
    flex-shrink: 0;
}

.brand-text {
    line-height: 1;
}

/* ---------------------------------- SOSMED FOOTER ---------------------------------- */
.contact-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.contact-input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.contact-input::placeholder { color: var(--text-3); }
.contact-input:focus { border-color: var(--primary); }
.contact-textarea { resize: vertical; min-height: 64px; }
.contact-submit { width: 100%; justify-content: center; }

.footer-social { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.footer-contact-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-3);
}
.footer-contact-list a {
  color: var(--text-2);
  transition: color 0.15s var(--ease);
}
.footer-contact-list a:hover { color: var(--primary); }
.social-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  transition: color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), background .15s var(--ease);
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover { color: #ffffff; border-color: var(--primary); transform: translateY(-2px); background: var(--primary); }