/* TradeBridge — site stylesheet */
:root {
  --paper: #F4F6F2;
  --surface: #FFFFFF;
  --ink: #14241E;
  --muted: #56665D;
  --line: #D5DCD3;
  --forest: #1E4636;
  --forest-deep: #163628;
  --pistachio: #B5CA5C;
  --pistachio-soft: #E6EDC4;
  --danger: #A33A2A;
  --ok: #2F6B3E;
  --radius-s: 6px;
  --radius-m: 10px;
  --wrap: 1160px;
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
}
[dir="rtl"] { --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--forest); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--pistachio); outline-offset: 2px; border-radius: 3px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { inset-inline-start: 8px; }

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.2vw, 36px); max-width: 22ch; }
h3 { font-size: 19px; }
p { margin: 0; }
.lead { color: var(--muted); max-width: 62ch; margin-top: 12px; }
section { padding-block: clamp(56px, 8vw, 96px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(244, 246, 242, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
.langs { display: flex; gap: 2px; font-size: 13px; }
.langs a { padding: 4px 6px; border-radius: var(--radius-s); color: var(--muted); text-decoration: none; font-weight: 500; }
.langs a[aria-current="true"] { background: var(--ink); color: #fff; }
.langs a:hover { color: var(--ink); }
.langs a[aria-current="true"]:hover { color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--radius-s); border: 1.5px solid transparent; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: #fff; }
.btn-pistachio { background: var(--pistachio); color: var(--ink); }
.btn-pistachio:hover { background: #C6D873; color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn svg { width: 20px; height: 20px; }

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(32px, 4.4vw, 52px); max-width: 17ch; }
.hero .lead { font-size: 18px; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.routes { background: var(--forest); border-radius: var(--radius-m); padding: clamp(16px, 2.4vw, 28px); color: #fff; }
.routes svg { width: 100%; height: auto; overflow: visible; }
.routes figcaption { margin-top: 14px; font-size: 14px; color: #CBD8CF; max-width: 52ch; }
.route { fill: none; stroke: var(--pistachio); stroke-width: 1.4; stroke-linecap: round; opacity: .9; }
.grid-dot { fill: #3B6452; }
.city { fill: #fff; }
.hub { fill: var(--pistachio); }
.hub-ring { fill: none; stroke: var(--pistachio); stroke-width: 1.2; opacity: .5; }
.city-label { fill: #E5EDE7; font-size: 15px; font-family: var(--font); }
.hub-label { fill: #fff; font-size: 17px; font-weight: 600; font-family: var(--font); }
@media (prefers-reduced-motion: no-preference) {
  .route { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s cubic-bezier(.45,.05,.2,1) forwards; animation-delay: calc(var(--i) * 70ms + 200ms); }
  .city, .city-label { opacity: 0; animation: appear .4s ease forwards; animation-delay: calc(var(--i) * 70ms + 1100ms); }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
}

/* Steps */
.how { background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { position: relative; padding-inline-end: 24px; padding-top: 52px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 0; inset-inline-start: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 17px; inset-inline-start: 36px; inset-inline-end: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 17px; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* Catalog */
.catalog-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: end; justify-content: space-between; }
.search { position: relative; width: min(340px, 100%); }
.search input { width: 100%; padding-inline-start: 42px; }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.cat-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cat-list li { display: flex; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.cat-list li:nth-child(odd) { padding-inline-end: 28px; }
.cat-list li:nth-child(even) { padding-inline-start: 28px; border-inline-start: 1px solid var(--line); }
.cat-icon { flex: none; width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--pistachio-soft); color: var(--forest); display: grid; place-items: center; }
.cat-icon svg { width: 24px; height: 24px; }
.cat-name { flex: 1; font-weight: 500; }
.cat-quote { flex: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.cat-empty { margin-top: 24px; color: var(--muted); }

/* Forms */
.forms { background: var(--surface); border-block: 1px solid var(--line); }
.tabs { display: inline-flex; margin-top: 28px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); gap: 4px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 15px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 10px 18px; border-radius: var(--radius-s); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--forest); color: #fff; }
.panel { margin-top: 28px; }
.panel[hidden] { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; max-width: 880px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 15px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .hint { font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 11px 13px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 3px var(--pistachio-soft); }
input[type="tel"] { direction: ltr; }
[dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"] { text-align: right; }
fieldset { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
.choices label { font-weight: 400; display: flex; gap: 8px; align-items: center; font-size: 15px; }
.choices input { width: 18px; height: 18px; accent-color: var(--forest); }
.cat-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; grid-column: 1 / -1; }
.consent input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--forest); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.status { font-size: 15px; }
.status.ok { color: var(--ok); font-weight: 600; }
.status.err { color: var(--danger); font-weight: 600; }
.hp { position: absolute; inset-inline-start: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* Suppliers */
.supplier-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.supplier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; }
.supplier .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ok); }
.supplier .badge svg { width: 16px; height: 16px; }
.supplier h3 { margin-top: 8px; }
.supplier .where { color: var(--muted); font-size: 15px; margin-top: 2px; }
.supplier .prods { font-size: 15px; margin-top: 10px; }
.supplier .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.supplier .tags span { font-size: 12.5px; background: var(--pistachio-soft); color: var(--forest-deep); padding: 3px 8px; border-radius: 4px; }
.empty-note { margin-top: 24px; padding: 20px; border: 1.5px dashed var(--line); border-radius: var(--radius-m); color: var(--muted); max-width: 640px; }

/* Trust */
.trust-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.trust-list li { border-inline-start: 3px solid var(--pistachio); padding-inline-start: 18px; }
.trust-list p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* WhatsApp band */
.wa-band { background: var(--forest-deep); color: #fff; padding-block: 44px; }
.wa-band .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.wa-band h2 { font-size: 26px; }
.wa-band p { color: #CBD8CF; margin-top: 6px; }

/* Footer */
.site-footer { padding-block: 36px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer p { max-width: 60ch; }

/* Privacy page */
.doc { padding-block: 56px 80px; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); }
.doc p { max-width: 68ch; margin-top: 16px; }
.doc .back { display: inline-block; margin-top: 32px; font-weight: 600; }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 24px; padding-inline-start: 56px; }
  .steps li::after { top: 36px; bottom: 0; inset-inline-start: 17px; inset-inline-end: auto; width: 2px; height: auto; }
  .steps li:last-child { padding-bottom: 0; }
  .trust-list { grid-template-columns: 1fr; gap: 22px; }
  .nav { display: none; }
  .langs { margin-inline-start: auto; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .cat-list { grid-template-columns: 1fr; }
  .cat-list li:nth-child(odd), .cat-list li:nth-child(even) { padding-inline: 0; border-inline-start: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .cat-checks { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .site-header .wrap { gap: 12px; }
  .langs { overflow-x: auto; }
}
