/*
Theme Name: Nemis
Theme URI: https://nemisgruppen.no
Author: Nemis Gruppen
Description: Et lett, spesialbygget WordPress-tema for Nemis Gruppen.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: nemis
*/

:root {
  --black: #111111;
  --text: #202020;
  --muted: #666663;
  --line: #deded9;
  --light: #f3f3ef;
  --white: #ffffff;
  --max: 1440px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed !important;
  z-index: 9999;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: #fff;
  color: #111;
}

/* Header */
.site-header {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  color: var(--white);
}

.site-header.is-scrolled {
  position: fixed;
  background: rgba(17,17,17,.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.1);
}

.header-inner {
  width: min(var(--max), 100%);
  height: 96px;
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 74px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: clamp(170px, 17vw, 240px);
  height: auto;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  font-size: 14px;
  font-weight: 550;
}

.primary-menu a { position: relative; }

.primary-menu a:not(.nav-cta)::after {
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transition: width .2s ease;
}

.primary-menu a:hover::after { width: 100%; }

.nav-cta {
  padding: 13px 19px;
  border: 1px solid rgba(255,255,255,.7);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 27px;
  height: 1px;
  margin: 7px auto;
  background: currentColor;
  transition: transform .2s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: 760px;
  height: 100vh;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7,7,7,.79) 0%, rgba(7,7,7,.46) 49%, rgba(7,7,7,.18) 100%),
    linear-gradient(0deg, rgba(7,7,7,.42), transparent 45%),
    var(--hero-image, linear-gradient(135deg,#42423f,#171717));
  background-size: cover;
  background-position: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), 100%);
  height: 100%;
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(190px, 25vh, 270px) clamp(24px, 8vw, 125px) 100px;
  display: flex;
  align-items: flex-start;
}

.hero-copy { max-width: 800px; }

