/* Tazafi Infosystems
   One typeface (Archivo, two widths), one family of blues taken from the logo,
   and one layout rule: section names sit in the margin, content hangs from a
   single line a quarter of the way across the page. */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #14365a;        /* text: the navy of the logo's stem, deepened */
  --ink-soft: #4a6585;   /* secondary text */
  --blue: #1f5f99;       /* headings, buttons and the contact field: the wordmark's blue */
  --sky: #379cd8;        /* start of the crossbar, as in the logo */
  --teal: #37aeb4;       /* the logo's teal, used for small marks only */
  --mist: #f1f5f9;       /* one quiet band */
  --navy: #102a47;       /* footer */
  --rule: #d8e0e9;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --bar: clamp(1.25rem, 3.3vw, 3rem);
  --wide: 122%;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

::selection { background: var(--blue); color: #fff; }

h1, h2, h3, h4, p, dl, dd, dt, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; }

[hidden] { display: none !important; }

a { color: inherit; text-decoration-color: var(--sky); text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
a:hover { color: var(--blue); text-decoration-thickness: 0.14em; }

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

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 2;
  background: var(--blue); color: #fff; padding: 0.65rem 0.875rem; text-decoration: none;
}
.skip:focus { top: 0.75rem; color: #fff; }

/* ---------- frame ---------- */

.wrap {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
}

/* ---------- the button ----------
   A small crossbar: its right edge is cut at the same angle as the logo's bar. */

.button {
  --cut: 0.85em;
  display: inline-block;
  padding: 0.95em calc(1.25em + var(--cut)) 0.95em 1.25em;
  background: var(--blue);
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1.2;
  font-weight: 600;
  font-stretch: 112%;
  text-decoration: none;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--ink); color: #fff; }
.button:focus-visible { outline: 2px solid #fff; outline-offset: -5px; border-radius: 0; }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
}

.brand { display: block; line-height: 0; padding-block: 0.25rem; }
.brand img { display: block; width: auto; height: 2.75rem; }

.masthead nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  font-size: 0.9375rem;
}
.masthead nav a { text-decoration: none; padding-block: 0.6rem; white-space: nowrap; }
.masthead nav a:hover { text-decoration: underline; }
.masthead .menu-only { display: none; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 0.125rem 0 0.5rem;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  font-stretch: 112%;
  cursor: pointer;
}
.menu-toggle::before {
  content: "";
  width: 1.15rem; height: 0.55rem;
  border-block: 2px solid currentColor;
}
.masthead.open .menu-toggle::before { height: 0; border-bottom: 0; }

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(1.75rem, 4.6vw, 3.75rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}

/* The logo's crossbar. It starts off the left edge of the screen and ends a
   fixed share of the way across the text column; the headline hangs beneath it. */
