/*
Theme Name: Thalamus
Theme URI: https://thalamus.se
Author: Thalamus
Description: Klassiskt tema för Thalamus IT Consulting AB, byggt på ACF.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: thalamus
*/

/* Typsnitt */
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/oswald-500.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/oswald-600.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/oswald-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/inter-600.woff2') format('woff2'); }


/* Bas */
*,
*::before,
*::after { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #FFFFFF; background: #111111; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p,
h1,
h2,
h3 { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(1120px, 90%); margin-inline: auto; }

a:focus-visible { outline: 3px solid #FFDE00; outline-offset: 4px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed !important;
	top: 16px;
	left: 16px;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 16px 24px;
	clip: auto;
	background: #111111;
	color: #FFFFFF;
	font-weight: 600;
}

/* Logotyp: märke och namn */
.lockup { display: flex; align-items: center; gap: 12px; }
.lockup__mark { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #FFDE00; }
.lockup__logo { display: block; width: auto; height: 40px; max-width: 100%; object-fit: contain; }
.lockup__name { font-family: 'Oswald', Inter, sans-serif; font-weight: 700; font-size: 32px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; }

/* Hero */
.hero { position: relative; display: flex; flex-wrap: wrap; min-height: 100vh; min-height: 100svh; background: #111111; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg:has(img)::after { content: ""; position: absolute; inset: 0; background: rgba(17, 17, 17, .5); }
.hero__bg--right { left: 47%; background: #383838; }
.hero__bg--left {
	right: 47%;
	background: #1C1C1C;
	-webkit-mask-image: linear-gradient(to right, #000 88.68%, transparent 100%);
	mask-image: linear-gradient(to right, #000 88.68%, transparent 100%);
}
.hero__inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; }
.hero__half { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 120px 32px; }
.hero__link { transition: opacity 200ms ease-out; }
.hero__link:hover,
.hero__link:focus-visible { opacity: .7; }
.hero__divider { position: absolute; z-index: 1; left: 50%; top: 50%; width: 1px; height: 160px; margin-top: -80px; background: rgba(255, 255, 255, .3); }

/* Hero när sidan laddas. Fill-mode backwards: startläget gäller under fördröjningen, och efteråt styr vanliga regler (t.ex. hover). */
.hero__link img,
.hero__link .lockup__mark,
.hero__link .lockup__name { animation: hero-rise 1150ms cubic-bezier(.33, 1, .68, 1) 450ms backwards; }
.hero__half + .hero__divider + .hero__half .hero__link img,
.hero__half + .hero__divider + .hero__half .hero__link .lockup__mark,
.hero__half + .hero__divider + .hero__half .hero__link .lockup__name { animation-delay: 600ms; }
.hero__divider { animation: hero-divider 1000ms cubic-bezier(.33, 1, .68, 1) 250ms backwards; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-divider { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Sektioner tonar in vid scroll. Klassen reveal sätts av assets/reveal.js, så utan JS syns allt direkt. */
.reveal { transition: opacity 1200ms cubic-bezier(.33, 1, .68, 1), transform 1200ms cubic-bezier(.33, 1, .68, 1); }
.reveal:not(.is-visible) { opacity: 0; transform: translateY(24px); }

/* Sektioner */
.section { padding-block: 128px; }
.section--surface { background: #1C1C1C; }
.section--black { background: #111111; }
.h2 { font-family: 'Oswald', Inter, sans-serif; font-weight: 500; text-transform: uppercase; font-size: 40px; line-height: 1.2; letter-spacing: -.01em; color: #FFFFFF; }
.body { font-size: 18px; line-height: 1.6; color: #B3B3B3; }

/* Om */
.about { display: grid; grid-template-columns: 55fr 45fr; align-items: center; gap: 64px; }
.about__text { display: flex; flex-direction: column; gap: 24px; }
.about__body > * + * { margin-top: 24px; }
.about__text a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.about__media { height: 480px; background: #383838; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }

/* Nyckeltal */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); }
.figure { padding: 8px 32px; text-align: center; }
.figure + .figure { border-left: 1px solid #383838; }
.figure__value { font-family: 'Oswald', Inter, sans-serif; font-weight: 600; font-size: 72px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #FFDE00; }
.figure__unit { font-size: 28px; letter-spacing: 0; margin-left: 8px; }
.figure__label { margin-top: 16px; font-size: 14px; font-weight: 500; letter-spacing: .02em; color: #A6A6A6; }

/* Nyheter */
.news__heading { margin-bottom: 40px; }
.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; }
.card__image { display: block; aspect-ratio: 3 / 2; background: #383838; overflow: hidden; }
.card__image img { width: 100%; height: 100%; object-fit: cover; }
.card__date { margin-top: 20px; font-size: 14px; color: #A6A6A6; }
.card__title { margin-top: 8px; font-size: 20px; font-weight: 600; line-height: 1.4; }

/* Footer */
.site-footer { background: #111111; color: #B3B3B3; }
.footer-main { padding-top: 74px; padding-bottom: 58px; }
.footer-main__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 48px; font-size: 15px; line-height: 1.7; }
.footer__company p { font-size: 15px; }
.footer__company .footer__name { margin-bottom: 8px; font-size: 17px; font-weight: 600; color: #FFFFFF; }
.footer__brands { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer__brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: #FFFFFF; }
.footer__brand .lockup__mark { width: 28px; height: 28px; }
.footer__brand .lockup__logo { height: 28px; }
.footer__brand .lockup__name { font-size: 22px; }
.footer__divider { width: 1px; height: 40px; background: rgba(255, 255, 255, .3); }
.footer-lower { padding-bottom: 21px; }
.footer-lower__inner { padding-top: 21px; border-top: 1px solid #383838; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; font-size: 14px; color: #A6A6A6; }
.footer__legal ul { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; padding: 0; list-style: none; }

/* Undersidor */
.site-header { padding-block: 24px; border-bottom: 1px solid #383838; }
.site-header__brand { display: inline-flex; align-items: center; min-height: 44px; font-family: 'Oswald', Inter, sans-serif; font-weight: 600; font-size: 20px; }
.entry { padding-block: 128px; background: #1C1C1C; }
.entry__inner { width: min(720px, 90%); margin-inline: auto; }
.entry__title { font-family: 'Oswald', Inter, sans-serif; font-weight: 500; text-transform: uppercase; font-size: 42px; line-height: 1.2; letter-spacing: -.01em; }
.entry__date { display: block; margin-bottom: 16px; font-size: 14px; color: #A6A6A6; }
.entry__image { margin-top: 48px; }
.entry__content { margin-top: 48px; font-size: 18px; line-height: 1.6; color: #B3B3B3; }
.entry__content > * + * { margin-top: 24px; }
.entry__content h2,
.entry__content h3 { font-family: 'Oswald', Inter, sans-serif; font-weight: 500; text-transform: uppercase; line-height: 1.2; color: #FFFFFF; }
.entry__content h2 { margin-top: 48px; font-size: 28px; }
.entry__content h3 { margin-top: 32px; font-size: 20px; }
.entry__content a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.entry__list { margin-top: 48px; }

/* Sidmall: sidhuvud */
.page-hero { position: relative; padding-block: 128px; background: #111111; overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; z-index: 0; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__overlay { position: absolute; inset: 0; background: rgba(17, 17, 17, .6); }
.page-hero__inner { position: relative; z-index: 1; }
.page-hero__inner--media { display: grid; grid-template-columns: 55fr 45fr; align-items: center; gap: 64px; }
.page-hero__text { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }
.page-hero__title { font-family: 'Oswald', Inter, sans-serif; font-weight: 500; text-transform: uppercase; font-size: 56px; line-height: 1.1; letter-spacing: -.01em; color: #FFFFFF; overflow-wrap: break-word; hyphens: auto; }
.page-hero__intro > * + * { margin-top: 16px; }
.page-hero__intro a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.page-hero__media { height: 480px; background: #383838; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* Sidmall: innehåll från redigeraren */
.page-content { padding-block: 128px; background: #1C1C1C; }
.prose { max-width: 900px; font-size: 18px; line-height: 1.6; color: #B3B3B3; }
.prose > :first-child { margin-top: 0; }
.prose > * + * { margin-top: 24px; }
.prose p,
.prose ul,
.prose ol,
.prose h4 { margin-bottom: 0; }
.prose strong { font-weight: 600; color: #FFFFFF; }
.prose a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 200ms ease-out; }
.prose a:hover { text-decoration-color: #FFDE00; }

.prose h2,
.prose h3 { margin-bottom: 0; font-family: 'Oswald', Inter, sans-serif; font-weight: 500; text-transform: uppercase; line-height: 1.2; letter-spacing: -.01em; color: #FFFFFF; }
.prose h2 { margin-top: 64px; padding-top: 32px; border-top: 1px solid #383838; font-size: 32px; }
.prose > h2:first-child { padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 48px; font-size: 22px; }
.prose h4 { margin-top: 32px; font-size: 18px; font-weight: 600; line-height: 1.4; color: #FFFFFF; }
.prose h2 + *,
.prose h3 + *,
.prose h4 + * { margin-top: 16px; }
.prose h2 + h3 { margin-top: 32px; }

.prose ul,
.prose ol { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 32px; }
.prose li + li,
.prose li > ul,
.prose li > ol { margin-top: 8px; }
.prose ul > li::before { content: ""; position: absolute; left: 0; top: 13px; width: 12px; height: 2px; background: #FFDE00; }
.prose ul ul > li::before { background: #A6A6A6; }
.prose ol { counter-reset: prose-ol; }
.prose ol > li { counter-increment: prose-ol; }
.prose ol > li::before { content: counter(prose-ol) "."; position: absolute; left: 0; top: 0; font-family: 'Oswald', Inter, sans-serif; font-weight: 500; color: #FFFFFF; font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline: 3px solid #FFDE00; outline-offset: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.prose th,
.prose td { padding: 16px 24px 16px 0; text-align: left; vertical-align: top; border-bottom: 1px solid #383838; }
.prose th:last-child,
.prose td:last-child { padding-right: 0; }
.prose th { font-size: 14px; font-weight: 500; letter-spacing: .02em; color: #A6A6A6; border-bottom-color: #A6A6A6; white-space: nowrap; }
.prose td:first-child { font-weight: 500; color: #FFFFFF; }
.prose caption { padding-bottom: 16px; text-align: left; font-size: 14px; color: #A6A6A6; }

@media (max-width: 760px) {
	.about { grid-template-columns: 1fr; }
	.figures { grid-template-columns: 1fr; }
	.figure { padding: 24px 32px; }
	.figure + .figure { border-left: 0; border-top: 1px solid #383838; }
	.hero__inner { flex-direction: column; }
	.page-hero__inner--media { grid-template-columns: 1fr; gap: 48px; }
	.page-hero__title { font-size: 40px; }
	.page-hero__media { height: 320px; }
	.prose h2 { font-size: 26px; }
	.prose h3 { font-size: 20px; }
	.prose table { min-width: 560px; }
	.hero__divider,
	.footer__divider { display: none; }
	.hero__bg--right { left: 0; top: 47%; }
	.hero__bg--left {
		right: 0;
		bottom: 47%;
		-webkit-mask-image: linear-gradient(to bottom, #000 88.68%, transparent 100%);
		mask-image: linear-gradient(to bottom, #000 88.68%, transparent 100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__link,
	.prose a { transition: none; }
	.hero__link img,
	.hero__link .lockup__mark,
	.hero__link .lockup__name,
	.hero__divider { animation: none; }
	.reveal { transition: none; }
	.reveal:not(.is-visible) { opacity: 1; transform: none; }
}
