/* ===== Komponenter ===== */

/* --- Knappar --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 400; /* originalet: regular */
  font-size: var(--fs-xs); /* 16px */
  line-height: var(--lh-body); /* 24px → knapphöjd 56px */
  padding: 1rem 1.5rem; /* 16px 24px som originalet */
  border: 0;
  border-radius: var(--radius); /* 0 */
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}
.btn--primary {
  background: var(--cyan);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--navy);
  color: var(--white);
}
/* Cyan-light knapp (hero "Begär offert", "Läs pressmeddelande") */
.btn--light {
  background: var(--cyan-light);
  color: var(--navy);
}
.btn--light:hover {
  background: var(--cyan);
  color: var(--white);
}
.btn--orange {
  background: var(--orange);
  color: var(--white);
}
.btn--orange:hover {
  background: var(--navy);
  color: var(--white);
}
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--ghost:hover {
  background: var(--navy);
  color: var(--white);
}
.btn--on-dark.btn--ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--on-dark.btn--ghost:hover {
  background: var(--white);
  color: var(--navy);
}

/* --- Header / navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
}
.site-header__inner {
  position: relative;
  z-index: 1; /* ovanför rastret */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: 2rem; /* p-8 i profilen → ~117px hög header */
}
.site-logo {
  display: inline-flex;
  align-items: center;
}
.site-logo img {
  height: 53px; /* naturlig storlek, som profilen */
  width: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.main-nav__list {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav__list a {
  color: var(--white);
  font-weight: 400; /* originalet: regular */
  font-size: var(--fs-xs);
}
.main-nav__list a:hover,
.main-nav__list a[aria-current="page"] {
  color: var(--cyan-light);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    position: fixed;
    inset: 117px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--line-light);
    padding: var(--space-2) var(--gutter) var(--space-3);
    transform: translateY(-120%);
    transition: transform var(--transition);
    box-shadow: var(--shadow);
  }
  .main-nav[data-open="true"] {
    transform: translateY(0);
  }
  .main-nav__list {
    flex-direction: column;
    gap: 0;
  }
  .main-nav__list a {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line-light);
    font-size: var(--fs-base);
  }
  .main-nav .btn {
    margin-top: var(--space-2);
    justify-content: center;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  gap: var(--space-4);
  padding-block: var(--hero-y);
}
/* På mobil ligger hero-bilden överst, texten under (som originalet) */
@media (max-width: 899px) {
  .hero .hero__media { order: -1; }
}
/* Inre sidors hero — samma formspråk som startsidan men mindre rubrik */
.hero--inner h1 {
  font-size: clamp(2.25rem, 4vw + 0.5rem, var(--fs-lg)); /* upp till 58px */
}
.hero--inner .breadcrumbs {
  margin-bottom: var(--space-2);
}
/* Standardsidans hero-band (titel utan bild) */
.hero-band {
  padding-block: var(--hero-y);
  position: relative;
  z-index: 2;
  max-width: 60ch;
}
.hero-band h1 {
  color: var(--white);
  font-size: clamp(2.25rem, 4vw + 0.5rem, var(--fs-lg));
}
.hero-band .lead {
  opacity: 0.85;
}
@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    padding-block: var(--hero-y);
  }
}
.hero h1 {
  color: var(--white);
}
.hero__text p {
  max-width: 42ch;
}
.hero__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
}
@media (min-width: 900px) {
  /* Hero-bilden går ut till högerkanten (full-bleed) som i profilen.
     Gäller bara heron — andra .hero__media (t.ex. Glasfasader) blöder inte. */
  .hero .hero__media {
    align-self: stretch;
    margin-right: calc(-1 * var(--gutter));
  }
  .hero .hero__media img {
    height: 100%;
    min-height: 480px;
  }
}

/* Bild med "tejp"-konfetti i hörnen */
.tape { position: relative; }
.tape .confetti { z-index: 3; }

/* --- Sektionsrubrik --- */
.section-head {
  margin-bottom: var(--space-4);
}
/* Funktionella sektionsrubriker (Kontakta oss, Våra produkter): Grotesk 48px,
   som originalets "Kontakta oss" — till skillnad från marknadsföringsrubrikerna
   (hero/Glasfasader/produkt-CTA) som är KlarheitKurrent. */
