:root {
  --cream: #F7F6F1;
  --white: #ffffff;
  --ink: #101828;
  --soft: #667085;
  --green: #0EA55A;
  --green-dk: #07713D;
  --green-soft: #E6F6EE;
  --blue: #2E90FA;
  --orange: #F79009;
  --line: #ECEAE4;
  --shadow-sm: 0 2px 10px rgba(16, 24, 40, .06);
  --shadow-md: 0 14px 40px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 70px rgba(16, 24, 40, .16);
  --radius: 20px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(560px 380px at 88% -6%, rgba(14, 165, 90, .10), transparent 65%),
    radial-gradient(500px 360px at -8% 22%, rgba(247, 144, 9, .07), transparent 60%);
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 246, 241, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(236, 234, 228, .7);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #12B76A, var(--green-dk));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(14, 165, 90, .35);
}

.logo-mark svg { width: 24px; height: 24px; }
.logo-mark.small { width: 34px; height: 34px; border-radius: 11px; }
.logo-mark.small svg { width: 19px; height: 19px; }

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.logo-text span { color: var(--green); }

.nav {
  display: flex;
  gap: 26px;
  margin-inline: auto;
}

.nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--soft);
  transition: color .2s;
}

.nav a:hover { color: var(--green-dk); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 20px;
  transition: transform .18s, box-shadow .18s, background .18s;
  white-space: nowrap;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, #12B76A, var(--green-dk));
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 90, .32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(14, 165, 90, .42);
}

.btn-ghost {
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: #fff; }

.btn-ghost.tg svg { width: 17px; height: 17px; color: #229ED9; }

.btn-white {
  background: #fff;
  color: var(--green-dk);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

.btn-white:hover { transform: translateY(-2px); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 8px;
}

.burger span {
  width: 22px;
  height: 2.4px;
  border-radius: 2px;
  background: var(--ink);
  transition: .25s;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--soft);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(14, 165, 90, .5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 90, .45); }
  70% { box-shadow: 0 0 0 10px rgba(14, 165, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 90, 0); }
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.03em;
}

.grad {
  background: linear-gradient(100deg, #12B76A 10%, var(--green-dk) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 18px;
  font-size: 16px;
  color: var(--soft);
  max-width: 480px;
}

.search-bar {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 18px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(236, 234, 228, .8);
  max-width: 520px;
}

.search-bar svg {
  width: 20px;
  height: 20px;
  color: var(--soft);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  padding: 10px 4px;
}

.search-bar input::placeholder { color: #98A2B3; }

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 30px;
}

.hero-stats div { display: flex; flex-direction: column; }

.hero-stats strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.hero-stats span {
  font-size: 12.5px;
  color: var(--soft);
  font-weight: 500;
}

/* Hero visual */
.hero-visual {
  position: relative;
  height: 460px;
}

.pv {
  position: absolute;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 5px solid #fff;
  box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite;
}

.pv img { width: 100%; height: 100%; object-fit: cover; }

.pv .pv-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green-dk);
  box-shadow: var(--shadow-sm);
}

