/* Stordalen IT brand — design system v0.2
   Paper and ink, hairline rules, deep blue for links and actions,
   marker red only for small marks (hero separators, the quote bar).
   Source Serif 4 for headings, IBM Plex Sans for text, IBM Plex Mono for figures and code.
   1rem in Material is 20px (larger on wide screens); media queries use 16px ems. */
:root {
  --si-paper: #f6f7f8;
  --si-ink: #11161f;
  --si-ink-2: #4a5463;
  --si-rule: #d5dae1;
  --si-blue: #1e3a8a;
  --si-red: #c23b2e;
  --si-white: #ffffff;
  --si-band-text: #dce3f2;
  --si-serif: "Source Serif 4", Georgia, serif;
  --si-radius: 6px;
  --si-header: 3.4rem;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--si-paper);
  --md-primary-fg-color--light: var(--si-paper);
  --md-primary-fg-color--dark: var(--si-ink);
  --md-primary-bg-color: var(--si-ink);
  --md-primary-bg-color--light: var(--si-ink-2);
  --md-accent-fg-color: var(--si-blue);
  --md-accent-fg-color--transparent: rgb(30 58 138 / 8%);
  --md-default-bg-color: var(--si-paper);
  --md-default-fg-color: var(--si-ink);
  --md-default-fg-color--light: var(--si-ink-2);
  --md-default-fg-color--lighter: rgb(17 22 31 / 36%);
  --md-default-fg-color--lightest: rgb(17 22 31 / 7%);
  --md-typeset-color: var(--si-ink);
  --md-typeset-a-color: var(--si-blue);
  --md-code-bg-color: #eceef1;
  --md-code-fg-color: var(--si-ink);
  --md-footer-bg-color: var(--si-paper);
  --md-footer-bg-color--dark: var(--si-paper);
  --md-footer-fg-color: var(--si-ink);
  --md-footer-fg-color--light: var(--si-ink-2);
  --md-footer-fg-color--lighter: var(--si-ink-2);
}

/* Always keep room for the scrollbar, so short pages don't shift sideways */
html {
  scrollbar-gutter: stable;
}
body {
  background-color: var(--si-paper);
}

/* Focus: one visible ring everywhere */
:is(a, button, summary, label, input, [tabindex]):focus-visible {
  outline: 2px solid var(--si-blue);
  outline-offset: 3px;
}

