/* Scalar Technologies — site styles */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-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: "Montserrat";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-italic-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-italic-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;
}

:root {
  --ink: #000;
  --ink-soft: #333;
  --ink-muted: #5f6360;
  --paper: #fff;
  --rule: #000;
  --gutter: clamp(16px, 5.5vw, 80px);
  --max: 1280px;
  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.site-header { padding-top: 40px; }

.brand { display: inline-block; line-height: 0; }
.brand svg { width: 80px; height: 80px; display: block; transition: transform .25s ease; }
.brand:hover svg { transform: rotate(90deg); }

.site-nav {
  margin-top: 28px;
  border-top: 1px solid var(--rule);
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 14px 10px 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  font-size: 15px;
  text-decoration: none;
  padding: 4px 0;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Main ---------- */

main { flex: 1 0 auto; }
#main { padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(40px, 6vw, 64px); }

.page-title {
  text-wrap: balance;
  margin: 0 0 clamp(28px, 4vw, 44px);
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-align: center;
}

.lead {
  max-width: 840px;
  text-wrap: balance;
  margin: 0 auto 32px;
  font-size: clamp(16px, 1.6vw, 18px);
  text-align: center;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.85;
  text-align: center;
}
.prose p { margin: 0 0 24px; }

.nowrap { white-space: nowrap; }
.flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

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

.btn {
  display: inline-block;
  min-width: 200px;
  padding: 13px 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 17px;
  letter-spacing: .08em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: transparent; color: var(--paper); }

.center { text-align: center; }

/* ---------- Partners ---------- */

.partners {
  --logo: clamp(60px, 7vw, 86px);       /* visual size; each logo scales by sqrt(aspect) */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1120px;
  margin: clamp(16px, 3vw, 40px) auto clamp(48px, 6vw, 72px);
  list-style: none;
}
.partners li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 25%;
  min-height: calc(var(--logo) * 1.9);
  padding: 20px 16px;
}
.partners img {
  width: calc(var(--logo) * var(--r, 1.4));
  max-width: 100%;
  height: auto;
  transition: filter .3s ease, opacity .3s ease, transform .3s ease;
}

/* Monochrome on devices with a pointer; full colour on hover/focus and on touch. */
@media (hover: hover) {
  .partners img { filter: grayscale(1) contrast(1.1); opacity: .72; }
  .partners li:hover img { filter: none; opacity: 1; transform: scale(1.04); }
}

@media (max-width: 760px) {
  .partners li { flex-basis: 50%; padding: 16px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .partners img { transition: none; }
  .partners li:hover img { transform: none; }
  .brand svg { transition: none; }
}

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

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: var(--paper);
  background: var(--ink);
}
.contact__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(48px, 7vw, 96px) 32px;
  text-align: center;
}
.contact__info .page-title { margin-bottom: 28px; }
.contact__info address { font-style: normal; font-size: 15px; line-height: 1.9; }
.contact__info a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .4); }
.contact__info a:hover { border-bottom-color: currentColor; }
.contact__info .email { display: inline-block; margin-top: 8px; }

.contact__form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vw, 96px) clamp(24px, 6vw, 80px);
  background: #111 url("../img/connecting-dots.jpg") center / cover no-repeat;
}
.contact-form { width: 100%; max-width: 480px; display: grid; gap: 14px; }
.contact-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #555; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.contact-form .btn { justify-self: center; margin-top: 4px; }
.form-note { margin: 2px 0 0; font-size: 12px; color: rgba(255, 255, 255, .7); text-align: center; }

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

/* ---------- Legal / policy ---------- */

.legal { max-width: 760px; margin: 0 auto; font-size: 15px; line-height: 1.8; }
.legal h2 { margin: 40px 0 12px; font-size: 18px; font-weight: 700; }
.legal h3 { margin: 24px 0 8px; font-size: 15px; font-weight: 700; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 4px; }
.meta { margin: -20px auto 24px; color: var(--ink-muted); font-size: 13px; text-align: center; }

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

.site-footer { padding: 0 0 40px; text-align: center; }
.copyright { margin: 0; font-size: 12px; color: var(--ink-soft); }

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

.not-found { text-align: center; }
.not-found .code { font-size: clamp(64px, 12vw, 120px); font-weight: 700; line-height: 1; margin: 0 0 12px; }
.not-found p { margin: 0 0 32px; }

/* ---------- Language switcher ---------- */

.site-nav .lang {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  letter-spacing: .06em;
}
.site-nav .lang span { font-weight: 700; }
.site-nav .lang a { font-size: 13px; color: var(--ink-muted); }
.site-nav .lang a:hover { color: var(--ink); }
.site-nav .lang > * + *::before {
  content: "|";
  margin-right: 8px;
  color: var(--ink-muted);
  font-weight: 400;
}
.site-nav .lang a::after { display: none; }
