/* BEHAB – Bockara Entreprenad & Handel AB */

:root {
	--paper: #eeece6;
	--paper-2: #dfdcd2;
	--ink: #1a1a18;
	--muted: #5f5c55;
	--rule: #cbc7ba;
	--yellow: #f5b800;
	--yellow-hi: #ffcd2e;
	--on-dark: #d8d5cb;

	--font: "Barlow", "Helvetica Neue", Arial, sans-serif;
	--display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--gutter: clamp(20px, 4vw, 48px);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 88px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.125rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img {
	display: block;
	max-width: 100%;
}

picture {
	display: contents;
}

figure,
blockquote,
dl,
dd,
ul,
h1,
h2,
h3,
p {
	margin: 0;
}

ul {
	padding: 0;
	list-style: none;
}

a {
	color: inherit;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

h1,
h2,
h3 {
	font-family: var(--display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.005em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(3rem, 8.2vw, 7.25rem);
	line-height: 0.92;
}

.h1__lead {
	display: block;
	margin-bottom: 18px;
	color: var(--yellow);
	font-size: clamp(1rem, 1.5vw, 1.25rem);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.25;
}

h2 {
	font-size: clamp(2.4rem, 4.8vw, 4.25rem);
	line-height: 0.96;
}

h3 {
	font-size: 1.75rem;
	line-height: 1;
}

.wrap {
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: clamp(72px, 10vw, 136px);
}

.section__head {
	position: relative;
	margin-bottom: clamp(32px, 5vw, 56px);
	padding-top: 26px;
}

.section__head::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: var(--ink);
	transform-origin: left;
}

.kicker {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	font-family: var(--display);
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.kicker::before {
	content: "";
	width: 14px;
	height: 14px;
	background: var(--yellow);
}

.lead {
	font-size: clamp(1.15rem, 1.6vw, 1.35rem);
	line-height: 1.5;
	max-width: 34em;
}

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 16px;
	z-index: 100;
	padding: 10px 14px;
	background: var(--ink);
	color: var(--paper);
}

/* Knappar och länkar */

.btn {
	display: inline-block;
	padding: 13px 24px 14px;
	background: var(--yellow);
	color: var(--ink);
	font-family: var(--display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.1;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.15s;
}

.btn:hover {
	background: var(--yellow-hi);
}

.link {
	font-family: var(--display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: underline;
	text-decoration-color: var(--yellow);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.3em;
}

.link:hover {
	text-decoration-color: currentColor;
}

/* Logga – originalets ordbild, färgas av textfärgen */

.logo {
	display: block;
	width: 118px;
	aspect-ratio: 183.2 / 34.1;
	background: currentColor;
	-webkit-mask: url(../images/behab-logo.svg) no-repeat center / contain;
	mask: url(../images/behab-logo.svg) no-repeat center / contain;
}

/* Sidhuvud */

.header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--ink);
	color: #fff;
}

.header :focus-visible,
.hero :focus-visible,
.footer :focus-visible {
	outline-color: var(--yellow);
}

.header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 72px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
}

.brand__sub {
	padding-left: 16px;
	border-left: 1px solid #45443f;
	color: #a9a69d;
	font-size: 0.9rem;
	line-height: 1.25;
}

.nav {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2.4vw, 32px);
}

