/* ═══════════════════════════════════════════════════════
   SalstudioZ.Fuzzy — Stylesheet
   Theme: Cool diagnosis / ice blue dark (matches Pakar Blue)
   Font: Archivo (display) + Instrument Sans (body)
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg:         #0d0d0d;
  --bg-2:       #131313;
  --bg-3:       #1a1a1a;
  --bg-4:       #222222;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.12);

  --blue:       #3b82f6;
  --blue-dim:   rgba(59,130,246,0.12);
  --blue-glow:  rgba(59,130,246,0.2);

  --ice:        #38bdf8;
  --ice-dim:    rgba(56,189,248,0.12);
  --ice-glow:   rgba(56,189,248,0.22);
  --dew:        #4ade80;
  --dew-dim:    rgba(74,222,128,0.10);
  --dew-glow:   rgba(74,222,128,0.18);

  --green:      #22c55e;
  --green-dim:  rgba(34,197,94,0.1);
  --red:        #f87171;
  --red-dim:    rgba(248,113,113,0.1);
  --purple:     #a78bfa;
  --purple-dim: rgba(167,139,250,0.1);

  --txt-1:  #f5f0e8;
  --txt-2:  #8095a8;
  --txt-3:  #4b70ab;

  --r-sm:  6px;
  --r:     12px;
  --r-lg:  18px;
  --r-xl:  24px;

  --shadow:    0 8px 24px rgba(0,0,0,0.6);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.7);
  --glow-ice:  0 0 28px var(--ice-glow);
  --glow-dew:  0 0 28px var(--dew-glow);

  --font-display: 'Archivo', sans-serif;
  --font-body:    'Instrument Sans', sans-serif;
  --ease:         cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.5;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* NAVBAR */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,13,13,0.9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; height: 60px; gap: 1.5rem; }
.nav-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.nav-brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 20px var(--blue-glow);
  flex-shrink: 0;
}
.nav-brand-icon img { width: 22px; height: 22px; object-fit: contain; filter: brightness(0); }
.nav-brand-icon i { font-size: 0.85rem; color: var(--bg); }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1; }
.nav-brand-name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 800; color: var(--txt-1); letter-spacing: -0.02em; }
.nav-brand-name span { color: var(--blue); }
.nav-brand-sub { font-size: 0.65rem; font-weight: 400; color: var(--txt-3); letter-spacing: 0.04em; margin-top: 1px; }
.nav-divider { width: 1px; height: 28px; background: var(--border-2); flex-shrink: 0; }
.nav-pill { background: var(--blue-dim); border: 1px solid rgba(59,130,246,0.2); color: var(--blue); font-size: 0.7rem; font-weight: 700; padding: 0.3rem 0.75rem; border-radius: 999px; letter-spacing: 0.06em; text-transform: uppercase; flex-shrink: 0; }
.nav-spacer { flex: 1; }
.nav-link-ext { display: flex; align-items: center; gap: 0.5rem; color: var(--txt-2); text-decoration: none; font-size: 0.8rem; font-weight: 500; padding: 0.4rem 0.85rem; border-radius: var(--r-sm); border: 1px solid var(--border); transition: all 0.2s; flex-shrink: 0; }
.nav-link-ext img { width: 14px; height: 14px; object-fit: contain; filter: brightness(0) saturate(0) invert(60%); }
.nav-link-ext i { font-size: 0.75rem; }
.nav-link-ext:hover { color: var(--txt-1); border-color: var(--border-2); background: var(--bg-3); }
.nav-link-ext:hover img { filter: brightness(0) saturate(0) invert(90%); }

/* HERO */
.hero { padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; top: -80px; right: -120px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-row { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 600; color: var(--blue); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.hero-eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--blue); border-radius: 2px; }
.hero-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.03em; color: var(--txt-1); margin-bottom: 1rem; }
.hero-title span { color: var(--blue); }
.hero-desc { font-size: 0.925rem; color: var(--txt-2); line-height: 1.8; max-width: 520px; font-weight: 400; }
.hero-stats { display: flex; flex-direction: column; gap: 0.75rem; flex-shrink: 0; }
.stat-card { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem; min-width: 160px; transition: border-color 0.2s; }
.stat-card:hover { border-color: var(--border-2); }
.stat-icon-wrap { width: 36px; height: 36px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; overflow: hidden; }
.stat-icon-wrap img { width: 20px; height: 20px; object-fit: contain; }
.stat-icon-wrap.blue  { background: var(--blue-dim); color: var(--blue); }
.stat-icon-wrap.blue img { filter: brightness(0) saturate(100%) invert(45%) sepia(80%) saturate(2000%) hue-rotate(210deg); }
.stat-icon-wrap.ice   { background: var(--ice-dim); color: var(--ice); }
.stat-icon-wrap.ice img   { filter: brightness(0) saturate(100%) invert(75%) sepia(60%) saturate(400%) hue-rotate(175deg); }
.stat-icon-wrap.dew   { background: var(--green-dim); color: var(--green); }
.stat-info { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--txt-1); line-height: 1; }
.stat-lbl { font-size: 0.7rem; font-weight: 500; color: var(--txt-3); margin-top: 2px; }