.crossbar {
  --reach: 62%;
  height: var(--bar);
  margin-left: calc((100% - 100vw) / 2);
  width: calc((100vw - 100%) / 2 + var(--reach));
  margin-bottom: clamp(1.1rem, 2.6vw, 2.25rem);
  background: linear-gradient(90deg, var(--sky) 0%, #1b84c1 48%, #226aa1 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--bar)) 100%, 0 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .crossbar { animation: draw 0.9s cubic-bezier(0.16, 0.8, 0.2, 1) both; }
  @keyframes draw {
    from { transform: translateX(-101%); }
    to   { transform: none; }
  }
}

h1 {
  max-width: 13.5em;
  color: var(--blue);
  font-size: clamp(1.75rem, 0.55rem + 6.2vw, 5.125rem);
  line-height: 1.04;
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.hero-foot { margin-top: clamp(1.75rem, 3.6vw, 3.25rem); align-items: start; }

.lede {
  grid-column: 4 / span 7;
  grid-row: 1;
  max-width: 35rem;
  font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* In the margin beside the introduction, so the way in is visible at once. */
.actions {
  grid-column: 1 / span 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding-top: 0.35rem;
}
.more { display: inline-block; padding-block: 0.65rem; font-weight: 500; }

/* ---------- parts ---------- */

.part { padding-block: clamp(3rem, 6vw, 5rem); }
.part.tinted { background: var(--mist); margin-block: clamp(1rem, 2vw, 2rem); }

.part-name {
  grid-column: 1 / span 3;
  align-self: start;
  position: sticky;
  top: 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 600;
  font-stretch: 116%;
  color: var(--blue);
  padding-top: 0.2rem;
}

.part-body { grid-column: 4 / -1; }

h3, h4 {
  font-weight: 600;
  font-stretch: 112%;
  line-height: 1.3;
}

/* What we do */

.practice .row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr);
  column-gap: 1.5rem;
  align-items: baseline;
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}
.practice .row:first-child { border-top: 0; padding-top: 0; }
.practice .row:last-child { padding-bottom: 0; }

/* The service name: one large word, with the rest of the phrase set small beneath it. */
.practice h3 { color: var(--blue); }
.practice h3 .big {
  display: block;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.15;
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: -0.012em;
}
.practice h3 .rest {
  display: block;
  max-width: 14rem;
  margin-top: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.35;
  font-weight: 500;
  font-stretch: 100%;
}
.row-body > p:first-child { max-width: 33rem; text-wrap: pretty; }

/* What you get: each line is marked with a small slanted bar from the logo. */
.gets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.5rem;
  margin-top: 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.gets li { position: relative; padding-left: 1.2rem; }
.gets li::before {
  content: "";
  position: absolute; left: 0.1rem; top: 0.52em;
  width: 0.6rem; height: 0.3rem;
  background: var(--sky);
  transform: skewX(-40deg);
}

.tools {
  margin-top: 1.05rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.tools span { color: var(--ink); font-weight: 600; margin-right: 0.35em; }

/* Working with us */

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}
.trio h3 { color: var(--blue); font-size: 1.1875rem; margin-bottom: 0.6rem; }
.trio p { max-width: 21rem; text-wrap: pretty; }

.sub {
  margin-top: clamp(2.75rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  color: var(--ink);
}

/* The steps are a real sequence, so they are numbered. */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--blue);
  padding-top: 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.steps li::before {
  content: counter(step);
  display: block;
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
  font-weight: 500;
  font-stretch: 125%;
  margin-bottom: 0.7rem;
}
.steps h4 { font-size: 1.0625rem; margin-bottom: 0.4rem; }
.steps p { text-wrap: pretty; }

/* How we work */

.quad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem 1.5rem;
}
.quad h3 {
  color: var(--blue);
  font-size: clamp(1.3125rem, 1.15rem + 0.6vw, 1.625rem);
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
}
.quad p { max-width: 26rem; text-wrap: pretty; }

/* Questions */

.faq { max-width: 44rem; border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:first-child { border-top: 0; }
.faq summary {
  position: relative;
  display: block;
  padding: 1.1rem 2.5rem 1.1rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-stretch: 112%;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.faq details:first-child summary { padding-top: 0.3rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue); }
/* plus that becomes a minus */
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute; right: 0.25rem; top: 50%;
  width: 0.8rem; height: 2px; margin-top: -1px;
  background: var(--blue);
  transition: transform 0.2s ease;
}
.faq details:first-child summary::before, .faq details:first-child summary::after { margin-top: -0.42rem; }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { max-width: 36rem; padding-bottom: 1.3rem; text-wrap: pretty; }

/* Company */

.prose { max-width: 34rem; }
.prose p + p { margin-top: 1.1rem; }
.prose p { text-wrap: pretty; }

/* ---------- contact field ---------- */

