/* Aluminiumfönster – designförslag A "Nordiskt ljus" */
:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --band: #E7EBE4;
  --ink: #1E2422;
  --ink-2: #3D4440;
  --ink-3: #5E655F;
  --line: #E2DDD2;
  --line-2: #C9D1C6;
  --accent: #2F5D50;
  --accent-hover: #1F4238;
  --on-accent: #FFFFFF;
  --footer: #1E2422;
  --footer-ink: #C8CCC7;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5.5vw, 80px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; color: var(--ink); }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.brand:hover { color: var(--ink); }
.brand__name { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.brand__tag { font-size: 13px; color: var(--ink-3); }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.nav__item { position: relative; }
.nav__link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav__link.is-active { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
.nav__sub { list-style: none; margin: 0; padding: 10px; position: absolute; left: 0; top: 100%; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(30, 36, 34, .10); display: none; }
.nav__sub a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-size: 15px; border-radius: 3px; }
.nav__sub a:hover, .nav__sub a[aria-current] { background: var(--band); color: var(--accent-hover); }
.has-sub:hover .nav__sub, .has-sub:focus-within .nav__sub { display: block; }
.nav-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px; background: none; color: var(--ink); font: 600 15px var(--sans); cursor: pointer; }

/* ---------- Knappar ---------- */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: background-color .15s, color .15s; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--light { background: var(--bg); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }
/* Reklammärkning av köplänkar */
.wp-block-button:has([data-affiliate])::after, .btn-row:has(> [data-affiliate])::after { content: var(--aff-label); font-size: 12px; font-weight: 400; color: var(--ink-3); }
.promo .btn-row:has(> [data-affiliate])::after { color: #B9C9BF; }
.prose :is(p, li, td) a[data-affiliate]:not(.wp-block-button__link):not(:has(img))::after { content: " (" var(--aff-label) ")"; font-size: .72em; color: var(--ink-3); white-space: nowrap; }

/* ---------- Startsida ---------- */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero__text { display: flex; flex-direction: column; gap: 28px; }
.hero__title { margin: 0; font-size: clamp(40px, 5vw, 68px); line-height: 1.04; letter-spacing: -.01em; }
.hero__lead { margin: 0; font-size: 19px; color: var(--ink-2); max-width: 540px; }
.hero__img { width: 100%; height: 520px; object-fit: cover; border-radius: var(--radius); }

.section { padding-bottom: 96px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; border-top: 1px solid var(--ink); padding-top: 24px; margin-bottom: 40px; }
.section-head h2 { margin: 0; font-size: clamp(30px, 3vw, 40px); }
.section-head a { font-weight: 600; font-size: 15px; white-space: nowrap; }

.teasers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.teaser { display: flex; flex-direction: column; gap: 18px; text-decoration: none; color: var(--ink); }
.teaser img { width: 100%; height: 260px; object-fit: cover; border-radius: var(--radius); }
.teaser__title { font-family: var(--serif); font-size: 28px; line-height: 1.2; }
.teaser__more { font-size: 14px; font-weight: 600; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; }
.teaser:hover { color: var(--ink); }
.teaser:hover .teaser__title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

.band { background: var(--band); padding: 88px 0; margin-bottom: 96px; }
.band__grid { display: grid; grid-template-columns: 4fr 8fr; gap: 32px; }
.band__intro h2 { margin: 0 0 20px; font-size: clamp(30px, 3vw, 40px); }
.band__intro p { margin: 0; color: var(--ink-2); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--line-2); border: 2px solid var(--line-2); }
.tile { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.tile:hover { background: #fff; color: var(--ink); }
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile__title { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.tile__text { font-size: 15px; line-height: 1.55; color: #4A514C; }

.makers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; }
.maker { display: flex; flex-direction: column; gap: 10px; }
.maker__name { font-family: var(--serif); font-size: 24px; color: var(--ink); text-decoration: none; }
.maker p { margin: 0; font-size: 15px; color: #4A514C; }
.maker__more { font-size: 14px; font-weight: 600; }

.promo { background: var(--accent); color: var(--bg); border-radius: var(--radius); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; margin-bottom: 96px; }
.promo__text { padding: 64px; display: flex; flex-direction: column; gap: 22px; justify-content: center; }
.promo h2 { margin: 0; color: var(--bg); font-size: clamp(32px, 3.2vw, 44px); line-height: 1.1; }
.promo p { margin: 0; color: #DCE5DF; }
.promo__img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; background: #fff; }

/* ---------- Undersidor ---------- */
.page-head { padding-top: 56px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-3); margin-bottom: 20px; }
.page-title { margin: 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.05; max-width: 900px; }
.page-body { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; padding-top: 48px; padding-bottom: 96px; }
.page-body--single { grid-template-columns: minmax(0, 820px); }

.sidebar { display: flex; flex-direction: column; gap: 32px; }
.side-nav { background: var(--band); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; }
.side-nav__head { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.side-nav__link { font-family: var(--serif); font-size: 21px; color: var(--ink); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.side-nav__link:last-child { border-bottom: 0; }
.side-nav__link[aria-current] { color: var(--accent); }
.side-box { border: 1px solid var(--ink); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.side-box__title { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.side-box p { margin: 0; font-size: 15px; color: #4A514C; }
.side-box a { font-weight: 600; font-size: 15px; }

/* ---------- Brödtext (inkl. block från gamla sajten) ---------- */
.prose { font-size: 18px; line-height: 1.7; color: #2D3430; min-width: 0; }
.prose > *:first-child { margin-top: 0; }
.prose > p:first-child:has(> strong:first-child) { font-family: var(--serif); font-size: 25px; line-height: 1.45; color: var(--ink); }
.prose > p:first-child:has(> strong:first-child) strong { font-weight: 400; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { font-size: 34px; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 26px; margin: 1.5em 0 .5em; }
.prose h4 { font-size: 21px; margin: 1.4em 0 .4em; }
.prose h1:empty, .prose p:empty { display: none; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius); }
.prose figure img, .prose .wp-block-image img { max-height: 460px; width: auto; object-fit: contain; }
.prose figure { margin: 2em 0; }
.prose figcaption, .prose .wp-element-caption { margin-top: 10px; font-size: 15px; font-style: italic; color: var(--ink-2); }
.prose .wp-block-image a { display: inline-block; }
.prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.prose .aligncenter img { margin: 0 auto; }
.prose .has-text-align-center { text-align: center; }
.prose .has-text-align-left { text-align: left; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { font-weight: 600; background: var(--band); }
.prose blockquote { margin: 1.5em 0; padding-left: 24px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 22px; }

.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.6em 0; }
.prose .wp-block-buttons.is-content-justification-center { justify-content: center; }
.prose .wp-block-button { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prose .wp-block-button__link { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; background: var(--accent); color: var(--on-accent) !important; border-radius: 999px; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.3; }
.prose .wp-block-button__link:hover { background: var(--accent-hover); }
.prose .wp-block-button__link strong { font-weight: 600; }
.prose .wp-block-button:has([data-affiliate])::after { font-family: var(--sans); }

.prose .wp-block-media-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; margin: 2em 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.prose .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }
.prose .wp-block-media-text__media { margin: 0; }
.prose .wp-block-media-text__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.prose .wp-block-media-text__content { padding: 16px 24px; }
.prose .wp-block-media-text__content p { font-family: var(--sans); font-size: 18px; color: #2D3430; }
.prose .wp-block-group { margin-bottom: 1em; }

.child-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--line-2); border: 2px solid var(--line-2); margin: 2em 0; }
.child-page { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.child-page:hover { background: #fff; color: var(--ink); }
.child-page__title { font-family: var(--serif); font-size: 23px; line-height: 1.2; }
.child-page__text { font-family: var(--sans); font-size: 15px; line-height: 1.55; color: #4A514C; }
.child-page__more { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- Vägval på startsidan ---------- */
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.path-card { display: flex; flex-direction: column; gap: 12px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.path-card:hover { border-color: var(--accent); color: var(--ink); }
.path-card__num { font-size: 13px; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
.path-card__title { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.path-card__text { font-size: 15px; line-height: 1.55; color: #4A514C; flex: 1; }
.path-card__more { font-size: 14px; font-weight: 600; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; }

/* ---------- Offertruta i slutet av sidor ---------- */
.cta-box { margin-top: 3em; padding: 40px; background: var(--accent); color: #DCE5DF; border-radius: var(--radius); font-family: var(--sans); }
.cta-box .cta-box__title { margin: 0 0 12px; color: var(--bg); font-size: 30px; }
.cta-box p { margin: 0 0 24px; font-size: 17px; }
.cta-box .btn-row:has(> [data-affiliate])::after { color: #B9C9BF; }
.btn--outline-light { border-color: #DCE5DF; color: var(--bg); }
.btn--outline-light:hover { background: var(--bg); color: var(--ink); }

/* ---------- Priskalkylator ---------- */
.calc { margin: 2em 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; font-family: var(--sans); }
.calc__form { padding: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-content: start; }
.calc__field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 0; padding: 0; border: 0; min-width: 0; }
.calc__field--wide { grid-column: 1 / -1; }
.calc__field legend { padding: 0; margin-bottom: 6px; }
.calc__radio { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 16px; color: var(--ink); min-height: 36px; }
.calc__radio input { width: 18px; height: 18px; accent-color: var(--accent); }
.calc select, .calc input[type="number"], .lead-form input:not([type="checkbox"]), .lead-form select, .lead-form textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); font: 400 16px var(--sans); color: var(--ink); }
.calc__result { padding: 28px; background: var(--band); display: flex; flex-direction: column; gap: 18px; }
.calc__rows { margin: 0; display: flex; flex-direction: column; }
.calc__rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.calc__rows dt { color: var(--ink-2); }
.calc__rows dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc__rows .calc__total { border-bottom: 0; padding-top: 16px; align-items: baseline; }
.calc__total dt { font-weight: 600; color: var(--ink); }
.calc__total dd { font-family: var(--serif); font-weight: 400; font-size: 28px; color: var(--accent); }
.calc__note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.calc [hidden] { display: none !important; }

/* ---------- Formulär för förfrågningar ---------- */
.lead-form { margin: 2em 0; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); display: flex; flex-direction: column; gap: 24px; }
.lead-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.lead-form__field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.lead-form__wide { grid-column: 1 / -1; }
.lead-form__check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.lead-form__check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.lead-form__note { font-size: 14px; color: var(--ink-3); }
.lead-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-form .btn { cursor: pointer; }
.notice { padding: 18px 22px; border-radius: var(--radius); font-family: var(--sans); font-size: 16px; line-height: 1.5; margin: 2em 0; }
.lead-form .notice { margin: 0; }
.notice--ok { background: var(--band); border-left: 4px solid var(--accent); }
.notice--error { background: #F8E9E4; border-left: 4px solid #A4412A; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: var(--footer-ink); padding: 64px 0; font-size: 14px; line-height: 1.9; }
.site-footer__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px; }
.site-footer__brand, .site-footer__col { display: flex; flex-direction: column; }
.site-footer__name { font-family: var(--serif); font-size: 22px; color: var(--bg); margin-bottom: 8px; }
.site-footer__head { color: var(--bg); font-weight: 600; text-decoration: none; }
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .site-footer__head:hover { color: #fff; }

/* ---------- Mobil & surfplatta ---------- */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; box-shadow: 0 16px 30px rgba(30, 36, 34, .08); }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { font-size: 17px; padding: 0; min-height: 48px; border-bottom: 1px solid var(--line); }
  .nav__sub { display: block; position: static; box-shadow: none; border: 0; background: none; padding: 4px 0 8px 16px; min-width: 0; }
  .site-header__inner { min-height: 72px; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; padding-bottom: 64px; }
  .hero__img { height: 360px; }
  .teasers, .makers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band__grid { grid-template-columns: 1fr; }
  .promo { grid-template-columns: 1fr; }
  .promo__text { padding: 40px; }
  .promo__img { min-height: 260px; height: 300px; }
  .page-body { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paths { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand__name { font-size: 22px; }
  .brand__tag { display: none; }
  .hero__img { height: 260px; }
  .teasers, .makers, .tiles, .child-pages { grid-template-columns: 1fr; }
  .teaser img { height: 220px; }
  .teaser__title { font-size: 24px; }
  .section, .band { padding-bottom: 64px; }
  .band { padding-top: 56px; margin-bottom: 64px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .promo__text { padding: 28px; }
  .prose { font-size: 17px; }
  .prose > p:first-child:has(> strong:first-child) { font-size: 21px; }
  .prose .wp-block-media-text { grid-template-columns: 1fr; }
  .prose .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 0; }
  .side-nav, .side-box { padding: 24px; }
  .path-card, .cta-box, .lead-form, .calc__form, .calc__result { padding: 22px; }
  .lead-form__grid, .calc__form { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}
