/* Custom Build Labs — shared styles
   Palette comes from the logo: charcoal "C" face and blue "B" face. */

:root {
  --paper: #F5F7FA;
  --surface: #FFFFFF;
  --ink: #1F2327;
  --ink-soft: #545C66;
  --rule: #DCE2E9;
  --blue: #0A4587;
  --blue-deep: #083467;
  --blue-tint: #E4ECF7;
  --blue-on-dark: #9CC0F0;
  --charcoal: #1F2327;
  --on-dark: #EEF1F5;
  --on-dark-soft: #A7B0BB;
  --flash: #CFE0F7;

  --shadow-sheet: 0 1px 2px rgba(20, 30, 45, .06), 0 24px 48px -20px rgba(10, 40, 80, .28);
  --focus: var(--blue);

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 18px;

  --font: "Saira", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(72px, 10vw, 128px);

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0; }

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86em;
  background: var(--blue-tint);
  color: var(--blue-deep);
  padding: .12em .45em;
  border-radius: var(--radius-s);
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-m);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--rule);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand__mark { width: 38px; height: auto; }
.brand__name {
  font-size: 21px;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -.005em;
  line-height: 1;
}
.brand__name span { color: var(--blue); }

.nav { display: flex; align-items: center; gap: 32px; }

.nav__list {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: inline-block;
  padding-block: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav__link:hover { border-bottom-color: var(--blue); color: var(--blue); }
.nav__link[aria-current="page"] { border-bottom-color: var(--blue); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  cursor: pointer;
}
.nav-toggle__icon { width: 18px; height: 18px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open,
.nav-toggle[aria-expanded="false"] .nav-toggle__close { display: none; }

@media (max-width: 960px) {
  .js .nav-toggle { display: inline-flex; }

  .js .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-sheet);
  }
  .js .nav.is-open { display: flex; }

  .js .nav__list { flex-direction: column; gap: 2px; }
  .js .nav__link {
    display: block;
    padding: 12px 14px;
    border-bottom: 0;
    border-radius: var(--radius-m);
  }
  .js .nav__link:hover,
  .js .nav__link[aria-current="page"] { background: var(--blue-tint); }

  /* Without JS the links simply wrap under the logo */
  html:not(.js) .site-header__bar { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 12px; }
  html:not(.js) .nav__list { flex-wrap: wrap; gap: 16px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-deep); }

.btn--outline { border-color: #B9C5D4; color: var(--ink); background: var(--surface); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }

.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(48px, 8vw, 104px) clamp(64px, 9vw, 120px);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

/* Isometric grid, taken from the angles of the cube in the logo */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='30'%3E%3Cpath d='M0 0V30M52 0V30M26 0V30M0 0L52 30M0 30L52 0' stroke='%230A4587' stroke-opacity='.13' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: 52px 30px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 72% 45%, #000 15%, transparent 72%);
          mask-image: radial-gradient(ellipse 70% 80% at 72% 45%, #000 15%, transparent 72%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero__title {
  font-size: clamp(38px, 4.6vw, 58px);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin-bottom: 24px;
}

.hero__lede {
  max-width: 32em;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 36px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__platforms {
  margin-top: 40px;
  font-size: 14px;
  color: var(--ink-soft);
}
.hero__platforms strong { color: var(--ink); font-weight: 600; }

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero::before {
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 78%, #000 15%, transparent 75%);
            mask-image: radial-gradient(ellipse 90% 60% at 50% 78%, #000 15%, transparent 75%);
  }
}

/* ---------- Sheet demo ---------- */

.demo { margin: 0; }

.sheet {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sheet);
  overflow: hidden;
  font-size: 14px;
}

.sheet__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}

