/* bygg40.se - rebuilt from the Squarespace site (2026). Plain CSS, no build step. */

:root {
  --text: rgba(28, 32, 24, 0.8);
  --heading: rgb(28, 32, 24);
  --red: #cc0000;
  --rule: rgba(212, 212, 212, 0.5);
  --gutter: 34px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 22px/1.32 "Unna", Georgia, serif;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 80px 90px 100px; }

/* header */
.site-header { margin-bottom: 60px; }
.site-title { display: inline-block; font-size: 36px; line-height: 1.2; color: var(--red); }
.site-title:hover { text-decoration: none; }
.site-header nav ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 30px; }
.site-header nav a { color: var(--heading); font-size: 14px; letter-spacing: 0.05em; text-transform: capitalize; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--red); text-decoration: none; }

/* text */
.content { overflow-wrap: anywhere; }
.content::after { content: ""; display: block; clear: both; }
h1, h2, h3, h4 { color: var(--heading); font-weight: 400; margin: 0.6em 0 0.4em; }
h1 { font-size: 36px; line-height: 1.2; }
h2 { font-size: 36px; line-height: 1.3; letter-spacing: 0.02em; }
h3 { font-size: 24px; line-height: 1.5; letter-spacing: 0.2em; text-transform: uppercase; color: #000; }
h4 { font-size: 22px; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0; }
.large { font-size: 1.3em; }
.small { font-size: 0.8em; }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.ta-justify { text-align: justify; }
hr { border: 0; height: 1px; background: var(--rule); margin: 30px 0; clear: both; }

/* layout grid (Squarespace 12-column rows) */
.row { display: flex; margin: 0 calc(var(--gutter) / -2); clear: both; }
.col { flex: 0 0 calc(var(--span) / 12 * 100%); padding: 0 calc(var(--gutter) / 2); min-width: 0; }
.spacer { height: 60px; }

/* images */
figure { margin: 17px 0 34px; }
.img { margin-left: auto; margin-right: auto; }
.img img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.img .crop { overflow: hidden; }
.img .crop img { width: 100%; height: 100%; object-fit: cover; }
.img.float-right, .img.float-left { width: calc(var(--span, 6) / 12 * 100% - var(--gutter) / 2); }
.img.float-right { float: right; margin-left: var(--gutter); }
.img.float-left { float: left; margin-right: var(--gutter); }
figcaption { margin-top: 10px; font-size: 0.85em; }
figcaption p:last-child { margin-bottom: 0; }

/* video */
.video-frame { position: relative; height: 0; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* galleries ("I media och på andra platser", /media) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin: 17px 0 34px; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f6f6f6; border: 1px solid #eee; }
.gallery figcaption { font-size: 16px; margin-top: 6px; }
.gallery figcaption strong { font-weight: 400; }

/* phones and tablets */
@media (max-width: 960px) {
  .wrap { padding: 40px 24px 60px; }
  .site-header nav ul { justify-content: flex-start; gap: 4px 20px; margin-top: 12px; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .wrap { padding: 24px 16px 48px; }
  .site-title { font-size: 30px; }
  h1, h2 { font-size: 28px; }
  h3 { font-size: 20px; letter-spacing: 0.12em; }
  .row { display: block; margin: 0; }
  .col { padding: 0; }
  .col:has(> .spacer:only-child) { display: none; }
  .img.float-right, .img.float-left { float: none; width: auto; margin-left: auto; margin-right: auto; }
}
