@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;600&display=swap');

:root { --header-height: 104px; --ink: #07131f; --white: #fff; --accent: #66e7dc; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { min-width: 320px; background: var(--ink); color: var(--white); font-family: "DM Sans", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: 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; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; background: var(--accent); color: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 20; display: flex; align-items: center; width: 100%; height: var(--header-height); padding: 0 clamp(28px, 3.7vw, 76px); background: #050b11; border-bottom: 1px solid rgba(255,255,255,.13); }
.brand { position: relative; z-index: 2; display: block; width: 96px; height: 96px; overflow: hidden; flex: 0 0 auto; }
.brand img { display: block; width: 100%; height: 100%; object-fit: cover; }
.main-nav { position: absolute; left: 50%; display: flex; align-items: center; gap: clamp(22px, 2.4vw, 50px); height: 100%; transform: translateX(-50%); }
.main-nav a { position: relative; display: grid; place-items: center; height: 100%; color: rgba(255,255,255,.76); font-size: clamp(.76rem, .78vw, .92rem); font-weight: 600; letter-spacing: .075em; text-transform: uppercase; transition: color 180ms ease; }
.main-nav a::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--accent); opacity: 0; transform: scaleX(.35); transition: opacity 180ms ease, transform 180ms ease; }
.main-nav a:hover, .main-nav a:focus-visible, .main-nav a.active { color: var(--white); }
.main-nav a:hover::after, .main-nav a:focus-visible::after, .main-nav a.active::after { opacity: 1; transform: scaleX(1); }
.menu-button { display: none; }

