/* Stordalen IT brand — design system v0.1 */
:root {
  --si-navy: #061242;
  --si-slate: #647a99;
  --si-pale: #c6d6e7;
  --si-mist: #eaf1f7;
  --si-sand: #ccad88;
  --si-offwhite: #fafaf9;
  --si-radius: 16px;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--si-offwhite);
  --md-primary-fg-color--light: var(--si-offwhite);
  --md-primary-fg-color--dark: var(--si-navy);
  --md-primary-bg-color: var(--si-navy);
  --md-primary-bg-color--light: rgb(6 18 66 / 70%);
  --md-accent-fg-color: var(--si-navy);
  --md-accent-fg-color--transparent: rgb(6 18 66 / 7%);
  --md-default-bg-color: var(--si-offwhite);
  --md-default-fg-color: var(--si-navy);
  --md-default-fg-color--light: rgb(6 18 66 / 72%);
  --md-default-fg-color--lighter: rgb(6 18 66 / 32%);
  --md-default-fg-color--lightest: rgb(6 18 66 / 7%);
  --md-typeset-color: var(--si-navy);
  --md-typeset-a-color: var(--si-navy);
  --md-footer-bg-color: var(--si-navy);
  --md-footer-bg-color--dark: var(--si-navy);
  --md-footer-fg-color: var(--si-offwhite);
  --md-footer-fg-color--lighter: rgb(250 250 249 / 60%);
}

/* Header: light bar, wordmark logo, site name kept for screen readers only */
.md-header,
.md-tabs {
  box-shadow: none;
  border-bottom: 1px solid var(--si-mist);
}
.md-header__button.md-logo {
  display: inline-block;
  margin: 0.2rem 0.4rem;
}
.md-header__button.md-logo img {
  height: 1.6rem;
  width: auto;
}
.md-header__title .md-header__topic:first-child .md-ellipsis {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.md-tabs__link {
  font-size: 0.75rem;
  opacity: 0.75;
}
.md-tabs__item--active .md-tabs__link {
  opacity: 1;
  font-weight: 600;
}

/* Search: mist field, navy text */
.md-search__form {
  background-color: var(--si-mist);
  border-radius: 8px;
}
.md-search__form:hover {
  background-color: var(--si-pale);
}
.md-search__input,
.md-search__input::placeholder,
.md-search__icon {
  color: var(--si-navy);
}

/* Admonitions and FAQ: brand colors instead of Material blue */
.md-typeset :is(.admonition, details):is(.note, .abstract, .info, .tip, .success, .question, .example, .quote) {
  border-color: var(--si-pale);
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
}
.md-typeset :is(.note, .abstract, .info, .tip, .success, .question, .example, .quote) > :is(.admonition-title, summary) {
  background-color: var(--si-mist);
  border-radius: 11px 11px 0 0;
}
.md-typeset details:is(.note, .abstract, .info, .tip, .success, .question, .example, .quote):not([open]) > summary {
  border-radius: 11px;
}
.md-typeset :is(.note, .abstract, .info, .tip, .success, .question, .example, .quote) > :is(.admonition-title, summary)::before,
.md-typeset :is(.note, .abstract, .info, .tip, .success, .question, .example, .quote) > summary::after {
  background-color: var(--si-slate);
}

/* Typography */
.md-typeset h1,
.md-typeset h2 {
  font-weight: 700;
  color: var(--si-navy);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.md-typeset h3 {
  font-weight: 600;
}
.md-typeset a {
  text-decoration: underline;
  text-decoration-color: var(--si-sand);
  text-underline-offset: 0.2em;
}
.md-typeset a:hover {
  text-decoration-thickness: 2px;
}

/* Readable line length: about 80 characters per line */
.md-typeset {
  --si-measure: 62ch;
}
.md-typeset :is(p, ul, ol, dl, blockquote, .si-faq) {
  max-width: var(--si-measure);
}
.md-typeset .grid :is(p, ul, ol) {
  max-width: none;
}

/* Buttons */
.md-typeset .md-button {
  border-radius: 8px;
  text-decoration: none;
}
.md-typeset .md-button--primary {
  background-color: var(--si-navy);
  border-color: var(--si-navy);
  color: var(--si-offwhite);
}
.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus-visible {
  background-color: rgb(6 18 66 / 85%);
  border-color: rgb(6 18 66 / 85%);
  color: #fff;
}

/* Cards */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  background: #fff;
  border: 1px solid var(--si-mist);
  border-radius: var(--si-radius);
}
/* Service cards: the "Läs mer" link covers the card, so the whole card is clickable */
.md-typeset .si-band .grid.cards > ul > li {
  position: relative;
}
.md-typeset .si-band .grid.cards > ul > li a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--si-radius);
}
.md-typeset .si-band .grid.cards > ul > li:hover {
  border-color: var(--si-pale);
  box-shadow: 0 6px 24px rgb(6 18 66 / 6%);
}
.md-typeset .grid.cards .lg {
  color: var(--si-slate);
}