.field {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3.5rem, 9vw, 7rem);
  background: var(--blue);
  color: #fff;
}
.field ::selection, .colophon ::selection { background: #fff; color: var(--blue); }
.field :focus-visible, .colophon :focus-visible { outline-color: #fff; }

.field .part-name { color: #fff; position: static; }

.ask {
  max-width: 15em;
  font-size: clamp(1.5rem, 0.9rem + 3.2vw, 3.5rem);
  line-height: 1.08;
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.mail {
  margin-top: clamp(1.5rem, 3.5vw, 2.75rem);
  font-size: clamp(1.1875rem, 1rem + 1.2vw, 1.875rem);
  font-weight: 500;
  font-stretch: var(--wide);
}
.mail a { display: inline-block; padding-block: 0.4rem; text-decoration-color: #8fc6ec; }
.mail a:hover { color: #fff; text-decoration-color: #fff; }
.note { margin-top: 0.6rem; max-width: 30rem; color: #dbe8f5; }

/* ---------- footer ---------- */

.colophon {
  background: var(--navy);
  color: #c9d8e8;
  padding-block: clamp(2.75rem, 5vw, 4rem) 2rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.colophon a { text-decoration: none; }
.colophon a:hover { color: #fff; text-decoration: underline; text-decoration-color: #8fc6ec; }

.foot-brand { grid-column: 1 / span 3; }
.foot-brand img { display: block; width: auto; height: 2.5rem; }
.foot-brand p { margin-top: 1rem; max-width: 15rem; }

.foot-col { grid-column: span 3; display: flex; flex-direction: column; align-items: flex-start; }
.foot-col a { padding-block: 0.3rem; }
.foot-h { color: #fff; font-weight: 600; font-stretch: 112%; margin-bottom: 0.45rem; }

.foot-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.875rem;
}

/* ---------- not found ---------- */

.lost { padding-block: clamp(2rem, 7vw, 5.5rem) clamp(4rem, 12vw, 9rem); overflow: hidden; }
.lost p { margin-top: 1.75rem; font-size: 1.1875rem; }

/* ---------- smaller screens ---------- */

@media (max-width: 68rem) {
  .masthead nav { gap: 0 1.25rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below this width the section links fold away behind a Menu button. */
@media (max-width: 62rem) {
  .masthead { gap: 0 1rem; }
  .masthead .button { margin-left: auto; }
  .menu-toggle { display: inline-flex; }

  .masthead nav.collapsible {
    display: none;
    order: 3;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
    margin: 0.75rem 0 0;
    border-top: 1px solid var(--rule);
    font-size: 1.0625rem;
  }
  .masthead.open nav.collapsible { display: flex; }
  .masthead nav.collapsible a { padding-block: 0.85rem; border-bottom: 1px solid var(--rule); white-space: normal; }
  .masthead .menu-only { display: block; }

  .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .grid { display: block; }

  .masthead { padding-block: 0.9rem 0.5rem; }
  .brand img { height: 2.25rem; }

  .crossbar { --reach: 72%; }
  .actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 1.5rem; padding-top: 0; }

  .part-name { position: static; margin-bottom: 1.5rem; }
  .practice .row { display: block; padding-block: 1.75rem; }
  .practice .row:first-child { padding-top: 0; }
  .practice h3 .rest { max-width: none; margin-top: 0.25rem; }
  .row-body { margin-top: 0.75rem; }
  .trio, .quad { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .trio p, .quad p { max-width: 34rem; }

  .field .part-name { margin-bottom: 1.75rem; }

  .colophon .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1.5rem; }
  .foot-brand, .foot-legal { grid-column: 1 / -1; }
  .foot-col { grid-column: auto; }
  .foot-col a { padding-block: 0.7rem; min-width: 2.75rem; }
  .foot-legal { display: block; margin-top: 0; }
  .foot-legal p + p { margin-top: 0.25rem; }
}

/* Phones */
@media (max-width: 34rem) {
  .masthead .button { display: none; }
  .menu-toggle { margin-left: auto; }

  .colophon .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gets { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .faq summary { padding-right: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .faq summary::before, .faq summary::after { transition: none; }
}

@media print {
  .crossbar { animation: none; }
  .masthead nav, .masthead .button, .menu-toggle, .skip, .actions { display: none; }
  .field, .colophon, .part.tinted { background: none; color: var(--ink); }
  .field .part-name, .note, .colophon, .foot-h { color: var(--ink); }
}
