/* ============================================================================
   TenderLoop design system
   Ink + a single indigo accent. Restraint = premium. System-grade type.
   ========================================================================== */

:root {
  /* palette */
  --ink:        #0B1220;
  --ink-2:      #1A2233;
  --muted:      #5B6472;
  --muted-2:    #858E9E;
  --line:       #E7E9EF;
  --line-2:     #EEF0F5;
  --surface:    #F7F8FB;
  --surface-2:  #F1F3F8;
  --white:      #FFFFFF;

  --brand:      #4F46E5;   /* indigo-600 */
  --brand-600:  #4338CA;
  --brand-700:  #3730A3;
  --brand-tint: #EEF0FE;
  --signal:     #0EA372;   /* emerald — reserved for "match" states in product */
  --signal-tint:#E7F6EF;
  --warn:       #B45309;

  /* type */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  /* scale */
  --step--1: 0.86rem;
  --step-0:  1rem;
  --step-1:  1.15rem;
  --step-2:  1.35rem;
  --step-3:  1.75rem;
  --step-4:  2.25rem;
  --step-5:  3rem;
  --step-6:  3.75rem;

  --radius:   14px;
  --radius-lg:22px;
  --radius-sm:9px;

  --shadow-sm: 0 1px 2px rgba(11,18,32,.05), 0 1px 3px rgba(11,18,32,.04);
  --shadow:    0 4px 12px rgba(11,18,32,.06), 0 12px 32px rgba(11,18,32,.07);
  --shadow-lg: 0 12px 28px rgba(11,18,32,.10), 0 40px 80px rgba(11,18,32,.12);

  --container: 1140px;
  --nav-h: 66px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.022em; font-weight: 650; color: var(--ink); }
h1 { font-size: var(--step-6); letter-spacing: -0.03em; }
h2 { font-size: var(--step-4); letter-spacing: -0.028em; }
h3 { font-size: var(--step-2); }
p  { margin: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 96px; }
.section-sm { padding-block: 60px; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 640px; }
.measure-sm { max-width: 520px; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand);
}
.lead { font-size: var(--step-1); color: var(--muted); line-height: 1.55; }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 560; font-size: var(--step-0);
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.35), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { background: var(--brand-600); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: #DADDE6; }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { box-shadow: var(--shadow); }
.btn-lg { padding: 14px 24px; font-size: var(--step-1); border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }
.arrow { transition: transform .18s ease; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow { color: var(--brand); font-weight: 560; display: inline-flex; align-items: center; gap: 6px; }

/* ---- navbar --------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.nav .container { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a { color: var(--muted); font-size: var(--step-0); font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }

/* ---- brand mark ----------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--ink); }
.brand svg { width: 26px; height: 26px; }
.brand-loop { color: var(--brand); }

/* ---- hero ----------------------------------------------------------------- */
.hero { position: relative; padding-top: 88px; padding-bottom: 40px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% 0 auto 0; height: 620px; z-index: -1;
  background:
    radial-gradient(680px 320px at 50% -8%, rgba(79,70,229,.14), transparent 70%),
    radial-gradient(520px 300px at 85% 8%, rgba(14,163,114,.08), transparent 70%);
}
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: 100px;
  font-size: var(--step--1); font-weight: 520; color: var(--muted); box-shadow: var(--shadow-sm);
}
.badge-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px var(--signal-tint); }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero .lead { max-width: 620px; margin: 22px auto 0; font-size: 1.22rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: var(--step--1); color: var(--muted-2); }

