/* Petres Bygg & Betong AB - petresbygg.se
   Tema: mörkt, låst över hela sidan (varmt kolsvart + trä/amber-accent).
   Formsystem: skarpa hörn (radius 0) på allt, inklusive knappar. */

:root {
  --bg: #191713;
  --bg-2: #1f1c17;
  --bg-3: #262119;
  --text: #efeae1;
  --text-dim: #a89e8e;
  --accent: #cf8b46;
  --on-accent: #191713;
  --border: rgba(239, 234, 225, 0.14);
  --container: 1280px;
  --pad: clamp(20px, 5vw, 64px);
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-v15-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-v15-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-v15-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-v15-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-v15-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul[role="list"] { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Knappar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.9rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.15s var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--accent:hover { background: #dda05f; }

.btn--ghost {
  border: 1px solid rgba(239, 234, 225, 0.4);
  color: var(--text);
  background: rgba(25, 23, 19, 0.25);
}
.btn--ghost:hover { border-color: var(--text); background: rgba(239, 234, 225, 0.08); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(25, 23, 19, 0.88);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__logo { flex-shrink: 0; }
.nav__logo img { width: clamp(120px, 14vw, 160px); height: auto; }
.nav__links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav__links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.nav__links a:hover { opacity: 1; color: var(--accent); }
.nav__cta { padding: 0.7rem 1.3rem; font-size: 0.95rem; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}
@media (max-width: 400px) {
  .nav__cta { padding: 0.6rem 0.9rem; font-size: 0.85rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media picture, .hero__media video {
  position: absolute;
  inset: -6% 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(25, 23, 19, 0.96) 0%, rgba(25, 23, 19, 0.45) 45%, rgba(25, 23, 19, 0.22) 100%),
    linear-gradient(to bottom, rgba(25, 23, 19, 0.55) 0%, rgba(25, 23, 19, 0) 28%),
    linear-gradient(to right, rgba(25, 23, 19, 0.55) 0%, rgba(25, 23, 19, 0) 60%);
}
.hero__content {
  position: relative;
  width: 100%;
  padding-bottom: clamp(3.5rem, 9vh, 7rem);
  padding-top: calc(var(--nav-h) + 2rem);
}
.hero__title {
  font-size: clamp(3rem, 9.5vw, 7.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 12ch;
}
.hero__title .line {
  display: block;
  overflow: clip;
}
.hero__title .line__inner { display: block; }
.hero__sub {
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text);
  opacity: 0.92;
  margin-bottom: 2.2rem;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Manifest ---------- */

.manifest {
  padding-block: clamp(6rem, 14vh, 11rem);
  background: var(--bg);
}
.manifest__text {
  font-size: clamp(1.7rem, 4.2vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 26ch;
}
.manifest__text .w { opacity: 0.4; display: inline-block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.manifest__facts {
  margin-top: clamp(3rem, 7vh, 5rem);
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(2rem, 6vw, 5.5rem);
}
.manifest__facts li { display: grid; gap: 0.2rem; }
.fact__label { color: var(--text-dim); font-size: 0.95rem; }
.fact__value { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 700; }

@media (max-width: 640px) {
  .manifest__facts { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* ---------- Sektionstitlar ---------- */

.section-title {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.section-title .line { display: block; overflow: clip; }
.section-title .line__inner { display: block; }
.section-intro {
  margin-top: 1.2rem;
  max-width: 52ch;
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* ---------- Tjänster ---------- */

.services {
  padding-block: clamp(5rem, 12vh, 9rem);
  background: var(--bg-2);
}
.services__grid {
  margin-top: clamp(3rem, 7vh, 5rem);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.service { display: flex; flex-direction: column; }
.service--wide     { grid-column: 1 / 9; }
.service--accent   { grid-column: 9 / 13; }
.service--half     { grid-column: 1 / 7; }
.service--half-alt { grid-column: 7 / 13; }
.service--big      { grid-column: 1 / 8; }
.service--small    { grid-column: 8 / 13; }

.service__media {
  overflow: clip;
  aspect-ratio: 3 / 2;
}
.service--wide .service__media { aspect-ratio: 16 / 9; }
.service__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service__body { padding-top: 1.2rem; }
.service__body h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.service__body p { color: var(--text-dim); max-width: 46ch; }

.service--accent {
  background: var(--bg-3);
  border-top: 3px solid var(--accent);
  justify-content: center;
  padding: clamp(1.8rem, 3vw, 2.8rem);
}
.service--accent .service__body { padding-top: 0; }
.service--accent h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.service--accent p { color: var(--text); opacity: 0.85; }

@media (max-width: 899px) {
  .services__grid { grid-template-columns: 1fr; }
  .service { grid-column: auto !important; }
  .service__media, .service--wide .service__media { aspect-ratio: 3 / 2; }
}

/* ---------- Divider ---------- */

.divider {
  position: relative;
  height: 100svh;
  overflow: clip;
  display: grid;
  place-items: center;
}
.divider__media { position: absolute; inset: 0; }
/* Bilden är högre än sektionen så den kan glida mjukt i sidled av skrollen
   utan att kanterna någonsin blottas. Samma grepp som heron använder. */
.divider__media img {
  position: absolute;
  inset: -12% 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
}
.divider__scrim {
  position: absolute;
  inset: 0;
  background: rgba(25, 23, 19, 0.55);
}
.divider__tagline {
  position: relative;
  font-size: clamp(2.4rem, 7vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-align: center;
  padding-inline: var(--pad);
}
.divider__tagline .line { display: block; overflow: clip; }
.divider__tagline .line__inner { display: block; }

/* ---------- Om oss ---------- */

.about {
  padding-block: clamp(5rem, 12vh, 9rem);
  background: var(--bg);
}
.about__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.about__media {
  overflow: clip;
  aspect-ratio: 4 / 5;
}
.about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about__text p {
  margin-top: 1.4rem;
  color: var(--text-dim);
  max-width: 54ch;
}
.about__text p:first-of-type { margin-top: 1.8rem; color: var(--text); }
.about__text .btn { margin-top: 2.2rem; }

@media (max-width: 899px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 480px; }
}

/* ---------- Arbetsområde ---------- */

.area {
  padding-block: clamp(5rem, 12vh, 9rem);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.area__grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.area__text > p {
  margin-top: 1.6rem;
  color: var(--text-dim);
  max-width: 50ch;
}
.area__towns {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.area__towns li {
  border: 1px solid var(--border);
  padding: 0.5rem 1.1rem;
  font-weight: 500;
  font-size: 0.98rem;
}
.area__towns li:first-child {
  border-color: var(--accent);
  color: var(--accent);
}
.area__viz { display: grid; place-items: center; }
.area__svg {
  width: min(100%, 380px);
  color: var(--text-dim);
}
.area__dot { fill: var(--accent); }
.area__svg-label {
  fill: var(--text);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 899px) {
  .area__grid { grid-template-columns: 1fr; }
  .area__viz { justify-content: start; }
}

/* ---------- Kontakt ---------- */

.contact {
  padding-block: clamp(6rem, 15vh, 12rem);
  background: var(--bg);
  text-align: center;
}
.contact__title {
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.contact__title .line { display: block; overflow: clip; }
.contact__title .line__inner { display: block; }
.contact__sub {
  margin-top: 1.2rem;
  color: var(--text-dim);
  font-size: 1.15rem;
}
.contact__actions {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}
.contact__tel {
  font-size: clamp(2.4rem, 7.5vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
.contact__tel:hover { color: #dda05f; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 3px; }
.contact__mail {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(239, 234, 225, 0.35);
  transition: text-decoration-color 0.25s ease, color 0.25s ease;
}
.contact__mail:hover { color: var(--accent); text-decoration-color: var(--accent); }
.contact__info {
  margin-top: clamp(3rem, 7vh, 5rem);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 6rem);
}
.contact__info dt {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.contact__info dd { font-weight: 600; font-size: 1.1rem; }

/* ---------- Footer ---------- */

.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-top: clamp(3.5rem, 8vh, 6rem);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vh, 4rem);
}
.footer__brand img { width: 190px; }
.footer__brand p {
  margin-top: 1.3rem;
  color: var(--text-dim);
  max-width: 34ch;
}
.footer__col h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer__col li { margin-bottom: 0.55rem; color: var(--text-dim); }
.footer__col a {
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 1.6rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

@media (max-width: 800px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Tjänstekort som länkar ---------- */

.service { position: relative; }
.service__link {
  text-decoration: none;
  color: inherit;
  transition: color 0.25s var(--ease-out);
}
.service__link::after { content: ""; position: absolute; inset: 0; }
.service:hover .service__link { color: var(--accent); }
.service__more {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

/* ---------- Tjänstesidor: hero ---------- */

.page-hero {
  position: relative;
  min-height: 68svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
  background: var(--bg-2);
}
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(25, 23, 19, 0.97) 0%, rgba(25, 23, 19, 0.5) 50%, rgba(25, 23, 19, 0.3) 100%),
    linear-gradient(to bottom, rgba(25, 23, 19, 0.55) 0%, rgba(25, 23, 19, 0) 28%);
}
.page-hero__content {
  position: relative;
  width: 100%;
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
}
.page-hero__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}
.page-hero__crumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.page-hero__crumb a:hover { color: var(--accent); }
.page-hero__title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  max-width: 16ch;
}
.page-hero__title .line { display: block; overflow: clip; }
.page-hero__title .line__inner { display: block; }
.page-hero__sub {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  opacity: 0.92;
  margin-bottom: 2.2rem;
}
.page-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Tjänstesidor: innehåll ---------- */

.svc { padding-block: clamp(4.5rem, 11vh, 8rem); }
.svc--intro { background: var(--bg); }
.svc__grid {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.svc__copy p {
  margin-top: 1.4rem;
  color: var(--text-dim);
  max-width: 58ch;
}
.svc__copy p:first-of-type { margin-top: 1.8rem; color: var(--text); }

.svc-aside {
  background: var(--bg-3);
  border-top: 3px solid var(--accent);
  padding: clamp(1.8rem, 3vw, 2.5rem);
}
.svc-aside h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.svc-aside__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.svc-aside__list li {
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.svc-figure { background: var(--bg); padding-bottom: clamp(4.5rem, 11vh, 8rem); }
.svc-figure__media {
  overflow: clip;
  aspect-ratio: 21 / 9;
}
.svc-figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.svc-how {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.svc-how__rows { margin-top: clamp(2.5rem, 6vh, 4rem); }
.svc-how__row {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: 1.8rem;
  border-top: 1px solid var(--border);
}
.svc-how__row h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 700; }
.svc-how__row p { color: var(--text-dim); max-width: 52ch; }

.svc-links { background: var(--bg); }
.svc-links__list {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.svc-links__list a {
  border: 1px solid var(--border);
  padding: 0.55rem 1.2rem;
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.svc-links__list a:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 899px) {
  .svc__grid { grid-template-columns: 1fr; }
  .svc-how__row { grid-template-columns: 1fr; gap: 0.5rem; }
  .svc-figure__media { aspect-ratio: 3 / 2; }
  .page-hero { min-height: 58svh; }
}

/* ---------- Reducerad rörelse ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
