@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ═══════════════════════════════════════
   Jung Calc — 2402 WorkDoc 벤치마킹
   Bright & Airy · Blue→Purple · Glass · rounded-2xl
═══════════════════════════════════════ */
:root {
  /* brand — vivid blue + purple accent */
  --primary:       #3B82F6;
  --primary-dark:  #2563EB;
  --primary-soft:  #EFF6FF;
  --primary-alpha: rgba(59, 130, 246, 0.14);
  --primary-tint:  rgba(59, 130, 246, 0.06);
  --primary-glow:  rgba(59, 130, 246, 0.30);
  --accent:        #8B5CF6;
  --grad:          linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);

  /* surfaces — slate scale */
  --bg:          #FFFFFF;
  --surface:     #FFFFFF;
  --surface-2:   #F8FAFC;
  --border:      #E2E8F0;
  --border-2:    #CBD5E1;
  --border-soft: #F1F5F9;

  /* text — slate */
  --text:        #1E293B;
  --text-strong: #0F172A;
  --text-2:      #64748B;
  --text-3:      #94A3B8;

  /* status */
  --ok:        #10B981;
  --ok-bg:     rgba(16, 185, 129, 0.10);
  --ok-border: rgba(16, 185, 129, 0.32);
  --err:       #EF4444;
  --err-bg:    rgba(239, 68, 68, 0.08);
  --err-border:rgba(239, 68, 68, 0.30);

  /* ── legacy compat (client_info / user_agent inline styles) ── */
  --bg-card:         var(--surface);
  --glass-border:    var(--border);
  --glass-shadow:    0 10px 30px rgba(15, 23, 42, 0.07);
  --accent-primary:  var(--primary);
  --accent-gradient: var(--grad);
  --text-primary:    var(--text);
  --text-secondary:  var(--text-2);
  --text-muted:      var(--text-3);
  --radius-md:       12px;
  --radius-lg:       16px;

  --r-1: 10px;
  --r-2: 12px;
  --r-3: 14px;
  --r-4: 16px;
  --r-5: 24px;

  --sh-1: 0 1px 2px rgba(15,23,42,.04);
  --sh-2: 0 4px 12px rgba(15,23,42,.06);
  --sh-3: 0 10px 30px rgba(15,23,42,.08);
  --sh-4: 0 20px 50px rgba(15,23,42,.12);

  --ease:     cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t1: 160ms;
  --t2: 300ms;
}

/* ─── BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 72px;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(59,130,246,0.08), transparent 60%),
    radial-gradient(1000px 480px at 92% -4%, rgba(139,92,246,0.08), transparent 60%),
    #FFFFFF;
  background-attachment: fixed;
}

.stars, .star { display: none !important; }

/* ─── GLOBAL HEADER (glass, sticky) ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100vw;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(226,232,240,0.7);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-strong);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}
.site-header__logo .logo-badge {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.site-header__logo .logo-badge svg { width: 18px; height: 18px; }
.site-header__logo .accent { color: var(--primary); }
.site-header__logo .logo-text { display: inline-flex; flex-direction: column; line-height: 1.12; gap: 1px; }
.site-header__logo .logo-main { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-strong); }
.site-header__logo .logo-sub { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.16em; color: var(--text-3); }
.site-header__nav { display: flex; align-items: center; gap: 22px; }
.site-header__nav a {
  font-size: 0.86rem; font-weight: 600; color: var(--text-2);
  text-decoration: none; transition: color var(--t1) var(--ease);
}
.site-header__nav a:hover { color: var(--text-strong); }
@media (max-width: 560px) { .site-header__nav { display: none; } }

/* ─── HERO ─── */
.hero {
  width: 100%;
  max-width: 760px;
  margin: 44px 0 8px;
  text-align: center;
}
.hero-icon {
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  margin-bottom: 22px;
  background: var(--grad);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 28px var(--primary-glow);
}
.hero-icon svg { width: 30px; height: 30px; }
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.045em;
  line-height: 1.16;
  margin-bottom: 20px;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p {
  font-size: 1.04rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
  word-break: keep-all;
}
.hero .hero-tail { margin-top: 14px; font-size: 0.9rem; color: var(--text-3); }

/* ─── SECTION LABEL (가로선 + 가운데 라벨) ─── */
.section-label {
  width: 100%; max-width: 1040px;
  display: flex; align-items: center; gap: 18px;
  margin: 46px 0 22px;
}
.section-label::before, .section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.section-label span {
  font-size: 0.92rem; font-weight: 700; color: var(--text-3);
  letter-spacing: -0.01em;
}