/* ---- browser frame (product shots) --------------------------------------- */
.window {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.window-bar .tl-dot { width: 11px; height: 11px; border-radius: 50%; background: #D6D9E0; }
.window-url {
  margin-left: 12px; font-size: 12px; color: var(--muted-2); font-family: var(--mono);
  background: #fff; border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 12px;
}
.hero-shot { margin-top: 52px; max-width: 1000px; }

/* ---- logo/source cloud ---------------------------------------------------- */
.sources { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--surface); }
.sources .container { padding-block: 30px; }
.sources p { text-align: center; font-size: var(--step--1); color: var(--muted-2); font-weight: 520; letter-spacing: .02em; }
.source-row { display: flex; flex-wrap: wrap; gap: 14px 34px; justify-content: center; align-items: center; margin-top: 18px; }
.source-chip { font-weight: 600; color: #8A93A4; font-size: 1rem; letter-spacing: -.01em; }

/* ---- generic grid & cards ------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card-hover:hover { box-shadow: var(--shadow); border-color: #DDE0EA; transform: translateY(-2px); }
.card .ic {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand); margin-bottom: 16px;
}
.card h3 { font-size: var(--step-1); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: var(--step-0); }

/* ---- feature rows --------------------------------------------------------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature.reverse .feature-media { order: -1; }
.feature h2 { font-size: var(--step-3); margin-bottom: 14px; }
.feature p { color: var(--muted); font-size: var(--step-1); }
.feature ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.feature li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.feature li svg { flex: none; margin-top: 3px; color: var(--signal); }

/* ---- stat tiles ----------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: #fff; padding: 30px; text-align: center; }
.stat .n { font-size: var(--step-4); font-weight: 680; letter-spacing: -.03em; color: var(--ink); }
.stat .l { color: var(--muted); font-size: var(--step--1); margin-top: 4px; }

/* ---- how it works --------------------------------------------------------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.step { position: relative; padding-top: 18px; }
.step::before {
  counter-increment: s; content: counter(s);
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--brand);
  width: 30px; height: 30px; border: 1px solid var(--brand-tint); background: var(--brand-tint);
  border-radius: 8px; display: grid; place-items: center; margin-bottom: 14px;
}
.step h3 { font-size: var(--step-1); margin-bottom: 6px; }
.step p { color: var(--muted); }

/* ---- CTA band ------------------------------------------------------------- */
.cta-band { background: var(--ink); border-radius: var(--radius-lg); padding: 60px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content:""; position:absolute; inset:0; background: radial-gradient(600px 240px at 50% 0%, rgba(79,70,229,.4), transparent 70%); }
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: #AEB6C7; margin: 12px auto 26px; max-width: 480px; position: relative; }
.cta-band .hero-cta { position: relative; }

/* ---- pricing -------------------------------------------------------------- */
.toggle { display: inline-flex; align-items: center; gap: 12px; margin: 22px auto 0; font-size: var(--step-0); color: var(--muted); }
.switch { position: relative; width: 46px; height: 26px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; cursor: pointer; transition: background .2s; }
.switch::after { content:""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch.on { background: var(--brand); border-color: var(--brand); }
.switch.on::after { transform: translateX(20px); }
.save-pill { font-size: 12px; font-weight: 600; color: var(--signal); background: var(--signal-tint); padding: 3px 8px; border-radius: 100px; }
.price-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: start; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; }
.plan.popular { border-color: var(--brand); box-shadow: var(--shadow); position: relative; }
.plan.popular::before { content: "Most popular"; position: absolute; top: -12px; left: 30px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 100px; }
.plan .name { font-weight: 620; font-size: var(--step-1); }
.plan .desc { color: var(--muted); font-size: var(--step--1); margin-top: 6px; min-height: 40px; }
.plan .amt { font-size: var(--step-4); font-weight: 680; letter-spacing: -.03em; margin-top: 16px; }
.plan .amt small { font-size: var(--step-0); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .btn { margin-top: 20px; }
.plan ul { list-style: none; padding: 20px 0 0; margin: 20px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 12px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step-0); color: var(--ink-2); }
.plan li svg { flex: none; margin-top: 3px; color: var(--brand); }

/* ---- FAQ ------------------------------------------------------------------ */
.faq { max-width: 760px; margin-inline: auto; }
.qa { border-bottom: 1px solid var(--line); }
.qa button { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 560; font-size: var(--step-1); color: var(--ink); padding: 22px 0; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.qa .sign { flex: none; color: var(--muted); transition: transform .2s; font-size: 22px; line-height: 1; }
.qa.open .sign { transform: rotate(45deg); }
.qa .a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.qa .a p { padding-bottom: 22px; color: var(--muted); font-size: var(--step-0); }

/* ---- forms / auth --------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: var(--step--1); font-weight: 560; margin-bottom: 7px; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: var(--step-0); padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: 48px 24px; }
.auth-aside { background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-aside::after { content:""; position:absolute; inset:0; background: radial-gradient(500px 300px at 20% 20%, rgba(79,70,229,.35), transparent 70%); }
.auth-aside > * { position: relative; }
.auth-quote { font-size: var(--step-2); font-weight: 550; letter-spacing: -.02em; line-height: 1.35; max-width: 440px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted-2); font-size: var(--step--1); margin: 20px 0; }
.divider::before, .divider::after { content:""; flex: 1; height: 1px; background: var(--line); }
.demo-flag { font-size: 12px; color: var(--warn); background: #FEF3E2; border: 1px solid #FBE1BE; border-radius: 8px; padding: 8px 11px; margin-bottom: 20px; }

/* ---- badges / misc -------------------------------------------------------- */
.trust-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.trust { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); color: var(--muted); border: 1px solid var(--line); background: #fff; padding: 8px 13px; border-radius: 100px; }
.trust svg { color: var(--signal); }
.tag { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:3px 9px; border-radius:100px; }
.tag-match { color: var(--signal); background: var(--signal-tint); }
.tag-new { color: var(--brand); background: var(--brand-tint); }

/* ---- language switcher ---------------------------------------------------- */
.lang-switch { display: inline-flex; gap: 1px; margin-right: 6px; }
.lang-switch a { color: var(--muted-2); padding: 4px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.on { color: var(--brand); background: var(--brand-tint); }

/* ---- footer --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.footer .container { padding-block: 56px 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); margin-bottom: 14px; font-weight: 600; }
.footer a { display: block; color: var(--muted); font-size: var(--step-0); padding: 5px 0; }
.footer a:hover { color: var(--ink); }
.footer .brand { margin-bottom: 12px; }
.footer .fine { color: var(--muted-2); font-size: var(--step--1); max-width: 280px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: var(--step--1); }

/* ---- dashboard ------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; background: var(--surface); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; }
.side .brand { padding: 8px 10px 18px; }
.side-group { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); font-weight: 600; padding: 16px 10px 6px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: var(--step-0); }
.side a:hover { background: var(--surface); color: var(--ink); }
.side a.active { background: var(--brand-tint); color: var(--brand-700); }
.side a svg { width: 17px; height: 17px; flex: none; }
.app-main { padding: 26px 32px; overflow: auto; }
.app-top { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.app-top h1 { font-size: var(--step-3); }
.app-search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--muted-2); font-size: var(--step--1); min-width: 220px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.kpi .l { color: var(--muted); font-size: var(--step--1); }
.kpi .n { font-size: var(--step-3); font-weight: 680; letter-spacing: -.02em; margin-top: 6px; }
.kpi .d { font-size: 12px; color: var(--signal); margin-top: 4px; font-weight: 560; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.panel-head h3 { font-size: var(--step-1); }
.tender-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); align-items: center; }
.tender-row:last-child { border-bottom: 0; }
.tender-row:hover { background: var(--surface); }
.tender-title { font-weight: 560; color: var(--ink); }
.tender-meta { color: var(--muted); font-size: var(--step--1); margin-top: 3px; }
.fit { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; font-weight: 680; font-size: var(--step-0); }
.fit-hi { background: var(--signal-tint); color: var(--signal); }
.fit-mid { background: var(--brand-tint); color: var(--brand-700); }
.fit-lo { background: var(--surface-2); color: var(--muted); }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --step-6: 2.6rem; --step-5: 2.2rem; --step-4: 1.9rem; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: flex; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px; gap: 4px; }
  .nav.open .nav-links a { padding: 10px 0; }
  .feature, .grid-2, .grid-3, .grid-4, .price-grid, .steps, .stats, .footer-grid, .kpis { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .section { padding-block: 64px; }
  .cta-band { padding: 40px 24px; }
}