.nav a:not(.btn) {
	font-family: var(--display);
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.nav a:not(.btn):hover {
	color: var(--yellow);
}

.nav .btn {
	padding: 9px 18px 10px;
	font-size: 1.1rem;
}

.burger {
	display: none;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.burger span,
.burger span::before,
.burger span::after {
	display: block;
	width: 24px;
	height: 2px;
	margin-inline: auto;
	background: currentColor;
	transition: transform 0.2s;
}

.burger span {
	position: relative;
}

.burger span::before,
.burger span::after {
	content: "";
	position: absolute;
	left: 0;
}

.burger span::before {
	top: -7px;
}

.burger span::after {
	top: 7px;
}

.is-open .burger span {
	background: transparent;
}

.is-open .burger span::before {
	transform: translateY(7px) rotate(45deg);
}

.is-open .burger span::after {
	transform: translateY(-7px) rotate(-45deg);
}

/* Start */

.hero {
	padding-block: clamp(40px, 6vw, 88px) clamp(40px, 6vw, 88px);
	background: var(--ink);
	color: #fff;	position: relative;
	overflow: hidden;
}

/* Svaga höjdkurvor som sakta rör sig bakom rubriken – ritas av skriptet */
.hero__terrain {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 92%);
	mask-image: linear-gradient(to bottom, #000 40%, transparent 92%);
}

.hero > .wrap {
	position: relative;
}

.hero__head {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	gap: clamp(24px, 6vw, 96px);
	align-items: end;
}

.hero__quote {
	font-size: clamp(1.15rem, 1.6vw, 1.35rem);
	font-style: italic;
	line-height: 1.45;
	color: var(--on-dark);
}

.hero__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin-top: 28px;
}

.hero__photo {
	margin-top: clamp(32px, 5vw, 64px);
	aspect-ratio: 21 / 9;
	overflow: hidden;
	background: #2a2a27;
}

.hero__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 34%;
}

.people {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: var(--yellow);
	color: var(--ink);
}

.people li {
	padding: 18px 24px 20px;
}

.people li + li {
	border-left: 2px solid var(--ink);
}

.people span {
	display: block;
	font-family: var(--display);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.people a {
	font-family: var(--display);
	font-size: clamp(1.6rem, 2.6vw, 2.2rem);
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	white-space: nowrap;
}

.people a:hover {
	text-decoration: underline;
}

.people p {
	font-weight: 500;
	line-height: 1.25;
	margin-top: 4px;
}

/* Om oss */

.about__grid {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: clamp(32px, 6vw, 96px);
	align-items: center;
}

.about__text h2 {
	margin-bottom: 24px;
}

.about__photo {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--paper-2);
}

.about__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.facts {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-top: clamp(8px, 2vw, 24px);
	border: 3px solid var(--ink);
}

.facts div {
	padding: 14px 20px 16px;
}

.facts div + div {
	border-left: 3px solid var(--ink);
}

.facts dt {
	font-family: var(--display);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.facts dd {
	font-family: var(--display);
	font-size: clamp(3rem, 6.4vw, 5.75rem);
	font-weight: 700;
	line-height: 0.95;
}

/* Kvalitet */

.quality {
	padding-block: clamp(72px, 9vw, 128px);
	background: var(--yellow);
	color: var(--ink);
}

.quality blockquote {
	max-width: 17em;
	margin-bottom: 36px;
	font-family: var(--display);
	font-size: clamp(2.2rem, 5.4vw, 4.75rem);
	font-weight: 700;
	line-height: 0.96;
	text-transform: uppercase;
	text-wrap: balance;
}

.quality .link {
	text-decoration-color: var(--ink);
}

/* Tjänster */

.feature {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	align-items: end;
	margin-bottom: clamp(40px, 5vw, 64px);
	background: var(--ink);
	color: #fff;
}

.feature > div {
	padding: clamp(24px, 3.4vw, 44px);
	border-left: 8px solid var(--yellow);
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.feature figure {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--paper-2);
}

.feature img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.feature h3 {
	margin-bottom: 14px;
	font-size: clamp(2.6rem, 4.8vw, 4.25rem);
	line-height: 0.95;
}

.feature p {
	color: var(--on-dark);
	line-height: 1.5;
}

.services__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(36px, 4vw, 56px) clamp(20px, 3vw, 40px);
}

.svc {
	padding-bottom: 20px;
	border-bottom: 3px solid var(--ink);
}

.svc figure {
	aspect-ratio: 4 / 3;
	margin-bottom: 18px;
	overflow: hidden;
	background: var(--paper-2);
}

.svc img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.svc h3 {
	margin-bottom: 8px;
}

.svc p,
.other p {
	color: #3b3934;
}