/* Full-width background band */
.si-band {
  margin: 2.5rem 0;
  padding: 1.5rem 0 2rem;
  box-shadow: 0 0 0 100vmax var(--si-band-color);
  clip-path: inset(0 -100vmax);
  background: var(--si-band-color);
}
.si-band--mist {
  --si-band-color: var(--si-mist);
}

/* Keep hyphenated words whole (balanced headings may break at the hyphen) */
.si-nowrap {
  white-space: nowrap;
}

/* Hero: text only */
.si-hero {
  max-width: 48rem;
  padding: 2rem 0 1.5rem;
}
.md-typeset .si-hero h1 {
  font-size: 2.6rem;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.si-hero__services {
  font-size: 1.2rem;
  color: var(--si-slate);
  margin-bottom: 1.2rem;
}
.md-typeset .si-hero__lead {
  font-size: 0.9rem;
  max-width: 40rem;
  margin-bottom: 2rem;
}

/* About: small round photo right of the text, centred on it */
.si-about {
  max-width: calc(var(--si-measure) + 12.5rem);
  display: grid;
  grid-template-columns: 1fr 10.5rem;
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
}
/* At the top of a page (About), line the heading up with other pages */
.si-about:first-child {
  margin-top: 0;
}
/* No stray margins, so the block is only as tall as its content */
.md-typeset .si-about > div > p:first-child {
  margin-top: 0;
}
.md-typeset .si-about > div > :last-child,
.md-typeset .si-about > p {
  margin: 0;
}
.si-about__photo {
  display: block;
  width: 10.5rem;
  border-radius: 50%;
}

/* Service cards: two columns, so four cards sit 2 × 2 */
.md-typeset .si-band .grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

/* Facts strip under the hero: client logo, divider, three facts.
   Items keep their natural width and share the free space equally. */
.si-facts {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 1rem;
}
.si-facts > div {
  order: 2;
  min-width: 0;
}
.si-facts > .si-facts__client {
  order: 0;
  display: flex;
  align-items: center;
}
/* Divider between the logo and its facts, spaced like the facts */
.si-facts::before {
  content: "";
  order: 1;
  flex: none;
  width: 1px;
  background: var(--si-pale);
}
.md-typeset .si-facts p {
  margin: 0;
}
/* Tablets: logo and divider on their own rows, facts in one row below */
@media screen and (min-width: 769px) and (max-width: 1099px) {
  .si-facts {
    flex-wrap: wrap;
    row-gap: 1rem;
  }
  .si-facts > .si-facts__client,
  .si-facts::before {
    flex-basis: 100%;
  }
  .si-facts::before {
    height: 1px;
  }
}
.md-typeset .si-facts__logo {
  display: block;
  height: 2rem;
  width: auto;
}
.md-typeset .si-facts__num {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

/* Quotes */
.md-typeset blockquote {
  color: var(--si-navy);
  padding-left: 1rem;
}
[dir=ltr] .md-typeset blockquote {
  border-left: 3px solid var(--si-sand);
}

/* FAQ: clean accordion — no boxes or icons, thin dividers, +/− marker */
.md-typeset .si-faq details.question {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--si-pale);
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 0.8rem;
}
.md-typeset .si-faq details.question:last-child {
  border-bottom: 1px solid var(--si-pale);
}
.md-typeset .si-faq details.question > summary {
  margin: 0;
  padding: 0.9rem 2rem 0.9rem 0;
  background: none;
  border-radius: 0;
  color: var(--si-navy);
  font-weight: 600;
}
.md-typeset .si-faq details.question > summary::before {
  display: none;
}
.md-typeset .si-faq details.question > summary::after {
  content: "+";
  top: 50%;
  right: 0;
  width: auto;
  height: auto;
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
  transform: translateY(-50%);
  content: "+" / "";
  color: var(--si-navy);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}
.md-typeset .si-faq details.question[open] > summary::after {
  content: "−";
  content: "−" / "";
  transform: translateY(-50%);
}
.md-typeset .si-faq details.question > summary:hover {
  text-decoration: underline;
  text-decoration-color: var(--si-sand);
  text-underline-offset: 0.2em;
}
.md-typeset .si-faq details.question > p {
  margin: 0 0 1rem;
  padding-right: 2rem;
}

/* Footer: light focus ring on the navy background */
.md-footer :focus-visible {
  outline-color: var(--si-offwhite);
}

/* Small screens: menu button first, then logo */
@media screen and (max-width: 76.234375em) {
  .md-header__inner > label[for="__drawer"] {
    order: -1;
  }
}

@media screen and (max-width: 768px) {
  .si-hero {
    padding: 2rem 0 1.5rem;
  }
  .md-typeset .si-hero h1 {
    font-size: clamp(1.6rem, 11vw, 2rem);
  }
  .si-facts {
    flex-direction: column;
    gap: 1rem;
  }
  .si-facts::before {
    width: auto;
    height: 1px;
  }
  .si-about {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .si-about__photo {
    width: 9rem;
  }
}

/* Very small phones (320px): drop spacing so the search button is not clipped */
@media screen and (max-width: 22.4375em) {
  [dir] .md-header__title {
    margin-inline: 0;
  }
  .md-header__button.md-logo {
    margin-inline: 0.2rem;
  }
}
