/* BSI theme. Colours come from the theme config as --c-* on :root (partials/base.html.twig). */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* widths and spacing of the former Elementor sites: header/hero 1280px, content --content (theme setting
     content_width, set in partials/base.html.twig), 5% side margins */
  --wide: 1280px;
  --side: 90%;
  --content-side: 90%;
  --radius: 0;
  --fs-body: 18px;
  --fs-eyebrow: 25px;
  --fs-h1: 36px;
  --fs-h2: 26px;
  --fs-banner: 36px;
  /* "bold" of the former sites: their Inter was declared with weight normal only, the browser emboldened it */
  --bold: 600;
}
@media (max-width: 767px) {
  :root {
    --content-side: 80%;
    --fs-body: 16px;
    --fs-eyebrow: 20px;
    --fs-h1: 25px;
    --fs-banner: 25px;
  }
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--c-text);
  font: 400 var(--fs-body)/1.5 'Inter', system-ui, sans-serif;
}

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

a { color: inherit; text-underline-offset: 0.15em; }
a:hover { color: var(--c-accent); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

h1, h2, h3 {
  color: var(--c-heading);
  font-weight: var(--bold);
  line-height: 1.2;
  margin: 0 0 20px;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: 1.15em; }
p, ul, ol { margin: 0 0 0.8em; }
strong { font-weight: var(--bold); }

.container {
  width: min(var(--content, 1024px), var(--content-side));
  margin-inline: auto;
}
.container--wide { width: min(var(--wide), var(--side)); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: 0.5rem 1rem; }

/* Buttons */
.button {
  display: inline-block;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-accent);
  color: var(--c-accent-text);
  font: 400 16px/1 'Inter', system-ui, sans-serif;
  text-decoration: none;
  padding: 12px 24px;
  cursor: pointer;
  transition: filter 0.2s;
}
.button:hover { color: var(--c-accent-text); filter: brightness(1.1); }
.button--light { background: #fff; color: #54595f; border: 2px solid #fff; }
.button--light:hover { color: #54595f; filter: none; background: transparent; color: #fff; }

/* Header */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 80px;
}
.site-header__logo img { width: var(--logo-width, 200px); height: auto; max-height: 60px; object-fit: contain; object-position: left center; }
.site-header__logo span { font-weight: 700; font-size: 1.25rem; color: var(--c-heading); }
.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--c-text); text-decoration: none; font-weight: 500; }
.site-nav a[aria-current] { color: var(--c-accent); }

/* Modules: 50px apart, the hero right under the header */
main > .module { margin-block: var(--space, 50px); }
main > .hero { margin-top: 0; margin-bottom: 50px; }

.hero__image { width: 100%; }

/* Intro: company line, heading, text; image (with caption) right or text right */
.eyebrow { font-size: var(--fs-eyebrow); line-height: 1; margin-bottom: 20px; color: var(--c-heading); }
.intro__grid { display: grid; gap: 40px; }
.intro__main { align-self: center; }
.intro__figure { margin: 0; }
.intro__image { width: 100%; }
.intro__figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.4; font-style: italic; }
.intro__text > :last-child { margin-bottom: 0; }

/* Box: tinted background, e.g. the services */
.box {
  background: var(--c-soft);
  padding: 50px;
}
.box > :last-child { margin-bottom: 0; }

/* Contact */
.contact__form { margin-top: 20px; }
.contact__form--boxed { background: var(--c-soft); padding: 50px; }

/* Banner: background image, small line, large text, button; content at the bottom left */
.banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 500px;
  padding: 5%;
  background: var(--c-heading) var(--banner-image, none) center / cover no-repeat;
  color: #fff;
}
.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(20deg, rgb(0 0 0 / 0.35), rgb(0 0 0 / 0) 60%);
}
/* widths in % of the banner, as on the former sites (the content box is 90% of it) */
.banner__content { position: relative; width: calc(45% / 0.9); }
.banner__kicker { color: #fff; font-size: 18px; font-weight: 400; margin-bottom: 15px; }
.banner__text { font-size: var(--fs-banner); font-weight: var(--bold); line-height: 1.1; margin-bottom: 20px; }
.banner__text > :last-child { margin-bottom: 0; }

/* Text pages, error page */
.text-page { width: min(52rem, var(--content-side)); padding-block: 2.5rem var(--space, 50px); }
.text-page h2 { margin-top: 1.8em; }

.error-page { text-align: center; padding-block: var(--space, 50px); background: var(--c-soft); }
.error-page__code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; line-height: 1; color: var(--c-accent); margin-bottom: 1rem; }