/* GRID */
.page-body { padding-bottom: 4rem; }
.main-grid { display: grid; grid-template-columns: 420px 1fr; gap: 1.5rem; align-items: start; }

/* PANEL */
.panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.panel-sticky { position: sticky; top: 76px; }
.panel-head { display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg-3); }
.panel-head-icon { width: 32px; height: 32px; background: var(--blue-dim); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 0.8rem; flex-shrink: 0; }
.panel-head h2 { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--txt-1); }
.panel-body { padding: 1.5rem; }

/* FIELD */
.field { margin-bottom: 1.5rem; }
.field-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 600; color: var(--txt-2); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.6rem; }
.field-label i { color: var(--blue); font-size: 0.72rem; }
.field-hint { font-size: 0.72rem; color: var(--txt-3); margin-top: 0.4rem; }
.badge-optional { margin-left: auto; font-size: 0.6rem; font-weight: 700; background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); padding: 0.15rem 0.55rem; border-radius: 999px; letter-spacing: 0.06em; text-transform: uppercase; }

/* SELECT */
.select-wrap { position: relative; }
.input-select { width: 100%; appearance: none; background: var(--bg-3); border: 1px solid var(--border-2); border-radius: var(--r); padding: 0.75rem 2.5rem 0.75rem 1rem; font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--txt-1); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
.input-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.select-arrow { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--txt-3); font-size: 0.7rem; pointer-events: none; }
.input-select option { background: var(--bg-3); }

