/* Xillard company site: a color-block mosaic on black. Solid, flat colors; square tiles; each tile is a
   doorway to a section. One theme for everyone. System fonts (no third-party requests). */
:root {
  --bg: #000000;
  --surface: #0d0d0d;
  --text: #f5f5f0;
  --text-soft: #a3a3a0;
  --line: #262626;
  --red: #b20000;
  --amber: #ff9f00;
  --orange: #ff570f;
  --lime: #abd037;
  --blue: #3d5aa8;
  --sky: #457dc0;
  --slate: #454a5c;
  --slate-2: #45545c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--amber); color: #000; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; padding: 8px 14px; background: var(--amber); color: #000; }

/* ---- header ---- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.logo span { color: var(--amber); }

.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-soft); font-weight: 600; text-decoration: none; }
.nav a:hover { color: var(--text); }

/* ---- mosaic ---- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding-bottom: 96px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 26px;
  overflow: hidden;
  text-decoration: none;
  transition: filter 0.18s ease;
}

a.tile:hover { filter: brightness(1.06); }

.tile__kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.tile__title {
  margin-top: auto;
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.tile__text { margin-top: 8px; font-size: 0.95rem; font-weight: 500; opacity: 0.85; }

.tile__big {
  margin-top: 18px;
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.tile__big small { font-size: 1rem; font-weight: 800; }

.tile__go {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 1.4rem;
  font-weight: 900;
  transition: transform 0.18s ease;
}

a.tile:hover .tile__go { transform: translateX(4px); }

.tile--intro { justify-content: flex-end; padding-left: 0; }
.tile--intro { padding-right: 20px; }
.tile--intro h1 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 900; line-height: 1.02; letter-spacing: -0.04em; }

.tile--red { background: var(--red); color: #fff; }
.tile--amber { background: var(--amber); color: #000; }
.tile--orange { background: var(--orange); color: #000; }
.tile--lime { background: var(--lime); color: #000; }
.tile--blue { background: var(--blue); color: #fff; }
.tile--sky { background: var(--sky); color: #000; }

/* Bottom row has three tiles: How we work spans two columns on wide screens. */
.tile--lime { grid-column: span 2; }

/* The band between the two rows: slate stubs and a large wordmark. */
.band {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  align-items: stretch;
  container-type: inline-size; /* the wordmark scales with the band's width */
}

.band__stub { background: var(--slate); }
.band__stub--right { background: var(--slate-2); }

.band__word {
  align-self: center;
  padding: 0.04em 0.07em 0.1em;
  font-size: 14cqw;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: var(--text);
}

/* ---- content blocks: colored label on the left, content on the right ---- */
.block {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 72px;
  position: relative;
}

/* Divider above each block, aligned with the content (not the container's side padding). */
.block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  border-top: 1px solid var(--line);
}

