/* Essence Solutions P/S - e-s.dk
   Breakpoints: sm 576px, md 768px, lg 992px, xl 1200px */

:root {
  --green: #99ba44;
  --green-dark: #86a43a;
  --mint: #eaf1d9;
  --grey: #e9e9e7;
  --light: #f5f5f5;
  --dark: #212121;
  --link: #2196f3;
  --ink: rgba(0, 0, 0, .65);
  --ink-strong: rgba(0, 0, 0, .85);
  --hdr-h: 4rem;
  --gutter: 5.25%;  /* old Bootstrap: 2.5% column padding on a row 105% wide */
  --side: 1.6vw;    /* page side padding, outside the 2.5% container padding */
}
@media (min-width: 1200px) { :root { --side: 3.2vw; } }
@media (min-width: 2560px) { :root { --side: 512px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* root size steps up with the screen, like the old site; rem/em scale with it */
html { font-size: 14px; scroll-behavior: smooth; scroll-padding-top: var(--hdr-h); }
@media (min-width: 576px) { html { font-size: 15px; } }
@media (min-width: 768px) { html { font-size: 16px; } }
@media (min-width: 992px) { html { font-size: 17px; } }
@media (min-width: 1200px) { html { font-size: 18px; } }
body {
  margin: 0;
  font-family: "Source Sans Pro", "Source Sans 3", system-ui, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 700; color: var(--ink-strong); }
h1, .h1 { font-size: 2.75em; line-height: 1.25; margin-bottom: .8em; }
h2 { font-size: 2em; line-height: 1.25; margin-bottom: .8em; }
h3 { font-size: 1.0625em; line-height: 1.4; margin: 1.6em 0 .4em; }
h3:first-child { margin-top: 0; }
p { margin: 0 0 1.6em; }
ul { margin: 1.6em 0 2.4em; }
blockquote { margin: 0 0 1.6em; }
hr { border: 0; border-top: 1px solid rgba(0, 0, 0, .15); margin: 1rem 0 1.6rem; }

.lead { font-size: 1.075em; font-weight: 700; font-style: italic; }
.small { font-size: .875rem; }
.tc { text-align: center; }
.tr { text-align: right; }
.text-primary { color: var(--green) !important; }
.text-white { color: #fff !important; }
.text-muted { color: rgba(0, 0, 0, .45); }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 2.4rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .5em !important; }

.i { width: 1em; height: 1em; vertical-align: -.15em; flex: none; }

@media (max-width: 991px) {
  p { font-size: 1.0625em; }
  p.small { font-size: .92969em; }
}
@media (max-width: 767px) {
  p { font-size: 1.125em; }
  p.small { font-size: .98438em; }
  h1, .h1 { font-size: 2.40625em; }
  h2 { font-size: 1.875em; }
  h3 { font-size: 1.12891em; }
}
@media (max-width: 575px) {
  h1, .h1 { font-size: 2.0625em; }
  h2 { font-size: 1.75em; }
  h3 { font-size: 1.19531em; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-size: .875rem;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: center;
  padding: 1.125em 3.75em;
  border: 1px solid var(--green);
  transition: background-color .2s, color .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-secondary { background: transparent; color: var(--green); }
.btn-secondary:hover { background: var(--green); color: #fff; }
.btn-sm { font-size: .75rem; padding: 1em 2.6em; }
.s-green .btn-primary { background: #fff; color: var(--green); border-color: #fff; }
.s-green .btn-primary:hover { background: transparent; color: #fff; }

a.arrow-right .i, a.arrow-down .i { margin-left: .35em; }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: #fff; }
.hdr.stuck { box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12), 0 2px 4px -1px rgba(0, 0, 0, .2); }
.hdr-in {
  display: flex; align-items: center; gap: 16px;
  height: var(--hdr-h);
  max-width: 2560px; margin: 0 auto;
  padding: 0 calc(var(--side) + 2.5%);
}
.logo { display: block; margin-right: auto; }
.logo img { width: 13.9rem; max-width: 52vw; }

.nav { display: flex; align-items: center; }
.nav-top { display: none; }
.nav-list { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: .88rem 1.06rem;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--dark);
}
.nav-list a:hover, .nav-list a.on { color: var(--green); text-decoration: none; }
.nav-sub { display: none; }
.nav-cta { display: flex; gap: 16px; margin-left: 24px; }

.nav-open {
  display: none; align-items: center; gap: .4em;
  font: inherit; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--dark);
  background: none; border: 0; padding: 10px 0; cursor: pointer;
}
.nav-open .i, .nav-close .i { width: 26px; height: 26px; }
.nav-close { background: none; border: 0; padding: 10px 0; cursor: pointer; color: var(--dark); }

@media (max-width: 991px) {
  .nav-open { display: inline-flex; }
  .nav { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav {
    display: block; position: fixed; inset: 0; z-index: 60;
    background: #fff; overflow-y: auto;
    padding: 0 calc(var(--side) + 2.5%) 40px;
  }
  .nav-top { display: flex; align-items: center; height: var(--hdr-h); margin-bottom: 24px; }
  .nav-list { display: block; }
  .nav-list a { padding: 8px 0; font-size: 1.25rem; text-transform: none; }
  .nav-sub { display: block; list-style: none; margin: 0 0 8px; padding: 0 0 0 16px; }
  .nav-sub a { font-size: 1rem; font-weight: 400; padding: 4px 0; }
  .nav-cta { margin: 24px 0 0; flex-wrap: wrap; }
}

/* breadcrumb sits over the top padding of the first section */
.crumbs {
  display: none;
  position: absolute; top: var(--hdr-h); left: 0; right: 0; z-index: 2;
  padding: 6px calc(var(--side) + 2.5%);
  font-size: .75rem; color: rgba(0, 0, 0, .45);
}
.crumbs a { color: inherit; text-decoration: underline; }
.crumbs .sep { margin: 0 .5em; }
.crumbs [aria-current] { color: var(--ink-strong); }
@media (min-width: 992px) { .crumbs { display: block; } }

/* ---------- sections ---------- */
main.pb-main { padding-bottom: 4.8rem; }  /* case pages: old content area kept bottom padding */

/* flow-root keeps child margins inside the section (no white bands between sections) */
.s { padding: 3.2rem var(--side); position: relative; display: flow-root; }
.s.pt0 { padding-top: 0; }
.s.pb0 { padding-bottom: 0; }
.s.pb-lg { padding-bottom: 8rem; }

.s-green { background: var(--green); color: rgba(255, 255, 255, .75); }
.s-green :is(h1, h2, a:not(.btn)) { color: #fff; }
.s-green h3 { color: rgba(255, 255, 255, .75); }
.s-mint, .s-grey { color: rgba(0, 0, 0, .75); }
.s-mint { background: var(--mint); }
.s-grey { background: var(--grey); }
:is(.s-mint, .s-grey) :is(h1, h2) { color: #000; }
:is(.s-mint, .s-grey) h3 { color: rgba(0, 0, 0, .75); }

/* content width: w-N = Bootstrap col-lg-N, centred */
.wrap { margin: 0 auto; padding: 0 2.5%; }
.wrap.px-6 { padding: 0 calc(1% + 4.8rem); }  /* old .pl-6/.pr-6 inside a col-lg-8 */
@media (min-width: 768px) {
  .w-6 { width: 66.667%; }
  .w-8 { width: 83.333%; }
  .w-9 { width: 91.667%; }
}
@media (min-width: 992px) {
  .w-6 { width: 50%; }
  .w-8 { width: 66.667%; }
  .w-9 { width: 75%; }
  .w-10 { width: 83.333%; }
}

/* 12-column grid; c-N = span at all sizes, sm-/md-/lg-/xl-N from that size up */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }  /* no row gap: like old Bootstrap rows, margins space the rows */
.grid > * { grid-column: span 12; min-width: 0; }
.grid > .c-6 { grid-column: span 6; }
@media (min-width: 576px) {
  .grid > .sm-4 { grid-column: span 4; }
  .grid > .sm-6 { grid-column: span 6; }
  .grid > .sm-9 { grid-column: span 9; }
  .grid > .sm-12 { grid-column: span 12; }
}
@media (min-width: 768px) {
  .grid > .md-3 { grid-column: span 3; }
  .grid > .md-4 { grid-column: span 4; }
  .grid > .md-6 { grid-column: span 6; }
  .grid > .md-9 { grid-column: span 9; }
  .grid > .md-12 { grid-column: span 12; }
  .grid > .mt-md { margin-top: 5rem; }
}
@media (min-width: 992px) {
  .grid > .lg-3 { grid-column: span 3; }
  .grid > .lg-6 { grid-column: span 6; }
  .grid > .lg-12 { grid-column: span 12; }
}
@media (min-width: 1200px) {
  .grid > .xl-3 { grid-column: span 3; }
}
.grid > hr { margin: 1.6rem 0 2.4rem; }
.grid > hr.hr-gap { margin: 0 0 1.6rem; border-color: transparent; }
/* old cards carried their own 1.6em bottom margin */
.grid > :has(> :is(.icard, .card)) { margin-bottom: 1.6rem; }
/* edge-to-edge card row: cards fill the old 105% row, outer cards pushed 1em outwards */
.grid-cards { margin: 0 -2.5%; }
@media (min-width: 768px) { .grid-cards { margin: 0 calc(-2.5% - 1rem); column-gap: 1rem; } }

/* ---------- mosaic (front page hero) ---------- */
.mosaic { display: grid; grid-template-columns: 1fr 1fr; background: var(--grey); color: rgba(0, 0, 0, .75); }
.mosaic-img { width: 100%; height: 50vw; max-height: 90vh; object-fit: cover; object-position: left center; }
@media (min-width: 2561px) { .mosaic-img { height: 1280px; } }
.mosaic-txt { align-self: center; padding: 2.4rem 10%; }
.mosaic-txt :last-child { margin-bottom: 0; }
/* old padding was 10% of the full row, i.e. 20% of a half-width column */
@media (min-width: 768px) { .mosaic-txt { padding: 2.4rem 20%; } }
.mosaic-txt h1 { color: #000; }
@media (max-width: 767px) {
  .mosaic { grid-template-columns: 1fr; }
  .mosaic-img { width: 90%; height: 75vw; max-height: none; }
}

/* ---------- raised image section (pulls up over the section above) ---------- */
.raise { margin-top: -6rem; padding: 3.2rem var(--side); position: relative; color: rgba(255, 255, 255, .75); }
.raise-bg {
  position: absolute; top: 0; bottom: 0; left: 10%; right: 10%;
  background: center / cover no-repeat;
}
.raise .wrap { position: relative; padding: 0 calc(1.4% + 4.8rem); }  /* old .pl-6/.pr-6 inside a col-lg-6 */
.raise :is(h2, h3) { color: #fff; }
.raise-md { height: 37.5vw; max-height: 90vh; }
@media (max-width: 575px) { .raise-md { height: auto; min-height: 75vw; } }
@media (min-width: 2561px) { .raise-md { height: 960px; } }
@media (max-width: 767px) {
  .raise-bg { left: 16px; right: 16px; }
}

/* check-mark lists */
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 2.4em; margin-bottom: .8em; }
.checks .i { position: absolute; left: 0; top: .05em; width: 1.5em; height: 1.5em; color: var(--green); }
.raise .checks .i { color: #fff; }

/* ---------- icon cards ---------- */
.icard { height: 100%; }
.icard :last-child { margin-bottom: 0; }
.icard-light { background: var(--light); padding: 3.2rem; }
/* icon scales with the card, like the old col-2 / col-3 icon column */
.icard .icon { width: 11.6%; margin-bottom: .8rem; }
.icard-light .icon, .icard-white .icon { width: 20%; }
.icard .icon svg { width: 100%; height: auto; fill: var(--green); display: block; }
.icard .icon svg [stroke] { stroke: var(--green); }
.icard .icon.icon-c { margin-left: auto; margin-right: auto; }
.icard-white .icon svg { fill: #fff; }
.icard-white .icon svg [stroke] { stroke: #fff; }
.icard-white h3 { color: #fff; }
.icard-row { display: flex; align-items: center; gap: 6.5%; }
.icard-row .icon { width: 11%; flex: none; margin: 0; }
.icard-row h3 { margin: 0; }

/* ---------- case cards ---------- */
.card { background: #fff; height: 100%; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: .875rem; }
.card img { width: 100%; }
.card-body { padding: 15%; }
.card-body :last-child { margin-bottom: 0; }
.card h3 { color: var(--ink-strong); }
.card p { color: var(--ink); }
.card a:not(.btn) { color: var(--link); }

/* ---------- employee cards ---------- */
.person { font-size: .875rem; color: var(--ink); margin-bottom: 3.2rem; }
.person img { width: 100%; max-width: 11.75rem; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: 1.6rem; background: var(--light); }
.person h3 { margin: 0; color: var(--ink-strong); }
.person p { margin: 0; }
.person .role { margin-bottom: 1em; }
.person .tel, .person .mail { display: flex; align-items: center; gap: .6em; margin-bottom: .3em; }
.person .i { color: var(--green); }
.person a { color: var(--ink); }

/* ---------- forms ---------- */
.form { margin-top: 1.6rem; }
.form .field { margin-bottom: 1.2em; }
.form label { display: block; font-weight: 700; margin-bottom: .3em; color: var(--ink-strong); }
.form :is(input, select, textarea) {
  display: block; width: 100%; font: inherit; color: var(--ink-strong);
  padding: .65em .8em; border: 1px solid rgba(0, 0, 0, .25); border-radius: 0; background: #fff;
}
.form textarea { resize: vertical; min-height: 9em; }
.form :is(input, select, textarea):focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }
.form button { cursor: pointer; font: inherit; font-size: .875rem; }
.form button:disabled { opacity: .6; cursor: wait; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 1em 0 0; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--green-dark); }
.form-status.err { color: #c62828; }

/* ---------- footer ---------- */
.ftr { background: var(--dark); color: rgba(255, 255, 255, .65); font-size: .875rem; line-height: 1.6; }
.ftr-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: 36px calc(var(--side) + 2.5%); }
.ftr-col { grid-column: span 6; }
@media (min-width: 768px) { .ftr-col { grid-column: span 4; } }
@media (min-width: 992px) { .ftr-col { grid-column: span 3; } .ftr-col:first-child { grid-column: span 6; } }
@media (min-width: 1200px) { .ftr-col:first-child { grid-column: span 3; } }
.ftr h3 { font-size: .93rem; color: rgba(255, 255, 255, .85); margin: 0 0 6px; }
.ftr p { margin: 0 0 1.6em; }
.ftr a { color: #fff; }
.ftr .i { color: var(--green); margin-right: .3em; }
.ftr-links a { color: rgba(255, 255, 255, .65); }
.ftr-copy { background: var(--green); color: #fff; font-size: .766rem; padding: 10px calc(var(--side) + 2.5%); }
.ftr-copy p { margin: 0; }

/* back to top */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: grid; place-items: center; width: 48px; height: 48px;
  background: rgba(255, 255, 255, .6); color: var(--dark);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top .i { width: 24px; height: 24px; }
