/* Preview only: typography, section rhythm and an uninterrupted video backdrop. */
html[data-preview-layout]:not([data-preview-palette]) {
  --p-bg: #101d2d; --p-alt: #17273a; --p-panel: #1c2c40; --p-text: #eff5fa;
  --p-muted: #c0cdda; --p-accent: #72c9ed; --p-on-accent: #101d2d;
  --p-media-accent: #72c9ed; --p-line: #c0cdda40;
}
html[data-preview-layout] [hidden] { display: none !important; }
html[data-preview-layout] :is(.bg-floorplan, .bg-pipes) { display: none; }
html[data-preview-layout] :is(.hero__water-bg, .water-bg) {
  display: block; position: fixed; inset: 72px 0 0; z-index: 0;
  pointer-events: none; overflow: hidden; background-color: #191d20;
}
html[data-preview-layout] :is(.hero__water-video, .water-bg video) {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform: none; filter: none; opacity: 1;
}
html[data-preview-layout] .hero__water-bg::before,
html[data-preview-layout] .water-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #101619dc, #10161988 48%, #10161938);
}
html[data-preview-layout] .hero__water-bg::after { display: none; }
html[data-preview-layout] #hero { position: relative; z-index: 1; overflow: visible; background: transparent; }
html[data-preview-layout] .hero__video-toggle {
  position: fixed; z-index: 100; bottom: 12px; right: 16px;
  background: #191d20dc; color: #f1eee8; backdrop-filter: none;
  padding: 9px 13px; border: 1px solid #ffffff40; border-radius: 999px;
  font: 500 12px system-ui, sans-serif; cursor: pointer;
}
html[data-preview-layout] section:not(.hero),
html[data-preview-layout] section:not(.hero):nth-of-type(odd),
html[data-preview-layout] :is(#programvare, #blogg, #tjenester, #ansatte, #erfaring, #kontakt) {
  position: relative; z-index: 1; border: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--p-bg) 92%, transparent), color-mix(in srgb, var(--p-bg) 74%, transparent));
}
html[data-preview-layout] .footer { position: relative; z-index: 1; background: color-mix(in srgb, var(--p-bg) 90%, transparent); }
/* Let the moving pipe scene remain visible behind the product introduction. */
html[data-preview-layout] section#programvare {
  background: transparent !important;
  backdrop-filter: none;
}
html[data-preview-layout] #programvare :is(.section__title, .section__desc, .section__label) {
  color: #f1eee8;
  text-shadow: 0 1px 3px #000, 0 2px 12px #000b !important;
}
html[data-preview-layout] #programvare .btn--secondary { color: #f1eee8; border-color: #ffffff80; }
html[data-preview-layout] .reveal { opacity: 1; transform: none; transition: none; }
html[data-preview-layout] section { scroll-margin-top: 84px; }
html[data-preview-layout] .page { background: color-mix(in srgb, var(--p-bg) 84%, transparent); padding: 40px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) { --preview-width: 1180px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .nav__inner,
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .section__inner,
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .hero__inner {
  width: min(var(--preview-width), calc(100% - 80px)); max-width: var(--preview-width); margin-inline: auto;
}
html:where([data-preview-layout]):not([data-preview-layout="classic"]) #hero {
  min-height: 0; height: auto; display: block; padding: 124px 0 42px;
}
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .hero__inner { transform: none; min-height: 0; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .hero__scroll { display: none; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .hero__subtitle--support {
  font-size: 17px; line-height: 1.65; max-width: 580px; margin-top: 24px; margin-bottom: 24px;
  font-weight: 400; text-shadow: none;
}
.preview-headline { font: 600 clamp(44px, 5.7vw, 80px)/1.04 var(--font-sans); letter-spacing: -.045em; color: var(--p-media-accent); max-width: 700px; margin: 0; text-wrap: balance; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) section:not(.hero) { padding: 52px 0; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) section .section__inner > .reveal:first-child {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 60px; row-gap: 14px;
  max-width: none; text-align: left; align-items: start; margin: 0 0 18px; padding: 24px 0 0; border-top: 1px solid var(--p-line);
}
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .section__label {
  grid-column: 1 / -1; justify-content: flex-start; margin: 0; font-size: 11px; letter-spacing: .15em;
}
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .section__label::before { display: none; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .section__title {
  font-size: clamp(28px, 3.2vw, 43px); line-height: 1.12; font-weight: 500; margin: 0; max-width: 600px;
}
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .section__desc {
  font-size: 15px; line-height: 1.7; margin: 0; max-width: 540px;
}
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .section__actions { grid-column: 2; justify-content: flex-start; margin: 0; }
html[data-preview-layout] section .section__inner > .reveal:first-child :is(.section__title, .section__desc, .section__label) { margin-inline: 0; justify-content: flex-start; text-align: left; }
html[data-preview-layout]:not([data-preview-layout="classic"]) .section__inner > .reveal:first-child .section__title { grid-row: 2 / 4; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .btn { min-height: 44px; padding: 11px 22px; border-radius: 6px; font-size: 14px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .carousel-card { border-radius: 10px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .carousel-card__body { padding: 24px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .blog-more { text-align: right; margin-top: 0; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .services__grid { width: 100%; max-width: none; margin-top: 32px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .employee-card { border-radius: 8px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) :is(.stat-card, .contact-info__card, .contact-form, .timeline__item) { border-radius: 6px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .about__stats { gap: 1px; }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .stat-card { background: transparent; border: 0; border-top: 1px solid var(--p-line); }
html:where([data-preview-layout]):not([data-preview-layout="classic"]) .timeline__item { background: color-mix(in srgb, var(--p-panel) 72%, transparent); }
/* 01 — Fagstudio: left-aligned type and numbered, open service rows. */
html[data-preview-layout="studio"] .hero__inner { text-align: left; align-items: flex-start; }
html[data-preview-layout="studio"] .hero__subtitle--support { margin-left: 0; }
html[data-preview-layout="studio"] .hero__actions { justify-content: flex-start; }
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .services__grid { display: block; counter-reset: services; }
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) :is(.service-card, .service-card:hover) {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px 24px;
  padding: 26px 0; min-height: 0; border: 0; border-top: 1px solid var(--p-line); border-radius: 0;
  background: transparent; box-shadow: none; transform: none; align-items: start;
}
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .service-card::before {
  display: block; position: static; content: counter(services, decimal-leading-zero); counter-increment: services;
  background: none; font-size: 13px; color: var(--p-accent); width: auto; height: auto; opacity: 1;
  transform: none; transition: none;
}
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .service-card__icon { display: none; }
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .service-card__title { color: var(--p-text); font-size: 21px; font-weight: 500; margin: 0; }
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .service-card__desc { color: var(--p-muted); margin: 0; font-size: 14px; }
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .service-card__link { grid-column: 3; color: var(--p-accent); }
html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .service-card:hover .service-card__title { color: var(--p-accent); }
/* 02 — Produktgalleri: compact editorial hero and product images immediately below. */
html[data-preview-layout="gallery"] #hero { padding: 112px 0 32px; }
html[data-preview-layout="gallery"] .preview-headline { margin-inline: auto; max-width: 780px; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; color: #f1eee8; }
html[data-preview-layout="gallery"] .hero__subtitle--support { margin-top: 16px; margin-bottom: 20px; }
html[data-preview-layout="gallery"] #programvare { padding-top: 0; }
html[data-preview-layout="gallery"] #programvare .section__inner > .reveal:first-child {
  grid-template-columns: 1fr auto; gap: 10px 32px; align-items: center; padding-top: 18px;
}
html[data-preview-layout="gallery"] #programvare .section__label { grid-column: 1; }
html[data-preview-layout="gallery"] #programvare .section__title { grid-column: 1; font-size: 24px; }
html[data-preview-layout="gallery"] #programvare .section__inner > .reveal:first-child .section__title { grid-row: auto; }
html[data-preview-layout="gallery"] #programvare .section__desc { grid-column: 1; max-width: 720px; font-size: 14px; }
html[data-preview-layout="gallery"] #programvare .section__actions { grid-column: 2; grid-row: 1 / 4; }
html[data-preview-layout="gallery"] .section__title { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
html[data-preview-layout="gallery"] .btn { border-radius: 40px; }
html[data-preview-layout="gallery"] .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-preview-layout="gallery"] .service-card { grid-column: auto; grid-row: auto; min-height: 340px; padding: 24px; border-radius: 8px; }
html[data-preview-layout="gallery"] .service-card__title { font-size: 24px; }
html[data-preview-layout="gallery"] .service-card__desc { font-size: 14px; }
/* 03 — Fagpersonen: masthead, human introduction and references first. */
html[data-preview-layout="personal"] #hero { padding-bottom: 0; }
html[data-preview-layout="personal"] .hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px 56px; text-align: left; align-items: start; }
html[data-preview-layout="personal"] #hero .hero__title { grid-column: 1; grid-row: 1 / 4; margin: 0; font-size: clamp(64px, 8.8vw, 128px); line-height: .95; color: var(--p-media-accent); }
html[data-preview-layout="personal"] .hero__subtitle--tagline { grid-column: 2; font-size: 30px; line-height: 1.18; margin: 0; color: #f1eee8 !important; }
html[data-preview-layout="personal"] .hero__subtitle--support { grid-column: 2; margin: 0; font-size: 15px; }
html[data-preview-layout="personal"] .hero__actions { grid-column: 2; justify-content: flex-start; margin-top: 8px; }
.preview-profile { display: flex; align-items: center; gap: 20px; width: min(1180px, calc(100% - 80px)); margin: 52px auto 0; padding: 22px 0; border-top: 1px solid #ffffff50; color: #f1eee8; text-decoration: none; }
.preview-profile img { width: 70px; height: 78px; object-fit: cover; border-radius: 4px; }
.preview-profile strong { display: block; font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.preview-profile span span { font-size: 13px; }
.preview-profile__link { margin-left: auto; font-size: 14px; color: var(--p-media-accent); }
html[data-preview-layout="personal"] #blogg { padding-top: 24px; }
html[data-preview-layout="personal"] .carousel-card { border-radius: 4px; }
html[data-preview-layout="personal"] .employee-card { grid-template-columns: 280px 1fr; }
@media(max-width: 900px) {
  html[data-preview-layout="personal"] .hero__inner { gap: 16px 24px; }
  html[data-preview-layout="gallery"] .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-preview-layout="gallery"] #programvare .section__actions { grid-column: 1; grid-row: auto; }
}
@media(max-width: 760px) {
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) :is(.nav__inner, .section__inner, .hero__inner), .preview-profile { width: calc(100% - 40px); }
  html[data-preview-layout] :is(.hero__water-video, .water-bg video) { object-position: 88% center; }
  html[data-preview-layout] .hero__water-bg::before,
  html[data-preview-layout] .water-bg::after { background: #10161985; }
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) #hero { padding: 112px 0 36px; }
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) section:not(.hero) { padding: 32px 0; }
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) section .section__inner > .reveal:first-child { grid-template-columns: 1fr; gap: 12px; padding-top: 20px; }
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) .section__actions { grid-column: 1; flex-wrap: wrap; }
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) .hero__subtitle--support { font-size: 15px; }
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) .hero__actions { flex-direction: row; flex-wrap: wrap; }
  html:where([data-preview-layout]):not([data-preview-layout="classic"]) .btn { width: auto; }
  html[data-preview-layout] #hero .hero__actions .btn { width: auto; flex: 0 1 auto; }
  html[data-preview-layout]:not([data-preview-layout="classic"]) .section__inner > .reveal:first-child .section__title { grid-row: auto; }
  .preview-headline { font-size: clamp(40px, 9.5vw, 64px); }
  html[data-preview-layout="gallery"] #hero { padding-top: 104px; padding-bottom: 22px; }
  html[data-preview-layout="gallery"] #programvare { padding-top: 0; }
  html[data-preview-layout="gallery"] #programvare .section__inner > .reveal:first-child { grid-template-columns: 1fr; }
  html[data-preview-layout="gallery"] .services__grid { grid-template-columns: 1fr; }
  html[data-preview-layout="gallery"] .service-card { min-height: 300px; }
  html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) .service-card { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
  html:is([data-preview-layout="studio"], [data-preview-layout="personal"]) :is(.service-card__desc, .service-card__link) { grid-column: 2; }
  html[data-preview-layout="personal"] .hero__inner { display: block; }
  html[data-preview-layout="personal"] #hero .hero__title { font-size: clamp(68px, 18vw, 110px); margin: 0 0 24px; }
  html[data-preview-layout="personal"] .hero__subtitle--tagline { font-size: 27px; margin-bottom: 14px; }
  html[data-preview-layout="personal"] .hero__actions { margin-top: 22px; }
  .preview-profile { margin-top: 28px; gap: 14px; flex-wrap: wrap; }
  .preview-profile img { width: 54px; height: 64px; }
  .preview-profile > span:nth-child(2) { flex: 1; }
  .preview-profile__link { width: 100%; margin-left: 68px; }
  html[data-preview-layout="personal"] .employee-card { grid-template-columns: 1fr; }
  html[data-preview-layout] .page { padding: 24px 20px; }
}

/* New comparison compositions. Existing layouts remain available unchanged. */
/* Keep card geometry stable when scrolling stops under the pointer. */
html[data-preview-layout] :is(.service-card,.software-card,.stat-card,.blog-card,.timeline__item,.employee-card,.employee-panel,.about__photo,.btn):hover {
  transform:none;
}
html[data-preview-layout] #erfaring .timeline__item:hover { transform:none; }
html[data-preview-layout] .carousel-card__text,
html[data-preview-layout] .carousel-card[data-active="true"]:is(:hover,:focus-within) .carousel-card__text {
  opacity:1; max-height:none; transition:none;
}
html[data-preview-layout] :is(.carousel-card,.blog-carousel .carousel-card) {
  transition:transform .18s ease-out,opacity .18s ease-out;
}
html[data-preview-layout] .card-carousel[data-dragging="true"] .carousel-card { transition:none; }
@media(prefers-reduced-motion:reduce) {
  html[data-preview-layout] :is(.carousel-card,.blog-carousel .carousel-card) { transition:none; }
}
html[data-preview-arrangement] #hero { padding:104px 0 28px; }
html[data-preview-arrangement] .preview-headline { font-size:clamp(40px,4.8vw,66px); line-height:1.08; letter-spacing:-.035em; }
html[data-preview-arrangement] .hero__subtitle--support { color:#f1eee8; text-shadow:0 2px 10px #000; font-size:16px; line-height:1.6; }
html[data-preview-arrangement] .hero__inner::before { display:none; }
html[data-preview-arrangement] section:not(.hero) { padding:64px 0; }
html[data-preview-arrangement] #hero + section { padding-top:0; }
html[data-preview-arrangement] .section__inner > .reveal:first-child { margin-bottom:24px; }
html[data-preview-arrangement] :is(.carousel-card,.blog-carousel .carousel-card) { border-radius:12px; border-color:#ffffff30; }
html[data-preview-arrangement] .carousel-card[data-active="true"] { border-color:var(--p-accent); box-shadow:0 22px 45px -18px #000b; }
html[data-preview-arrangement] .card-carousel__arrow { background:color-mix(in srgb,var(--p-bg) 94%,transparent); border-color:#ffffff50; }
html[data-preview-arrangement] .btn { border-radius:8px; }
html[data-preview-arrangement] .service-card { min-height:240px; border-radius:12px; }
html[data-preview-arrangement] .service-card__title { font-size:22px; }
html[data-preview-arrangement] .service-card__desc { line-height:1.65; }
html[data-preview-arrangement] .section__title { text-wrap:balance; }
html[data-preview-arrangement] .employee-card { border-radius:12px; }
/* A / C: open the right side of the introduction for the pipe. */
html:is([data-preview-arrangement="products"],[data-preview-arrangement="services"]) .hero__inner { text-align:left; align-items:flex-start; }
html:is([data-preview-arrangement="products"],[data-preview-arrangement="services"]) .preview-headline { max-width:660px; margin-left:0; }
html:is([data-preview-arrangement="products"],[data-preview-arrangement="services"]) .hero__subtitle--support { margin-left:0; max-width:530px; }
html:is([data-preview-arrangement="products"],[data-preview-arrangement="services"]) .hero__actions { justify-content:flex-start; }
/* B: project images form the first large visual element. */
html[data-preview-arrangement="references"] #hero { padding-bottom:36px; }
html[data-preview-arrangement="references"] .preview-headline { max-width:820px; }
html[data-preview-arrangement="references"] #blogg .section__inner > .reveal:first-child { grid-template-columns:1fr 1fr; }
html[data-preview-arrangement="references"] #blogg .section__title { font-size:32px; }
/* C: scan the service offer without six oversized boxes. */
html[data-preview-arrangement="services"] #tjenester .services__grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:20px; }
html[data-preview-arrangement="services"] #tjenester .service-card { min-height:220px; padding:22px; }
html[data-preview-arrangement="services"] #tjenester .service-card__icon { display:none; }
html[data-preview-arrangement="services"] #tjenester .section__title { font-size:30px; }
@media(min-width:1100px) {
  html[data-preview-arrangement="products"] #programvare .section__inner { width:min(var(--preview-width),calc(100% - 80px)); max-width:var(--preview-width); margin-inline:auto; }
  html[data-preview-arrangement="products"] #programvare .section__actions { grid-column:1; grid-row:auto; }
  html[data-preview-arrangement="products"] #programvare .section__inner > .reveal:first-child { grid-template-columns:1fr; gap:8px; margin-bottom:0; }
  html[data-preview-arrangement="products"] #programvare .card-carousel { max-width:none; }
  html[data-preview-arrangement="products"] #programvare .card-carousel__stage { height:580px; }
  html[data-preview-arrangement="products"] #programvare .carousel-card { height:500px; }
  html[data-preview-arrangement="products"] #programvare .card-carousel__arrow { top:260px; }
}
@media(max-width:900px) {
  html[data-preview-arrangement="services"] #tjenester .services__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
  html[data-preview-arrangement] #hero { padding:100px 0 24px; }
  html[data-preview-arrangement] .preview-headline { font-size:clamp(37px,9.5vw,54px); }
  html[data-preview-arrangement] section:not(.hero) { padding:36px 0; }
  html[data-preview-arrangement] #hero + section { padding-top:0; }
  html[data-preview-arrangement] .hero__subtitle--support { font-size:15px; }
  html[data-preview-arrangement="references"] #blogg .section__inner > .reveal:first-child { grid-template-columns:1fr; }
  html[data-preview-arrangement="services"] #tjenester .services__grid { grid-template-columns:1fr; }
  html[data-preview-arrangement="services"] #tjenester .service-card { min-height:210px; }
}
/* Products share the heading hierarchy and center line of the other sections. */
html[data-preview-arrangement="products"] #programvare .section__inner > .reveal:first-child {
  grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:14px 60px; margin-bottom:24px;
}
html[data-preview-arrangement="products"] #programvare .section__title {
  font:400 clamp(28px,3.2vw,43px)/1.12 Georgia,'Times New Roman',serif;
  grid-column:1; grid-row:2 / 4;
}
html[data-preview-arrangement="products"] #programvare .section__desc {grid-column:2;grid-row:2;font-size:15px;line-height:1.7;}
html[data-preview-arrangement="products"] #programvare .section__actions {grid-column:2;grid-row:3;}
@media(max-width:760px){
 html[data-preview-arrangement="products"] #programvare .section__inner > .reveal:first-child {grid-template-columns:1fr;gap:12px;}
 html[data-preview-arrangement="products"] #programvare :is(.section__title,.section__desc,.section__actions){grid-column:1;grid-row:auto;}
}