.other {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 120px;
	gap: clamp(20px, 3vw, 40px);
	align-items: center;
	margin-top: clamp(40px, 5vw, 64px);
	padding: 20px clamp(20px, 3vw, 40px);
	background: var(--paper-2);
}

.other figure {
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--paper-2);
}

.other img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Bilder */

.gallery {
	padding-top: 0;
}

.gallery__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.shot {
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--paper-2);
	cursor: zoom-in;
}

.shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shot--more {
	display: none;
}

.gallery.is-all .shot--more {
	display: block;
}

.gallery__more {
	display: block;
	margin: clamp(24px, 3vw, 40px) auto 0;
	border: 0;
	cursor: pointer;
}

.gallery.is-all .gallery__more {
	display: none;
}

.shot:hover img,
.svc:hover img {
	transform: scale(1.05);
}

.svc img {
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Samarbetspartners */

.partners {
	border-block: 4px solid var(--ink);
}

.partners__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 32px 64px;
	padding-block: clamp(40px, 5vw, 64px);
}

.partners h2 {
	font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.partners__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px 56px;
	font-size: 1.5rem;
	font-weight: 600;
}

.partners__logos img {
	width: auto;
	height: 44px;
	max-width: 220px;
	object-fit: contain;
}

/* Kontakt */

.contact__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 96px);
	align-items: start;
}

.contact__intro h2 {
	margin-bottom: 24px;
}

.contact__intro .lead + .lead {
	margin-top: 12px;
}

.contact__intro .btn {
	margin-top: 32px;
}

.contact__list {
	border-top: 4px solid var(--ink);
}

.contact__list > div {
	display: grid;
	grid-template-columns: 7.5em minmax(0, 1fr);
	gap: 16px;
	padding-block: 16px;
	border-bottom: 1px solid var(--rule);
}

.contact__list dt {
	padding-top: 3px;
	font-family: var(--display);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.contact__list dd {
	font-weight: 500;
	overflow-wrap: anywhere;
}

.contact__list span {
	color: var(--muted);
	font-weight: 400;
}

.map {
	margin-top: clamp(40px, 6vw, 80px);
	aspect-ratio: 21 / 9;
	min-height: 320px;
	width: 100%;
	background: var(--paper-2);
}

.map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Sidfot */

.footer {
	background: var(--ink);
	color: var(--on-dark);
	border-top: 8px solid var(--yellow);
}

.footer a {
	text-decoration: none;
}

.footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 40px clamp(32px, 6vw, 96px);
	padding-block: clamp(56px, 7vw, 88px);
}

.footer .logo {
	width: 150px;
	margin-bottom: 18px;
	color: #fff;
}

.footer p + p {
	margin-top: 16px;
}

.footer p a {
	text-decoration: underline;
}

.footer h3 {
	margin-bottom: 14px;
	color: var(--yellow);
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}

.footer li + li {
	margin-top: 6px;
}

.footer__bar {
	padding-block: 20px;
	border-top: 1px solid #3d3b37;
	color: #a19e96;
	font-size: 0.9rem;
}

/* Bildvisning */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(24, 23, 21, 0.95);
	color: #fff;
}

.lightbox.is-open {
	display: flex;
}

.lightbox figure {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 64px clamp(16px, 7vw, 96px);
}

.lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.lightbox button {
	position: absolute;
	z-index: 1;
	min-width: 48px;
	height: 48px;
	padding: 0 12px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.lightbox button:hover {
	text-decoration: underline;
}

.lightbox button:focus-visible {
	outline-color: #fff;
}

.lightbox__close {
	top: 8px;
	right: 12px;
}

.lightbox__prev,
.lightbox__next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.6rem;
}

.lightbox__prev {
	left: 8px;
}

.lightbox__next {
	right: 8px;
}

.lightbox__count {
	position: absolute;
	top: 20px;
	left: 24px;
	font-variant-numeric: tabular-nums;
}

/* Mindre skärmar */

