/* ===================================================================
   ImageVerify — design system + layout
   Palette: clean light background, dark professional text, trust-blue.
   =================================================================== */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;

  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  --border: #e5e9f0;
  --border-strong: #cbd5e1;

  --success: #059669;
  --success-50: #ecfdf5;
  --warning: #b45309;
  --warning-50: #fffbeb;
  --danger: #dc2626;
  --danger-50: #fef2f2;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow: 0 2px 4px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 40px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.05);

  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ----------------------- Buttons ----------------------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--btn-bg); color: var(--text); cursor: pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn svg { flex: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 2px; }

.btn-primary { --btn-bg: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { --btn-bg: var(--brand-dark); box-shadow: var(--shadow); }

.btn-soft { --btn-bg: var(--brand-50); color: var(--brand-dark); border-color: var(--brand-100); }
.btn-soft:hover { --btn-bg: var(--brand-100); }

.btn-ghost { --btn-bg: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { --btn-bg: #f1f5f9; color: var(--text); }

.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-50); border-color: #fecaca; }

.btn-block { width: 100%; }

.btn.is-disabled, .btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.is-disabled:active { transform: none; }

.pill {
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: var(--warning-50); color: var(--warning); border: 1px solid #fde68a;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px; white-space: nowrap;
}

/* ----------------------- Header ----------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark { display: inline-flex; }
.main-nav { display: flex; align-items: center; gap: 28px; margin-left: 8px; }
.main-nav a { color: var(--text-muted); font-weight: 500; font-size: .95rem; position: relative; padding: 6px 0; }
.main-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); padding: 6px; border-radius: 8px; cursor: pointer; }
.mobile-nav { display: none; }

/* ----------------------- Hero ----------------------- */
.hero { padding: 64px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-dark); background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; }
.hero .lead { margin-top: 20px; font-size: 1.2rem; color: var(--text-muted); max-width: 32ch; }
.trust-line {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 9px;
  font-size: .92rem; color: var(--success); font-weight: 600;
  background: var(--success-50); border: 1px solid #a7f3d0; padding: 8px 14px; border-radius: 999px;
}

/* ----------------------- Verify card ----------------------- */
.verify-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 26px; min-height: 420px;
  display: flex; flex-direction: column; justify-content: center;
}
.vc-view { display: flex; flex-direction: column; gap: 18px; animation: fade .25s ease; }
.vc-centered { align-items: center; text-align: center; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.dropzone {
  position: relative; border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  padding: 40px 20px; text-align: center; color: var(--text-muted);
  transition: border-color .15s, background .15s, color .15s; cursor: pointer;
}
.dropzone:hover { border-color: var(--brand); background: #fbfdff; }
.dropzone:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 3px; }
.dz-icon { color: var(--text-faint); display: flex; justify-content: center; margin-bottom: 10px; }
.dropzone:hover .dz-icon { color: var(--brand); }
.dz-title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.dz-sub { font-size: .95rem; }
.dz-overlay {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: var(--brand-50); border-radius: var(--r-lg); color: var(--brand-dark); font-weight: 700; font-size: 1.1rem;
}
.dropzone.dragover { border-color: var(--brand); border-style: solid; background: var(--brand-50); }
.dropzone.dragover .dz-overlay { display: flex; }

.vc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vc-formats { font-size: .85rem; color: var(--text-faint); text-align: center; }
.vc-heading { font-size: 1.35rem; font-weight: 700; }
.vc-sub { color: var(--text-muted); font-size: .95rem; margin-top: -8px; }

/* fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.input {
  font: inherit; padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; width: 100%;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-50); }
.field-hint { font-size: .85rem; color: var(--text-faint); }
.field-hint.error { color: var(--danger); }

/* preview */
.preview-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: start; }
.preview-img-box {
  background: #0f172a08; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
}
.preview-img-box img { width: 100%; height: 100%; object-fit: contain; }
.preview-meta { display: flex; flex-direction: column; gap: 12px; }
.source-chip {
  align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--brand-dark);
  background: var(--brand-50); border: 1px solid var(--brand-100); padding: 4px 10px; border-radius: 999px;
}
.meta-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .92rem; }
.meta-list dt { color: var(--text-faint); font-weight: 500; }
.meta-list dd { margin: 0; color: var(--text); font-weight: 600; word-break: break-word; }
.paste-note { font-size: .85rem; color: var(--success); font-weight: 600; }