/* --- Header: one row with logo, menu, language and search -------------- */
.md-header,
.md-header--shadow {
  box-shadow: none;
  border-bottom: 1px solid var(--si-rule);
}
.md-header__button.md-logo {
  display: inline-block;
  margin: 0.2rem 0.4rem;
}
.md-header__button.md-logo img {
  height: 1.6rem;
  width: auto;
}
/* Site name kept for screen readers only */
.md-header__title .md-header__topic:first-child .md-ellipsis {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.md-header__title {
  font-family: var(--si-serif);
  font-weight: 600;
}
@media screen and (min-width: 76.25em) {
  .md-header__inner {
    min-height: var(--si-header);
  }
  .md-header__button.md-logo img {
    height: 1.8rem;
  }
  .md-header .md-tabs {
    flex: none;
    width: auto;
    overflow: visible;
    background: none;
    color: inherit;
  }
  .md-header .md-tabs > .md-grid {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .md-header .md-tabs__list {
    gap: 1.5rem;
    margin: 0 0.8rem 0 0;
    overflow: visible;
  }
  .md-header .md-tabs__item {
    height: auto;
    padding: 0;
  }
  .md-header .md-tabs__link,
  .md-header .md-tabs[hidden] .md-tabs__link {
    margin: 0;
    padding: 0.3rem 0;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 1;
    transform: none;
    color: var(--si-ink);
  }
  .md-header .md-tabs__link:hover {
    color: var(--si-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.35em;
  }
  .md-header .md-tabs__item--active .md-tabs__link {
    text-decoration: underline;
    text-decoration-color: var(--si-blue);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.35em;
  }
  .md-header--lifted ~ .md-container .md-sidebar {
    top: var(--si-header);
  }
  .md-header--lifted ~ .md-container .md-typeset :target {
    --md-scroll-margin: 4.6rem;
  }
}

/* Search: white field with a hairline */
.md-search__form {
  background-color: var(--si-white);
  border-radius: var(--si-radius);
  box-shadow: inset 0 0 0 1px var(--si-rule);
}
.md-search__form:hover {
  box-shadow: inset 0 0 0 1px var(--si-ink-2);
}
.md-search__input,
.md-search__input::placeholder,
.md-search__icon {
  color: var(--si-ink);
}

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

/* --- Type ---------------------------------------------------------------- */
.md-typeset {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--si-ink);
}
.md-typeset :is(h1, h2, h3) {
  font-family: var(--si-serif);
  font-weight: 600;
  color: var(--si-ink);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.md-typeset h1 {
  font-size: 2.3em;
  line-height: 1.1;
  margin: 0 0 1em;
}
.md-typeset h2 {
  font-size: 1.6em;
  line-height: 1.2;
  margin: 2.4em 0 0.7em;
}
.md-typeset h3 {
  font-size: 1.25em;
  line-height: 1.3;
  margin: 1.8em 0 0.6em;
}
.md-typeset h4 {
  font-weight: 600;
  letter-spacing: 0;
}
.md-typeset a {
  color: var(--si-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.md-typeset a:hover {
  color: var(--si-blue);
  text-decoration-thickness: 2px;
}
.md-typeset hr {
  border-bottom-color: var(--si-rule);
}
.md-typeset :is(strong, b) {
  font-weight: 600;
}

/* 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);
}

/* Keep hyphenated words whole (balanced headings may break at the hyphen) */
.si-nowrap {
  white-space: nowrap;
}
.si-mono {
  font-family: var(--md-code-font-family);
  font-variant-numeric: tabular-nums;
  color: var(--si-ink);
}

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

/* Tables: hairlines, paper header row */
.md-typeset table:not([class]) {
  border: 1px solid var(--si-rule);
  border-radius: var(--si-radius);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
}
.md-typeset table:not([class]) th {
  background-color: var(--si-paper);
  color: var(--si-ink);
  font-weight: 600;
}
.md-typeset table:not([class]) td {
  border-top: 1px solid var(--si-rule);
}
.md-typeset table:not([class]) tbody tr:hover {
  background-color: rgb(30 58 138 / 4%);
  box-shadow: none;
}

/* Footnotes */
.md-typeset .footnote {
  color: var(--si-ink-2);
}

/* Admonitions: white box, hairline, blue icon */
.md-typeset :is(.admonition, details) {
  border: 1px solid var(--si-rule);
  border-radius: var(--si-radius);
  box-shadow: none;
  background: var(--si-white);
  font-size: 0.8rem;
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary) {
  background-color: var(--si-paper);
  border-radius: calc(var(--si-radius) - 1px) calc(var(--si-radius) - 1px) 0 0;
  font-weight: 600;
}
.md-typeset details:not([open]) > summary {
  border-radius: calc(var(--si-radius) - 1px);
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::before,
.md-typeset details > summary::after {
  background-color: var(--si-blue);
}

/* Buttons: primary books a call, secondary is an outline */
.md-typeset .md-button {
  padding: 0.75em 1.3em;
  border: 1px solid var(--si-blue);
  border-radius: var(--si-radius);
  color: var(--si-blue);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.md-typeset .md-button:hover,
.md-typeset .md-button:focus-visible {
  background-color: var(--si-blue);
  border-color: var(--si-blue);
  color: var(--si-white);
}
.md-typeset .md-button--primary {
  background-color: var(--si-blue);
  color: var(--si-white);
}
.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus-visible {
  background-color: var(--si-ink);
  border-color: var(--si-ink);
  color: var(--si-white);
}

/* --- Footer: paper, hairlines, small grey text --------------------------- */
.md-footer {
  border-top: 1px solid var(--si-rule);
}
.md-footer-meta {
  border-top: 1px solid var(--si-rule);
}
.md-footer__title {
  font-family: var(--si-serif);
  font-weight: 600;
}
.md-copyright {
  font-size: 0.7rem;
}
.md-copyright a {
  color: var(--si-ink);
}

/* --- Home ---------------------------------------------------------------- */
/* Hero: headline left, services, lead and booking right */
.md-typeset .si-hero {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1.6rem, 6vw, 4rem) 0 clamp(2.4rem, 6vw, 4.4rem);
}
.md-typeset .si-hero h1 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(1.85rem, 1.2rem + 3.4vw, 2.9rem);
  font-weight: 400;
  line-height: 1.08;
}
.si-hero__side {
  display: grid;
  gap: 1.2rem;
  justify-items: start;
}
.md-typeset .si-hero__side > p {
  margin: 0;
}
.md-typeset .si-hero__services {
  max-width: none;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.5;
}
.si-hero__services > span {
  white-space: nowrap;
}
.si-sep {
  padding-left: 0.2em;
  color: var(--si-red);
}
.md-typeset .si-hero__lead {
  max-width: 36em;
  color: var(--si-ink-2);
  font-size: clamp(0.85rem, 1.6vw, 0.9rem);
  line-height: 1.6;
}
.md-typeset .si-hero .md-button {
  margin: 0.2rem 0 0;
  padding: 0.85em 1.4em;
  font-size: 0.75rem;
}
/* Desktop: the headline column is as wide as its longest word, so the gap
   between headline and side text is the grid gap, not leftover column space */
@media screen and (min-width: 56.25em) {
  .md-typeset .si-hero {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 3.6rem;
  }
  .md-typeset .si-hero h1 {
    width: min-content;
  }
}

/* Sections: margin heading left, content right; a hairline across the page above each */
.md-typeset .si-sec {
  display: grid;
  gap: 1.4rem;
  padding: clamp(2.4rem, 7vw, 5.2rem) 0;
  border-top: 1px solid var(--si-rule);
  border-image: linear-gradient(var(--si-rule), var(--si-rule)) 1 / 1px 0 0 / 0 100vmax;
}
.md-typeset .si-sec h2 {
  margin: 0;
  font-size: clamp(1.28rem, 3vw, 1.8rem);
  line-height: 1.15;
}
@media screen and (min-width: 56.25em) {
  .md-typeset .si-sec {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
    gap: 2.8rem;
  }
  .si-sec__side {
    position: sticky;
    top: calc(var(--si-header) + 1.6rem);
    align-self: start;
  }
}

/* Demo: screenshot and text side by side */
.si-demo-card {
  display: grid;
  gap: 1.4rem;
  align-items: center;
  min-width: 0;
}
.md-typeset .si-demo-card__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--si-rule);
  border-radius: 8px;
  background: var(--si-white);
}
.si-demo-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.si-demo-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.6rem;
  font-family: var(--si-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.si-demo-card__lang {
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--si-rule);
  border-radius: 4px;
  color: var(--si-ink-2);
  font-family: var(--md-text-font-family);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0;
}
.si-demo-card__text {
  max-width: 46ch;
  color: var(--si-ink-2);
}
.si-demo-card__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.2rem;
  margin-top: 0.6rem;
}
.md-typeset .si-demo-card__links .md-button {
  margin: 0;
}
.md-typeset a.si-demo-card__more {
  font-weight: 500;
}
@media screen and (min-width: 43.75em) {
  .si-demo-card {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

/* Services: a ruled list; each row links to its section */
.md-typeset .si-svc > ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: none;
}
.md-typeset .si-svc > ul > li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1.2rem;
  margin: 0;
  padding: 1.1rem 0.2rem;
  border-top: 1px solid var(--si-rule);
}
.md-typeset .si-svc > ul > li:last-child {
  border-bottom: 1px solid var(--si-rule);
}
.md-typeset .si-svc h3 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.2;
}
.md-typeset .si-svc li > p {
  grid-column: 1;
  margin: 0;
  max-width: 52ch;
  color: var(--si-ink-2);
}
.md-typeset .si-svc li > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  white-space: nowrap;
}
.md-typeset .si-svc li > p:last-child a {
  font-weight: 500;
  text-decoration: none;
}
.md-typeset .si-svc li > p:last-child a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.md-typeset .si-svc li > p:last-child a:focus-visible {
  outline: none;
}
.md-typeset .si-svc li:has(a:focus-visible) {
  outline: 2px solid var(--si-blue);
  outline-offset: 2px;
}
.md-typeset .si-svc li:hover h3 {
  color: var(--si-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
@media screen and (min-width: 43.75em) {
  .md-typeset .si-svc > ul > li {
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) auto;
    gap: 0.3rem 2rem;
    align-items: baseline;
  }
  .md-typeset .si-svc li > p:first-of-type {
    grid-column: 2;
    grid-row: 1;
  }
  .md-typeset .si-svc li > p:last-child {
    grid-column: 3;
    grid-row: 1;
    align-self: baseline;
  }
}

/* Clients: a ruled list, logo and what the work covers */
.si-case {
  display: grid;
  gap: 0.6rem 2rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--si-rule);
}
.si-case:last-child {
  border-bottom: 1px solid var(--si-rule);
}
.md-typeset .si-case__logo img {
  display: block;
  height: 1.5rem;
  width: auto;
}
.md-typeset .si-case p {
  margin: 0;
  max-width: 56ch;
  color: var(--si-ink-2);
}
@media screen and (min-width: 43.75em) {
  .si-case {
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
    align-items: center;
  }
}

