:root {
  --ink: #151618;
  --muted: #6f7276;
  --line: #dedfe1;
  --paper: #f4f3ef;
  --white: #ffffff;
  --accent: #ff6a1a;
  --accent-dark: #d94b00;
  --max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Manrope", sans-serif; color: var(--ink); background: var(--paper); font-size: 16px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }

.topbar { height: 88px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - var(--max)) / 2)); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.brand > span:last-child > span { color: var(--accent); }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; color: var(--white); background: var(--ink); font-size: 26px; font-weight: 800; }
.topnav { display: flex; align-items: center; gap: 32px; font-weight: 700; }
.topnav > a:not(.button):hover { color: var(--accent); }
.menu-button { display: none; border: 0; background: transparent; font-weight: 800; }

.button { min-height: 48px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 0; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-dark { color: var(--white); background: var(--ink); }
.button-accent { color: var(--white); background: var(--accent); }
.button-accent:hover { background: var(--accent-dark); }
.button-light { color: var(--ink); background: var(--white); }
.text-link { font-weight: 800; border-bottom: 2px solid var(--accent); padding-bottom: 3px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-family: "Roboto Mono", monospace; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

.hero { max-width: var(--max); min-height: 560px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: stretch; background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; border: 96px solid var(--accent); border-radius: 50%; right: 160px; top: -280px; opacity: .9; }
.hero::after { content: ""; position: absolute; width: 1px; height: 120%; background: rgba(255,255,255,.2); transform: rotate(36deg); right: 36%; top: -10%; }
.hero-copy { padding: 84px 7vw; position: relative; z-index: 1; }
.hero h1 { margin: 0; max-width: 900px; font-size: clamp(52px, 6.3vw, 100px); line-height: .95; letter-spacing: -.07em; }
.hero h1 span { color: var(--accent); }
.hero-lead { max-width: 650px; margin: 32px 0; color: #c9c9c9; font-size: 19px; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 28px; }
.hero-stat { display: grid; align-content: end; background: var(--accent); color: var(--ink); position: relative; z-index: 2; }
.hero-stat div { display: grid; grid-template-columns: 84px 1fr; align-items: baseline; gap: 18px; padding: 24px 32px; border-top: 1px solid rgba(21,22,24,.25); }
.hero-stat strong { font-size: 50px; line-height: 1; letter-spacing: -.06em; }
.hero-stat span { font-weight: 800; }

.catalog { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 330px minmax(0,1fr); align-items: start; }
.sidebar { position: sticky; top: 88px; min-height: calc(100vh - 88px); padding: 46px 26px 36px; background: var(--white); border-right: 1px solid var(--line); }
.sidebar-title { padding: 0 10px 24px; border-bottom: 1px solid var(--line); }
.sidebar-title h2 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
.category { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: flex; justify-content: space-between; gap: 16px; padding: 20px 10px; text-align: left; font-weight: 700; cursor: pointer; }
.category b { color: var(--muted); font-family: "Roboto Mono", monospace; font-size: 13px; }
.category:hover, .category.active { color: var(--accent); }
.category.active { background: #fff5ee; padding-left: 18px; }
.sidebar-note { margin-top: 36px; padding: 22px; background: var(--ink); color: var(--white); }
.sidebar-note span { display: block; margin-bottom: 8px; color: #aaa; font-size: 13px; }
.sidebar-note a { color: var(--accent); font-size: 14px; font-weight: 800; word-break: break-all; }

.catalog-main { min-width: 0; padding: 48px 38px 80px; }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.catalog-head h2 { margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.06em; }
.search { width: min(390px, 42%); height: 56px; border: 1px solid var(--line); background: var(--white); display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.search span { color: var(--accent); font-size: 26px; transform: rotate(-15deg); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }
.catalog-summary { margin: 34px 0 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.product-card { min-width: 0; background: var(--white); display: flex; flex-direction: column; cursor: pointer; transition: background .2s ease; }
.product-card:hover { background: #fffaf7; }
.product-image { aspect-ratio: 4 / 3; background: #fafafa; display: grid; place-items: center; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: contain; padding: 22px; transition: transform .25s ease; }
.product-card:hover img { transform: scale(1.035); }
.product-info { flex: 1; min-height: 196px; display: flex; flex-direction: column; padding: 22px; border-top: 1px solid #efefef; }
.product-meta { color: var(--accent); font-family: "Roboto Mono", monospace; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.product-code { margin: 10px 0 6px; font-size: 26px; line-height: 1.15; letter-spacing: -.045em; }
.product-title { margin: 0; color: var(--muted); line-height: 1.45; }
.product-bottom { margin-top: auto; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.product-bottom span:last-child { color: var(--accent); }
.empty { padding: 80px 24px; text-align: center; background: var(--white); }
.empty h3 { font-size: 32px; margin: 0 0 10px; }
.empty p { color: var(--muted); margin-bottom: 24px; }

.about { max-width: var(--max); margin: 0 auto; padding: 88px 7vw; display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; background: var(--white); }
.about h2 { max-width: 660px; margin: 0; font-size: clamp(38px, 4.5vw, 70px); line-height: 1.02; letter-spacing: -.06em; }
.about-copy { font-size: 18px; line-height: 1.65; }
.about-copy p { margin-top: 0; }
.about-copy ul { margin: 28px 0 0; padding: 0; list-style: none; }
.about-copy li { padding: 14px 0 14px 30px; border-top: 1px solid var(--line); position: relative; font-weight: 700; }
.about-copy li::before { content: ""; width: 10px; height: 10px; background: var(--accent); position: absolute; left: 0; top: 22px; }
.contact-strip { max-width: var(--max); margin: 0 auto; padding: 60px 7vw; display: flex; justify-content: space-between; align-items: center; gap: 40px; background: var(--accent); }
.contact-strip .eyebrow { color: var(--ink); }
.contact-strip h2 { margin: 0; font-size: clamp(30px, 4vw, 58px); line-height: 1.05; letter-spacing: -.05em; }

footer { max-width: var(--max); margin: 0 auto; padding: 42px 7vw; background: var(--ink); color: var(--white); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; }
.brand-footer .brand-mark { background: var(--accent); color: var(--ink); }
footer p { margin: 0; color: #aaa; }
.source { max-width: 340px; text-align: right; font-size: 12px; line-height: 1.5; }

.product-dialog { width: min(980px, calc(100vw - 32px)); padding: 0; border: 0; background: var(--white); box-shadow: 0 22px 80px rgba(0,0,0,.35); grid-template-columns: 1fr 1fr; }
.product-dialog[open] { display: grid; }
.product-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.dialog-image { min-height: 520px; background: #f5f5f3; display: grid; place-items: center; }
.dialog-image img { width: 100%; height: 100%; object-fit: contain; padding: 42px; }
.dialog-copy { padding: 58px 44px 44px; display: flex; flex-direction: column; }
.dialog-close { position: absolute; top: 12px; right: 18px; border: 0; background: transparent; font-size: 36px; cursor: pointer; }
.dialog-code { margin: 0 0 10px; color: var(--muted); font-family: "Roboto Mono", monospace; font-size: 14px; }
.dialog-copy h2 { margin: 0 0 20px; font-size: 40px; line-height: 1.05; letter-spacing: -.05em; }
.dialog-copy > p:not(.eyebrow):not(.dialog-code) { color: var(--muted); line-height: 1.6; }
.dialog-actions { margin-top: auto; display: flex; align-items: center; gap: 22px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 260px; }
  .catalog { grid-template-columns: 270px 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .topbar { height: 72px; padding: 0 18px; }
  .brand-mark { width: 40px; height: 40px; }
  .topnav { display: none; position: absolute; left: 0; right: 0; top: 72px; padding: 22px; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .topnav.open { display: flex; }
  .menu-button { display: block; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { padding: 58px 24px; }
  .hero h1 { font-size: clamp(48px, 15vw, 72px); }
  .hero-stat { grid-template-columns: repeat(3, 1fr); }
  .hero-stat div { grid-template-columns: 1fr; gap: 6px; padding: 20px 12px; }
  .hero-stat strong { font-size: 36px; }
  .hero-stat span { font-size: 12px; }
  .catalog { display: block; }
  .sidebar { position: static; min-height: 0; padding: 28px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-title { display: none; }
  .category { padding: 15px 10px; }
  .sidebar-note { display: none; }
  .catalog-main { padding: 38px 16px 60px; }
  .catalog-head { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .catalog-summary { gap: 20px; font-size: 12px; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-image img { padding: 10px; }
  .product-info { min-height: 182px; padding: 16px; }
  .product-code { font-size: 21px; }
  .product-title { font-size: 14px; }
  .product-bottom { align-items: flex-start; flex-direction: column; }
  .about { grid-template-columns: 1fr; padding: 62px 24px; }
  .contact-strip { padding: 48px 24px; align-items: stretch; flex-direction: column; }
  footer { grid-template-columns: 1fr; padding: 38px 24px; }
  .source { text-align: left; }
  .product-dialog[open] { grid-template-columns: 1fr; }
  .dialog-image { min-height: 300px; }
  .dialog-copy { padding: 36px 24px; }
  .dialog-copy h2 { font-size: 32px; }
  .dialog-actions { margin-top: 24px; align-items: stretch; flex-direction: column; }
}

@media (max-width: 430px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
}
