:root {
  --bg: #111418;
  --panel: #191e24;
  --panel-strong: #20262e;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f3ed;
  --muted: #b8b1a5;
  --steel: #9fb3c8;
  --rust: #d17842;
  --amber: #e5b45b;
  --green: #7dbb77;
  --danger: #d96b5f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(17, 20, 24, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(229, 180, 91, 0.55);
  background: linear-gradient(145deg, #272d35, #14181d);
  color: var(--amber);
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 14px;
}

nav a:hover,
.header-phone:hover {
  color: var(--text);
}

.header-phone {
  color: var(--amber);
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 20, 24, 0.94), rgba(17, 20, 24, 0.62) 45%, rgba(17, 20, 24, 0.32)),
    linear-gradient(0deg, var(--bg), rgba(17, 20, 24, 0) 42%),
    url("/assets/steel-warehouse-hero.png") center / cover no-repeat;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  max-width: 900px;
  padding: clamp(80px, 13vw, 170px) clamp(18px, 4vw, 56px) clamp(56px, 9vw, 110px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.hero-lead {
  max-width: 690px;
  color: #ddd7cc;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.button.primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #17130b;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 1px;
  max-width: 790px;
  margin-top: 42px;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: var(--shadow);
}

.hero-stats span {
  padding: 18px;
  background: rgba(25, 30, 36, 0.86);
  color: var(--muted);
}

.hero-stats strong {
  display: block;
  color: var(--text);
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 4vw, 56px);
}

.intro-grid,
.section-heading,
.request-layout,
.contacts,
.import-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading > p {
  color: var(--muted);
  max-width: 620px;
}

.steps,
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.steps article,
.services article,
.request-list,
.lead-form {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.steps article,
.services article {
  padding: 22px;
}

.steps span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(229, 180, 91, 0.14);
  color: var(--amber);
  font-weight: 900;
}

.steps p,
.services p,
.import-section p {
  color: var(--muted);
}

.stock-section {
  background: #151a20;
}

.stock-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px);
  gap: 14px;
  margin-bottom: 18px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101419;
  color: var(--text);
  outline: none;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(229, 180, 91, 0.8);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.category-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  padding: 9px 14px;
}

.category-tabs button.active {
  border-color: rgba(229, 180, 91, 0.7);
  background: rgba(229, 180, 91, 0.14);
  color: var(--text);
}

.stock-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  max-height: min(78vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  scrollbar-gutter: stable;
}

.stock-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.stock-table .col-position {
  width: 18%;
}

.stock-table .col-grade {
  width: 8%;
}

.stock-table .col-length {
  width: 11%;
}

.stock-table .col-origin {
  width: 11%;
}

.stock-table .col-number {
  width: 7.5%;
}

.stock-table .col-status {
  width: 11%;
}

.stock-table .col-quantity {
  width: 11%;
}

.stock-table .col-action {
  width: 7.5%;
}

.stock-table th,
.stock-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.stock-table th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #242a32;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 24px rgba(0, 0, 0, 0.2);
}

.stock-table th button {
  display: inline-grid;
  gap: 2px;
  justify-items: inherit;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 900;
  text-transform: inherit;
  text-align: inherit;
  padding: 0;
}

.stock-table th button small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 900;
}

.sort-indicator {
  color: currentColor;
  font-size: 13px;
  line-height: 1;
}

.stock-table th button.active {
  color: var(--amber);
}

.stock-table td {
  color: #e5e0d6;
}

.stock-table th:nth-child(n + 5),
.stock-table td:nth-child(n + 5) {
  text-align: center;
}

.stock-table th:nth-child(9),
.stock-table td:nth-child(9),
.stock-table th:nth-child(10),
.stock-table td:nth-child(10) {
  text-align: left;
}

.stock-table td:nth-child(5),
.stock-table td:nth-child(6),
.stock-table td:nth-child(7) {
  color: #f0eadf;
  font-variant-numeric: tabular-nums;
}

.stock-table td:first-child strong {
  display: block;
  line-height: 1.25;
}

.muted {
  color: var(--muted);
}

.status {
  display: inline-flex;
  min-width: 108px;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.status.available {
  background: rgba(125, 187, 119, 0.16);
  color: #b8e2b2;
}

.status.transit {
  background: rgba(229, 180, 91, 0.16);
  color: #f2cc80;
}

.status.request {
  background: rgba(159, 179, 200, 0.16);
  color: #c9d8e7;
}

.quantity-input {
  min-width: 120px;
  height: 44px;
}

.row-add {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  white-space: nowrap;
}

.request-list {
  min-height: 240px;
  padding: 16px;
}

.request-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.request-item:last-child {
  border-bottom: 0;
}

.request-item strong {
  display: block;
}

.request-item small {
  color: var(--muted);
}

.remove-item {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.empty-state,
.form-status {
  color: var(--muted);
}

.form-status.success {
  color: #b8e2b2;
}

.form-status.error {
  color: #ffaaa0;
}

.lead-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.import-section {
  align-items: center;
  background: linear-gradient(135deg, #242a31, #15191f);
}

.import-section .button {
  justify-self: start;
}

.services {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contacts {
  background: #151a20;
}

.contacts iframe {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  filter: grayscale(0.2) contrast(1.05);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 720px;
  }

  .hero-stats,
  .steps,
  .services,
  .intro-grid,
  .section-heading,
  .request-layout,
  .contacts,
  .import-section {
    grid-template-columns: 1fr;
  }

  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .brand {
    min-width: 0;
  }

  .hero-content {
    padding-top: 96px;
  }

  .hero-stats,
  .services,
  .stock-toolbar {
    grid-template-columns: 1fr;
  }

  .stock-meta,
  footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .table-wrap {
    max-height: 72vh;
  }

  .stock-table {
    min-width: 1040px;
  }
}