.hero { position: relative; width: 100%; height: calc(100dvh - var(--header-height)); min-height: 360px; overflow: hidden; background: #07131f; }
.hero-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; animation: settle 1.4s cubic-bezier(.2,.65,.25,1) both; }
.image-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(2,9,15,.28), transparent 35%), linear-gradient(180deg, rgba(2,8,13,.08), transparent 35%, rgba(2,8,13,.17)); }
.hero-button { position: absolute; z-index: 2; bottom: clamp(34px, 7vh, 76px); left: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 58px; padding: 0 30px; border: 1px solid rgba(255,255,255,.72); background: rgba(4,12,19,.7); box-shadow: 0 14px 45px rgba(0,0,0,.3); backdrop-filter: blur(8px); color: var(--white); font-size: .88rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; transform: translateX(-50%); transition: background 180ms ease, border-color 180ms ease, color 180ms ease; }
.hero-button span { color: var(--accent); font-size: 1.15rem; transition: transform 180ms ease; }
.hero-button:hover, .hero-button:focus-visible { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.hero-button:hover span, .hero-button:focus-visible span { color: var(--ink); transform: translateX(4px); }
@keyframes settle { from { opacity: 0; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 940px) {
  :root { --header-height: 82px; }
  .site-header { padding: 0 22px; }
  .brand { width: 66px; height: 66px; }
  .menu-button { position: relative; z-index: 32; display: block; margin-left: auto; width: 46px; height: 46px; padding: 0; color: var(--white); background: transparent; border: 0; cursor: pointer; }
  .menu-button span:not(.sr-only) { display: block; width: 25px; height: 1px; margin: 7px auto; background: currentColor; transition: transform 180ms ease; }
  .main-nav { position: fixed; z-index: 30; inset: 0; display: flex; visibility: hidden; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; height: auto; padding: 84px 11vw; background: rgba(5,11,17,.98); opacity: 0; pointer-events: none; transform: translateY(-12px); transition: opacity 180ms ease, transform 180ms ease; }
  .main-nav.open { visibility: visible; opacity: 1; pointer-events: auto; transform: none; }
  .main-nav a { display: block; height: auto; padding: 5px 0; font-size: clamp(1.35rem, 6vw, 2rem); }
  .main-nav a::after { bottom: -2px; }
  .menu-button[aria-expanded="true"] span:not(.sr-only):first-of-type { transform: translateY(4px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span:not(.sr-only):last-of-type { transform: translateY(-4px) rotate(-45deg); }
  .hero-image { object-position: 57% center; }
  .hero-button { min-width: 230px; padding: 0 22px; font-size: .82rem; }
}

@media (max-height: 560px) and (min-width: 941px) { :root { --header-height: 80px; } .brand { width: 70px; height: 70px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.main-nav a { white-space: nowrap; font-size: .875rem; }
body.content-page { overflow-y: auto; }
.content-main { max-width: 1240px; margin: 0 auto; padding: clamp(36px, 6vw, 80px) clamp(22px, 5vw, 64px) 64px; }
.page-intro { max-width: 800px; margin-bottom: 40px; }
.eyebrow { color: var(--accent); font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 18px; }
h1 { font-size: clamp(2rem, 4.3vw, 3.6rem); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 24px; }
.intro-text { color: #c4d1db; font-size: 1.125rem; line-height: 1.7; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.content-card { border: 1px solid #284050; border-top: 2px solid var(--accent); padding: clamp(24px, 3vw, 36px); background: #0d1d2a; }
.content-card h2 { font-size: 1.375rem; line-height: 1.35; margin: 0 0 16px; overflow-wrap: anywhere; }
.content-card p { color: #c4d1db; font-size: 1rem; line-height: 1.75; margin: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 940px) { .main-nav a { font-size: clamp(1.35rem, 6vw, 2rem); white-space: normal; } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.nav-dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.dropdown-toggle { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: rgba(255,255,255,.76); font: 600 .875rem "DM Sans", Arial, sans-serif; letter-spacing: .075em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.dropdown-toggle:hover, .dropdown-toggle.active, .dropdown-toggle[aria-expanded="true"] { color: white; border-bottom-color: var(--accent); }
.chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
.dropdown-toggle[aria-expanded="true"] .chevron { transform: rotate(225deg); margin-top: 4px; }
.dropdown-panel { position: absolute; top: 100%; left: -20px; min-width: 300px; padding: 10px; background: #0d1d2a; border: 1px solid #284050; border-top: 2px solid var(--accent); box-shadow: 0 18px 40px #0006; }
.dropdown-panel[hidden] { display: none; }
.main-nav .dropdown-panel a { display: block; height: auto; padding: 13px 14px; font-size: .9375rem; line-height: 1.4; letter-spacing: 0; text-transform: none; white-space: normal; }
.main-nav .dropdown-panel a::after { display: none; }
.main-nav .dropdown-panel a:hover, .main-nav .dropdown-panel a:focus-visible { background: #193243; color: var(--accent); }
.content-card { scroll-margin-top: 24px; }
.content-card:target { border-color: var(--accent); }
@media (max-width: 940px) {
 .main-nav { overflow-y: auto; justify-content: flex-start; padding-top: 110px; }
 .nav-dropdown { height: auto; display: block; width: 100%; }
 .dropdown-toggle { height: auto; padding: 5px 0; font-size: clamp(1.35rem, 6vw, 2rem); white-space: normal; text-align: left; }
 .dropdown-panel { position: static; min-width: 0; width: 100%; margin-top: 12px; box-shadow: none; }
 .main-nav .dropdown-panel a { font-size: 1rem; }
}

.analysis-choice { display: block; transition: border-color 180ms ease, background 180ms ease; }
.analysis-choice:hover { border-color: var(--accent); background: #132b3a; }
.tool-link { display: inline-block; margin-top: 20px; color: var(--accent); font-size: 1rem; font-weight: 600; line-height: 1.5; }
a.tool-link:hover { text-decoration: underline; }

/* Seven tool entries stay readable and within the viewport. */
#digitala-verktyg-menu { width: 410px; max-width: calc(100vw - 32px); max-height: calc(100dvh - var(--header-height) - 16px); overflow-y: auto; }
@media (max-width: 940px) {
 #digitala-verktyg-menu { width: 100%; max-width: none; max-height: none; }
 .main-nav.open { overscroll-behavior: contain; }
}

.contact-link { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
