/* FAZKHAN SC Consultancy
   Palette: cool paper, slate ink, cable yellow, status green.
   One typeface (Archivo, variable width + weight), self-hosted. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --paper: #f3f4f1;
  --paper-deep: #e6eae7;
  --white: #ffffff;
  --slate: #1d2b33;
  --slate-soft: #3a4a52;
  --muted: #5b6870;
  --line: #c9d0cd;
  --signal: #f5c400;
  --signal-deep: #e2b400;
  --status: #2e9b6a;
  --on-slate: #f3f4f1;
  --on-slate-muted: #b9c4c8;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-space: clamp(4rem, 9vw, 7rem);
  --radius: 8px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--signal);
  color: var(--slate);
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--slate);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 1.5rem + 3.2vw, 3.9rem);
  font-weight: 760;
  font-stretch: 114%;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  font-weight: 720;
  font-stretch: 115%;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 660;
  font-stretch: 106%;
  line-height: 1.3;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--slate);
  color: var(--on-slate);
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

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

.site-header {
  padding-block: 1.25rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 0.7rem;
  align-items: center;
  text-decoration: none;
  line-height: 1.1;
}

.brand-mark {
  grid-row: span 2;
  width: 2.125rem;
  height: 2.125rem;
}

.brand-mark path {
  fill: none;
  stroke: var(--slate);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.brand-mark rect {
  fill: var(--signal);
  stroke: var(--slate);
  stroke-width: 2.25;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  font-weight: 560;
  text-decoration: none;
}

.nav-list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-list .nav-contact {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--slate);
  border-radius: var(--radius);
}

.nav-list .nav-contact:hover {
  background: var(--slate);
  color: var(--on-slate);
  text-decoration: none;
}

@media (max-width: 40rem) {
  .nav-optional {
    display: none;
  }
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  border: 2px solid var(--slate);
  border-radius: var(--radius);
  font-weight: 650;
  font-stretch: 106%;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button-primary {
  background: var(--signal);
  color: var(--slate);
}

.button-primary:hover {
  background: var(--signal-deep);
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
}

.button-quiet:hover {
  border-color: var(--slate);
}

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

.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.hero-copy h1 {
  max-width: 16ch;
}

.lead {
  max-width: 34rem;
  margin-top: 1.75rem;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--slate-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero-diagram {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 34rem;
}

.hero-diagram svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.wires path {
  fill: none;
  stroke: var(--slate);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.joints circle {
  fill: var(--slate);
}

.node rect {
  fill: var(--white);
  stroke: var(--slate);
  stroke-width: 2;
}

.node text,
.hub text {
  fill: var(--slate);
  font-family: inherit;
  text-anchor: middle;
}

.node text {
  font-size: 15px;
  font-weight: 560;
}

.hub rect {
  fill: var(--signal);
  stroke: var(--slate);
  stroke-width: 2.5;
}

.hub text {
  font-size: 17px;
  font-weight: 720;
  font-stretch: 112%;
}

.leds circle {
  fill: var(--status);
  stroke: var(--paper);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .wires path {
    animation: wire-draw 0.6s cubic-bezier(0.6, 0, 0.2, 1) var(--d, 0s) both;
  }

  .leds circle {
    animation: led-on 0.35s ease-out var(--d, 0s) both;
  }
}

@keyframes wire-draw {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes led-on {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
}

@media (max-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-diagram {
    justify-self: start;
  }
}

/* The diagram scales down on phones; enlarge its labels so they stay readable
   (widths checked: the longest label still fits its box at these sizes). */
@media (max-width: 30rem) {
  .node text {
    font-size: 17px;
  }

  .hub text {
    font-size: 19px;
  }
}

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

.section {
  padding-block: var(--section-space);
}

.section-tint {
  background: var(--paper-deep);
}

.section-lead {
  max-width: 38rem;
  margin-top: 1rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.split-intro p {
  max-width: 28rem;
  margin-top: 1rem;
  color: var(--muted);
}

@media (max-width: 56rem) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Services */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem 3rem;
}

.service p {
  margin-top: 0.5rem;
  color: var(--muted);
}

@media (max-width: 40rem) {
  .services {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* How we work: a real sequence, so the steps are numbered and wired together */

.steps {
  --marker: 2.75rem;
  --step-gap: 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--step-gap);
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--marker) / 2 - 1px);
  left: calc(var(--marker) + 0.5rem);
  right: calc(-1 * var(--step-gap) + 0.5rem);
  height: 2px;
  background: var(--slate);
}

.step-marker {
  display: grid;
  place-items: center;
  width: var(--marker);
  height: var(--marker);
  background: var(--white);
  border: 2px solid var(--slate);
  border-radius: var(--radius);
  font-weight: 760;
  font-stretch: 115%;
}

.step h3 {
  margin-top: 1.25rem;
}

.step p {
  margin-top: 0.5rem;
  color: var(--muted);
}

@media (max-width: 60rem) {
  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    padding-left: calc(var(--marker) + 1.25rem);
    min-height: var(--marker);
  }

  .step-marker {
    position: absolute;
    left: 0;
    top: 0;
  }

  .step h3 {
    margin-top: 0.55rem;
  }

  .step:not(:last-child)::after {
    top: calc(var(--marker) + 0.5rem);
    bottom: calc(-1 * var(--step-gap) + 0.5rem);
    left: calc(var(--marker) / 2 - 1px);
    right: auto;
    width: 2px;
    height: auto;
  }
}

/* Who we work with */

.who-statement {
  max-width: 30ch;
  font-size: clamp(1.375rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 600;
  font-stretch: 108%;
  line-height: 1.3;
}

.who-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.who-list li {
  padding: 0.5rem 0.95rem;
  background: var(--white);
  border: 2px solid var(--slate);
  border-radius: var(--radius);
  font-weight: 560;
}

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

.contact {
  padding-block: var(--section-space);
  background: var(--slate);
  color: var(--on-slate);
}

.contact h2 {
  color: var(--on-slate);
}

.contact :focus-visible {
  outline-color: var(--signal);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact-grid > div > p {
  max-width: 34rem;
  margin: 1rem 0 2rem;
  color: var(--on-slate-muted);
}

.contact .button-primary {
  border-color: var(--signal);
}

.contact-details {
  display: grid;
  gap: 1.75rem;
  margin: 0;
}

.contact-details dt {
  font-size: 0.9375rem;
  color: var(--on-slate-muted);
}

.contact-details dd {
  margin: 0.3rem 0 0;
  font-size: 1.1875rem;
  font-weight: 550;
  line-height: 1.45;
}

.contact-details a {
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}

.contact-details address {
  font-style: normal;
}

@media (max-width: 48rem) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

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

.site-footer {
  padding-block: 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.legal {
  max-width: 62rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a {
  color: var(--slate);
  font-weight: 560;
}

/* Privacy page ----------------------------------------------------------- */

.page {
  padding-block: clamp(2.5rem, 6vw, 5rem) var(--section-space);
}

.prose {
  max-width: 42rem;
}

.prose h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.25rem);
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
}

.prose p,
.prose ul {
  margin-top: 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose .updated {
  margin-top: 0.75rem;
  color: var(--muted);
}

.prose a {
  text-decoration-thickness: 1px;
}
