:root {
  --page: #f6f4ee;
  --surface: #ffffff;
  --surface-muted: #ebe6dc;
  --text: #18221f;
  --muted: #65716c;
  --line: #d7d0c4;
  --green: #174f49;
  --green-dark: #0c3531;
  --gold: #d2a85c;
  --shadow: 0 16px 38px rgba(24, 34, 31, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family:
    "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 12px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(215, 208, 196, 0.9);
  background: rgba(246, 244, 238, 0.96);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: inline-flex;
  height: 42px;
  align-items: center;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
}

.site-nav a {
  position: relative;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 2px;
  background: var(--green);
  content: "";
  opacity: 0;
  transform: scaleX(0.65);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  background: url("assets/ance/header-20190414.jpg") center center / cover no-repeat;
  color: white;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(12, 35, 32, 0.55);
  content: "";
}

.hero-home {
  min-height: 430px;
}

.hero-page {
  min-height: 430px;
}

.hero-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 90px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  display: block;
  width: min(110px, 30vw);
  height: auto;
  margin-bottom: 40px;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
}

h2 {
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
  line-height: 1.25;
}

p {
  margin: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: var(--gold);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 30px;
  padding: 12px 20px;
  border-radius: 4px;
  background: white;
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  background: var(--gold);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(12, 35, 31, 0.3);
}

.hero .button {
  min-height: 52px;
  padding: 14px 32px;
  font-size: 1.05rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.hero h1 {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
}

.section-muted {
  width: 100%;
  max-width: none;
  padding-inline: max(20px, calc((100% - 1120px) / 2));
  border-block: 1px solid var(--line);
  background: var(--surface-muted);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 36px;
}

.content-grid,
.contact-layout,
.member-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 7vw, 88px);
  align-items: start;
}

/* ==============================
   RSS-feed
   ============================== */
.rss-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.rss-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.rss-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--green);
}

.rss-item h3 {
  margin: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.rss-item p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.rss-date {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.rss-sub-heading {
  margin: 28px 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.rss-sub-heading:first-of-type {
  margin-top: 0;
}

.rss-item--urgent {
  border-color: var(--gold);
}

.rss-item--urgent .rss-date {
  color: #b8862e;
}

.rss-loading,
.rss-error {
  color: var(--muted);
  font-style: italic;
}

.lead-text {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 1.12rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.link-tile {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.link-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(24, 34, 31, 0.16);
  border-color: var(--green);
}

.link-tile h3 {
  transition: color 150ms ease;
}

.link-tile:hover h3 {
  color: var(--green);
}

.link-tile span,
.service-item > span {
  color: var(--green);
  font-weight: 900;
}

.link-tile p,
.service-item p,
.person-card p,
.values-grid p,
.contact-box span {
  color: var(--muted);
}

.member-section {
  align-items: center;
}

.member-section img {
  width: min(280px, 100%);
  justify-self: end;
}

.service-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.service-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.service-item p {
  max-width: 840px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.person-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(24, 34, 31, 0.16);
}

.person-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 16%;
}

.person-card h3,
.person-card p {
  padding-inline: 16px;
}

.person-card h3 {
  margin-top: 16px;
}

.person-card p {
  padding-bottom: 18px;
  font-size: 0.95rem;
}

.values-section {
  width: 100%;
  max-width: none;
  padding-inline: max(20px, calc((100% - 1120px) / 2));
  background: var(--green-dark);
  color: white;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.values-grid article {
  padding-top: 20px;
  border-top: 2px solid rgba(210, 168, 92, 0.75);
}

.values-grid p {
  color: rgba(255, 255, 255, 0.78);
}

.contact-box,
.contact-list {
  display: grid;
  gap: 12px;
}

.contact-box {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-style: normal;
}

.icon-link,
.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

.contact-person-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.contact-person-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  padding-right: 4px;
  color: var(--text);
}

.contact-list a {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.icon-link img,
.contact-list img {
  width: 22px;
  height: 22px;
}

/* ── Kontaktside layout ── */

.contact-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 48px;
  position: sticky;
  top: 100px;
}

/* ── Kontaktskjema ── */

.contact-form {
  margin-top: 28px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.required {
  color: var(--green);
}

.form-group input,
.form-group textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 79, 73, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.g-recaptcha {
  margin-bottom: 18px;
}

.form-status {
  padding: 14px 18px;
  border-radius: 4px;
  font-weight: 700;
  margin-bottom: 16px;
}

.form-status.success {
  background: #e8f4f2;
  color: var(--green-dark);
  border: 1px solid var(--green);
}

.form-status.error {
  background: #fdf0f0;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 32px;
  border: none;
  border-radius: 4px;
  background: var(--green);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, transform 120ms ease;
}

.form-submit:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.form-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 560px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Kart ── */

.map-section {
  width: 100%;
  border-top: 1px solid var(--line);
}

.map-section iframe {
  display: block;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

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

.site-nav a.nav-cta {
  padding: 8px 18px;
  border-radius: 4px;
  background: var(--green);
  color: white;
  transition: background 150ms ease;
}

.site-nav a.nav-cta:hover {
  background: var(--green-dark);
  color: white;
}

.site-nav a.nav-cta::after {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .content-grid,
  .contact-layout,
  .contact-page-layout,
  .member-section {
    grid-template-columns: 1fr;
  }

  .contact-sidebar {
    position: static;
  }

  .link-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

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

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

  .member-section img {
    justify-self: start;
  }
}

/* ==============================
   Cookie-samtykke
   ============================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--green-dark);
  color: #fff;
  padding: 20px clamp(20px, 5vw, 72px);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.22);
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1 1 300px;
}

.cookie-banner-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.82;
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 10px 22px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.cookie-btn-primary {
  background: var(--gold);
  color: var(--green-dark);
  border-color: var(--gold);
}

.cookie-btn-primary:hover {
  background: #c49848;
  border-color: #c49848;
}

.cookie-btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
    padding: 8px 20px;
  }

  .brand-mark {
    width: 78px;
    height: 50px;
  }

  .menu-button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
  }

  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .menu-icon {
    position: relative;
  }

  .menu-icon::before,
  .menu-icon::after {
    position: absolute;
    left: 0;
    content: "";
  }

  .menu-icon::before {
    top: -6px;
  }

  .menu-icon::after {
    top: 6px;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--page);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
  }

  .site-nav a::after {
    display: none;
  }

  .hero-home {
    min-height: 620px;
  }

  .hero-page {
    min-height: 360px;
  }

  .hero-inner {
    width: min(100% - 36px, 1120px);
    padding: 70px 0;
  }

  .section {
    width: min(100% - 36px, 1120px);
    padding: 62px 0;
  }

  .section-muted,
  .values-section {
    padding-inline: 18px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.35rem;
    line-height: 1.12;
  }

  .hero-logo {
    width: min(90px, 28vw);
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .rss-list {
    grid-template-columns: 1fr;
  }

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