.sheet__file {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  min-width: 0;
}
.sheet__file svg { width: 20px; height: 20px; flex: none; color: var(--blue); }
.sheet__file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sheet__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.sheet__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2E8B57;
}
.is-syncing .sheet__status::before { background: var(--blue); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.sheet__scroll { overflow-x: auto; }

.sheet__table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.sheet__table th,
.sheet__table td {
  padding: 8px 12px;
  border: 1px solid #E6EAEF;
  text-align: left;
  white-space: nowrap;
}
.sheet__table tr > :first-child { border-left: 0; }
.sheet__table tr > :last-child { border-right: 0; }

.sheet__table .sheet__letters th {
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #8A939E;
  text-align: center;
  background: #F4F6F9;
  border-top: 0;
}

.sheet__table .sheet__head th { font-weight: 600; background: #FAFBFC; }

.sheet__table .sheet__rn {
  width: 36px;
  padding-inline: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #8A939E;
  text-align: center;
  background: #F4F6F9;
}

.sheet__table .sheet__num { text-align: right; }

.sheet__table tfoot td { font-weight: 700; background: #FAFBFC; }

.src {
  display: inline-block;
  padding: 1px 9px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue-deep);
}

.sheet__row.is-pending td:not(.sheet__rn),
.sheet__row.is-pending .src { color: transparent; background-color: transparent; }

.sheet__row.is-new td:not(.sheet__rn) { animation: row-in 1.4s ease-out; }
@keyframes row-in {
  from { background-color: var(--flash); }
  to { background-color: transparent; }
}

.sheet__tabs {
  display: flex;
  gap: 2px;
  padding: 0 12px;
  background: #F4F6F9;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}
.sheet__tab { padding: 8px 14px; color: var(--ink-soft); }
.sheet__tab--active {
  background: var(--surface);
  color: var(--blue);
  font-weight: 600;
  box-shadow: inset 0 2px 0 var(--blue);
}

.demo__caption {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

@media (max-width: 520px) {
  .sheet__table .col-order { display: none; }
  .sheet__table th,
  .sheet__table td { padding-inline: 8px; }
  .sheet__status { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-space); }
.section--tint { background: var(--surface); border-block: 1px solid var(--rule); }

.section__head { max-width: 44em; margin-bottom: clamp(40px, 5vw, 64px); }

.section__title {
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: -.015em;
  line-height: 1.08;
  text-wrap: balance;
}

.section__lede {
  margin-top: 16px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 36em;
}

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: clamp(28px, 4vw, 44px);
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-l);
  --focus: #fff;
}
.feature a { color: #fff; }

.feature__title {
  font-size: clamp(28px, 3vw, 36px);
  font-stretch: 110%;
  letter-spacing: -.01em;
}
.feature__for { margin-top: 8px; font-size: 17px; color: #C8DAF2; }

.feature__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.feature__list li {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-size: 15.5px;
  line-height: 1.5;
  color: #D6E3F5;
}
.feature__list strong {
  display: block;
  margin-bottom: 2px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.feature__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: auto 0 0;
}
.feature__gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-m);
}
.feature__gallery img:first-child { object-position: 50% 42%; }
.feature__gallery figcaption {
  grid-column: 1 / -1;
  font-size: 13.5px;
  color: #C8DAF2;
}

.service-list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
}

.service {
  flex: 1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 4px 18px;
  align-content: center;
  padding: clamp(24px, 3vw, 32px);
}
.service + .service { border-top: 1px solid var(--rule); }

.service__icon {
  grid-row: span 2;
  width: 48px;
  height: 48px;
  padding: 12px;
  color: var(--blue);
  background: var(--blue-tint);
  border-radius: 12px;
}
.service__title { font-size: 21px; font-weight: 650; }
.service__text { color: var(--ink-soft); font-size: 16px; }

@media (max-width: 900px) {
  .services { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .feature__list { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.contact__text { margin-top: 16px; font-size: 19px; color: var(--ink-soft); max-width: 30em; }

.contact__email {
  display: inline-block;
  margin-top: 32px;
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 3px solid var(--blue);
  overflow-wrap: anywhere;
}
.contact__email:hover { color: var(--blue-deep); border-bottom-color: var(--blue-deep); }

.contact__sms {
  margin-top: 40px;
  padding: 24px 28px;
  max-width: 34em;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
}
.contact__sms-title { margin: 0; font-size: 22px; font-weight: 600; }
.contact__sms p { margin: 10px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.contact__sms a { color: var(--blue); font-weight: 600; }
.contact__sms a:hover { color: var(--blue-deep); }

.contact__details {
  margin: 0;
  display: grid;
  gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
}
.contact__details dt { font-size: 14px; color: var(--ink-soft); }
.contact__details dd { margin: 2px 0 0; font-weight: 600; }

@media (max-width: 860px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--charcoal);
  color: var(--on-dark-soft);
  font-size: 15px;
  --focus: var(--blue-on-dark);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: 64px 48px;
}

.footer__brand { display: flex; flex-direction: column; gap: 16px; }
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--on-dark);
  text-decoration: none;
}
/* The logo's charcoal face needs a light tile on the dark footer */
.footer__logo img {
  width: 44px;
  padding: 6px;
  background: #fff;
  border-radius: 10px;
}
.footer__logo .brand__name span { color: var(--blue-on-dark); }
.footer__tagline { color: var(--on-dark); }

.footer__heading {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--on-dark);
}
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__links a { color: var(--on-dark-soft); text-decoration: none; }
.footer__links a:hover { color: #fff; text-decoration: underline; }

.footer__base {
  padding-block: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 13.5px;
}

address { font-style: normal; }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ---------- Legal pages ---------- */

.page-head {
  position: relative;
  isolation: isolate;
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 5vw, 64px);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='30'%3E%3Cpath d='M0 0V30M52 0V30M26 0V30M0 0L52 30M0 30L52 0' stroke='%230A4587' stroke-opacity='.12' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: 52px 30px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  pointer-events: none;
}
.page-head__title {
  font-size: clamp(36px, 5vw, 60px);
  font-stretch: 112%;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.page-head__meta { margin-top: 14px; color: var(--ink-soft); }

.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px);
  padding-block: clamp(48px, 6vw, 80px) var(--section-space);
}

.toc { position: sticky; top: 24px; align-self: start; font-size: 14.5px; }
.toc__title { font-weight: 600; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  line-height: 1.35;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }

.prose { max-width: 68ch; font-size: 17.5px; line-height: 1.72; }
.prose > * + * { margin-top: 18px; }
.prose section > * + * { margin-top: 16px; }
.prose h2 {
  margin-top: 52px;
  font-size: 25px;
  font-stretch: 106%;
  letter-spacing: -.005em;
  line-height: 1.25;
}
.prose h2 + * { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--blue); }

.prose .callout {
  margin-top: 40px;
  padding: 26px 28px;
  background: var(--blue-tint);
  border: 1px solid #C3D4EC;
  border-radius: var(--radius-l);
}
.prose .callout h2 { margin-top: 0; }
.callout > * + * { margin-top: 12px; }

.prose .address-card {
  margin-top: 20px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  line-height: 1.8;
}
.address-card strong { font-weight: 650; }

@media (max-width: 900px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

/* ---------- 404 ---------- */

.lost { padding-block: 120px; text-align: center; }
.lost img { width: 88px; margin: 0 auto 32px; }
.lost .section__lede { margin-inline: auto; }
.lost .btn { margin-top: 32px; }
