/* nordisk-havprosjekter main bundle. @mike dark theme 08.05, @tom spacing pass 14.05 */
/* FIXME: merge .pricin-card and .card before go-live if QA ok. Deadline was 20.05 */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-deep: #06121c;
  --bg-elevated: #0a1c2e;
  --bg-card: #0e2438;
  --border: #1e4564;
  --text: #e7f4fb;
  --text-muted: #a8c7d8;
  --accent: #22d3ee;
  --accent-bright: #67e8f9;
  --neon: #a5f3fc;
  --focus: #cffafe;
  --danger: #fb7185;
  --header-h: 4.25rem;
  --cookie-h: 0px;
  --radius: 16px;
  --transition: 0.28s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-deep);
  min-height: 100vh;
}

body.has-cookie-banner {
  padding-bottom: var(--cookie-h);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--neon);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Top bar */
.top-bar {
  background: #07182a;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  text-align: center;
}

.top-bar strong {
  color: var(--neon);
}

/* Header (legacy .site-header + refactor names) */
.site-header,
.main-header,
.mw-shellHeader {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(6, 18, 28, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.mw-headerInner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 380px) {
  .brand {
    font-size: 1rem;
  }
}

.brand:hover {
  color: var(--accent-bright);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
}

.nav-desktop ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-desktop a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--accent-bright);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle-lines {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  box-shadow:
    0 -6px 0 currentColor,
    0 6px 0 currentColor;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 12, 22, 0.72);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition),
    visibility var(--transition);
  z-index: 950;
  border: none;
  padding: 0;
  cursor: pointer;
}

.mobile-nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(18rem, 88vw);
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform var(--transition);
  z-index: 960;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-panel.is-open {
  transform: translateX(0);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-close {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-nav-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-panel li {
  border-bottom: 1px solid var(--border);
}

.mobile-nav-panel a {
  display: block;
  padding: 0.875rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.mobile-nav-panel a:hover {
  color: var(--accent-bright);
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

/* Layout */
.container,
.mw-layoutContainer {
  max-width: 72rem;
  margin: 0 auto;
  padding-right: 1.25rem !important;
  padding-left: 1.25rem !important;
}

main {
  padding-bottom: 3rem;
}

/* Hero - yes .hero-baner is misspelled on purpose, grep before rename */
.hero,
.hero-baner,
.hero-section,
.app-heroWrap {
  position: relative;
  padding: 3rem 0 2.5rem;
  overflow: hidden;
}

.hero-grid,
.app-heroGrid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.app-heroGrid {
  text-align: center;
}

.app-heroGrid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* @media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
} */

.hero h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 27ch;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  object-fit: cover;
}

/* Sections */
.section,
.secton-dark {
  padding: 2.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.5rem;
  text-align: center;
}

.section-head p {
  margin: 0 auto;
  color: var(--text-muted);
  text-align: center;
  max-width: 40rem;
}

/* Cards row: flex @tom 21.10, 3+2 desktop */
.cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  align-items: stretch;
}

.cards-grid .card,
.cards-grid .pricin-card {
  flex: 1 1 100%;
  max-width: 100%;
  min-width: min(100%, 17rem);
}

@media (min-width: 640px) {
  .cards-grid .card,
  .cards-grid .pricin-card {
    flex: 1 1 calc(50% - 0.625rem);
    max-width: calc(50% - 0.625rem);
  }
}

@media (min-width: 1024px) {
  .cards-grid .card,
  .cards-grid .pricin-card {
    flex: 0 1 calc(33.333% - 0.834rem);
    max-width: calc(33.333% - 0.834rem);
    min-width: 0;
  }
}

.card,
.pricin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.card:hover,
.pricin-card:hover {
  border-color: #22d3ee;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.28),
    0 12px 40px rgba(8, 145, 178, 0.2);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-logo img {
  /* width: 3rem;
  height: 3rem; */
  object-fit: contain;
}

.card-meta {
  text-align: right;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.card-score {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neon);
}

.card h3 {
  font-size: 1.0625rem;
  margin: 0;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  flex-grow: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  /* justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted); */

  width: 100%;
  background: #22d3ee;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
}

.card-foot .btn-primary.card-visit {
  display: flex;
  color: #06121c !important;

  text-align: center;
  position: absolute;
  z-index: -5;
}

.prose.section:has(> .page-hero) {
  padding-top: 0;
}

.card-foot .btn-primary.card-visit span {
  flex-grow: 1;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.btn-primary,
.ui-btnPrimary {
  background: linear-gradient(135deg, #0c4a6e, #0369a1);
  color: #fff;
}

@media (max-width: 600px) {
  .hero.hero-baner.hero-section.app-heroWrap {
    padding: 20px 0;
  }
  .hero-lead {
    font-size: 13px;
  }
  #classement .section-head p {
    display: none;
  }
  #classement .section-head {
    margin-bottom: 0;
  }
  .hero-tags {
    display: none;
  }
}

.btn-primary:hover,
.ui-btnPrimary:hover {
  background: linear-gradient(135deg, #082f49, #075985);
  color: #fff;
}

.btn-primary.card-visit {
  color: var(--accent) !important;
  background: none !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.btn-link,
.card-btn,
.cmz-cardBtn {
  padding: 0;
  background: none;
  border: none;
  color: var(--accent-bright);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hidlink {
  position: absolute;
  z-index: -5;
}

.card-foot .btn-primary.card-visit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Info blocks */
.info-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.info-panel h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.info-columns {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .info-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-block h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--accent-bright);
}

.info-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 2rem 0 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.trust-strip li {
  list-style: none;
}

.trust-strip a {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: color var(--transition);
}

.trust-strip a:hover {
  color: var(--accent-bright);
}

/* Page content (legal / method) */
.page-hero {
  padding: 2.5rem 0 1rem;
}

.page-hero h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 42rem;
}

.prose {
  max-width: 48rem;
}

.prose section {
  margin-bottom: 2rem;
}

.prose h2 {
  font-size: 1.125rem;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose ol {
  padding-left: 1.25rem;
}

.steps {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--neon);
  margin-bottom: 0.5rem;
}

.step-card h2 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
}

.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Contact form */
.form-card {
  max-width: 36rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 540px) {
  .form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  margin-top: 10px;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.footer-legal h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.footer-legal h3 {
  font-size: 0.9375rem;
  margin: 1rem 0 0.35rem;
  color: var(--accent-bright);
}

.footer-legal p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"],
.mobile-nav-panel a[aria-current="page"] {
  color: var(--accent-bright);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-org {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-org strong {
  color: var(--text);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  padding: 1rem 1.25rem;
  background: #071422;
  border-top: 1px solid #0e7490;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.cookie-banner.is-hiding {
  transform: translateY(100%);
  opacity: 0;
}

.cookie-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text);
  max-width: 52rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(3, 10, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition),
    visibility var(--transition);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 26rem;
  width: 100%;
  box-shadow: 0 20px 60px rgba(8, 145, 178, 0.28);
  transform: scale(0.96);
  transition: transform var(--transition);
}

.modal-overlay.is-open .modal-dialog {
  transform: scale(1);
}

.section-follow {
  margin-top: 2rem;
}

.modal-dialog h2 {
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
}

.modal-dialog p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.prose a,
.page-hero a,
.cookie-text a,
.info-block a {
  text-decoration: underline;
}

.map-section {
  padding-top: 0;
}

.map-panel .footer-org {
  margin-bottom: 1rem;
}

.map-embed {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  aspect-ratio: 16 / 10;
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 18rem;
  border: 0;
}

.map-fallback {
  margin: 1rem 0 0;
}
