:root {
  color-scheme: dark;
  --bg: #080909;
  --surface: #101315;
  --surface-2: #151a1d;
  --line: #2c3336;
  --text: #f5f1eb;
  --muted: #a9b0ad;
  --accent: #d94732;
  --accent-2: #f1c27a;
  --cool: #7fb7c6;
  --ok: #91d8a8;
  --error: #ff9d8f;
  --shadow: rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(8, 9, 9, .86);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small, .eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
nav { display: flex; justify-content: center; gap: 24px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 700; }
nav a:hover { color: var(--text); }

.nav-login, .button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.ghost { background: transparent; }
.button.small { min-height: 34px; padding: 0 12px; }
.button:hover, .nav-login:hover { filter: brightness(1.08); }

.hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  align-items: center;
  padding: clamp(54px, 8vw, 96px) clamp(20px, 5vw, 72px);
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,9,9,.96) 0%, rgba(8,9,9,.68) 42%, rgba(8,9,9,.22) 100%),
    radial-gradient(circle at 82% 28%, rgba(217,71,50,.32), transparent 34%),
    linear-gradient(140deg, #121719 0%, #28211e 52%, #0a0c0d 100%);
}
.hero-copy {
  position: relative;
  max-width: 720px;
  z-index: 1;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(56px, 10vw, 126px); line-height: .9; margin-bottom: 24px; letter-spacing: 0; }
h2 { font-size: clamp(32px, 5vw, 64px); line-height: 1; letter-spacing: 0; }
h3 { font-size: 20px; margin-bottom: 10px; }
.lede { max-width: 620px; color: #d6d8d4; font-size: clamp(19px, 2.2vw, 27px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.product-render {
  position: absolute;
  right: clamp(18px, 8vw, 126px);
  top: 51%;
  width: min(42vw, 620px);
  min-width: 320px;
  height: 420px;
  transform: translateY(-42%);
}
.machine-top {
  position: absolute;
  left: 8%;
  top: 4%;
  width: 78%;
  height: 54px;
  background: #d9dedb;
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 26px 60px var(--shadow);
}
.machine-face {
  position: absolute;
  left: 0;
  top: 58px;
  width: 92%;
  height: 160px;
  background: linear-gradient(160deg, #f0f2ef, #aab2ad 60%, #3c4747);
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: 0 34px 90px rgba(0,0,0,.48);
}
.display-line { position: absolute; right: 32px; top: 30px; width: 92px; height: 5px; background: var(--accent); }
.vent-row { position: absolute; left: 32px; right: 32px; bottom: 30px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.vent-row span { height: 14px; background: rgba(0,0,0,.28); }
.air-sheet { position: absolute; right: 4%; height: 130px; width: 54%; border-left: 1px solid rgba(127,183,198,.42); background: linear-gradient(90deg, rgba(127,183,198,.2), transparent); transform: skewX(-16deg); }
.air-one { top: 226px; }
.air-two { top: 270px; right: 18%; opacity: .75; }
.floor-shadow { position: absolute; bottom: 0; right: 8%; width: 82%; height: 34px; background: rgba(0,0,0,.55); filter: blur(22px); }

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: #0d1011;
}
.metric-band div { padding: 26px clamp(18px, 4vw, 54px); border-right: 1px solid var(--line); }
.metric-band strong { display: block; font-size: 30px; }
.metric-band span { color: var(--muted); }

.section {
  padding: clamp(64px, 9vw, 128px) clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.two-column, .catalog-section, .admin-section, .contact-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}
.section p { color: var(--muted); max-width: 720px; }
.cards, .tech-grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(3, 1fr); }
.card, .tech-grid article, .request-form, .admin-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 16px 46px rgba(0,0,0,.18);
}
.card { padding: 22px; }
.card-code { display: inline-block; color: var(--accent-2); font-weight: 900; margin-bottom: 18px; }
.tech-section { background: #0b0d0e; }
.section-heading { margin-bottom: 34px; }
.tech-grid { grid-template-columns: repeat(4, 1fr); }
.tech-grid article { padding: 24px; }

.request-form { display: grid; gap: 14px; padding: 22px; }
label { display: grid; gap: 7px; color: #d8dedb; font-weight: 760; }
input, textarea, select {
  width: 100%;
  border: 1px solid #30383b;
  border-radius: 0;
  background: #080a0b;
  color: var(--text);
  min-height: 44px;
  padding: 10px 12px;
}
textarea { resize: vertical; }
.form-status { min-height: 22px; margin: 0; }
.form-status[data-tone="ok"] { color: var(--ok); }
.form-status[data-tone="error"] { color: var(--error); }

.logged-in { display: none; }
body[data-authenticated="true"] .logged-in { display: block; }
body[data-authenticated="true"] .logged-out { display: none; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 580px; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); }
th { color: var(--text); }
address { display: grid; gap: 8px; color: var(--muted); font-style: normal; }
address a { color: var(--text); }

dialog {
  width: min(440px, calc(100% - 32px));
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0;
}
dialog::backdrop { background: rgba(0,0,0,.66); backdrop-filter: blur(6px); }
.login-panel { position: relative; display: grid; gap: 14px; padding: 28px; }
.dialog-close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .product-render { opacity: .38; right: -96px; min-width: 420px; }
  .metric-band, .cards, .tech-grid, .two-column, .catalog-section, .admin-section, .contact-section { grid-template-columns: 1fr; }
  .metric-band div { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  h1 { font-size: 54px; }
  .hero { min-height: 78svh; }
  .product-render { right: -180px; top: 57%; }
  .site-header { padding-inline: 14px; }
  .brand small { display: none; }
}
