@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --ink: #111111;
  --paper: #f3efe6;
  --red: #ff2e35;
  --blue: #1883f0;
  --line: 4px solid var(--ink);
  --gap: 16px;
  --pad: 20px;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.45;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button,
a.stamp {
  font: inherit;
  cursor: pointer;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.strip {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  border-bottom: var(--line);
}

.strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
}

.strip-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.strip a {
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

header.site {
  border-bottom: var(--line);
  background: #fff;
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { height: 72px; width: auto; }

.brand span {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-size: 20px;
}

.hero { padding: 28px 0 8px; }

h1 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  max-width: 16ch;
}

.lede { max-width: 62ch; margin: 0; }

h2 {
  margin: 28px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

.card-hit {
  width: 100%;
  text-align: left;
  background: #fff;
  border: var(--line);
  padding: 0;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card-hit:hover,
.card-hit:focus-visible {
  background: var(--red);
  color: #fff;
  outline: none;
}

.card-hit img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: var(--line);
  background: #fff;
}

.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card-body h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.card-body p { margin: 0; flex: 1; }

.stamp {
  align-self: flex-start;
  margin-top: 8px;
  border: var(--line);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  min-height: 44px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-hit:hover .stamp,
.card-hit:focus-visible .stamp {
  background: #fff;
  color: var(--ink);
}

.contacts {
  margin: 28px 0 40px;
  border: var(--line);
  background: #fff;
  padding: var(--pad);
}

.contacts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contacts a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid var(--blue);
}

.contacts svg,
dialog svg { width: 22px; height: 22px; flex: none; }

footer.site {
  border-top: var(--line);
  background: var(--ink);
  color: #fff;
  padding: 20px 0 28px;
  font-size: 14px;
}

dialog {
  border: var(--line);
  padding: 0;
  width: min(520px, calc(100% - 24px));
  background: var(--paper);
  color: var(--ink);
}

dialog::backdrop { background: rgba(17, 17, 17, 0.72); }

dialog form,
.dlg {
  margin: 0;
  padding: 20px;
}

dialog h3 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.dlg-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.dlg-actions a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: var(--line);
  background: #fff;
  text-decoration: none;
  font-weight: 600;
}

.dlg-actions a:hover,
.dlg-actions a:focus-visible { background: var(--red); color: #fff; outline: none; }

dialog .close {
  float: right;
  border: var(--line);
  background: #fff;
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1040px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
}