/* ─── FEATURE GRID (컬러풀 아이콘 카드) ─── */
.feature-grid {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-5);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  box-shadow: var(--sh-2);
  transition:
    transform var(--t2) var(--ease-out),
    box-shadow var(--t2) var(--ease-out),
    border-color var(--t1) var(--ease);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-alpha);
  box-shadow: 0 18px 40px rgba(59,130,246,0.14);
}
.feature-icon {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 15px;
  margin-bottom: 16px;
}
.feature-icon svg { width: 26px; height: 26px; }
/* 아이콘 배지 색상 변형 */
.ic-blue    { background: #EFF6FF; color: #2563EB; }
.ic-emerald { background: #ECFDF5; color: #059669; }
.ic-amber   { background: #FFFBEB; color: #D97706; }
.ic-violet  { background: #F5F3FF; color: #7C3AED; }
.ic-rose    { background: #FFF1F2; color: #E11D48; }
.ic-indigo  { background: #EEF2FF; color: #4F46E5; }
.ic-sky     { background: #F0F9FF; color: #0284C7; }
.ic-teal    { background: #F0FDFA; color: #0D9488; }

.feature-title {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  transition: color var(--t1) var(--ease);
}
.feature-card:hover .feature-title { color: var(--primary); }
.feature-desc {
  font-size: 0.84rem;
  color: var(--text-3);
  line-height: 1.6;
  flex: 1;
  word-break: keep-all;
}
.feature-arrow {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.82rem; font-weight: 700; color: var(--primary);
}
.feature-arrow svg { width: 15px; height: 15px; transition: transform var(--t1) var(--ease); }
.feature-card:hover .feature-arrow svg { transform: translateX(3px); }

/* 카드 안 보조 액션(레거시 호환) */
.card-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.btn-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-1);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text-2);
  transition: all var(--t1) var(--ease);
}
.btn-link:hover { background: var(--primary-soft); color: var(--primary); }
.btn-link.primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px var(--primary-glow);
}
.btn-link.primary:hover { filter: brightness(1.04); transform: translateY(-1px); }

/* ─── TRUST BAR ─── */
.trust-bar {
  width: 100%; max-width: 1040px;
  margin-top: 44px; padding-top: 30px;
  border-top: 1px solid var(--border-soft);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px 40px;
}
.trust-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.86rem; font-weight: 600; color: var(--text-3);
}
.trust-item svg { width: 17px; height: 17px; color: var(--primary); }

/* ─── TITLE BAR (계산기 내부 페이지) ─── */
.title-bar {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 4px;
}
.title-bar__home {
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none; color: var(--text-2);
  font-size: 0.86rem; font-weight: 600;
  transition: color var(--t1) var(--ease);
}
.title-bar__home:hover { color: var(--primary); }
.title-bar__cat {
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-alpha);
  padding: 5px 12px;
  border-radius: 99px;
}

/* ─── PAGE CONTAINER ─── */
.page-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
}
.page-header { text-align: center; margin: 14px 0 24px; }
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.035em;
  margin-bottom: 7px;
}
.page-sub { font-size: 0.9rem; color: var(--text-2); }

/* ─── SUBNAV (탭) ─── */
.subnav {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  padding: 5px;
  gap: 5px;
  margin-bottom: 18px;
}
.subnav-btn {
  flex: 1;
  padding: 11px 6px;
  border-radius: calc(var(--r-2) - 4px);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--t1) var(--ease);
}
.subnav-btn:hover { color: var(--text-2); }
.subnav-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--sh-1);
  pointer-events: none;
}

/* ─── CALC FORM ─── */
.calc-form {
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-5);
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: var(--sh-2);
}
.calc-field { margin-bottom: 20px; }
.calc-field:last-child { margin-bottom: 0; }
.calc-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 9px;
  letter-spacing: -0.01em;
}
.calc-label .hint { color: var(--text-3); font-weight: 400; font-size: 0.76rem; }

.calc-input-wrap { position: relative; display: flex; align-items: center; }
.calc-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: right;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-2);
  color: var(--text-strong);
  outline: none;
  transition: all var(--t1) var(--ease);
}
.calc-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-alpha); }
.calc-input::placeholder { color: var(--text-3); font-weight: 400; }
.calc-input.has-suffix { padding-right: 50px; }
.calc-suffix {
  position: absolute; right: 16px;
  font-size: 0.9rem; font-weight: 700; color: var(--text-3);
  pointer-events: none;
}

