:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-soft: #ebeae4;
  --ink: #171914;
  --muted: #65685f;
  --line: #d8d8cf;
  --accent: #b8ff4f;
  --accent-strong: #8ad719;
  --dark: #171914;
  --danger: #ba3f3f;
  --shadow: 0 24px 70px rgba(23, 25, 20, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Pretendard, "Noto Sans KR", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
code { padding: 0.12rem 0.38rem; border-radius: 6px; background: #e6e6df; font-size: 0.9em; }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 74px;
  padding: 0 36px;
  border-bottom: 1px solid rgba(216, 216, 207, 0.8);
  background: rgba(245, 244, 239, 0.9);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-weight: 900; letter-spacing: -0.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--dark); background: var(--accent); }
.desktop-nav { display: flex; gap: 30px; font-size: 14px; font-weight: 700; color: var(--muted); }
.desktop-nav a:hover { color: var(--ink); }
.site-header > .button { justify-self: end; }

.section-shell { width: min(var(--max-width), calc(100% - 48px)); margin-inline: auto; }
.section { padding: 110px 0; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; min-height: calc(100vh - 74px); padding-top: 70px; padding-bottom: 70px; }
.eyebrow { margin: 0 0 16px; color: #5b7040; font-size: 12px; font-weight: 900; letter-spacing: 0.18em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(48px, 6.5vw, 88px); line-height: 0.98; letter-spacing: -0.065em; }
h2 { margin-bottom: 18px; font-size: clamp(36px, 4.5vw, 60px); line-height: 1.08; letter-spacing: -0.05em; }
h3 { margin-bottom: 0; font-size: 28px; letter-spacing: -0.035em; }
.hero-description { max-width: 600px; margin-bottom: 32px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.microcopy { max-width: 520px; color: #777a72; font-size: 13px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--dark);
  border-radius: 999px;
  color: #fff;
  background: var(--dark);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: 0.4; }
.button-small { min-height: 42px; padding-inline: 18px; font-size: 14px; }
.button-ghost { color: var(--ink); background: transparent; }
.button-full { width: 100%; border-radius: 14px; }

.hero-visual {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 40px;
  background: #20231d;
  box-shadow: var(--shadow);
}
.orb { position: absolute; border-radius: 50%; filter: blur(4px); }
.orb-one { top: -100px; right: -80px; width: 420px; height: 420px; background: rgba(184, 255, 79, 0.95); }
.orb-two { bottom: -180px; left: -100px; width: 480px; height: 480px; background: rgba(116, 128, 101, 0.45); }
.watch-mockup { position: absolute; top: 80px; left: 80px; display: grid; justify-items: center; transform: rotate(-12deg); }
.watch-strap { width: 94px; height: 155px; border: 2px solid rgba(255,255,255,0.18); background: #353a31; }
.watch-strap.top { border-radius: 28px 28px 8px 8px; }
.watch-strap.bottom { border-radius: 8px 8px 28px 28px; }
.watch-face { z-index: 2; display: grid; place-items: center; width: 156px; height: 176px; margin: -16px 0; border: 10px solid #777e6e; border-radius: 42px; color: var(--accent); background: #0b0c0a; box-shadow: 0 30px 50px rgba(0,0,0,0.45); font-size: 58px; font-weight: 900; }
.necklace-mockup { position: absolute; right: 70px; bottom: 70px; width: 280px; height: 400px; }
.necklace-chain { position: absolute; inset: 0; border: 5px solid #b4b8aa; border-bottom-color: transparent; border-radius: 50% 50% 46% 46%; transform: rotate(8deg); }
.necklace-pendant { position: absolute; left: 50%; bottom: 58px; display: grid; place-items: center; width: 106px; height: 138px; border: 8px solid #c4c9ba; border-radius: 52px 52px 40px 40px; color: #111; background: var(--accent); box-shadow: 0 30px 50px rgba(0,0,0,0.4); font-size: 44px; font-weight: 900; transform: translateX(-50%) rotate(8deg); }

.section-heading { display: flex; flex-direction: column; align-items: flex-start; max-width: 820px; margin-bottom: 46px; }
.section-heading > p:last-child { color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.product-visual { position: relative; display: grid; place-items: center; min-height: 390px; overflow: hidden; background: #e6e8df; }
.product-visual::before { content: ""; position: absolute; width: 330px; height: 330px; border-radius: 50%; background: var(--accent); filter: blur(1px); }
.product-card:nth-child(2) .product-visual::before { background: #d4d8ca; }
.product-card-content { padding: 30px; }
.product-label { color: #748059; font-size: 12px; font-weight: 900; letter-spacing: 0.16em; }
.product-card h3 { margin: 8px 0 10px; }
.product-card-content > p { color: var(--muted); }
.product-details { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0; list-style: none; }
.product-details li { padding: 7px 11px; border-radius: 999px; background: var(--surface-soft); font-size: 13px; font-weight: 700; }
.product-note { font-size: 13px; }
.product-watch { position: relative; z-index: 1; display: grid; justify-items: center; transform: rotate(8deg); }
.product-watch .strap { width: 72px; height: 100px; background: #4c5148; }
.product-watch .strap:first-child { border-radius: 24px 24px 5px 5px; }
.product-watch .strap:last-child { border-radius: 5px 5px 24px 24px; }
.product-watch .face { display: grid; place-items: center; width: 126px; height: 142px; margin: -9px 0; border: 8px solid #92998a; border-radius: 36px; color: var(--accent); background: #111; font-size: 42px; font-weight: 900; box-shadow: 0 24px 40px rgba(0,0,0,0.25); }
.product-necklace { position: relative; z-index: 1; width: 250px; height: 280px; }
.product-necklace .chain { position: absolute; inset: 0 20px 30px; border: 4px solid #777e72; border-bottom-color: transparent; border-radius: 50%; }
.product-necklace .pendant { position: absolute; left: 50%; bottom: 10px; display: grid; place-items: center; width: 86px; height: 112px; border: 7px solid #8f9688; border-radius: 45px 45px 30px 30px; color: var(--accent); background: #151713; font-size: 34px; font-weight: 900; transform: translateX(-50%); box-shadow: 0 24px 40px rgba(0,0,0,0.22); }

.feature-section { background: #1d201a; color: #fff; }
.feature-layout { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 90px; }
.feature-intro p:last-child { color: #aeb2a7; }
.feature-grid { display: grid; gap: 14px; }
.feature-card { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 28px; border: 1px solid #383d34; border-radius: var(--radius-md); background: #242820; }
.feature-number { color: var(--accent); font-weight: 900; }
.feature-card h3 { margin-bottom: 8px; font-size: 23px; }
.feature-card p { margin: 0; color: #aeb2a7; }

.contract-section { padding-bottom: 80px; }
.contract-heading { flex-direction: row; align-items: flex-end; justify-content: space-between; max-width: none; gap: 24px; }
.contract-heading > div:first-child { max-width: 780px; }
.privacy-badge { padding: 9px 14px; border: 1px solid #819062; border-radius: 999px; color: #596a3c; font-size: 11px; font-weight: 900; letter-spacing: 0.12em; }
.contract-app { display: grid; grid-template-columns: 340px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.contract-panel { padding: 26px; border-right: 1px solid var(--line); background: #fbfbf7; }
.step-card { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.step-number { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--dark); background: var(--accent); font-size: 12px; font-weight: 900; }
.step-card strong { display: block; margin-bottom: 2px; }
.step-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.upload-box { display: grid; justify-items: center; gap: 4px; padding: 22px; border: 1px dashed #adb1a6; border-radius: var(--radius-sm); background: #fff; cursor: pointer; text-align: center; }
.upload-box:hover { border-color: var(--dark); }
.upload-box input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.upload-icon { display: grid; place-items: center; width: 46px; height: 54px; margin-bottom: 5px; border-radius: 7px; color: #fff; background: #343831; font-size: 11px; font-weight: 900; }
.upload-box span:last-of-type { color: var(--muted); font-size: 12px; }
.contract-panel .button { margin-top: 10px; }
.status-text { min-height: 20px; margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.status-text.error { color: var(--danger); }
.status-text.success { color: #3e6d24; }
.divider { height: 1px; margin: 24px 0; background: var(--line); }
.field-label { display: block; margin: 14px 0 7px; font-size: 13px; font-weight: 800; }
.text-input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #fff; }
.text-input:focus { border-color: #66764c; box-shadow: 0 0 0 3px rgba(184, 255, 79, 0.22); }
.signature-mini-preview { display: grid; place-items: center; min-height: 74px; margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.signature-mini-preview.empty { color: #969990; font-size: 12px; }
.signature-mini-preview img { max-width: 90%; max-height: 64px; }
input[type="range"] { width: 100%; accent-color: var(--dark); }
.agreement-row { display: flex; gap: 9px; align-items: flex-start; margin-top: 18px; color: var(--muted); font-size: 12px; cursor: pointer; }
.agreement-row input { margin-top: 4px; accent-color: var(--dark); }

.pdf-workspace { min-width: 0; background: #e8e8e1; }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff; }
.pagination { display: flex; gap: 10px; align-items: center; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 24px; line-height: 1; }
.viewer-help { color: var(--muted); font-size: 12px; }
.pdf-empty-state { display: grid; place-items: center; align-content: center; min-height: 760px; padding: 40px; color: var(--muted); text-align: center; }
.pdf-empty-state strong { margin: 18px 0 4px; color: var(--ink); }
.pdf-empty-state p { margin: 0; font-size: 13px; }
.document-icon { width: 74px; height: 94px; border: 3px solid #afb2a9; border-radius: 9px; background: #f7f7f3; box-shadow: 12px 12px 0 #d5d6cf; }
.pdf-stage-scroll { min-height: 760px; max-height: 940px; overflow: auto; padding: 28px; }
.pdf-stage { position: relative; width: max-content; margin: 0 auto; line-height: 0; background: #fff; box-shadow: 0 18px 45px rgba(0,0,0,0.16); touch-action: pan-y; }
#pdfCanvas { display: block; }
.signature-overlay { position: absolute; z-index: 5; top: 30px; left: 30px; width: 170px; height: auto; padding: 3px; border: 1px dashed rgba(32, 35, 29, 0.7); background: rgba(255,255,255,0.12); cursor: grab; touch-action: none; user-select: none; }
.signature-overlay.dragging { cursor: grabbing; border-style: solid; }
.signature-overlay.locked { cursor: default; border-color: rgba(28, 91, 54, 0.8); background: rgba(238, 249, 241, 0.18); }
.legal-note { margin-top: 18px; padding: 20px 22px; border: 1px solid #d4d5cd; border-radius: var(--radius-md); background: #edede7; }
.legal-note strong { display: block; margin-bottom: 5px; }
.legal-note p { margin: 0; color: var(--muted); font-size: 13px; }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 22px 40px; padding: 48px max(24px, calc((100% - var(--max-width)) / 2)); color: #ced1c8; background: #151713; }
.site-footer strong { color: #fff; }
.site-footer p { margin: 5px 0 0; font-size: 13px; }
.footer-links { display: flex; gap: 22px; color: #fff; font-size: 13px; font-weight: 700; }
.footer-disclaimer { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid #30342d; color: #888d82; }

.signature-dialog { width: min(680px, calc(100% - 24px)); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.3); }
.signature-dialog::backdrop { background: rgba(13, 15, 12, 0.68); backdrop-filter: blur(5px); }
.signature-dialog-card { padding: 28px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-description { color: var(--muted); font-size: 14px; }
.signature-pad-wrap { height: 260px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background-color: #fff; background-image: linear-gradient(#ecece6 1px, transparent 1px); background-size: 100% 48px; }
#signaturePad { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; padding-inline: 22px; }
  .desktop-nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 80px; }
  .hero-visual { min-height: 540px; }
  .feature-layout { grid-template-columns: 1fr; gap: 40px; }
  .contract-app { grid-template-columns: 1fr; }
  .contract-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .pdf-stage-scroll, .pdf-empty-state { min-height: 620px; }
}

@media (max-width: 680px) {
  .site-header { min-height: 64px; }
  .site-header > .button { display: none; }
  .section-shell { width: min(100% - 28px, var(--max-width)); }
  .section { padding: 76px 0; }
  .hero { gap: 44px; padding-top: 48px; }
  h1 { font-size: 50px; }
  h2 { font-size: 38px; }
  .hero-visual { min-height: 430px; border-radius: 28px; }
  .watch-mockup { top: 42px; left: 48px; transform: rotate(-12deg) scale(0.74); transform-origin: top left; }
  .necklace-mockup { right: 8px; bottom: 12px; transform: scale(0.76); transform-origin: bottom right; }
  .product-grid { grid-template-columns: 1fr; }
  .product-visual { min-height: 320px; }
  .contract-heading { align-items: flex-start; flex-direction: column; }
  .viewer-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; padding-block: 12px; }
  .pdf-stage-scroll { min-height: 520px; padding: 12px; }
  .pdf-empty-state { min-height: 520px; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
  .signature-dialog-card { padding: 20px; }
  .signature-pad-wrap { height: 220px; }
  .dialog-actions .button { flex: 1; padding-inline: 10px; }
}

/* Fixed contract / server archive additions */
.fixed-contract-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(30, 36, 28, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}
.fixed-contract-box > div {
  display: grid;
  gap: 4px;
}
.fixed-contract-box strong { font-size: 0.95rem; }
.fixed-contract-box span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