.pv .pv-badge.demande { color: #175CD3; }

.pv1 {
  width: 250px; height: 300px;
  left: 4px; top: 36px;
  transform: rotate(-6deg);
  animation-delay: .2s;
}

.pv2 {
  width: 285px; height: 345px;
  right: 6px; top: 0;
  transform: rotate(3deg);
  z-index: 2;
}

.pv3 {
  width: 215px; height: 235px;
  right: 52px; bottom: 8px;
  transform: rotate(-4deg);
  animation-delay: .6s;
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

/* ============ Sections ============ */
.section { padding: 56px 0; position: relative; z-index: 1; }
.section-tight { padding: 20px 0 70px; position: relative; z-index: 1; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.025em;
}

.sub {
  color: var(--soft);
  font-size: 14.5px;
  margin-top: 6px;
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.chips {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 17px;
  font-size: 13.5px;
  font-weight: 600;
  transition: .18s;
  white-space: nowrap;
}

.chip:hover { border-color: #d5d2c8; transform: translateY(-1px); }

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.count { font-size: 13px; color: var(--soft); font-weight: 600; }

/* ============ Grid & cards ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(236, 234, 228, .6);
  transition: transform .22s, box-shadow .22s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--green-soft), #d9efe4);
  overflow: hidden;
}

.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s;
}

.card:hover .card-media img { transform: scale(1.05); }

.media-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 44px;
  opacity: .6;
}

.badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255, 255, 255, .95);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--green-dk);
  box-shadow: var(--shadow-sm);
}

.badge.demande { color: #175CD3; }

.date-pill {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(16, 24, 40, .6);
  backdrop-filter: blur(4px);
  color: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 10.5px;
  font-weight: 600;
}

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  color: var(--green-dk);
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--soft);
  font-size: 12.5px;
  font-weight: 500;
}

.card-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

.need-pill {
  align-self: flex-start;
  background: #FEF3E2;
  color: #B54708;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

/* Skeleton */
.skeleton {
  height: 330px;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(14, 165, 90, .07) 50%, transparent 70%);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.empty, .error-box {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.empty-ico { font-size: 44px; margin-bottom: 10px; }

.empty h3 { font-size: 19px; font-weight: 700; }

.empty p { color: var(--soft); margin-top: 6px; font-size: 14px; }

.error-box { display: grid; gap: 14px; place-items: center; }

.error-box[hidden], .empty[hidden] { display: none; }

/* ============ Steps ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  border: 1px solid rgba(236, 234, 228, .65);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s, box-shadow .22s;
}

.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.step-num {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 46px;
  font-weight: 800;
  color: var(--green-soft);
  line-height: 1;
  letter-spacing: -.04em;
}

.step-ico {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--green-soft);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--soft); }

/* ============ Telegram banner ============ */
.telegram-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(120deg, #2AABEE, #229ED9 55%, #1E8FCC);
  border-radius: 26px;
  padding: 34px 36px;
  color: #fff;
  box-shadow: 0 24px 60px rgba(34, 158, 217, .35);
  position: relative;
  overflow: hidden;
}

.telegram-banner::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  right: -80px; top: -120px;
}

.tg-left { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }

.tg-ico {
  width: 58px; height: 58px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tg-ico svg { width: 30px; height: 30px; }

.telegram-banner h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.telegram-banner p { font-size: 13.5px; opacity: .88; margin-top: 4px; max-width: 460px; }
.telegram-banner .btn { position: relative; z-index: 1; flex-shrink: 0; }

/* ============ Footer ============ */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #fff;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 44px 0 28px;
  flex-wrap: wrap;
}

.footer-brand p { color: var(--soft); font-size: 13px; margin-top: 12px; }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--soft);
  transition: color .2s;
}

.footer-links a:hover { color: var(--green-dk); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 12.5px;
}

/* ============ Modal ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, .5);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  background: var(--cream);
  border-radius: 26px;
  width: min(880px, 100%);
  max-height: min(86vh, 740px);
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow-lg);
  animation: pop .25s ease;
}

@keyframes pop {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  font-weight: 700;
}

.modal-close:hover { background: #fff; }

.modal-media {
  background: linear-gradient(135deg, var(--green-soft), #d9efe4);
  min-height: 320px;
  position: relative;
}

.modal-media img { width: 100%; height: 100%; object-fit: cover; }

.modal-content { padding: 30px 28px; }

.modal-content .badge {
  position: static;
  display: inline-block;
  box-shadow: none;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.modal-content h3 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.meta-list { margin-top: 18px; display: grid; gap: 10px; }

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
}

.meta-row svg { width: 17px; height: 17px; color: var(--green); flex-shrink: 0; }

.seller-line {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--soft);
}

.modal-actions { margin-top: 20px; display: grid; gap: 10px; }

/* ============ Reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 46px; }
  .hero-visual { display: none; }
  .steps { grid-template-columns: 1fr; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-media { min-height: 240px; max-height: 300px; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: rgba(247, 246, 241, .97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 18px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform .3s ease;
    z-index: 55;
  }

  .nav.open { transform: translateY(0); }

  .nav a { padding: 13px 4px; font-size: 15px; }

  .burger { display: inline-flex; }
  .btn-ghost.tg { display: none; }

  .header-actions .btn-primary {
    padding: 10px 14px;
    font-size: 12.5px;
    border-radius: 12px;
  }

  .hero-stats { gap: 24px; }
  .telegram-banner { flex-direction: column; align-items: flex-start; padding: 26px; }
  .search-bar { padding: 6px 6px 6px 14px; border-radius: 16px; }
  .search-bar .btn { padding: 11px 14px; font-size: 13px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-title { font-size: 14px; }
  .card-body { padding: 11px 12px 13px; }
  .price { font-size: 13px; }
  .footer-inner { flex-direction: column; gap: 24px; }
}