/* segmented radio */
.calc-seg { display: flex; gap: 7px; flex-wrap: wrap; }
.calc-seg input[type="radio"] { display: none; }
.calc-seg label {
  flex: 1; min-width: 66px;
  padding: 11px 12px;
  text-align: center;
  border-radius: var(--r-1);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t1) var(--ease);
}
.calc-seg label:hover { border-color: var(--primary); color: var(--primary); }
.calc-seg input[type="radio"]:checked + label {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* stepper (− 값 +) */
.calc-stepper { display: flex; align-items: center; gap: 8px; }
.stp-btn {
  flex: 0 0 auto; width: 44px; height: 44px;
  border-radius: var(--r-1);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-size: 1.3rem; font-weight: 700; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t1) var(--ease);
}
.stp-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.stp-btn:active { transform: scale(0.94); }
.stp-val {
  flex: 1; min-width: 0;
  padding: 13px 12px;
  font-family: inherit; font-size: 1.05rem; font-weight: 700;
  text-align: center;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-2);
  color: var(--text-strong);
  outline: none;
}
.stp-unit { flex: 0 0 auto; font-size: 0.9rem; font-weight: 600; color: var(--text-3); padding: 0 2px; }

/* ─── RESULT ─── */
.calc-result {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--primary-alpha);
  border-radius: var(--r-5);
  padding: 30px 26px;
  margin-bottom: 16px;
  box-shadow: 0 14px 36px rgba(59,130,246,0.10);
  overflow: hidden;
}
.calc-result::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad);
}
.result-label {
  font-size: 0.74rem; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em;
  text-align: center; margin-bottom: 10px;
}
.result-main {
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
  word-break: keep-all;
}
.result-main .unit {
  -webkit-text-fill-color: var(--text-2);
  color: var(--text-2);
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 5px;
}
.result-sub { text-align: center; font-size: 0.85rem; color: var(--text-3); margin-top: 8px; }

.result-rows { margin-top: 24px; border-top: 1px solid var(--border-soft); }
.result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.9rem;
}
.result-row .rk { color: var(--text-2); }
.result-row .rv { color: var(--text-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.result-row.minus .rv { color: var(--err); }
.result-row.total { padding-top: 16px; border-bottom: none; }
.result-row.total .rk { font-weight: 800; color: var(--text-strong); }
.result-row.total .rv { font-weight: 800; font-size: 1.08rem; color: var(--primary); }

.calc-note {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.7;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-3);
  padding: 16px 18px;
  margin-bottom: 16px;
  word-break: keep-all;
}
.calc-note b { color: var(--text-2); font-weight: 700; }

/* ─── START BUTTON ─── */
.start-button {
  width: 100%;
  padding: 15px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--grad);
  border: none;
  border-radius: var(--r-2);
  cursor: pointer;
  box-shadow: 0 8px 22px var(--primary-glow);
  margin-top: 6px;
  transition: all var(--t1) var(--ease);
}
.start-button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px var(--primary-glow); }

/* ─── AD ─── */
.ad-grid { display: grid; grid-template-columns: repeat(2, 320px); gap: 12px; justify-content: center; margin-top: 36px; }
.ad-cell { width: 320px; min-height: 50px; }
.ad-mobile-container-320-50-center  { display: block; width: 320px; min-height: 50px; }
.ad-mobile-container-320-100-center { display: block; width: 320px; min-height: 100px; }
.ag-ad-area { width: 320px; }
@media (max-width: 720px) { .ad-grid { grid-template-columns: 320px; } }

/* ─── FOOTER ─── */
.site-footer {
  width: 100%;
  max-width: 1040px;
  margin-top: 36px;
  padding: 24px 16px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}
.site-footer a { color: var(--text-3); font-size: 0.82rem; text-decoration: none; transition: color var(--t1) var(--ease); }
.site-footer a:hover { color: var(--primary); }
.footer-divider { color: var(--border-2); margin: 0 10px; }

/* ─── ANIMATIONS ─── */
.animate-fade-in { animation: fadeIn 0.6s var(--ease-out) both; }
.animate-slide-up { animation: slideUp 0.6s var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
  body { padding: 0 14px 64px; }
  .hero { margin-top: 32px; }
  .calc-form { padding: 22px 18px; }
  .calc-result { padding: 24px 18px; }
  .feature-grid { gap: 12px; }
  .feature-card { padding: 22px 18px; }
}
