* { box-sizing: border-box; margin: 0; padding: 0; }

/* Accent palette threaded through the page: blue → teal → green → violet */
:root {
  --navy: #0a1628;
  --blue: #3e6fae;
  --teal: #2aa6a0;
  --green: #3da06b;
  --violet: #7b6fd0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0a1628;
  background: linear-gradient(180deg, #ffffff 0%, #dce6f1 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top bar ---------- */
nav.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(13, 32, 61, 0.72);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

/* Spectrum strip along the very top of the page */
nav.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--green), var(--violet));
}

nav.topbar ul.menu {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav.topbar ul.menu a {
  color: #e8eef5;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

nav.topbar ul.menu a:hover {
  border-bottom-color: currentColor;
}

/* ---------- Language switcher ---------- */
details.lang-switcher {
  position: relative;
}

details.lang-switcher summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f0f4f8;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 140px;
}

/* Two-letter language code (ISO 639-1), shown instead of country flags */
.lang-code {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #44546a;
  min-width: 22px;
  text-align: center;
}

details.lang-switcher summary .lang-code {
  color: #c7d2e0;
}

details.lang-switcher summary::-webkit-details-marker { display: none; }
details.lang-switcher summary::after {
  content: "▾";
  margin-left: auto;
  font-size: 10px;
  opacity: 0.6;
}

details.lang-switcher[open] .lang-menu {
  display: block;
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.18);
  list-style: none;
  padding: 6px 0;
  min-width: 220px;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 200;
}

.lang-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: #0a1628;
  text-decoration: none;
  font-size: 14px;
}

.lang-menu li a:hover {
  background: #f0f4f8;
}

.lang-menu li a.current {
  font-weight: 600;
  background: #f7f9fc;
}

/* ---------- Layout ---------- */
/* Sections are full-bleed bands; .inner keeps the text in a centered column. */
.inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  scroll-margin-top: 56px;
}

/* Home: just the logo, with generous space above and soft colour washes */
section#home {
  padding: 220px 0 60px;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 45% at 28% 38%, rgba(42, 166, 160, 0.22) 0%, rgba(42, 166, 160, 0) 65%),
    radial-gradient(ellipse 50% 40% at 74% 62%, rgba(123, 111, 208, 0.20) 0%, rgba(123, 111, 208, 0) 65%),
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(78, 130, 196, 0.14) 0%, rgba(78, 130, 196, 0) 70%);
}

.logo {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto;
}

/* Mission: white area with a faint blue tint and teal/blue accents */
section#mission {
  padding: 90px 0 100px;
  border-top: 2px solid rgba(62, 111, 174, 0.35);
  background:
    radial-gradient(ellipse 80% 50% at 25% 0%, rgba(78, 130, 196, 0.10) 0%, rgba(78, 130, 196, 0) 60%),
    radial-gradient(ellipse 70% 45% at 85% 100%, rgba(42, 166, 160, 0.10) 0%, rgba(42, 166, 160, 0) 60%),
    linear-gradient(180deg, #ffffff 0%, #eef4fa 100%);
}

section#mission p strong {
  color: #2e5286;
}

/* Careers: white area with a faint teal tint */
section#careers {
  padding: 90px 0 110px;
  border-top: 2px solid rgba(42, 166, 160, 0.35);
  background: linear-gradient(180deg, #f2f9f9 0%, #def0f0 100%);
}

/* Open roles as a card grid: 3 cards in the first row, 2 in the second */
.roles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin: 30px 0 34px;
}

.role { grid-column: span 2; }
.role:nth-child(4),
.role:nth-child(5) { grid-column: span 3; }

.role {
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-top: 3px solid var(--blue);
  border-radius: 10px;
  padding: 26px 24px;
  box-shadow: 0 2px 12px rgba(10, 22, 40, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Each role card picks up the next colour in the palette */
.role:nth-child(2) { border-top-color: var(--teal); }
.role:nth-child(3) { border-top-color: #6fa0d8; }
.role:nth-child(4) { border-top-color: var(--violet); }

.role:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(10, 22, 40, 0.12);
}

.role h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: #14304f;
}

.role p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #3c4a5e;
}