.eyebrow {
  margin: 0 0 26px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow.dark { color: var(--muted); }

h1, h2, h3 {
  margin-top: 0;
  font-weight: 450;
  letter-spacing: -.045em;
}

.hero h1 {
  max-width: 790px;
  margin-bottom: 30px;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1.02;
}

.hero-lead {
  max-width: 610px;
  margin: 0;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.button {
  min-width: 174px;
  min-height: 56px;
  padding: 15px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 650;
  transition: .2s ease;
}

.button-light {
  background: var(--white);
  color: var(--black);
}

.button-light:hover { background: #e9e9e5; }

.button-outline {
  border-color: rgba(255,255,255,.75);
  color: var(--white);
}

.button-outline:hover {
  background: var(--white);
  color: var(--black);
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 35px;
  width: 28px;
  height: 52px;
  transform: translateX(-50%);
}

.scroll-cue::before {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 39px;
  background: rgba(255,255,255,.75);
  content: "";
}

.scroll-cue::after {
  position: absolute;
  left: 8px;
  bottom: 9px;
  width: 11px;
  height: 11px;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transform: rotate(45deg);
  content: "";
}

/* Layout */
.section {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(92px, 10vw, 160px) clamp(24px, 6vw, 94px);
}

.section h2,
.contact h2,
.image-band h2 {
  margin-bottom: 0;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1.08;
}

.intro {
  display: grid;
  grid-template-columns: 1fr 5fr;
  gap: 45px;
}

.section-number {
  color: var(--muted);
  font-size: 13px;
}

.intro-content {
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(260px, .8fr);
  gap: clamp(45px, 8vw, 125px);
}

.intro-text {
  align-self: end;
  color: #4c4c49;
  font-size: 18px;
}

.intro-text p { margin: 0 0 21px; }

.services,
.process {
  max-width: none;
  background: var(--light);
}

.section-heading {
  width: min(var(--max), 100%);
  margin: 0 auto clamp(60px, 7vw, 105px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.section-heading > p {
  max-width: 385px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 17px;
}

.service-grid,
.process-grid {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  border-top: 1px solid var(--line);
}

.service-grid { grid-template-columns: repeat(3, 1fr); }

.service-card {
  min-height: 400px;
  padding: 34px clamp(24px, 3vw, 46px) 42px;
  border-right: 1px solid var(--line);
}

.service-card:last-child { border-right: 0; }

.service-card > span,
.process-card > span {
  color: var(--muted);
  font-size: 12px;
}

.service-card h3 {
  margin: 142px 0 20px;
  font-size: 28px;
}

.service-card p,
.process-card p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.image-band {
  position: relative;
  min-height: 720px;
  padding: clamp(75px, 8vw, 125px);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background:
    linear-gradient(0deg, rgba(7,7,7,.72), rgba(7,7,7,.04) 67%),
    var(--band-image, linear-gradient(135deg,#353532,#131313));
  background-size: cover;
  background-position: center;
}

.image-band-copy { max-width: 850px; }

.about {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(60px, 10vw, 160px);
}

.about-copy { padding-top: 55px; }

.about-copy p {
  margin: 0 0 29px;
  color: var(--muted);
  font-size: 17px;
}

.about-copy .large-copy {
  color: var(--text);
  font-size: clamp(22px, 2.3vw, 33px);
  line-height: 1.45;
}

.master-section {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(68px, 7vw, 105px) clamp(24px, 6vw, 94px);
  display: flex;
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  border-top: 1px solid var(--line);
}

.master-section img {
  width: clamp(110px, 13vw, 180px);
  aspect-ratio: 1;
  object-fit: contain;
}

.master-section .eyebrow { margin-bottom: 13px; }

.master-section h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.08;
}

.process-grid { grid-template-columns: repeat(4, 1fr); }

.process-card {
  min-height: 305px;
  padding: 31px 34px;
  border-right: 1px solid var(--line);
}

.process-card:last-child { border-right: 0; }

.process-card h3 {
  margin: 102px 0 17px;
  font-size: 23px;
}

.contact {
  padding: clamp(100px, 11vw, 170px) clamp(24px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(60px, 10vw, 165px);
  background: var(--black);
  color: var(--white);
}

.contact-heading > p:last-child {
  max-width: 500px;
  margin: 30px 0 0;
  color: #b7b7b2;
  font-size: 17px;
}

.contact-details {
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-details p {
  max-width: 430px;
  margin: 0 0 38px;
  color: #b7b7b2;
  font-size: 17px;
}

.contact-details a {
  padding: 11px 0;
  border-bottom: 1px solid #444;
  font-size: clamp(20px, 2vw, 27px);
}

.contact-form {
  display: grid;
  gap: 22px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  color: #d2d2ce;
  font-size: 13px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #4a4a47;
  border-radius: 0;
  padding: 13px 14px;
  background: #181818;
  color: var(--white);
  outline: none;
}

.form-field input,
.form-field select { min-height: 50px; }

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--white);
  box-shadow: 0 0 0 1px var(--white);
}

.form-trap {
  position: absolute !important;
  left: -9999px !important;
}

.form-submit {
  width: fit-content;
  cursor: pointer;
}

.form-notice {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid #5b5b56;
}

.form-notice.success { border-color: #7e9477; }
.form-notice.error { border-color: #b47a72; }

.direct-contact {
  margin-top: 34px;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 1px solid #3b3b39;
}

.direct-contact span {
  margin-bottom: 8px;
  color: #92928e;
  font-size: 12px;
}

.direct-contact a {
  padding: 5px 0;
  border-bottom: 1px solid #555;
  font-size: clamp(17px, 1.5vw, 21px);
}

.site-footer {
  padding: 46px clamp(24px, 6vw, 94px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  background: var(--black);
  color: var(--white);
  border-top: 1px solid #333;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.footer-logo { width: 190px; }

.footer-brand p,
.footer-meta p {
  margin: 5px 0 0;
  color: #92928e;
  font-size: 12px;
}

.footer-meta { text-align: right; }

/* Standard WordPress pages */
.page-main {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 150px 0 100px;
}

.page-main h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
}

.entry-content {
  max-width: 780px;
  font-size: 18px;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */
@media (max-width: 950px) {
  .header-inner { height: 84px; }

  .menu-toggle { display: block; }

  .primary-menu {
    position: fixed;
    inset: 84px 0 0;
    z-index: 60;
    height: calc(100dvh - 84px);
    padding: 38px 30px 45px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #111;
    font-size: 27px;
  }

  .primary-menu.is-open { display: flex; }

  .menu-toggle {
    position: relative;
    z-index: 61;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .intro,
  .intro-content,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .section-number { display: none; }

  .service-grid { grid-template-columns: 1fr; }

  .service-card {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-card h3 { margin-top: 80px; }

  .process-grid { grid-template-columns: repeat(2,1fr); }

  .process-card:nth-child(2) { border-right: 0; }
  .process-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .about-copy { padding-top: 0; }
}

@media (max-width: 640px) {
  .brand-logo { width: 172px; }

  .hero {
    min-height: 720px;
    height: auto;
  }

  .hero-inner { padding-top: 170px; }

  .hero h1 { font-size: clamp(43px, 13vw, 59px); }

  .hero-lead { font-size: 16px; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button { width: 100%; }

  .scroll-cue { display: none; }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .image-band {
    min-height: 570px;
    padding: 65px 24px;
  }

  .process-grid { grid-template-columns: 1fr; }

  .process-card {
    min-height: 250px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .process-card h3 { margin-top: 65px; }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-meta { text-align: left; }

  .master-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .master-section img { width: 120px; }

  .form-submit { width: 100%; }
}
