*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--imperial-blue);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  padding: 0.45rem 0.75rem;
  background: var(--gold);
  color: var(--imperial-blue);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(68rem, calc(100% - 3rem));
  margin-inline: auto;
}

.prose {
  max-width: 62ch;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose p + p {
  margin-top: 1.05rem;
}

.kicker {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-azure);
}

h1,
h2,
h3 {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.018em;
  color: var(--imperial-blue);
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.05rem, 4.2vw, 3.05rem);
}

h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.22rem;
}

code,
.tech {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86em;
  font-weight: 400;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  color: var(--header-fg);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav {
  order: 1;
}

.lang-switch {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--header-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.lang-switch img {
  display: block;
  width: 1.15rem;
  height: 0.86rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(242, 247, 246, 0.22);
}

.lang-switch a:hover {
  color: var(--header-fg);
}

.lang-switch a:hover img {
  box-shadow: 0 0 0 1px var(--accent);
}

.lang-switch a[aria-current="true"] {
  color: var(--header-fg);
  box-shadow: inset 0 -1px 0 var(--accent);
}

.lang-switch a:not([aria-current="true"]) img {
  opacity: 0.72;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--header-fg);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--header-fg);
}

.wordmark-logo {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  filter: invert(1);
}

.nav-toggle {
  display: none;
  order: 3;
  margin: 0;
  padding: 0.4rem 0.15rem 0.4rem 0.7rem;
  border: 0;
  background: transparent;
  color: var(--header-fg);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  gap: 0 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--header-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.2rem 0;
}

.site-nav a:hover {
  color: var(--header-fg);
}

.site-nav a[aria-current="page"] {
  color: var(--header-fg);
  box-shadow: inset 0 -1px 0 var(--accent);
}

/* Main */

main {
  flex: 1;
}

.page {
  padding: 4rem 0 5.5rem;
}

.page-contact {
  padding-top: 1.75rem;
  padding-bottom: 3.5rem;
}

.page-contact .intro {
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.page-contact .intro h1 {
  margin-bottom: 0.5rem;
}

.page-contact .intro p {
  margin: 0;
}

.page-contact .contact-form {
  margin-top: 0;
}

.intro {
  margin-bottom: 3.75rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 56rem) {
  .intro-split {
    display: grid;
    grid-template-columns: minmax(0, 62ch) minmax(11rem, 1fr);
    gap: 2.5rem 2.75rem;
    align-items: center;
  }
}

.intro-figure {
  margin: 1.75rem 0 0;
}

@media (min-width: 56rem) {
  .intro-figure {
    margin: 0;
  }
}

.intro-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.section {
  margin-top: 3.75rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.blocks {
  display: grid;
  gap: 2rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .blocks.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.block {
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--hairline);
  background: transparent;
}

.block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.block-index {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-azure);
}

.service {
  display: grid;
  gap: 0.7rem 2.25rem;
  padding: 1.85rem 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 48rem) {
  .service {
    grid-template-columns: 10.5rem minmax(0, 62ch);
    align-items: start;
  }
}

.service:first-of-type {
  border-top: 1px solid var(--border);
}

.service-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-azure);
  padding-top: 0.55rem;
}

.service p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 62ch;
}

.steps li {
  padding: 1.35rem 0 1.35rem 3.1rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  color: var(--text-muted);
}

.steps li:first-child {
  border-top: 1px solid var(--border);
}

.steps strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--imperial-blue);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
}

.step-num {
  position: absolute;
  left: 0;
  top: 1.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--steel-azure);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

.tech-list li {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  color: var(--imperial-blue);
}

.tech-list li:not(:last-child)::after {
  content: "·";
  margin: 0 0.85rem;
  color: var(--steel-azure);
  font-family: "IBM Plex Sans", sans-serif;
}

.note {
  margin-top: 1.5rem;
  max-width: 62ch;
  color: var(--text-muted);
}

.callout {
  margin-top: 3.5rem;
  padding: 1.85rem 0 0;
  max-width: 62ch;
  background: transparent;
  border-top: 1px solid var(--hairline);
  color: var(--text);
}

.callout h2,
.callout p {
  color: inherit;
}

.callout p {
  margin: 0.55rem 0 1.1rem;
  color: var(--text-muted);
}

.callout a {
  color: var(--imperial-blue);
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--accent);
}

.callout a:hover {
  color: var(--steel-azure);
}

.contact-form {
  margin-top: 1.5rem;
  max-width: 40rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  margin: 0 0 1.15rem;
}

.field label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-azure);
}

.optional {
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-muted);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.5;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--steel-azure);
}

.field-actions {
  margin: 1.5rem 0 0.65rem;
}

.field-actions button {
  margin: 0;
  padding: 0.7rem 1.35rem;
  border: 0;
  background: var(--header-bg);
  color: var(--header-fg);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.field-actions button:hover {
  background: var(--steel-azure);
  color: var(--header-fg);
}

.field-actions button:disabled {
  cursor: default;
  background: var(--border);
  color: var(--text-muted);
}

.form-status {
  margin: 0;
  min-height: 1.5em;
  color: var(--text-muted);
}

.form-status.is-error {
  color: var(--text);
}

.form-status a {
  color: var(--imperial-blue);
  font-weight: 600;
}

.contact-alt {
  margin: 0 0 1.35rem;
  padding: 0;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.contact-alt a {
  color: var(--imperial-blue);
  font-weight: 600;
}

/* Footer */

.site-footer {
  background: var(--header-bg);
  color: var(--header-muted);
  padding: 1.6rem 0;
  border-top: 1px solid var(--hairline);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer a {
  color: var(--header-fg);
  text-decoration: none;
}

.site-footer p {
  margin: 0;
  font-size: 0.88rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
}

.footer-nav a {
  font-size: 0.88rem;
}

.footer-nav a:hover,
.site-footer a:hover {
  box-shadow: inset 0 -1px 0 var(--accent);
}

@media (max-width: 47.99rem) {
  .wrap {
    width: min(68rem, calc(100% - 1.75rem));
  }

  .page {
    padding: 2.5rem 0 4rem;
  }

  .page-contact {
    padding-top: 1.25rem;
    padding-bottom: 3rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--french-blue);
    border-bottom: 1px solid var(--hairline);
    padding: 0.4rem 1.25rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 0;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: none;
    color: var(--header-fg);
  }

  body.nav-open {
    overflow: hidden;
  }
}
