/* Angelov Trade Group — technical-document minimalism. */

:root {
  --paper: #f3f3ef;
  --ink: #111111;
  --muted: #6a6a66;
  --rule: #111111;
  --soft: #d6d6d0;

  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --pad: clamp(20px, 2.6vw, 32px);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-style: dashed; }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  z-index: 20;
}
.skip-link:focus { top: 16px; }

/* Sheet: rail | document | figure */

.sheet {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.rail {
  border-right: 1px solid var(--rule);
  background-image: repeating-linear-gradient(-45deg, var(--ink) 0 1px, transparent 1px 4px);
  opacity: 0.55;
}

.doc {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rule);
  min-width: 0;
}

main { flex: 1; }

/* Top bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
}
.sep { color: var(--muted); margin: 0 4px; }

.nav { display: flex; gap: 20px; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* Panels */

.panel {
  padding: var(--pad);
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 40px;
}
.panel > * + * { margin-top: 14px; }
.panel.dashed { border-top: 1px dashed var(--rule); margin-top: -1px; }

.kicker { font-size: 11px; color: var(--muted); }

h1 {
  font-family: var(--sans);
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 {
  font-family: var(--sans);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.intro { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(32px, 4vw, 48px); }
.intro h1 { margin-bottom: 28px; }
.intro p:not(.kicker) { max-width: 58ch; }

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}
.row > .panel { border-bottom: 0; }
.row > .panel + .panel { border-left: 1px solid var(--rule); }

.plain li + li { margin-top: 6px; }
.glyph { display: inline-block; width: 18px; }

/* Table */

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--soft);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: 1px solid var(--rule); }
td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
td:nth-child(2) { white-space: nowrap; width: 1%; padding-right: 32px; }

/* Bullets */

.bullets li {
  position: relative;
  padding-left: 18px;
  max-width: 64ch;
}
.bullets li + li { margin-top: 10px; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  background: var(--ink);
}
.bullets strong { font-weight: 600; }

/* Contact form */

.contact p { max-width: 60ch; }

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  margin-top: 28px !important;
}

.field { display: flex; flex-direction: column; min-width: 0; }
.field-full { grid-column: 1 / -1; }

.field label {
  font-size: 11px;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 10px 12px;
  appearance: none;
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.field textarea { resize: vertical; min-height: 132px; }

.field input:hover,
.field textarea:hover { background: rgba(17, 17, 17, 0.025); }

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.field [aria-invalid="true"] { border-style: dashed; }

.field-error {
  min-height: 1.7em;
  margin-top: 4px;
  font-size: 11px;
}
.field-error:not(:empty)::before { content: "! "; }

/* Visually hidden honeypot — kept out of view and out of the tab order. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 8px;
}

.submit {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 13px 22px;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease), opacity 160ms var(--ease);
}
.submit:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 0 var(--ink);
}
.submit:disabled { cursor: progress; opacity: 0.45; }

.form-status { font-size: 12px; max-width: 52ch; }
.form-status:empty { display: none; }

/* Footer */

.foot {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--rule);
  margin-top: -1px;
}
.badge {
  display: grid;
  place-items: center;
  width: 56px;
  flex: none;
  background: var(--ink);
}
.badge span {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--paper);
}
.foot > div { padding: 12px 16px; }
.foot-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.foot-meta { font-size: 11px; color: var(--muted); }
.foot-meta a { text-decoration: none; }
.foot-meta a:hover { text-decoration: underline; }

/* Figure */

.figure {
  display: grid;
  place-items: center;
  background-color: #fbfbf8;
  background-image: radial-gradient(rgba(17, 17, 17, 0.14) 1px, transparent 1px);
  background-size: 16px 16px;
}

.figure-side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: clamp(24px, 4vw, 64px);
}

.figure-inline { display: none; }

.drawing {
  display: block;
  width: 100%;
  height: auto;
  max-width: 440px;
  max-height: 100%;
}

/* Responsive */

@media (max-width: 960px) {
  .sheet { grid-template-columns: 6px minmax(0, 1fr); }
  .doc { border-right: 0; }
  .figure-side { display: none; }
  .figure-inline { display: grid; padding: 24px 16px; }
  .figure-inline .drawing { max-width: 320px; }
}

@media (max-width: 560px) {
  .sheet { border-left: 0; border-right: 0; }
  .bar > p { display: none; }
  .bar { justify-content: flex-end; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > .panel + .panel { border-left: 0; border-top: 1px solid var(--rule); }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .submit { width: 100%; }
}

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