.section-head--grotesk h2 {
  font-family: var(--font-body);
  font-size: clamp(2rem, 4vw, var(--fs-md)); /* upp till 48px */
  line-height: var(--lh-tight);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-xxs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.section--dark {
  background: var(--navy);
  color: var(--white);
}
.section--dark h2,
.section--dark h3 {
  color: var(--white);
}
.section--light-blue {
  background: var(--cyan-light);
}

/* --- Kortrutnät --- */
.grid {
  display: grid;
  gap: var(--space-4); /* 32px som profilen */
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Produktkort — borderlösa, som kontaktkorten: bild + titel/länk under */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px, som personkorten */
}
.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cyan-light);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__title {
  font-family: var(--font-title);
  font-size: 1.25rem; /* 20px — stram etikett, inte 32px */
  line-height: var(--lh-snug);
  color: var(--navy);
  margin: 0;
}
.card__link {
  color: var(--navy);
}
.card:hover .card__title .card__link,
.card:hover .card__title {
  color: var(--cyan);
}
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* --- Kategorikort med fallback-yta --- */
.card__media--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-2);
  text-align: center;
}
.card__media--fallback span {
  font-family: var(--font-title);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

/* --- Personalkort --- */
.staff-group { margin-bottom: var(--space-6); }
.staff-group__title {
  font-family: var(--font-body); /* KlarheitGrotesk, som originalet */
  font-weight: 400;
  font-size: var(--fs-sm); /* 32px */
  line-height: var(--lh-tight);
  color: var(--navy);
  margin-bottom: var(--space-4); /* 32px */
}
.person {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px mellan varje rad, som originalet */
  line-height: var(--lh-body);
}
.person__photo {
  aspect-ratio: 4 / 5; /* porträtt som profilen */
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cyan-light);
  margin-bottom: 0;
}
.person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Originalet: roll = 14px fet navy (etikett ovanför namnet), namn = 16px regular */
.person__role {
  font-size: var(--fs-xxs); /* 14px */
  font-weight: 700;
  color: var(--navy);
}
.person__name {
  font-size: var(--fs-xs); /* 16px */
  font-weight: 400;
  color: var(--navy);
}
.person__contact {
  font-size: var(--fs-xs); /* 16px */
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px mellan tel och e-post, som originalet */
}

/* --- Kontorsblock (som originalets footer: versal fet stad + dämpad adress) --- */
.office__city {
  font-family: var(--font-body);
  font-size: var(--fs-xs); /* 16px */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin: 0 0 0.25rem;
}
.section--dark .office__city,
.site-footer .office__city {
  color: var(--white);
}
.office__details {
  margin: 0;
  opacity: 0.75;
  line-height: var(--lh-body);
}

/* --- Sidhuvud för inre sidor (navy band med raster) --- */
.page-header {
  position: relative;
  background: var(--navy);
  color: var(--white);
  padding-block: var(--space-6);
}
.page-header--image {
  background-size: cover;
  background-position: center;
}
.page-header > .holder {
  position: relative;
  z-index: 1;
}
.page-header h1 {
  color: var(--white);
  margin: 0;
  font-size: clamp(2.5rem, 5vw + 0.5rem, var(--fs-lg)); /* upp till 58px */
}

/* --- Brödsmulor (på navy sidhuvud) --- */
.breadcrumbs {
  font-size: var(--fs-xxs);
  margin-bottom: var(--space-2);
  opacity: 0.85;
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.breadcrumbs li::after {
  content: "›";
  margin-left: 0.5rem;
  opacity: 0.6;
}
.breadcrumbs li:last-child::after {
  content: none;
}
.breadcrumbs a {
  color: var(--white);
}
.breadcrumbs a:hover {
  color: var(--cyan-light);
}
.breadcrumbs li[aria-current] {
  opacity: 0.7;
}

/* --- CTA-band --- */
/* Produkt-CTA: bildbakgrund (cover.jpg) + rubrik + orange "Begär offert",
   vänsterställt, direkt före kontaktblocket — som originalets bg-cover-band. */
.product-cta {
  position: relative;
  background-image:
    linear-gradient(rgba(22, 33, 61, 0.55), rgba(22, 33, 61, 0.55)),
    url(/img/cover.jpg);
  background-size: cover;
  background-position: center;
  color: var(--white);
}
.product-cta h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, var(--fs-md)); /* upp till 48px som originalet */
  line-height: var(--lh-snug); /* 1.25 → 60px */
  margin-bottom: var(--space-3);
}

/* --- Footer (som originalet: rubrik + sitemap + kontor + Ring/Maila/Visselblåsare) --- */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding-block: var(--space-8) var(--space-4);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
}
.site-footer a {
  color: var(--white);
}
.site-footer a:hover {
  color: var(--cyan-light);
}
.site-footer__heading {
  font-family: var(--font-title);
  font-size: clamp(2rem, 3vw + 0.5rem, var(--fs-md)); /* upp till 48px Kurrent */
  line-height: var(--lh-tight);
  color: var(--white);
  margin: 0 0 var(--space-2);
}
.site-footer__intro {
  opacity: 0.75;
  max-width: 46ch;
  margin: 0 0 var(--space-8);
}
/* Sitemap + kontor + bottenrad — alla på samma 4-kolumners raster, med luft emellan */
.footer-nav {
  margin-bottom: var(--space-8);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px mellan rader */
}
.footer-col a,
.footer-col span {
  opacity: 0.75;
}
.footer-col__head {
  font-weight: 700;
  opacity: 1 !important;
  margin-bottom: 0.25rem;
}
.footer-offices,
.offices {
  margin-bottom: var(--space-8);
}
/* Footer-kolumnerna ligger i linje med rastret: 4 lika kolumner UTAN gap
   (gränserna hamnar på rasterlinjerna) + 32px inre vänsterpadding, så
   innehållet börjar vid linje+32 precis som originalet (48/400/752/1104). */