/* SLIDER */
.slider-badge { margin-left: auto; font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; color: var(--blue); background: var(--blue-dim); border: 1px solid rgba(59,130,246,0.2); padding: 0.2rem 0.6rem; border-radius: 999px; }
.slider-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; }
.slider-edge { font-size: 0.68rem; font-weight: 600; color: var(--txt-3); white-space: nowrap; flex-shrink: 0; }
.slider-track { flex: 1; position: relative; height: 32px; display: flex; align-items: center; }
.range-input { width: 100%; -webkit-appearance: none; appearance: none; height: 4px; background: var(--bg-4); border-radius: 999px; outline: none; cursor: pointer; position: relative; z-index: 2; }
.range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: var(--blue); border-radius: 50%; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--blue), 0 0 16px var(--blue-glow); cursor: pointer; transition: transform 0.15s var(--ease); }
.range-input::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-input::-moz-range-thumb { width: 22px; height: 22px; background: var(--blue); border-radius: 50%; border: 3px solid var(--bg); cursor: pointer; }
.slider-fill { position: absolute; left: 0; height: 4px; background: linear-gradient(90deg, #2563eb, var(--blue)); border-radius: 999px; pointer-events: none; z-index: 1; transition: width 0.04s linear; }
.range-tip { position: absolute; top: -30px; background: var(--bg-4); border: 1px solid var(--border-2); color: var(--txt-1); font-size: 0.68rem; font-weight: 700; padding: 0.18rem 0.45rem; border-radius: var(--r-sm); pointer-events: none; white-space: nowrap; z-index: 10; transition: left 0.04s linear; }
.range-tip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: var(--border-2); }
.slider-ticks { display: flex; justify-content: space-between; margin-top: 0.35rem; }
.slider-ticks span { font-size: 0.62rem; color: var(--txt-3); font-weight: 500; letter-spacing: 0.02em; }

/* BUTTON */
.btn-calc { width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.65rem; padding: 0.875rem 1.5rem; background: linear-gradient(135deg, #2563eb, var(--blue)); color: var(--bg); border: none; border-radius: var(--r); font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; letter-spacing: -0.01em; cursor: pointer; transition: all 0.25s var(--ease); margin-top: 0.5rem; box-shadow: 0 4px 16px var(--blue-glow); }
.btn-calc:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(59,130,246,0.4); background: linear-gradient(135deg, #1d4ed8, #93c5fd); }
.btn-calc:active:not(:disabled) { transform: translateY(0); }
.btn-calc:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-spin { display: none; }

/* ERROR */
.err-box { margin-top: 0.75rem; background: var(--red-dim); border: 1px solid rgba(248,113,113,0.25); border-radius: var(--r-sm); padding: 0.65rem 0.9rem; font-size: 0.8rem; color: var(--red); display: none; align-items: center; gap: 0.5rem; }

/* RESULTS */
.results-col { display: flex; flex-direction: column; gap: 1.25rem; }
.results-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; min-height: 320px; background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: var(--r-xl); text-align: center; padding: 3rem; }
.results-empty-icon { width: 64px; height: 64px; background: var(--bg-3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--txt-3); overflow: hidden; }
.results-empty-icon img { width: 36px; height: 36px; object-fit: contain; filter: brightness(0) saturate(0) invert(40%); }
.results-empty h3 { font-size: 0.95rem; font-weight: 600; color: var(--txt-2); }
.results-empty p  { font-size: 0.8rem; color: var(--txt-3); line-height: 1.7; max-width: 260px; }

/* RESULT CARDS */
.result-cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.res-card { border-radius: var(--r-lg); padding: 1.75rem 1.5rem; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.res-card:hover { transform: translateY(-4px); }
.res-card--ice { background: linear-gradient(145deg, #0a0f14 0%, #0c1a2e 50%, #0e1f3a 100%); border: 1px solid rgba(56,189,248,0.2); box-shadow: var(--glow-ice); }
.res-card--dew { background: linear-gradient(145deg, #0a0f0a 0%, #0c2318 50%, #0e2d1e 100%); border: 1px solid rgba(74,222,128,0.2); box-shadow: var(--glow-dew); }
.res-card-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 0.5rem; }
.res-icon { font-size: 1.25rem; margin-bottom: 0.5rem; }
.res-card--ice .res-icon { color: var(--ice); }
.res-card--dew .res-icon { color: var(--dew); }
.res-value { font-family: var(--font-display); font-size: 3.25rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.res-card--ice .res-value { color: var(--ice); }
.res-card--dew .res-value { color: var(--dew); }
.res-unit { font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,0.5); margin-top: 0.1rem; }
.res-badge { margin-top: 0.6rem; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.res-card--ice .res-badge { background: var(--ice-dim); color: var(--ice); border: 1px solid rgba(56,189,248,0.25); }
.res-card--dew .res-badge { background: var(--dew-dim); color: var(--dew); border: 1px solid rgba(74,222,128,0.25); }
.res-desc { font-size: 0.72rem; color: rgba(255,255,255,0.35); margin-top: 0.2rem; }
.res-card::after { content: ''; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; border-radius: 50%; pointer-events: none; opacity: 0.15; }
.res-card--ice::after { background: var(--ice); }
.res-card--dew::after { background: var(--dew); }

/* DETAIL PANEL */
.detail-panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.detail-head { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg-3); }
.detail-head i { color: var(--blue); font-size: 0.8rem; }
.detail-head h3 { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--txt-1); }
.detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.detail-col { padding: 1.25rem 1.5rem; }
.detail-col:first-child { border-right: 1px solid var(--border); }
.detail-col-title { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-3); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; }
.detail-col-title i { font-size: 0.65rem; }
.bar-item { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.65rem; }
.bar-name { font-size: 0.72rem; font-weight: 500; color: var(--txt-2); width: 104px; flex-shrink: 0; text-transform: capitalize; }
.bar-track { flex: 1; height: 6px; background: var(--bg-4); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.7s var(--ease); }
.detail-col:first-child .bar-fill { background: linear-gradient(90deg, #2563eb, var(--ice)); }
.detail-col:last-child  .bar-fill { background: linear-gradient(90deg, #166534, var(--dew)); }
.bar-pct { font-size: 0.68rem; font-weight: 700; color: var(--txt-3); width: 30px; text-align: right; flex-shrink: 0; }

/* FOOTNOTE */
.footnote { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; color: var(--txt-3); padding: 0 0.25rem; }
.footnote i { color: var(--blue); font-size: 0.7rem; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; background: var(--bg); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 600; color: var(--txt-2); }
.footer-brand img { width: 16px; height: 16px; object-fit: contain; filter: brightness(0) saturate(100%) invert(45%) sepia(80%) saturate(2000%) hue-rotate(210deg); }
.footer-brand i { color: var(--blue); }
.footer-brand span { color: var(--blue); font-family: var(--font-display); }
.footer-right { font-size: 0.72rem; color: var(--txt-3); display: flex; align-items: center; gap: 1rem; }
.footer-right a { color: var(--txt-3); text-decoration: none; }
.footer-right a:hover { color: var(--blue); }
.footer-dot { width: 3px; height: 3px; background: var(--txt-3); border-radius: 50%; }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeUp 0.5s var(--ease) both; }

/* RESPONSIVE */
@media (max-width: 1100px) { .main-grid { grid-template-columns: 380px 1fr; } }
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .panel-sticky { position: static; }
  .hero-row { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .stat-card { flex: 1; min-width: 140px; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-col:first-child { border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .hero { padding: 2rem 0 1.75rem; }
  .hero-title { font-size: 1.75rem; }
  .hero-stats { gap: 0.6rem; }
  .stat-card { padding: 0.75rem 1rem; min-width: unset; flex: 1 1 calc(50% - 0.3rem); }
  .stat-num { font-size: 1.2rem; }
  .result-cards-row { grid-template-columns: 1fr; }
  .res-value { font-size: 2.75rem; }
  .nav-brand-sub { display: none; }
  .nav-link-ext span { display: none; }
  .nav-link-ext { padding: 0.4rem 0.6rem; }
  .nav-pill { display: none; }
  .panel-body { padding: 1.1rem; }
  .bar-name { width: 88px; }
}
@media (max-width: 400px) {
  .hero-stats { flex-direction: column; }
  .stat-card { flex: none; width: 100%; }
}