.block--red { --c: var(--red); --on-c: #fff; }
.block--orange { --c: var(--orange); --on-c: #000; }
.block--lime { --c: var(--lime); --on-c: #000; }
.block--blue { --c: var(--blue); --on-c: #fff; }
.block--sky { --c: var(--sky); --on-c: #000; }

.block__label {
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 18px 20px;
  background: var(--c);
  color: var(--on-c);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.block__label span { font-size: 0.85rem; letter-spacing: 0.12em; opacity: 0.75; }

.block h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.block__lead { max-width: 640px; margin-top: 18px; color: var(--text-soft); font-size: 1.15rem; }

/* ---- products ---- */
.product {
  margin-top: 40px;
  padding: 32px;
  border-left: 8px solid var(--amber);
  background: var(--surface);
}

.product__name { color: var(--amber); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.product h3 { margin-top: 10px; font-size: 1.6rem; font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; }
.product p { margin-top: 10px; color: var(--text-soft); }

.product__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin: 22px 0 28px;
}

.product__list li { position: relative; padding-left: 22px; font-weight: 600; }
.product__list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--amber); }

.btn {
  display: inline-block;
  padding: 13px 24px;
  background: var(--amber);
  color: #000;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover { background: #ffb53d; }

.soon { margin-top: 20px; color: var(--text-soft); }
.soon strong { color: var(--text); }
.soon a { color: var(--amber); font-weight: 700; }

/* ---- how we work ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 40px;
}

.steps li { padding: 26px; background: var(--surface); border-top: 6px solid var(--lime); }
.steps__n { display: block; color: var(--lime); font-size: 2.4rem; font-weight: 900; line-height: 1; }
.steps h3 { margin-top: 16px; font-size: 1.35rem; font-weight: 900; }
.steps p { margin-top: 8px; color: var(--text-soft); }

/* ---- services ---- */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 40px;
}

.services li { padding: 26px; background: var(--surface); }
.services li:nth-child(1) { border-left: 6px solid var(--blue); }
.services li:nth-child(2) { border-left: 6px solid var(--sky); }
.services li:nth-child(3) { border-left: 6px solid var(--lime); }
.services li:nth-child(4) { border-left: 6px solid var(--orange); }
.services h3 { font-size: 1.3rem; font-weight: 900; }
.services p { margin-top: 8px; color: var(--text-soft); }

/* ---- contact ---- */
.mail {
  display: inline-block;
  margin-top: 32px;
  padding: 18px 28px;
  background: var(--sky);
  color: #000;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mail:hover { background: #5b8fcd; }

/* ---- footer ---- */
.footer { padding-top: 24px; padding-bottom: 40px; }

.footer__colors { display: grid; grid-template-columns: repeat(6, 1fr); height: 10px; }
.footer__colors span:nth-child(1) { background: var(--red); }
.footer__colors span:nth-child(2) { background: var(--amber); }
.footer__colors span:nth-child(3) { background: var(--orange); }
.footer__colors span:nth-child(4) { background: var(--lime); }
.footer__colors span:nth-child(5) { background: var(--blue); }
.footer__colors span:nth-child(6) { background: var(--sky); }

.footer__row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.footer__row a { text-decoration: none; }
.footer__row a:hover { color: var(--text); }

/* ---- 404 ---- */
.not-found { padding-top: 80px; padding-bottom: 120px; }
.not-found h1 { font-size: clamp(2.6rem, 8vw, 5.5rem); font-weight: 900; line-height: 1; letter-spacing: -0.05em; }
.not-found p { margin: 20px 0 32px; color: var(--text-soft); font-size: 1.15rem; }
.not-found__code { display: inline-block; margin-bottom: 24px; padding: 6px 14px; background: var(--red); color: #fff; font-weight: 900; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .tile__go, .btn, .mail { transition: none; }
}

/* ---- narrow screens ---- */
@media (max-width: 980px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .tile { min-height: 240px; }
  .tile--intro { grid-column: 1 / -1; min-height: 0; padding: 0 0 28px; }
  .tile--lime { grid-column: auto; }
  .band { order: 10; }
  .tile--intro h1 { font-size: clamp(2rem, 7vw, 3rem); }
  .band { grid-template-columns: 30px 1fr 60px; }
  .block { grid-template-columns: 1fr; gap: 24px; }
  .block__label { flex-direction: row; align-items: baseline; gap: 14px; min-height: 0; justify-self: start; }
}

@media (max-width: 720px) {
  .nav { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .mosaic { padding-bottom: 56px; }
  .tile { min-height: 190px; padding: 18px; }
  .tile--intro { min-height: 0; padding: 0 0 24px; }
  .tile__title { font-size: 1.35rem; }
  .tile__text { font-size: 0.85rem; }
  .tile__big { font-size: 1.8rem; }
  .tile__go { top: 14px; right: 16px; font-size: 1.1rem; }
  .band { grid-template-columns: 20px 1fr 40px; }
  .header { padding-top: 20px; padding-bottom: 20px; }
  .block { padding-top: 48px; padding-bottom: 48px; }
  .block::before { left: 16px; right: 16px; }
  .product { padding: 22px; }
  .product__list, .steps, .services { grid-template-columns: 1fr; }
}
