@font-face {
  font-family: "Space Grotesk";
  src: url("assets/SpaceGrotesk-wght.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color: #132f39;
  background: #f4f7f7;
  font-family: "Space Grotesk", system-ui, sans-serif;
  --ink: #132f39;
  --muted: #4d6670;
  --accent: #08768b;
  --border: #d8e3e5;
  --cut: #13788f;
  --engrave: #a04c26;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
button, select, input, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #13859b; outline-offset: 3px; }

.wrap { width: min(calc(100% - 80px), 1168px); margin-inline: auto; }
.site-header { background: #fcfefe; border-bottom: 1px solid var(--border); }
.header-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: block; font-size: clamp(1rem, 4vw, 1.45rem); font-weight: 700; letter-spacing: -.055em; white-space: nowrap; }
.brand span { color: #13788f; }
.header-tools { display: flex; align-items: center; gap: 15px; }

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #c9e2e5;
  border-radius: 999px;
  color: #0c5f70;
  background: #e9f6f7;
  font-size: .75rem;
  font-weight: 700;
}

.demo-badge > span:first-child, .offline > span:first-child {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #168398;
}

.language-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f1f6f6;
}

.language-switch button {
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  min-width: 37px;
  min-height: 32px;
  padding: 4px 6px;
  font-size: .75rem;
  font-weight: 700;
}
.language-switch button[aria-pressed="true"] { color: white; background: #16404d; }

.hero { padding: 46px 0 33px; }
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.45;
  text-transform: uppercase;
}
.hero .eyebrow { display: flex; align-items: center; gap: 9px; }
.hero .eyebrow > span:first-child { width: 23px; height: 2px; background: #1b97b1; }
h1 {
  margin: 9px 0 10px;
  font-size: clamp(2.45rem, 5.25vw, 4.45rem);
  line-height: 1.04;
  letter-spacing: -.067em;
}
.accent { color: var(--accent); }
.intro { margin: 0; max-width: 60ch; color: var(--muted); font-size: clamp(.98rem, 2.4vw, 1.125rem); line-height: 1.55; }

.panels { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr); gap: 22px; align-items: stretch; }
.card {
  min-width: 0;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 3px 6px #16404d08, 0 12px 28px #16404d06;
}
.example { display: flex; flex-direction: column; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
h2 { margin: 4px 0 0; font-size: clamp(1.32rem, 2.55vw, 1.8rem); line-height: 1.15; letter-spacing: -.045em; }
.file-badge {
  padding: 5px 8px;
  min-width: 40px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  background: #f4f8f8;
  text-align: center;
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.plate-figure { margin: 0; }
.drawing {
  display: grid;
  place-items: center;
  min-height: 290px;
  overflow: hidden;
  border: 1px solid #d7e5e8;
  border-radius: 10px;
  background-color: #f2f8f9;
  background-image: linear-gradient(#dce8eb 1px, transparent 1px), linear-gradient(90deg, #dce8eb 1px, transparent 1px);
  background-size: 19px 19px;
  background-position: center;
}
.diagram { display: block; width: min(100%, 536px); height: auto; }
.dimensions { fill: none; stroke: #586e76; stroke-width: 1; }
.dimension-text { fill: #415b65; font-size: 13px; font-weight: 700; }
.plate-edge { fill: #d8edf1; stroke: var(--cut); stroke-width: 2; }
.holes { fill: #f2f8f9; stroke: var(--cut); stroke-width: 2; }
.engraving { fill: none; stroke: var(--engrave); stroke-width: .85; stroke-linecap: round; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 18px; margin: 12px 0 17px; font-size: .81rem; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 7px; }
.line { display: inline-block; width: 19px; border-top: 2px solid var(--cut); }
.engrave-line { border-color: var(--engrave); border-top-style: dashed; }
.engraving { stroke-dasharray: 2 1; }
.legend .legend-unit { margin-inline-start: auto; }

.file-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border); }
.file-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-info strong, .file-info div > span { display: block; overflow-wrap: anywhere; }
.file-info strong { font-size: .86rem; }
.file-info div > span { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.file-icon { display: grid; place-items: center; flex: 0 0 39px; height: 39px; border-radius: 8px; color: var(--accent); background: #eaf5f6; }
svg path, svg rect { stroke-linejoin: round; }
.file-icon svg, .download svg, .material-option svg, .select-wrap svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.download {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 41px;
  padding: 7px 12px;
  border: 1px solid #b9d1d6;
  border-radius: 7px;
  color: #13586a;
  background: #f3f9fa;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.download:hover { background: #e3f2f4; }

.configurator { display: flex; flex-direction: column; }
fieldset { min-inline-size: 0; border: 0; margin: 0; padding: 0; }
legend, .field > label { display: block; padding: 0; margin: 0 0 7px; font-size: .86rem; font-weight: 700; }
.material-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.material-option { position: relative; cursor: pointer; }
.material-option input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.material-option > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 700;
}
.material-option svg { color: var(--accent); flex: 0 0 22px; }
.material-option:hover > span { border-color: #77aab4; }
.material-option input:checked + span { border-color: #20879a; background: #eaf6f7; box-shadow: inset 0 0 0 1px #20879a; }
.material-option input:focus-visible + span { outline: 3px solid #13859b; outline-offset: 3px; }

.field { margin-top: 13px; }
.select-wrap { position: relative; }
.select-wrap svg { position: absolute; right: 13px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--accent); }
select, .stepper { width: 100%; min-height: 43px; border-radius: 8px; border: 1px solid var(--border); background: #fbfdfd; color: var(--ink); font-size: .91rem; }
select { appearance: none; padding: 0 39px 0 12px; }
.stepper { display: grid; grid-template-columns: 47px minmax(0, 1fr) 47px; }
.stepper button { padding: 0; border: 0; background: #edf5f6; color: #125e70; font-size: 1.2rem; font-weight: 700; }
.stepper button:hover:not(:disabled) { background: #def0f3; }
.stepper button:first-child { border-radius: 7px 0 0 7px; }
.stepper button:last-child { border-radius: 0 7px 7px 0; }
.stepper button:disabled { color: #687d84; }
.stepper input { min-width: 0; width: 100%; min-height: 41px; padding: 2px 8px; border: solid var(--border); border-width: 0 1px; background: #fbfdfd; color: var(--ink); text-align: center; }
.stepper input[aria-invalid="true"] { background: #fff2ee; }
.error { margin: 6px 0 0; color: #a13b23; font-size: .76rem; }

.estimate {
  margin-top: 17px;
  padding: 13px 14px;
  border: 1px solid #cee3e6;
  border-radius: 9px;
  background: #edf7f8;
}
.estimate-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; font-size: .87rem; font-weight: 700; }
.estimate-row strong { color: #135b6d; font-size: 1.12rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.estimate p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.price-row { border-top: 1px solid #cce0e3; margin-top: 9px; padding-top: 7px; }

.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 25px; padding: 15px 0 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .78rem; }
.site-footer strong { color: var(--ink); }
.footer-dot { margin-inline: 8px; }
.offline { display: inline-flex; align-items: center; gap: 7px; }

@media (max-width: 850px) {
  .wrap { width: min(calc(100% - 44px), 690px); }
  .panels { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 28px; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 30px); }
  .header-inner { min-height: 64px; gap: 8px; }

  .header-tools { gap: 7px; }
  .demo-badge { padding-inline: 7px; }
  .language-switch button { min-width: 33px; }
  .card { padding: 15px; border-radius: 13px; }
  .card-head { margin-bottom: 14px; }
  .drawing { min-height: 0; background-size: 14px 14px; }
  .legend { gap: 7px 11px; }
  .site-footer { margin-top: 20px; }
}