@media (min-width: 1024px) {
  .site-footer .footer-nav,
  .site-footer .offices,
  .site-footer .footer-bottom {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .site-footer .footer-nav > *,
  .site-footer .offices > *,
  .site-footer .footer-bottom > * {
    padding-left: 2rem;
    padding-right: 1rem;
  }
  /* Rubrik, ingress och copyright aligner också mot rasterlinjen (linje + 32px) */
  .site-footer__heading,
  .site-footer__intro,
  .site-footer__copy {
    padding-left: 2rem;
  }
}
.footer-bottom {
  align-items: start;
}
.footer-bottom__logo img {
  height: 53px;
  width: auto;
}
.site-footer__copy {
  margin-top: var(--space-6);
  font-size: var(--fs-xxs);
  opacity: 0.6;
}

/* --- Dekor: confetti (orange/cyan stänk) + raster --- */
.confetti {
  position: absolute;
  width: 34px;
  height: 76px;
  pointer-events: none;
  z-index: 1;
}
.confetti--orange { background: var(--orange); }
.confetti--cyan { background: var(--cyan); }
.confetti--sm { width: 21px; height: 44px; }

/* Vertikalt dekorraster — 1410px centrerat (som profilen), bakom innehållet
   i mörka sektioner. Vita 10%-linjer syns bara mot mörk bakgrund. Eftersom
   alla band är centrerade på samma 1410px ligger linjerna i linje mellan
   sektionerna, precis som profilens genomgående raster. */
.has-raster { position: relative; }
.has-raster > .holder { position: relative; z-index: 1; }
.bg-raster {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1410px;
  max-width: 100%;
  display: flex;
  pointer-events: none;
  z-index: 0;
  border-inline: 1px solid var(--line-light);
}
.bg-raster span {
  flex: 1;
  border-right: 1px solid var(--line-light);
}
.bg-raster span:last-child { border-right: 0; }
/* På mobil blir innehållet en kolumn — dölj de inre rasterlinjerna så de
   inte skär genom texten. Rastret hör ihop med flerkolumnslayouten. */
@media (max-width: 767px) {
  .bg-raster span { border-right: 0; }
  .bg-raster { border-inline: 0; }
}
.hero > .holder { position: relative; z-index: 2; }

/* --- Videogrid (Media) --- */
.video-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Nedladdningslista --- */
.downloads {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: var(--maxw-text);
}
.downloads li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.downloads a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  color: var(--navy);
  font-weight: 700;
}
.downloads a::before {
  content: "↓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  background: var(--cyan-light);
  color: var(--navy);
}
.downloads a:hover {
  color: var(--cyan);
}

/* --- Formulär (offertförfrågan, kontakt) --- */
.form {
  max-width: 640px;
}
.form__row {
  margin-bottom: var(--space-3);
}
.form label {
  display: block;
  font-weight: 700;
  font-size: var(--fs-xs);
  margin-bottom: 0.4rem;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  font-family: inherit;
  font-size: var(--fs-base);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 3px solid var(--cyan);
  outline-offset: 1px;
  border-color: var(--cyan);
}
.form textarea {
  min-height: 150px;
  resize: vertical;
}
.form input[type="file"] {
  padding: 0.6rem;
  background: var(--cyan-light);
}
.form__hint {
  font-size: var(--fs-xxs);
  color: var(--ink-muted);
  font-weight: 400;
}
.form .req {
  color: var(--orange);
}
.form .btn {
  margin-top: var(--space-2);
}

/* --- Produktdetalj (bild + beskrivning) --- */
.product {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 900px) {
  .product {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: var(--space-6);
  }
}
.product__media img {
  width: 100%;
  background: var(--cyan-light);
}
.product__content h2 {
  font-family: var(--font-body);
  font-size: var(--fs-sm); /* 32px Grotesk, som funktionella rubriker */
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
}
.product__props {
  margin: var(--space-3) 0;
  padding-left: 1.25em;
}
.product__props li {
  margin-bottom: 0.5rem;
}
.product__cta {
  margin-top: var(--space-4);
}

/* --- Wysiwyg (migrerat innehåll) — h2/h3 i KlarheitKurrent som originalet --- */
.wysiwyg a { text-decoration: underline; }
.wysiwyg h2 { font-family: var(--font-title); font-size: clamp(2rem, 3vw + 0.5rem, var(--fs-lg)); line-height: var(--lh-snug); margin-top: 1.5em; }
.wysiwyg h3 { font-family: var(--font-title); font-size: clamp(1.5rem, 2vw + 0.5rem, var(--fs-md)); line-height: var(--lh-snug); margin-top: 1.25em; }
.wysiwyg img { border-radius: var(--radius-lg); margin: var(--space-3) 0; }
.wysiwyg ul { padding-left: 1.25em; }
.wysiwyg li { margin-bottom: 0.4em; }