/* 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%;
}
/* On the home page: serif text, smaller photo */
.md-typeset .si-sec .si-about {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) 8rem;
  margin: 0;
}
.md-typeset .si-sec .si-about > div > p:first-child {
  max-width: 40ch;
  font-family: var(--si-serif);
  font-size: clamp(0.92rem, 1.8vw, 1.08rem);
  line-height: 1.55;
}
.md-typeset .si-sec .si-about > div > p:last-child {
  margin-top: 0.8rem;
  font-weight: 500;
}
.md-typeset .si-sec .si-about__photo {
  width: 8rem;
}

/* Quote: a white band */
.md-typeset .si-quote {
  padding: clamp(3.2rem, 10vw, 6.4rem) 0;
  background: var(--si-white);
  box-shadow: 0 0 0 100vmax var(--si-white);
  clip-path: inset(0 -100vmax);
}
.md-typeset .si-quote blockquote {
  max-width: 40em;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--si-ink);
}
.md-typeset .si-quote blockquote::before {
  content: "";
  display: block;
  width: 2.8rem;
  height: 3px;
  margin-bottom: 1.4rem;
  background: var(--si-red);
}
.md-typeset .si-quote blockquote > p:first-child {
  max-width: none;
  margin: 0;
  font-family: var(--si-serif);
  font-size: clamp(1.04rem, 2.2vw, 1.4rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.md-typeset .si-quote__by {
  margin: 1.4rem 0 0;
  color: var(--si-ink-2);
}
.md-typeset .si-quote__by strong {
  color: var(--si-ink);
}

/* FAQ: clean accordion — no boxes or icons, hairlines, +/− marker */
.md-typeset .si-faq {
  max-width: none;
}
.md-typeset .si-faq details.question {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--si-rule);
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 0.85rem;
}
.md-typeset .si-faq details.question:last-child {
  border-bottom: 1px solid var(--si-rule);
}
.md-typeset .si-faq details.question > summary {
  margin: 0;
  padding: 1rem 2rem 1rem 0.2rem;
  background: none;
  border-radius: 0;
  color: var(--si-ink);
  font-family: var(--si-serif);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}
.md-typeset .si-faq details.question > summary::before {
  display: none;
}
.md-typeset .si-faq details.question > summary::after {
  top: 50%;
  right: 0.2rem;
  width: auto;
  height: auto;
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
  transform: translateY(-50%);
  content: "+";
  content: "+" / "";
  color: var(--si-blue);
  font-family: var(--md-code-font-family);
  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 {
  color: var(--si-blue);
}
.md-typeset .si-faq details.question > p {
  max-width: 60ch;
  margin: 0 0 1.1rem;
  padding: 0 2rem 0 0.2rem;
  color: var(--si-ink-2);
}

/* Booking: a blue band that closes the page */
.md-typeset .si-cta {
  display: grid;
  gap: 1.2rem;
  padding: clamp(3.2rem, 9vw, 6rem) 0;
  background: var(--si-blue);
  box-shadow: 0 0 0 100vmax var(--si-blue);
  clip-path: inset(0 -100vmax);
  color: var(--si-white);
}
.md-typeset .si-cta h2 {
  margin: 0;
  color: var(--si-white);
  font-size: clamp(1.6rem, 5vw, 2.88rem);
  line-height: 1.05;
}
.md-typeset .si-cta p {
  max-width: 44ch;
  margin: 0 0 1.2rem;
  color: var(--si-band-text);
  font-size: 0.9rem;
}
.md-typeset .si-cta .md-button--primary {
  margin: 0;
  background: var(--si-white);
  border-color: var(--si-white);
  color: var(--si-blue);
}
.md-typeset .si-cta .md-button--primary:hover,
.md-typeset .si-cta .md-button--primary:focus-visible {
  background: var(--si-paper);
  border-color: var(--si-paper);
  color: var(--si-ink);
}
.md-typeset .si-cta :focus-visible {
  outline-color: var(--si-white);
}
@media screen and (min-width: 56.25em) {
  .md-typeset .si-cta {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
    gap: 2.8rem;
  }
}
/* The band meets the footer */
.md-content__inner:has(> .si-cta:last-child) {
  margin-bottom: 0;
}

/* Blog: demo recording and its "try it" link, framed as one block */
.md-typeset figure.si-watch {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 3rem 0 0;
  border: 1px solid var(--si-rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--si-white);
}
.md-typeset .si-watch video {
  display: block;
  width: 100%;
  height: auto;
}
.md-typeset .si-watch figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: none;
  margin: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--si-rule);
  background: var(--si-paper);
  font-style: normal;
  text-align: left;
}
.md-typeset .si-watch figcaption p {
  margin: 0;
  color: var(--si-ink-2);
  font-size: 0.75rem;
  line-height: 1.5;
}
.md-typeset .si-watch .md-button {
  flex: none;
  margin: 0;
}
@media screen and (max-width: 600px) {
  .md-typeset figure.si-watch {
    margin-top: 2rem;
  }
  .md-typeset .si-watch figcaption {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 1rem 1rem;
  }
}

@media screen and (max-width: 768px) {
  .si-about {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .md-typeset .si-sec .si-about {
    grid-template-columns: 1fr;
  }
  .si-about__photo {
    width: 9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Footnotes: no back-links to the text */
.md-typeset .footnote-backref {
  display: none;
}
