/* Finderie — design system. Warm, designed, premium-but-friendly. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #17141a;
  --ink-soft: #3a3540;
  --muted: #75707b;
  --bg: #faf7f2;
  --paper: #ffffff;
  --line: #ebe5db;
  --line-strong: #ddd5c8;
  --accent: #6d28d9;
  --accent-2: #2f6df6;
  --accent-soft: #f1ebfe;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --shadow-sm: 0 1px 2px rgba(23, 20, 26, .06), 0 1px 3px rgba(23, 20, 26, .05);
  --shadow-md: 0 6px 22px rgba(23, 20, 26, .08), 0 2px 6px rgba(23, 20, 26, .05);
  --shadow-lg: 0 24px 60px rgba(23, 20, 26, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.08; margin: 0; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; transition: .16s ease; white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(109, 40, 217, .32); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(12px);
  background: rgba(250, 247, 242, .82); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-display);
  font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.logo .spark { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 15px;
  box-shadow: 0 4px 12px rgba(109, 40, 217, .35); }
.nav-links { display: flex; gap: 22px; margin-left: 14px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--paper); }
.lang-toggle button { border: 0; background: transparent; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang-toggle button.on { background: var(--ink); color: #fff; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 78px 0 56px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13.5px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 600; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { max-width: 640px; margin: 22px auto 0; font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); }
.hero-search { max-width: 640px; margin: 34px auto 0; display: flex; gap: 10px; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: var(--shadow-md); }
.hero-search input { flex: 1; border: 0; outline: 0; font-size: 17px; background: transparent; color: var(--ink); }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

/* ── Logos strip ─────────────────────────────────────────────────────────── */
.logos { padding: 26px 0 8px; }
.logos .label { text-align: center; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; }
.logos .row { display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: center; }
.chip-store { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink-soft); box-shadow: var(--shadow-sm); }
.chip-store .dot { width: 9px; height: 9px; border-radius: 50%; }

/* ── Sections ────────────────────────────────────────────────────────────── */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { color: var(--ink-soft); font-size: 18px; margin-top: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.step .n { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 700;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: .16s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .ico { font-size: 24px; margin-bottom: 12px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: 15px; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); position: relative; }
.plan .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; font-size: 12.5px; font-weight: 700; padding: 5px 14px; border-radius: 999px; }
.plan h3 { font-size: 22px; }
.plan .price { font-family: var(--font-display); font-size: 44px; font-weight: 600; margin: 12px 0 2px; }
.plan .price small { font-size: 16px; color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; font-size: 15px; color: var(--ink-soft); }
.plan li::before { content: '✓'; color: var(--good); font-weight: 800; }
.plan .btn { margin-top: auto; width: 100%; }

footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }

/* ── App shell ───────────────────────────────────────────────────────────── */
.app-main { padding: 26px 0 90px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.market-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-sm); }
.market-switch button { border: 0; background: transparent; padding: 9px 16px; font-weight: 600; font-size: 14.5px; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; }
.market-switch button.on { background: var(--ink); color: #fff; }
.usage-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm); }
.usage-pill .bar { width: 64px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.usage-pill .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.usage-pill.pro { color: var(--accent); border-color: var(--accent); }

.search-row { display: flex; gap: 10px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 7px 7px 20px; box-shadow: var(--shadow-md); margin-bottom: 14px; }
.search-row input { flex: 1; border: 0; outline: 0; font-size: 16.5px; background: transparent; }
.photo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.photo-row.drag { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 12px; }
.photo-row #linkInput { flex: 1; min-width: 180px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-family: inherit; outline: 0; background: var(--paper); }
.photo-row #linkInput:focus { border-color: var(--accent); }
.photo-hint { font-size: 13px; color: var(--muted); }
.detected { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.detected .ref { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.detected .dchip { display: inline-flex; flex-direction: column; gap: 1px; padding: 7px 13px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--paper); cursor: pointer; transition: .12s; box-shadow: var(--shadow-sm); }
.detected .dchip:hover { border-color: var(--accent); transform: translateY(-1px); }
.detected .dchip b { font-size: 13.5px; font-weight: 600; }
.detected .dchip span { font-size: 11.5px; color: var(--muted); }
.opts-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 16px; font-size: 14px; color: var(--ink-soft); }
.opts-row label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.opts-row select, .opts-row input[type=number] { font-family: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); color: var(--ink); }