/* crop */
.crop-stage {
  position: relative; max-height: 420px; overflow: hidden; border-radius: var(--r);
  background: #0f172a; display: flex; justify-content: center; align-items: center; user-select: none; touch-action: none;
}
.crop-stage img { max-height: 420px; width: auto; max-width: 100%; -webkit-user-drag: none; }
.crop-sel { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(15,23,42,.55); cursor: move; }
.crop-handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--brand); border-radius: 3px; }
.crop-handle[data-h="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-handle[data-h="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-handle[data-h="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-handle[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }

/* processing */
.spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid var(--brand-100); border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.proc-status { font-size: 1.2rem; font-weight: 700; margin-top: 6px; }
.proc-sub { color: var(--text-muted); font-size: .9rem; }

/* result */
.result-head { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; font-weight: 800; }
.result-head .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.result-head.new .ic { background: var(--success-50); color: var(--success); }
.result-head.dup .ic { background: var(--brand-50); color: var(--brand-dark); }
.status-badge { align-self: flex-start; font-weight: 700; font-size: .92rem; padding: 8px 14px; border-radius: 999px; }
.status-badge.new { background: var(--success-50); color: var(--success); border: 1px solid #a7f3d0; }
.status-badge.dup { background: var(--brand-50); color: var(--brand-dark); border: 1px solid var(--brand-100); }
.result-explain { color: var(--text-muted); font-size: .92rem; }

/* error */
.error-icon { color: var(--danger); }
.error-title { font-size: 1.25rem; font-weight: 700; }
.error-sub { color: var(--text-muted); max-width: 40ch; }

/* ----------------------- Sections ----------------------- */
.section { padding: 76px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.section-head p { margin-top: 12px; color: var(--text-muted); font-size: 1.05rem; }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card h3 { font-size: 1.12rem; font-weight: 700; }
.card p { margin-top: 8px; color: var(--text-muted); font-size: .95rem; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.step-num {
  position: absolute; top: -16px; left: 26px; width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.step-icon { color: var(--brand); margin: 10px 0 14px; }
.step h3 { font-size: 1.15rem; font-weight: 700; }
.step p { margin-top: 8px; color: var(--text-muted); }

.feature-icon, .privacy-icon { color: var(--brand); }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); display: grid; place-items: center; margin-bottom: 14px; }

.usecase h3 { font-size: 1.05rem; }

/* privacy */
.privacy-inner { text-align: center; max-width: 680px; margin: 0 auto; }
.privacy-icon { display: inline-flex; margin-bottom: 16px; }
.privacy-inner h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.privacy-inner p { margin-top: 16px; color: var(--text-muted); font-size: 1.1rem; }

/* pricing */
.plan { display: flex; flex-direction: column; text-align: center; }
.plan-price { font-size: 2rem; font-weight: 800; margin: 10px 0 2px; }
.plan-desc { color: var(--text-muted); font-size: .92rem; min-height: 46px; }
.plan .btn { margin-top: auto; }
.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }

.api-inner { text-align: center; }
.api-inner .btn { margin: 0 auto; }

/* ----------------------- Footer ----------------------- */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 48px 0 28px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid #1e293b; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: #94a3b8; font-size: .92rem; }
.footer-links a:hover { color: #fff; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: .85rem; color: #64748b; }

/* ----------------------- Toast + modal ----------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s, transform .2s; z-index: 100; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: var(--danger); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: grid; place-items: center; z-index: 120; padding: 20px; }
.modal-card { background: #fff; border-radius: var(--r-lg); padding: 30px; max-width: 400px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); position: relative; animation: fade .2s ease; }
.modal-card h3 { font-size: 1.4rem; font-weight: 800; }
.modal-card p { margin: 12px 0 22px; color: var(--text-muted); }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--text-faint); cursor: pointer; }
.modal-close:hover { color: var(--text); }

[hidden] { display: none !important; }

/* ----------------------- Responsive ----------------------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero .lead { max-width: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .main-nav, .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav.open { display: flex; flex-direction: column; gap: 4px; padding: 12px 24px 20px; background: #fff; border-bottom: 1px solid var(--border); }
  .mobile-nav a { padding: 12px 8px; color: var(--text-muted); border-radius: 8px; font-weight: 500; }
  .mobile-nav a:hover { background: #f1f5f9; color: var(--text); }
  .mobile-nav-actions { display: flex; gap: 10px; margin-top: 8px; }
  .mobile-nav-actions .btn { flex: 1; }
}
@media (max-width: 560px) {
  .hero { padding: 40px 0 36px; }
  .container { padding: 0 18px; }
  .verify-card { padding: 18px; border-radius: var(--r-lg); min-height: 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .preview-wrap { grid-template-columns: 1fr; }
  .preview-img-box { max-width: 220px; margin: 0 auto; }
  .vc-actions .btn { flex: 1 1 auto; }
  .section { padding: 56px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

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