:root {
  --ink: #0D1014;
  --paper: #F3F4F0;
  --paper-2: #E6E8E2;
  --signal: #2F5BFF;
  --signal-on-ink: #8CA4FF;
  --muted: #3D424A;
  --line: rgba(13, 16, 20, 0.16);
  --muted-on-ink: #A9AEB5;
  --line-on-ink: rgba(243, 244, 240, 0.18);
  --field: #161A20;
  --field-line: #3A4049;
  --sans: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

h1, h2, h3, p { margin: 0; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--signal); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--signal { background: var(--signal); color: var(--paper); }
.btn--signal:hover { background: var(--paper); color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* Eyebrow */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow__mark {
  width: 18px;
  height: 16px;
  flex-shrink: 0;
  fill: var(--signal);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 88px;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.site-header .xt4-logo { font-size: 44px; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"]:not(.btn) { color: var(--signal); }

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 128px) 0 clamp(72px, 10vw, 144px);
}
.hero .wrap { position: relative; }
.hero__mark {
  position: absolute;
  top: 50%;
  right: -7%;
  height: 124%;
  transform: translateY(-50%);
  fill: var(--paper-2);
  pointer-events: none;
}
.hero h1 {
  margin-top: 28px;
  font-size: clamp(44px, 8.6vw, 124px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero__accent {
  display: block;
  color: var(--signal);
}
.hero__lede {
  margin-top: 32px;
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--muted);
}
.hero__actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Section heads */

.section-head h2 {
  margin-top: 20px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-head__lede {
  margin-top: 24px;
  max-width: 30em;
  color: var(--muted);
}

/* Services */

.services {
  padding: clamp(64px, 8vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
}
.services .section-head {
  position: sticky;
  top: 32px;
  align-self: start;
}
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.service-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.service-list li:last-child { border-bottom: 1px solid var(--line); }
.service-list__index {
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--signal);
}
.service-list h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.service-list p {
  margin-top: 12px;
  max-width: 34em;
  color: var(--muted);
}
.service-list .service-list__points {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  max-width: 34em;
  display: grid;
  gap: 10px;
}
.service-list .service-list__points li {
  display: block;
  position: relative;
  padding: 0 0 0 22px;
  border: 0;
  font-size: 17px;
  color: var(--ink);
}
.service-list .service-list__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--signal);
}

/* Contact */

.contact {
  padding: clamp(64px, 8vw, 120px) 0;
  background: var(--ink);
  color: var(--paper);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
}
.contact .eyebrow,
.contact .section-head__lede { color: var(--muted-on-ink); }
.contact :focus-visible { outline-color: var(--signal-on-ink); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted-on-ink);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 6px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.4;
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #8A9099; }
.field input:hover,
.field textarea:hover { border-color: var(--muted-on-ink); }
.field [aria-invalid="true"] { border-color: #FF8A73; }

/* Spam trap: hidden from people, left empty; bots that fill it are ignored. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.contact-form__note {
  font-size: 15px;
  color: var(--muted-on-ink);
}
.contact-form__status {
  min-height: 1.5em;
  font-size: 16px;
}
.contact-form__status[data-state="error"] { color: #FF8A73; }
.contact-form__status[data-state="sent"] { color: var(--paper); }

/* Footer */

.site-footer {
  padding: 32px 0 40px;
  background: var(--ink);
  color: var(--muted-on-ink);
  border-top: 1px solid var(--line-on-ink);
  font-size: 15px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.site-footer .xt4-logo { font-size: 36px; }
.site-footer__links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
}
.site-footer a:hover,
.site-footer a[aria-current="page"] { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--signal-on-ink); }

/* Solutions page */

.page-head {
  padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--line);
}
.page-head h1 {
  margin-top: 24px;
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.page-head__lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--muted);
}

.solutions { padding-bottom: clamp(64px, 8vw, 120px); }
.solution {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(32px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
}
.solution:nth-child(even) .solution__shot { order: 2; }
.solution__shot {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-2);
  transition: border-color 0.15s;
}
.solution__shot:hover { border-color: var(--ink); }
.solution__shot img {
  display: block;
  width: 100%;
  height: auto;
}
/* Trims the bottom strip of a screenshot (a cookie notice in the capture). */
.solution__shot--trim img {
  aspect-ratio: 800 / 455;
  object-fit: cover;
  object-position: top;
}
.solution__kind {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
}
.solution h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.solution__body > p:not(.solution__kind) {
  margin-top: 18px;
  max-width: 30em;
  color: var(--muted);
}
.solution__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: var(--signal);
}
.solution__link:hover { color: var(--signal); }

.cta {
  padding: clamp(56px, 7vw, 96px) 0;
  background: var(--ink);
  color: var(--paper);
}
.cta__wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}
.cta h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.cta :focus-visible { outline-color: var(--signal-on-ink); }

@media (max-width: 860px) {
  .solution { grid-template-columns: minmax(0, 1fr); }
  .solution:nth-child(even) .solution__shot { order: 0; }
}

/* Legal pages (privacy policy, terms of service, 404) */

.legal {
  padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 120px);
  border-top: 1px solid var(--line);
}
.legal__wrap { max-width: 808px; }
.legal h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.legal__updated {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.legal h2 {
  margin-top: 56px;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.legal h3 {
  margin-top: 28px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}
.legal p,
.legal ul {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.65;
}
.legal ul {
  margin-bottom: 0;
  padding-left: 22px;
}
.legal li + li { margin-top: 6px; }
.legal a { color: var(--ink); }
.legal a:hover { color: var(--signal); }

/* Narrow screens */

@media (max-width: 860px) {
  .services__grid,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .services .section-head { position: static; }
  .hero__mark { right: -38%; height: 96%; }
}

/* The header button no longer fits beside four links below this width. */
@media (max-width: 760px) {
  .site-nav__cta { display: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  /* Logo on its own row, links underneath, so four links fit a phone. */
  .site-header .wrap { height: auto; flex-wrap: wrap; gap: 0 16px; padding-top: 14px; padding-bottom: 6px; }
  .site-header .xt4-logo { font-size: 38px; }
  .site-nav { width: 100%; margin-left: 0; gap: 20px; }
  .site-nav__cta { display: none; }
  .hero__mark { display: none; }
  .service-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .site-footer__links { margin-left: 0; }
}
