/* KUMO by OVERCAST: OVERCAST:s formspråk ur loggan och investerardecket.
   Vitt på mörk kolfiber, Bebas Neue i versaler, raka hörn och inga skuggor.
   Tillgänglighet: brödtext minst 18 px, AAA-kontrast (7:1), 48 px klickytor,
   synlig fokusring, inget förmedlas enbart med färg. */

@font-face {
  font-family: "Bebas Neue";
  src: url("fonts/BebasNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --svart: #0b0b0c;
  --kol: #121214;
  --text: #e6e6e6;
  --vit: #ffffff;
  --dampad: #c8c8c8;
  --linje: rgba(255, 255, 255, 0.24);
  --linje-stark: rgba(255, 255, 255, 0.55);
  --fel: #ffb4b4;
  --rubrik: "Bebas Neue", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --brod: Aptos, "Segoe UI Variable Text", "Segoe UI", Calibri, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --bredd: 1240px;
  --kant: clamp(16px, 4vw, 48px);
}

:lang(ja) {
  --brod: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", system-ui, sans-serif;
  --rubrik: "Bebas Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
}

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

html {
  font-size: 112.5%; /* 18 px */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.a11y-text-1 { font-size: 131.25%; }
html.a11y-text-2 { font-size: 150%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--brod);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--svart);
  background-image:
    radial-gradient(ellipse 110% 65% at 50% -8%, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0) 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 1px, rgba(0, 0, 0, 0) 1px 4px);
  background-attachment: fixed;
}
:lang(ja) body, body:lang(ja) { line-height: 1.85; }

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

a { color: var(--vit); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--vit); outline-offset: 3px; }
main:focus { outline: 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;
}

.hoppa {
  position: absolute; left: var(--kant); top: -200px; z-index: 100;
  background: var(--vit); color: #000; padding: 0.8rem 1.1rem; font-weight: 700;
}
.hoppa:focus { top: 12px; }

