/* 0250 demo: in the client's own idiom (graphite #25323b on white, concrete-grey surfaces,
   uppercase semibold headings, 14–16px rounded pills). Manrope stands in for their Gilroy. */
:root {
  color-scheme: light;
  --graphite: #25323b;
  --graphite-hover: #394856;
  --ink: #141414;
  --muted: #68757d;
  --line: #d9dfe2;
  --surface: #f3f5f5;
  --surface-strong: #e8ecee;
  --white: #ffffff;
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font: 400 15px/1.6 Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.2em; }
img { max-width: 100%; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--graphite);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1360px, 100% - 64px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--graphite);
  color: var(--white);
  border-radius: 12px;
}
.skip-link:focus { top: 12px; }

/* Header: logo centred like on 0250.ru, demo label as a graphite pill */
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
}
.logo { display: block; line-height: 0; }
.logo img { width: 104px; height: 61px; }
.demo-badge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--graphite);
  box-shadow: 0 14px 22px rgba(0, 0, 0, 0.12);
}

/* Hero: the chat is the page */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(32px, 5vw, 64px);
}
.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0 0 22px;
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--graphite);
}
h1 strong {
  display: block;
  font-weight: 800;
  font-size: 1.5em;
  letter-spacing: 0.04em;
}
.lead {
  margin: 0 0 32px;
  max-width: 42ch;
  color: var(--muted);
  font-size: 16px;
}
.chips-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--graphite);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover {
  background: var(--graphite);
  border-color: var(--graphite);
  color: var(--white);
}

.chat-panel {
  position: relative;
  min-width: 0;
  height: min(680px, calc(100dvh - 140px));
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 24px 60px -28px rgba(37, 50, 59, 0.45);
  overflow: hidden;
}
/* Signature: a polished-concrete edge, the graphite of their pills over the grey of their surfaces */
.chat-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--graphite) 0 62%, #68757d 62% 82%, var(--surface-strong) 82%);
  z-index: 1;
}
.chat-panel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.chat-status,
.chat-fallback,
.reopen-chat {
  position: absolute;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: fit-content;
  max-width: 80%;
  text-align: center;
  color: var(--muted);
}
.chat-fallback p { margin: 0 0 12px; }
.chat-fallback button,
.reopen-chat,
.show-all {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--graphite);
  background: var(--graphite);
  color: var(--white);
}
.chat-fallback button:hover,
.reopen-chat:hover { background: var(--graphite-hover); }

/* Expanded widget: chat takes the whole row */
.hero.expanded { grid-template-columns: minmax(0, 1fr); }
.hero.expanded .hero-copy { display: none; }
.hero.expanded .chat-panel { height: calc(100dvh - 120px); }

/* What the consultant knows */
.knowledge { padding-block: clamp(8px, 2vw, 24px) 24px; }
.knowledge-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin-bottom: 32px;
}
h2 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--graphite);
}
.knowledge-head p { margin: 0; max-width: 60ch; color: var(--muted); font-size: 14px; }
.subhead {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pages {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pages a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.pages a:hover { background: var(--graphite); color: var(--white); }

.products {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.products:not(.show-all-open) .is-extra { display: none; }
.product a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 0 0 14px;
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  overflow: hidden;
  transition: background 0.15s, box-shadow 0.2s;
}
.product a:hover {
  background: var(--surface-strong);
  box-shadow: 0 14px 22px rgba(0, 0, 0, 0.12);
}
.product-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
  background: var(--surface-strong);
}
.product-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-cat,
.product-name,
.product-price { padding-inline: 14px; }
.product-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--graphite);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.show-all {
  display: block;
  margin: 24px auto 0;
  background: var(--white);
  color: var(--graphite);
}
.show-all:hover { background: var(--graphite); color: var(--white); }

.note {
  margin-block: 24px 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.note a { color: var(--graphite); font-weight: 600; }

@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .chat-panel { height: min(640px, calc(100dvh - 96px)); }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .topbar-inner { min-height: 68px; }
  .logo img { width: 78px; height: 46px; }
  .demo-badge { font-size: 11px; padding: 7px 11px; border-radius: 12px; }
  .lead { margin-bottom: 24px; font-size: 15px; }
  .chat-panel { min-height: 480px; border-radius: 14px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-cat, .product-name, .product-price { padding-inline: 10px; }
  .product-name { font-size: 13px; }
}

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