/* R&D Advance - static site stylesheet (replaces the Strato Sitebuilder design "cm_dh_083") */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face { font-family: 'Glegoo'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/glegoo-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'Glegoo'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/glegoo-700-latin.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format('woff2'); }

/* ---------- Colours ---------- */
:root {
  --bg: #dde7f3;          /* page background + footer */
  --white: #ffffff;
  --text: #333333;
  --title: #46566e;       /* site title + navigation bar */
  --subtitle: #545454;
  --accent: #f15e1d;      /* headings + link hover */
}

/* ---------- Base ---------- */
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  font-family: 'Glegoo', serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}
img { border: 0; }
a { color: var(--text); outline: 0; }
a:hover { color: var(--accent); }

.page { width: 1150px; margin: 0 auto; }

/* ---------- Header ---------- */
.header {
  position: relative;
  min-height: 110px;
  background: var(--white) url(../img/logo.png) no-repeat 98% 69% / auto 85%;
}
.header .home-link { position: absolute; inset: 0; }   /* whole header clickable, like the original logo */
.title-wrap {
  position: relative;
  display: inline-block;
  max-width: 1080px;
  padding: 0 0 0 40px;
  pointer-events: none;
}
.site-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: xx-large;
  line-height: 60px;
  color: var(--title);
  margin: 0;
}
.site-subtitle {
  font-family: 'Glegoo', serif;
  font-size: large;
  line-height: 40px;
  color: var(--subtitle);
  margin: 0;
}

/* ---------- Navigation ---------- */
.nav { background: var(--title); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav a, .nav-toggle {
  display: block;
  padding: 10px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: var(--white);
  background: var(--title);
  text-decoration: none;
  transition: color .3s, background-color .3s;
}
.nav a:hover, .nav a.current { color: var(--title); background: var(--white); }
.nav-toggle {            /* only shown on phones */
  display: none;
  width: 100%;
  border: 0;
  cursor: pointer;
  text-align: center;
}
.nav-toggle .bars {
  display: inline-block; vertical-align: middle;
  width: 14px; height: 2px; margin: -3px 10px 0 0;
  background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

/* ---------- Key visual (banner image) ---------- */
.keyvisual {
  height: 290px;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 100% auto;
}
.kv-home      { background-image: url(../img/kv-home.jpg); }
.kv-about     { background-image: url(../img/kv-about.jpg); }
.kv-portfolio { background-image: url(../img/kv-portfolio.jpg); }
.kv-contact   { background-image: url(../img/kv-contact.jpg); }

/* ---------- Content + sidebar ---------- */
.content {
  display: flex;
  align-items: flex-start;
  background: var(--white);
  padding: 30px 40px;
  overflow-wrap: break-word;
}
.main { width: 809px; margin: 0 20px 30px 0; }
.sidebar { width: 200px; padding: 25px 10px 20px; background: var(--white); }
.sidebar-block { padding: 0 10px; text-align: center; }

h1, h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  color: var(--accent);
  margin: 0 0 .7em 0;
}
h1 { font-size: 26px; }
h2 { font-size: 16px; }
p  { margin: 0 0 1em 0; }
.spacer { height: 31px; }                 /* empty line the original pages start with */
.quotes-title { font-family: 'Montserrat', sans-serif; font-size: 16px; color: var(--accent); }

/* centred images (sidebar, about page) */
.img-center { display: block; margin: 0 auto 5px; height: auto; }
.icon-linkedin { width: 20%; }
.photo-erik    { width: 63.3%; }
.cert-mark     { width: 27.8%; }

/* columns on about/portfolio pages */
.cols { display: flex; gap: 15px; }
.cols > div { flex: 1 1 0; min-width: 0; }
.cols-2 { flex-wrap: wrap; }
.cols-2 > div { flex: 0 0 calc(50% - 7.5px); }
.col-title { font-weight: 700; }
.about-logo { width: 22.3%; margin-top: 31px; }

/* ---------- Contact form ---------- */
.contact-form ul { list-style: none; margin: 0; padding: 0; }
.contact-form li { margin: 0 0 10px; }
.contact-form label { display: inline-block; margin-bottom: 4px; }
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form input[type=tel],
.contact-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: rgba(51, 51, 51, .03);
  border: 1px solid rgba(51, 51, 51, .45);
  border-radius: 2px;
}
.contact-form textarea { height: 91px; resize: vertical; }
.contact-form input:hover, .contact-form textarea:hover { border-color: rgba(51, 51, 51, .8); }
.contact-form input:focus, .contact-form textarea:focus { outline: 0; border-color: var(--text); }
.contact-form input[type=checkbox] { margin: 3px 6px 3px 0; vertical-align: middle; }
.contact-form button {
  margin: 10px 0 15px;
  padding: 10px 14px;
  font: inherit;
  color: var(--text);
  background: rgba(51, 51, 51, .08);
  border: 1px solid rgba(51, 51, 51, .35);
  border-radius: 2px;
  box-shadow: rgba(51, 51, 51, .5) 0 3px 3px -2px;
  cursor: pointer;
}
.contact-form button:hover { border-color: rgba(51, 51, 51, .8); }
.contact-form .hp { position: absolute; left: -9999px; }  /* spam honeypot, hidden from people */

/* ---------- Footer ---------- */
.footer { background: var(--bg); text-align: center; padding: 50px 0; }
.footer a { text-decoration: none; }

/* ---------- Responsive (same breakpoints as the original design) ---------- */
@media (max-width: 1250px) {
  .keyvisual { background-position: center; background-size: cover; }
}
@media (min-width: 1024px) and (max-width: 1250px) {
  .page { width: 1020px; }
  .title-wrap { max-width: 950px; }
  .header { background-position: right 69%; }
  .keyvisual { height: 260px; }
  .main { width: 679px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .page { width: 95%; }
  .title-wrap { max-width: calc(100% - 50px); }
  .header { background-position: right 69%; }
  .nav ul { justify-content: center; }
  .keyvisual { height: 230px; }
  .content { padding: 30px 20px; }
  .main { width: calc(100% - 260px); }
}
@media (max-width: 767px) {
  .page { width: 100%; }
  .header { padding-top: 110px; background-position: center 8px; background-size: auto 93.5px; }
  .title-wrap { display: block; text-align: center; padding: 0; }
  .nav-toggle { display: block; }
  .nav ul { display: none; text-align: center; }
  .nav.open ul { display: block; }
  .keyvisual { height: 190px; }
  .content { display: block; padding: 30px 20px; }
  .main { width: auto; margin-right: 0; }
  .sidebar { width: auto; padding: 10px; }
  .cols { flex-direction: column; gap: 0; }
  .cols > div { flex: none; }
}
@media (max-width: 479px) {
  .keyvisual { height: 140px; }
  .content { padding: 20px 10px; }
}

/* title scales with the window, as in the original */
@media (max-width: 767px) and (orientation: portrait) {
  .site-title { font-size: 8vw; } .site-subtitle { font-size: 6vw; }
}
@media (max-width: 767px) and (orientation: landscape) {
  .site-title { font-size: 6vw; } .site-subtitle { font-size: 4vw; }
}
@media (min-width: 768px) and (max-width: 1280px) and (orientation: portrait) {
  .site-title { font-size: 5vw; } .site-subtitle { font-size: 3vw; }
}
@media (min-width: 768px) and (max-width: 1280px) and (orientation: landscape) {
  .site-title { font-size: 4vw; } .site-subtitle { font-size: 2vw; }
}