.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pgroup-label { width: 100%; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 8px 0 2px; font-weight: 700; }
.pchip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: .12s; user-select: none; }
.pchip .dot { width: 9px; height: 9px; border-radius: 50%; }
.pchip.off { opacity: .45; }
.pchip .demo { font-size: 10px; color: var(--warn); font-weight: 700; }
.pchip:hover { border-color: var(--ink); }
.pchip .x { margin-left: 2px; color: var(--muted); font-weight: 700; cursor: pointer; padding: 0 2px; border-radius: 4px; }
.pchip .x:hover { color: var(--bad); background: rgba(220,38,38,.1); }

/* Custom sources */
.custom-sources { margin: 6px 0 4px; }
.add-source { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.add-source input { flex: 1; min-width: 200px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13.5px; font-family: inherit; outline: 0; background: var(--paper); }
.add-source input:focus { border-color: var(--accent); }
.src-hint { font-size: 12.5px; color: var(--muted); }
.src-hint a { color: var(--accent); font-weight: 600; cursor: pointer; }

.status { color: var(--muted); font-size: 14px; margin: 16px 0 14px; min-height: 20px; display: flex; align-items: center; gap: 10px; }
.spinner { width: 15px; height: 15px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result cards ────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: .16s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .thumb { aspect-ratio: 4/3; background: #f3efe8; position: relative; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; backdrop-filter: blur(4px); }
.card .score { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: rgba(255,255,255,.92); color: var(--accent); box-shadow: var(--shadow-sm); }
.card .demo-badge { position: absolute; bottom: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; background: rgba(217,119,6,.92); color: #fff; }
.card .body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card .title { font-size: 14px; font-weight: 600; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 37px; }
.card .price { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.card .price .orig { font-family: var(--font-body); font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.card .meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.card .reason { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 5px 9px; border-radius: 7px; line-height: 1.3; }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.card .foot a { font-size: 13px; font-weight: 700; color: var(--accent); }
.card .supplier { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.disclaimer { color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 720px; margin: 40px auto 0; text-align: center; }
footer .disclaimer { margin-top: 18px; }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(23,20,26,.5); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: var(--paper); border-radius: 18px; max-width: 440px; width: 100%; padding: 32px; box-shadow: var(--shadow-lg); }
.modal h2 { font-size: 26px; margin-bottom: 6px; }
.modal p.lead { color: var(--ink-soft); margin: 0 0 20px; }
.modal .field { margin-bottom: 14px; }
.modal label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.modal input { width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 15px; font-family: inherit; outline: 0; }
.modal input:focus { border-color: var(--accent); }
.modal .btn { width: 100%; margin-top: 6px; }
.modal .switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.modal .switch a { color: var(--accent); font-weight: 600; cursor: pointer; }
.modal .err { color: var(--bad); font-size: 13.5px; margin: 4px 0 12px; min-height: 18px; }
.modal .close { float: right; background: transparent; border: 0; font-size: 22px; color: var(--muted); margin: -10px -8px 0 0; }
.paywall .big { font-family: var(--font-display); font-size: 40px; text-align: center; margin: 6px 0; }
.paywall ul { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.paywall li { display: flex; gap: 9px; font-size: 14.5px; color: var(--ink-soft); }
.paywall li::before { content: '✓'; color: var(--good); font-weight: 800; }

@media (max-width: 860px) {
  .steps, .features, .pricing { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
