/* Biotherm Heat · Nyheter (nyheter.html), ovanpå bas.css och sajt.css. Prefix nyh-.
   En nyhet per uppslag: ljuslinjeteckning till vänster, text och numrerade rader till höger. */

/* ---------- hero ---------- */
.nyh-hero { position: relative; padding: clamp(136px, 12vw, 196px) 0 clamp(56px, 6vw, 112px); overflow: hidden; }
.nyh-hero > .topo { left: 40%; -webkit-mask-image: radial-gradient(60% 70% at 70% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(60% 70% at 70% 40%, #000 20%, transparent 75%); opacity: .8; }
.nyh-hero .bredd { position: relative; z-index: 1; }
.nyh-hero .smulor { margin-bottom: 34px; }
.nyh-hero h1 { margin-top: 24px; max-width: 11ch; font-size: clamp(3rem, 1.5rem + 4.4vw, 6.75rem); }
.nyh-hero .t-ingress { margin-top: 30px; max-width: 40ch; }

/* ---------- nyheterna ---------- */
.nyh { align-items: center; row-gap: 40px; padding: clamp(72px, 7.5vw, 136px) 0; border-top: 1px solid var(--linje); }
.nyh-bild { grid-column: 1 / span 6; position: relative; margin: 0; aspect-ratio: 640 / 440; }
.nyh-bild::before { content: ""; position: absolute; inset: 4% 2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(31, 116, 184, .1), rgba(31, 116, 184, 0)); pointer-events: none; }
.nyh-text { grid-column: 8 / span 5; }

.nyh-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; }
.nyh-meta .t-etikett { color: var(--is-2); }
.nyh-kalla { font-size: .8125rem; line-height: 1.3; font-weight: 600; font-stretch: 80%; font-variation-settings: "opsz" 12; letter-spacing: .16em; text-transform: uppercase; color: var(--is-3); }
/* datumet: tomt = syns inte; ifyllt visas det efter källan */
.nyh-datum:empty { display: none; }
.nyh-datum::before { content: "·"; margin: 0 .7em; }
.nyh-text h2 { margin-top: 26px; max-width: 15ch; }
.nyh-text .t-brod { margin-top: 22px; max-width: 44ch; }

/* raderna: siffran hör ihop med teckningen */
.nyh-delar { margin-top: 36px; counter-reset: del; }
.nyh-delar li { counter-increment: del; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 13px 0; border-top: 1px solid var(--linje); }
.nyh-delar li:last-child { border-bottom: 1px solid var(--linje); }
.nyh-delar li::before { content: counter(del); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(214, 230, 250, .55); font-size: .75rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--is); }
.nyh-delar .v { font-size: 1.0625rem; font-weight: 380; color: var(--is); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- teckningarna (byggs av nyheter.js) ---------- */
.nyh-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nyh-svg * { vector-effect: non-scaling-stroke; }
.nyh-svg .f { fill: #050c1e; fill-opacity: .94; stroke: none; }
.nyh-svg .p { fill: none; stroke-width: 1.5; stroke-opacity: .95; stroke-linecap: round; stroke-linejoin: round; }
.nyh-svg .s { fill: none; stroke-width: 1; stroke-opacity: .5; stroke-linecap: round; stroke-linejoin: round; }
.nyh-svg .h { fill: none; stroke-width: 7; stroke-opacity: .1; stroke-linecap: round; stroke-linejoin: round; }
.nyh-svg .ror { stroke-width: 1.8; }
.nyh-svg .skikt { fill: none; stroke-width: 1; }
.nyh-svg .mark { fill: none; stroke-width: 1; }
.nyh-svg .flis { fill: none; stroke: #aac4e4; stroke-opacity: .32; stroke-width: 1; stroke-linecap: round; }
.nyh-svg .el { stroke: #9fd3f2; stroke-opacity: .8; stroke-dasharray: 1.5 3.5; }
.nyh-svg .kulvert { stroke-dasharray: 3 4; stroke-opacity: .55; }
.nyh-svg .arm { stroke: #e8f1fc; stroke-width: 2; }
.nyh-svg .flyg { stroke: #cfe2f6; stroke-opacity: .85; animation: nyh-flyg .9s linear infinite; }
@keyframes nyh-flyg { to { transform: translateX(8px); } }
.nyh-bild.vilar .nyh-svg * { animation-play-state: paused; }

/* siffrorna i teckningen (HTML ovanpå, så att de går att läsa även på mobilen) */
.nyh-nr { position: absolute; z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center; border-radius: 50%; background: var(--natt); box-shadow: inset 0 0 0 1px rgba(214, 230, 250, .7), 0 0 0 5px rgba(4, 10, 24, .55); font-size: .8125rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; color: var(--is); }

/* avtäckning: teckningen ritas fram i flödets riktning (vänster till höger), siffrorna tänds efteråt */
.js .nyh-bild[data-syns] .nyh-svg { clip-path: inset(0 100% 0 0); transition: clip-path 2.4s var(--ease) .1s; }
.js .nyh-bild.syns .nyh-svg { clip-path: inset(0 0 0 0); }
.js .nyh-bild[data-syns] .nyh-nr { opacity: 0; transform: scale(.7); transition: opacity .8s ease, transform 1s var(--ease); }
.js .nyh-bild.syns .nyh-nr { opacity: 1; transform: none; transition-delay: 1.3s; }
.js .nyh-bild.syns .nyh-nr + .nyh-nr { transition-delay: 1.45s; }
.js .nyh-bild.syns .nyh-nr + .nyh-nr + .nyh-nr { transition-delay: 1.6s; }
.js .nyh-bild.syns .nyh-nr + .nyh-nr + .nyh-nr + .nyh-nr { transition-delay: 1.75s; }

/* ---------- jättetalet (Skogsnolia) ---------- */
.nyh-tal { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nyh-tal::before { inset: 10% 14%; background: radial-gradient(closest-side, rgba(31, 116, 184, .16), rgba(31, 116, 184, 0)); }
.nyh-jattetal { position: relative; display: block; font-size: clamp(16rem, 31vw, 34rem); line-height: .74; padding-top: .04em; font-weight: 420; font-variation-settings: "opsz" 96; letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  background: #1f74b8 url("../bild/sidor/nyh-tre.webp") 50% 50% / cover no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; }
.nyh-golv { position: relative; display: block; width: 58%; height: 1px; margin-top: clamp(18px, 2vw, 30px); background: linear-gradient(90deg, rgba(31, 116, 184, 0), #1f74b8 30%, #9fb4c4 70%, rgba(159, 180, 196, 0)); }
.nyh-golv::after { content: ""; position: absolute; left: 10%; right: 10%; top: -14px; height: 28px; border-radius: 50%; background: radial-gradient(closest-side, rgba(63, 143, 214, .22), rgba(63, 143, 214, 0)); }
.nyh-tal .t-etikett { position: relative; margin-top: 20px; }
.js .nyh-tal[data-syns] .nyh-jattetal { opacity: 0; transform: translateY(18px); transition: opacity 1.4s ease .1s, transform 1.8s var(--ease) .1s; }
.js .nyh-tal[data-syns] .nyh-golv { transform: scaleX(0); transition: transform 1.8s var(--ease) .5s; }
.js .nyh-tal.syns .nyh-jattetal, .js .nyh-tal.syns .nyh-golv { opacity: 1; transform: none; }


/* ---------- mellanstora skärmar ---------- */
@media (max-width: 1100px) {
  .nyh-bild { grid-column: 1 / span 7; }
  .nyh-text { grid-column: 8 / span 5; }
  .nyh-text h2 { font-size: 2rem; }
}
@media (max-width: 960px) {
  .nyh { row-gap: 36px; }
  .nyh-bild { grid-column: 1 / -1; width: 100%; max-width: 720px; justify-self: center; }
  .nyh-text { grid-column: 1 / -1; max-width: 640px; }
}

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  .nyh-hero .smulor { margin-bottom: 26px; }
  .nyh-hero h1 { font-size: 3.25rem; }
  .nyh-hero .t-ingress { margin-top: 24px; font-size: 1.1875rem; }
  .nyh { padding: 56px 0 64px; row-gap: 28px; }
  .nyh-bild { margin-inline: -8px; width: calc(100% + 16px); }
  .nyh-nr { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: .75rem; box-shadow: inset 0 0 0 1px rgba(214, 230, 250, .7), 0 0 0 3px rgba(4, 10, 24, .55); }
  .nyh-text h2 { margin-top: 20px; font-size: 1.875rem; }
  .nyh-text .t-brod { margin-top: 16px; }
  .nyh-delar { margin-top: 28px; }
  .nyh-delar .v { font-size: 1rem; }
  .nyh-jattetal { font-size: 17rem; }
}