@media (max-width: 960px) {
	.brand__sub {
		display: none;
	}

	.services__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gallery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.burger {
		display: block;
	}

	.nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px var(--gutter) 24px;
		background: var(--ink);
	}

	.is-open .nav {
		display: flex;
	}

	.nav a:not(.btn) {
		padding-block: 14px;
		border-bottom: 1px solid #3a3935;
		font-size: 1.4rem;
	}

	.nav .btn {
		margin-top: 20px;
		padding: 14px 18px;
		text-align: center;
	}

	.hero__head,
	.about__grid,
	.feature,
	.contact__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero__photo {
		aspect-ratio: 4 / 3;
		margin-inline: calc(var(--gutter) * -1);
	}

	.people,
	.facts {
		grid-template-columns: repeat(2, 1fr);
	}

	.people {
		margin-inline: calc(var(--gutter) * -1);
	}

	.people li,
	.people li + li {
		padding: 14px var(--gutter) 16px;
		border-left: 0;
	}

	.people li:nth-child(even) {
		border-left: 2px solid var(--ink);
		padding-left: 16px;
	}

	.people li:nth-child(n + 3) {
		border-top: 2px solid var(--ink);
	}

	.hero {
		padding-bottom: 0;
	}

	.facts div:nth-child(3) {
		border-left: 0;
	}

	.facts div:nth-child(n + 3) {
		border-top: 3px solid var(--ink);
	}

	.feature > div {
		border-left: 0;
		border-top: 8px solid var(--yellow);
	}

	.feature figure {
		aspect-ratio: 4 / 3;
	}

	.other {
		grid-template-columns: minmax(0, 1fr) 88px;
	}

	.other h3 {
		grid-column: 1 / -1;
		margin-bottom: -12px;
	}

	.gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.map {
		aspect-ratio: 4 / 3;
	}

	.footer__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 520px) {
	.services__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.contact__list > div {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}
}

/* Rörelse – läggs bara på när skriptet körs och användaren inte bett om mindre rörelse */

.rv {
	opacity: 0;
	transform: translateY(26px);
	transition:
		opacity 0.7s ease,
		transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
	transition-delay: var(--d, 0s);
}

.rv.in {
	opacity: 1;
	transform: none;
}

/* Sektionsrubrik: linjen dras ut från vänster, texten följer efter */
.section__head.rv {
	opacity: 1;
	transform: none;
}

.section__head.rv::before {
	transform: scaleX(0);
	transition: transform 0.9s cubic-bezier(0.6, 0, 0.2, 1);
}

.section__head.rv > * {
	opacity: 0;
	transform: translateY(18px);
	transition:
		opacity 0.6s ease 0.25s,
		transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s;
}

.section__head.rv.in::before,
.section__head.rv.in > * {
	opacity: 1;
	transform: none;
}

/* Bilder som dras upp som en lucka */
.about__photo.rv img,
.feature.rv figure {
	clip-path: inset(0 0 100% 0);
	transition: clip-path 1s cubic-bezier(0.6, 0, 0.2, 1);
}

.about__photo.rv {
	opacity: 1;
	transform: none;
	background: none;
}

.about__photo.rv.in img,
.feature.rv.in figure {
	clip-path: inset(0);
}

@media (prefers-reduced-motion: no-preference) {
	.hero h1 {
		animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}

	.hero__side {
		animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
	}

	.hero__photo {
		animation: shutter 1.1s cubic-bezier(0.6, 0, 0.2, 1) 0.25s both;
	}

	.hero__photo img {
		animation: settle 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both;
	}

	.people li {
		animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}

	.people li:nth-child(1) { animation-delay: 0.9s; }
	.people li:nth-child(2) { animation-delay: 0.98s; }
	.people li:nth-child(3) { animation-delay: 1.06s; }
	.people li:nth-child(4) { animation-delay: 1.14s; }

	.people {
		animation: shutter 0.7s cubic-bezier(0.6, 0, 0.2, 1) 0.7s both;
	}
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(28px);
	}
}

@keyframes shutter {
	from {
		clip-path: inset(0 0 100% 0);
	}

	to {
		clip-path: inset(0);
	}
}

@keyframes settle {
	from {
		transform: scale(1.12);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition: none !important;
	}
}