/* Forms (classes from bsi.php) */
.form-field { margin-bottom: 10px; }
.form-label { display: block; font-size: 16px; font-weight: var(--bold); line-height: 1; text-transform: uppercase; margin-bottom: 10px; }
.form-input {
  width: 100%;
  border: 1px solid var(--c-text);
  border-radius: var(--radius);
  background: #fff;
  color: var(--c-text);
  font: 400 18px/1.4 'Inter', system-ui, sans-serif;
  padding: 10px 16px;
}
.form-input:focus { border-color: var(--c-accent); outline: 1px solid var(--c-accent); }
textarea.form-input { height: 115px; min-height: 0; resize: vertical; }
.required, .form-label .required { color: inherit; margin-left: 0.25em; }
.form-errors, .notices.red, .alert.error { color: #b00020; }
.notices.green, .alert.success { background: var(--c-soft); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.form-columns { display: grid; gap: 0 10px; }
.form-buttons { margin-top: 10px; }
.form-buttons .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-size: 18px;
  font-weight: var(--bold);
  line-height: 1;
  text-transform: uppercase;
  padding: 15px 30px;
}
.form-buttons .button::before {
  content: '';
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: var(--icon-mail) center / contain no-repeat;
  mask: var(--icon-mail) center / contain no-repeat;
}
:root {
  --icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='1.5'/%3E%3Cpath d='m3 6.5 9 6.5 9-6.5'/%3E%3C/svg%3E");
}

/* Footer: three columns, the last one small with the links */
.site-footer { padding-bottom: 50px; }
.site-footer__columns { display: grid; gap: 20px; font-size: 16px; }
.site-footer__column > :last-child { margin-bottom: 0; }
.site-footer__column:last-child { font-size: 12px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 1.2em; list-style: none; margin: 1.2em 0 0; padding: 0; }

/* Tablet and up */
@media (min-width: 768px) and (max-width: 1024px) {
  .box { padding-block: 100px; }
}

@media (min-width: 768px) {
  .intro__grid { grid-template-columns: 1fr 1fr; gap: 50px; }
  .form-columns { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; }
  .contact__form--boxed { width: 80%; }
  .contact__form--boxed .form-buttons .button { width: calc(50% - 5px); }
  .box > :not(h2) { margin-right: 100px; }
}

/* Up to tablet: tinted boxes reach the screen edges */
@media (max-width: 1024px) {
  .container--bleed { width: 100%; }
  .banner { min-height: 350px; }
  .site-footer__columns { gap: 40px; }
  .banner__content { width: calc(65% / 0.9); }
}

/* Desktop */
@media (min-width: 1025px) {
  body { font-size: var(--fs-body); }
  .intro--image .intro__grid { grid-template-columns: minmax(0, 1fr) 370px; gap: 100px; }
  .intro--split .intro__grid { gap: 100px; }
  .intro--split .intro__text { max-width: 82%; }
  .intro--split .intro__main { align-self: start; }
  .contact--right .container { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
  .contact--right .contact__inner { grid-column: 2; }
  .contact__form--boxed { width: 60%; }
  .site-footer__columns { grid-template-columns: repeat(3, 1fr); font-size: 18px; }
  .site-footer__column { padding-right: 100px; }
  .intro--image h1 { max-width: 60%; }
  .intro--image .intro__text { max-width: 82%; }
}

/* Phone */
@media (max-width: 767px) {
  .site-nav { display: none; }
  .site-header__logo img { width: calc(0.6 * var(--logo-width, 200px)); }
  .site-header__button { font-size: 12px; }
  .hero__container, .container--bleed-mobile { width: 100%; }
  .hero__image { height: 250px; object-fit: cover; }
  .box { padding: 40px 10%; }
  .contact__form--boxed { margin-inline: calc(-12.5%); padding: 40px 12.5%; }
  .banner { min-height: 500px; padding: 10%; }
  .banner__content { width: calc(70% / 0.8); }
  .banner__kicker { font-size: 20px; }
  .banner .button { font-size: 14px; }
  .site-footer .container { width: 90%; }
  .site-footer__columns { gap: 20px; }
}