p.careers-outro {
  margin-bottom: 0;
}

/* Accent bar under section headings */
/* Accent bar under section headings — one palette colour per section */
h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--blue);
}

section#mission h2::after {
  background: var(--blue);
}

section#careers h2::after {
  background: var(--teal);
}

section#contact h2::after {
  background: var(--violet);
  transition: background 0.6s ease;
}

body.contact-active section#contact h2::after {
  background: #b5abf5;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 10px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

section p {
  margin-bottom: 18px;
  font-size: 17px;
}

/* ---------- Contact (full-bleed, fills viewport, darkens when scrolled into) ---------- */
section#contact {
  min-height: calc(100vh - 56px);
  padding: 120px 24px;
  border-top: 2px solid rgba(123, 111, 208, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: inherit;
  text-align: center;
  transition: background 0.6s ease, color 0.6s ease;
}

/* Triggered while Contact is occupying the viewport (script.js sets the class) */
body.contact-active section#contact {
  background:
    radial-gradient(ellipse 90% 60% at 70% 100%, rgba(123, 111, 208, 0.30) 0%, rgba(123, 111, 208, 0) 60%),
    radial-gradient(ellipse 70% 50% at 18% 0%, rgba(42, 166, 160, 0.16) 0%, rgba(42, 166, 160, 0) 55%),
    linear-gradient(180deg, #0d1d33 0%, #0a1628 100%);
  color: #e8eef5;
}

section#contact h2 {
  transition: color 0.6s ease;
}

body.contact-active section#contact h2 {
  color: #ffffff;
}

section#contact .contact-inner {
  max-width: 920px;
  width: 100%;
}

section#contact h2::after {
  margin-left: auto;
  margin-right: auto;
}

a.email-cta {
  display: inline-block;
  margin: 14px 0 24px;
  padding: 14px 32px;
  border-radius: 8px;
  background: #2e5286;
  color: #ffffff;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(10, 22, 40, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.6s ease, color 0.6s ease;
}

a.email-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10, 22, 40, 0.35);
}

/* Button inverts to white on the dark background */
body.contact-active a.email-cta {
  background: #ffffff;
  color: #0a1628;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}

section#contact p.confidence {
  font-size: 14px;
  color: #6b7a8f;
  margin-bottom: 0;
  transition: color 0.6s ease;
}

body.contact-active section#contact p.confidence {
  color: #b3c2d8;
}

/* Inline email link (careers outro) */
a.email {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(10, 22, 40, 0.3);
  transition: border-color 0.3s;
}

a.email:hover {
  border-bottom-color: currentColor;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  font-size: 13px;
  color: #6b7a8f;
  padding: 32px 24px 48px;
  transition: color 0.5s ease, background 0.5s ease;
}

/* Footer sits below the dark contact section, blend it in when active */
body.contact-active footer {
  background: #0a1628;
  color: #6b7a8f;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  nav.topbar { padding: 0 14px; height: 52px; }
  nav.topbar ul.menu { gap: 18px; }
  nav.topbar ul.menu a { font-size: 14px; }
  details.lang-switcher summary { min-width: auto; padding: 5px 10px; font-size: 13px; }
  details.lang-switcher summary::after { display: none; }
  /* On mobile the summary shows only the two-letter language code */
  details.lang-switcher summary .lang-name { display: none; }
  .lang-menu { min-width: 200px; }
  section { scroll-margin-top: 52px; }
  section#contact { min-height: calc(100vh - 52px); }
  section#home { padding: 160px 0 40px; }
  .logo { max-width: 340px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
  section p { font-size: 16px; }
  .inner { padding: 0 20px; }
  section#mission { padding: 60px 0; }
  section#careers { padding: 60px 0 80px; }
  .roles { grid-template-columns: 1fr; gap: 14px; margin: 24px 0 28px; }
  .roles .role { grid-column: auto; padding: 20px 18px; }
  a.email-cta { font-size: 16px; padding: 13px 26px; }
  section#contact { padding: 80px 20px; }
}