.forhands { background: #ffe066; color: #000; text-align: center; padding: 0.6rem var(--kant); font-weight: 700; }

.inre { max-width: var(--bredd); margin: 0 auto; padding: 0 var(--kant); }

/* Rubriker: Bebas Neue är ett versaltypsnitt. Japanskan faller tillbaka på ett
   japanskt typsnitt och får en riktig fet vikt. */
h1, h2, h3, .overrubrik, .ordmarke, .knapp, .meny a, .jattemarke, .koordinat, caption {
  font-family: var(--rubrik);
  font-weight: 400;
  letter-spacing: 0.02em;
}
h1, h2, h3 { color: var(--vit); line-height: 1.02; margin: 0 0 1rem; overflow-wrap: break-word; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .knapp, :lang(ja) .meny a, :lang(ja) caption {
  font-weight: 700; font-synthesis: none; letter-spacing: 0.04em; line-height: 1.35; word-break: auto-phrase;
}
h3 { font-size: 1.65rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }

.overrubrik {
  font-size: 1.2rem; letter-spacing: 0.14em; color: var(--dampad); margin: 0 0 0.75rem;
}
.overrubrik a { color: inherit; }

/* Språkraden och sidhuvudet */
.sprakrad { border-bottom: 1px solid var(--linje); }
.sprak { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 1.1rem; }
.sprak a { display: inline-flex; align-items: center; min-height: 48px; color: var(--dampad); text-decoration: none; }
.sprak a:hover { color: var(--vit); text-decoration: underline; }
.sprak a[aria-current="true"] { color: var(--vit); text-decoration: underline; text-decoration-thickness: 2px; }

.topp { border-bottom: 1px solid var(--linje); }
.topp-inre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 2rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.ordmarke {
  font-size: 2.7rem; line-height: 1; letter-spacing: 0.035em; color: var(--vit); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 48px;
}
.meny ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.6rem; }
.meny a {
  display: inline-flex; align-items: center; min-height: 48px; font-size: 1.45rem; letter-spacing: 0.07em;
  color: var(--text); text-decoration: none; border-bottom: 3px solid transparent;
}
.meny a:hover { color: var(--vit); border-bottom-color: var(--linje-stark); }
.meny a[aria-current="page"] { color: var(--vit); border-bottom-color: var(--vit); }

/* Toppen */
.hero { padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-hem { padding-top: clamp(3rem, 7vw, 6rem); }
.hero-kort { padding-bottom: 1rem; }
.jattemarke {
  font-size: clamp(6.5rem, 24vw, 19rem); line-height: 0.8; color: var(--vit); margin: 0 0 1.2rem;
  letter-spacing: 0.01em;
}
.hero-rubrik { font-size: clamp(2.1rem, 4.6vw, 3.7rem); max-width: 26ch; margin-bottom: 1.5rem; }
:lang(ja) .hero-rubrik { max-width: 26ch; font-size: clamp(1.8rem, 3.8vw, 3rem); }
.sid-rubrik { font-size: clamp(2.5rem, 5.4vw, 4.4rem); max-width: 22ch; }
.jatterubrik { font-size: clamp(3.3rem, 10vw, 8rem); line-height: 0.9; }
:lang(ja) .jatterubrik, :lang(ja) .sid-rubrik { font-size: clamp(2.2rem, 5.6vw, 4.4rem); line-height: 1.25; }
.ingress { font-size: 1.25rem; max-width: 40em; color: var(--text); }
.ort { font-family: var(--rubrik); letter-spacing: 0.16em; color: var(--dampad); font-size: 1.2rem; margin-top: 2rem; }

.knappar { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 0; }
.knapp {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0.55rem 1.4rem 0.45rem; font-size: 1.4rem; letter-spacing: 0.08em; line-height: 1.1;
  background: var(--vit); color: #000; border: 2px solid var(--vit); text-decoration: none; cursor: pointer;
}
.knapp:hover { background: transparent; color: var(--vit); }
.knapp-kontur { background: transparent; color: var(--vit); }
.knapp-kontur:hover { background: var(--vit); color: #000; }
.pil-lank { font-weight: 700; display: inline-flex; align-items: center; min-height: 48px; }
.pil-lank::after { content: "\2192"; margin-left: 0.5em; }

/* Avsnitten */
.del { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--linje); }
.del-mork { background: rgba(0, 0, 0, 0.35); }
.del-rubrik { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 2rem; max-width: 26ch; }
.halv-rubrik { font-size: clamp(1.8rem, 3vw, 2.5rem); max-width: 24ch; }
.stor-rubrik { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 0.95; }

.kolumner { display: grid; gap: 2.5rem 3rem; }
.kolumner-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.kolumner-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.kolumner-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.kolumn { border-top: 1px solid var(--linje-stark); padding-top: 1.3rem; }
.bred-text .kolumn { border-top: 0; padding-top: 0; }
.smal-kolumn { max-width: 52rem; }
.smal { max-width: 44em; }
.stor-text { font-size: 1.3rem; }

.streck-lista { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.streck-lista li { padding: 0.8rem 0; border-top: 1px solid var(--linje); font-size: 1.1rem; }
.streck-lista li:last-child { border-bottom: 1px solid var(--linje); }

.problem-losning { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0; }
.halva { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--linje-stark); }
.halva-ljus { background: var(--vit); color: #000; border-color: var(--vit); }
.halva-ljus h2, .halva-ljus .overrubrik { color: #000; }
.halva-ljus .streck-lista li { border-color: rgba(0, 0, 0, 0.3); }
.halva-ljus :focus-visible { outline-color: #000; }

.rutnat { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 2.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rutnat li { border-top: 1px solid var(--linje-stark); padding-top: 1.3rem; }

.citat {
  margin: 1.5rem 0 2rem; padding: 0 0 0 1.5rem; border-left: 4px solid var(--vit);
  font-size: clamp(1.45rem, 2.8vw, 2.2rem); line-height: 1.32; color: var(--vit); max-width: 34em;
}
.citat p:last-child { margin-bottom: 0; }

.schweiz { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; align-items: end; }
.koordinat { font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: 0.95; color: var(--vit); text-align: right; margin: 0; letter-spacing: 0.04em; }

/* Nätet och kartan */
.natet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.karta { margin: 0; }
.karta svg { display: block; width: 100%; max-height: 640px; }
.lank { stroke: var(--linje-stark); stroke-width: 3.2; stroke-linecap: round; }
/* Varje flöde är ritat från orten närmast Genève, så alla rör sig framåt längs linjen. */
.flode { stroke: var(--vit); stroke-width: 2.6; stroke-dasharray: 3 25; stroke-linecap: round; animation: flode 3.2s linear infinite; }
.flode-1 { animation-duration: 4.1s; }
.flode-2 { animation-duration: 2.6s; }
@keyframes flode { to { stroke-dashoffset: -112; } }
.nod { fill: var(--vit); }
.nav-ring { fill: none; stroke: var(--vit); stroke-width: 3; }
.nodtext { fill: var(--vit); font-family: var(--rubrik); font-size: 30px; letter-spacing: 0.06em; }
.nodtext-nav { font-size: 40px; }
.karta figcaption { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; color: var(--dampad); }
.forklaring { display: inline-flex; align-items: center; gap: 0.6rem; }
.tecken { display: inline-block; }
.tecken-nod { width: 14px; height: 14px; background: var(--vit); }
.tecken-nav { width: 18px; height: 18px; background: var(--vit); outline: 3px solid var(--vit); outline-offset: 3px; margin: 0 4px; }
.tecken-flode { width: 32px; border-top: 3px dotted var(--vit); }
.tecken-lank { width: 32px; border-top: 4px solid var(--linje-stark); }

.dc-rubrik { font-size: 1.7rem; margin-top: 3rem; }
.dc-lista { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0 2.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.dc-lista li { padding: 0.75rem 0; border-top: 1px solid var(--linje); font-size: 1.1rem; }
.dc-kod { font-family: var(--rubrik); font-size: 1.35rem; letter-spacing: 0.08em; color: var(--vit); margin-right: 0.4rem; }
.dc-nav { font-weight: 700; color: var(--vit); }
.dc-roll { font-weight: 400; color: var(--dampad); }
.dc-grannar { display: block; margin-top: 0.25rem; font-size: 1rem; font-weight: 400; color: var(--dampad); }

/* Uppmaningen */
.cta { background: var(--vit); color: #000; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.cta h2 { color: #000; }
.cta-inre { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; }
.cta-inre > div { max-width: 40em; }
.cta .knapp { background: #000; color: var(--vit); border-color: #000; }
.cta .knapp:hover { background: transparent; color: #000; }
.cta :focus-visible { outline-color: #000; }

/* Formuläret */
.kontakt { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); }
.formular { max-width: 46rem; }
.falt { margin-bottom: 1.5rem; }
.falt label { display: block; font-weight: 700; margin-bottom: 0.4rem; color: var(--vit); }
.kravs { font-weight: 400; color: var(--dampad); }
.hjalp { color: var(--dampad); margin: -0.2rem 0 0.5rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 54px; padding: 0.75rem 0.9rem; font: inherit; font-size: 1rem;
  color: var(--vit); background: #111113; border: 2px solid #b5b5b5; border-radius: 0;
}
textarea { min-height: 11rem; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 15px) 50%; background-size: 7px 7px, 7px 7px; background-repeat: no-repeat; padding-right: 2.6rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--vit); outline-offset: 2px; border-color: var(--vit); }
.har-fel input, .har-fel select, .har-fel textarea { border-color: var(--fel); border-width: 3px; }
.faltfel { color: var(--fel); font-weight: 700; margin: 0.45rem 0 0; }
.faltfel::before { content: "! "; }
.falt-kryss { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.falt-kryss input { width: 28px; height: 28px; margin: 0.15rem 0 0; accent-color: #fff; }
.falt-kryss label { font-weight: 400; color: var(--text); margin: 0; }
.falt-kryss .faltfel { grid-column: 1 / -1; }
.felruta { border: 3px solid var(--fel); padding: 1rem 1.25rem; margin-bottom: 2rem; }
.felruta p { font-weight: 700; color: var(--vit); }
.felruta a { color: var(--fel); }
.honung { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sidopanel { border-top: 1px solid var(--linje-stark); padding-top: 1.3rem; align-self: start; }

/* Nyheter och textsidor */
.nyhetslista { list-style: none; padding: 0; margin: 0; }
.nyhetslista li { border-top: 1px solid var(--linje-stark); padding: 1.6rem 0; }
.datum { color: var(--dampad); margin-bottom: 0.4rem; }
.brodtext h2 { font-size: 1.9rem; margin-top: 2.4rem; }
.brodtext ul { padding-left: 1.3rem; }
.brodtext li { margin-bottom: 0.4rem; }
.nyhetsbild { margin: 0 0 2rem; }
.nyhetsbild img { display: block; width: 100%; }

/* Sidfoten */
/* Nedre luft 6rem: tillgänglighetsknappen (56 px, fast 16 px från hörnet) får inte täcka sidfotens sista rad. */
.sidfot { border-top: 1px solid var(--linje); padding: clamp(3rem, 6vw, 4.5rem) 0 6rem; }
.sidfot-inre { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem 3rem; }
.ordmarke-liten { font-size: 2.2rem; margin: 0 0 0.75rem; }
.sidfot .ort { margin-top: 0.5rem; }
.sidfot-lankar { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.sidfot-lankar a { display: inline-flex; align-items: center; min-height: 48px; color: var(--text); }
.sidfot-botten { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--linje); color: var(--dampad); }
.sidfot-botten p { margin: 0; }
.drivs-av a { color: var(--text); padding: 12px 0; }

/* Tillgänglighetspanelen */
.a11y-knapp {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 56px; height: 56px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: #000; background: var(--vit); border: 2px solid #000; outline-offset: 3px;
}
.a11y-knapp svg { width: 34px; height: 34px; }
.a11y-knapp:hover { background: #000; color: var(--vit); border-color: var(--vit); }
.a11y-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow-y: auto; padding: 1.2rem 1.25rem; background: #111113;
  border: 2px solid var(--vit); color: var(--vit);
}
.a11y-panel[hidden] { display: none; }
.a11y-huvud { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.a11y-huvud h2 { font-size: 1.6rem; margin: 0; }
.a11y-panel fieldset { border: 0; padding: 0; margin: 0 0 0.75rem; }
.a11y-panel legend { font-weight: 700; margin-bottom: 0.4rem; }
.a11y-val { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.a11y-panel button {
  min-height: 48px; min-width: 48px; padding: 0.45rem 0.85rem; font: inherit; cursor: pointer;
  color: var(--vit); background: transparent; border: 2px solid var(--vit);
}
.a11y-panel button[aria-pressed="true"] { background: var(--vit); color: #000; }
.a11y-genvag, .a11y-status { color: var(--dampad); margin: 0.25rem 0 0; }

/* Hög kontrast */
html.a11y-kontrast body { background: #000; background-image: none; color: #fff; }
html.a11y-kontrast .del-mork { background: #000; }
html.a11y-kontrast a { text-decoration: underline; text-decoration-thickness: 2px; }
html.a11y-kontrast { --linje: #ffffff; --linje-stark: #ffffff; --dampad: #ffffff; --text: #ffffff; }
html.a11y-kontrast .halva-ljus, html.a11y-kontrast .cta { background: #000; color: #fff; border: 2px solid #fff; }
html.a11y-kontrast .halva-ljus h2, html.a11y-kontrast .halva-ljus .overrubrik, html.a11y-kontrast .cta h2 { color: #fff; }
html.a11y-kontrast .halva-ljus .streck-lista li { border-color: #fff; }
html.a11y-kontrast .cta .knapp { background: #fff; color: #000; border-color: #fff; }
html.a11y-kontrast :focus-visible { outline: 4px solid #ffe066; }

/* Rörelse */
html.a11y-rorelse .floden { display: none; }
html.a11y-rorelse { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  .floden { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Smala skärmar */
@media (max-width: 860px) {
  .natet, .kontakt, .schweiz, .sidfot-inre { grid-template-columns: minmax(0, 1fr); }
  .koordinat { text-align: left; }
  .sprak { justify-content: flex-start; }
  .meny ul { gap: 0 1.2rem; }
  .meny a { font-size: 1.3rem; }
}

@media print {
  body { background: #fff; color: #000; }
  .sprakrad, .meny, .a11y-knapp, .a11y-panel, .floden, .cta .knapp { display: none !important; }
  h1, h2, h3, .ordmarke, .jattemarke, .koordinat { color: #000; }
  .halva-ljus, .cta { border: 1px solid #000; }
}
