/* ==========================================================================
   Holm Bygg og Maskin AS — demo
   Palett: antrasitt fra logoen, maskingul aksent fra maskinparken.
   ========================================================================== */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-semicond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/barlow-semicond-700.woff2") format("woff2");
}

:root {
  --ink: #23231f;
  --muted: #5b5b54;
  --paper: #ffffff;
  --paper-2: #f4f4f1;
  --dark: #171714;
  --dark-2: #201f1b;
  --accent: #f0a500;
  --accent-deep: #cf8f00;
  --line: #e2e1da;
  --font-body: "Barlow", "Segoe UI", Arial, sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", "Segoe UI", Arial, sans-serif;
  --radius: 6px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--dark);
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

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

/* --------------------------------------------------------------------------
   Knapper
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
}
.btn-accent:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}
.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-small {
  font-size: 0.95rem;
  padding: 0.45rem 1.1rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dark);
  border-bottom: 1px solid #2c2b26;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand img {
  display: block;
  width: 145px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid #4a4942;
  border-radius: var(--radius);
  color: #fff;
  font: 600 1rem var(--font-display);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.nav-toggle-bars {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
}
.nav-toggle-bars::before {
  top: -6px;
}
.nav-toggle-bars::after {
  top: 6px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a:not(.btn) {
  color: #e8e7e1;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.menu a:not(.btn):hover {
  color: #fff;
  border-bottom-color: var(--accent);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--dark-2);
    border-bottom: 1px solid #2c2b26;
    padding: 0.5rem 1.25rem 1rem;
  }
  .menu.is-open {
    display: flex;
  }
  .menu li {
    border-bottom: 1px solid #2c2b26;
  }
  .menu li:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
  }
  .menu a:not(.btn) {
    display: block;
    padding: 0.75rem 0;
    border-bottom: none;
  }
  .menu .btn {
    display: block;
    text-align: center;
  }
}

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

.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(17, 17, 14, 0.82) 0%, rgba(17, 17, 14, 0.55) 55%, rgba(17, 17, 14, 0.25) 100%);
}

.hero-content {
  position: relative;
  color: #fff;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  max-width: var(--container);
  width: 100%;
}

.hero-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  font-weight: 700;
  max-width: 15em;
  margin-bottom: 0.4em;
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 34em;
  margin: 0 0 1.75rem;
  color: #f0efe9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* --------------------------------------------------------------------------
   Seksjoner
   -------------------------------------------------------------------------- */

.section {
  padding: 4.5rem 0;
  scroll-margin-top: 80px;
}

.section-alt {
  background: var(--paper-2);
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  padding-bottom: 0.55rem;
  position: relative;
  margin-bottom: 1.4rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: var(--accent);
}

.section-intro {
  max-width: 44em;
  color: var(--muted);
  margin: -0.5rem 0 2rem;
}

/* --------------------------------------------------------------------------
   Vi utfører
   -------------------------------------------------------------------------- */

.utforer-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.6rem 2rem;
}

.utforer-grid li {
  padding: 0.55rem 0 0.55rem 1.35rem;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.utforer-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 9px;
  height: 9px;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   Kort (tjenester)
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.4rem;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.4em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card-grid-compact .card {
  padding: 1.3rem 1.4rem 1.2rem;
}

/* --------------------------------------------------------------------------
   Prosjekter og galleri
   -------------------------------------------------------------------------- */

.project-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
}

.project-list li {
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}

.project-list h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.15em;
}

.project-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* --------------------------------------------------------------------------
   Maskinpark
   -------------------------------------------------------------------------- */

.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
}

.machine-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}

.machine-group h3 {
  font-size: 1.1rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 0.75rem;
}

.machine-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.machine-group li {
  padding: 0.3rem 0;
  color: var(--muted);
  border-bottom: 1px solid var(--paper-2);
}
.machine-group li:last-child {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Jobb-banner
   -------------------------------------------------------------------------- */

.job-banner {
  background: var(--dark);
  color: #fff;
  padding: 3rem 0;
}

.job-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.job-banner h2 {
  font-size: 1.7rem;
  margin-bottom: 0.2em;
}

.job-banner p {
  margin: 0;
  color: #d8d7cf;
  max-width: 38em;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.contact-address {
  margin: 0 0 1.5rem;
}

.contact-person {
  margin-bottom: 1.25rem;
}

.contact-person h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.1em;
}

.contact-person p {
  margin: 0;
}

.contact-person a,
.contact-address a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.contact-form {
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9c8c0;
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.form-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.9rem 0 0;
}

/* --------------------------------------------------------------------------
   Undersider (ledige stillinger)
   -------------------------------------------------------------------------- */

.page-header {
  background: var(--dark);
  color: #fff;
  padding: 3.5rem 0;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  padding-bottom: 0.55rem;
  position: relative;
  margin-bottom: 1rem;
}
.page-header h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: var(--accent);
}

.page-header-lead {
  max-width: 48em;
  margin: 0;
  color: #d8d7cf;
  font-size: 1.1rem;
}

.job-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.job-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem 1.9rem;
}

.job-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75em;
}

.job-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4em;
}

.job-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.job-columns ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.job-columns li {
  margin-bottom: 0.3rem;
}

.job-contact {
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: 1.75rem 1.9rem;
}

.job-contact h2 {
  font-size: 1.4rem;
}

.job-contact p {
  margin: 0 0 0.5rem;
}

.job-contact a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

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

.site-footer {
  background: var(--dark);
  color: #d8d7cf;
  padding: 3.5rem 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-logo {
  width: 160px;
  margin-bottom: 0.75rem;
}

.footer-col p {
  margin: 0;
  font-size: 0.97rem;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5em;
}

.footer-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-contacts li {
  margin-bottom: 0.9rem;
  font-size: 0.97rem;
}

.footer-contacts strong {
  color: #fff;
}

.footer-contacts a,
.footer-bottom a {
  color: #d8d7cf;
  text-decoration-color: var(--accent);
}
.footer-contacts a:hover,
.footer-bottom a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #2c2b26;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  color: #a5a49b;
}

@media (max-width: 640px) {
  .section {
    padding: 3rem 0;
  }
  .hero {
    min-height: 440px;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
}
