@font-face {
  font-family: 'Roboto Condensed';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(roboto-condensed-italic.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;
}

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(roboto-condensed-normal.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 {
    interpolate-size: allow-keywords;

    --white: hsl(0 0% 100%);
    --base-dark: hsl(220 33% 11%);
    --base-dark-faded: hsl(from var(--base-dark) H calc(S / 2) calc(L + 10));   
    --base-light: hsl(36 19% 93%);   
    --accent-pink: hsl(330 70% 45%);
    --accent-blue: hsl(195 100% 40%);
    --accent-yellow: hsl(47 99% 55%);

    --edge-pos: clamp(1rem, -1.3333rem + 11.6667vi, 8rem);
    --edge-neg: clamp(-8rem, 1.3333rem - 11.6667vi, -1rem);

    --container:42rem;
    
    --fluid-type: clamp(1.25rem, 1.125rem + 0.3125vw, 1.375rem);
    /* @link https://utopia.fyi/clamp/calculator?a=640,1280,20—22 */
}

@view-transition {
    navigation: auto;
}

html {
    background-color: var(--base-dark);
    box-sizing: border-box;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: var(--fluid-type);
    font-optical-sizing: auto;
    font-weight: 350;
    line-height: 1.5;
    color: var(--white);
}

:where(h2,h3,h4){
    margin-block: 1.25em 0.25em;
    line-height: 1.25;
}

h1 {
    font-size: 2.25em;
    line-height: 1.125;
    font-weight: 900;
    margin-block: 0.125em 0.25em;
}

h2 {
    font-size: 1.5em;
    font-weight: 800;
}

h3 {
    font-size: 1.25em;
    font-weight: 600;
}

h4 {
    font-size: 1em;
    font-weight: 800;
}

:where(h2,h3,h4) + :is(h3,h4,ul,p, table) {
    margin-block-start: 0.25lh;
}

:where(b,strong, p > a) {
    font-weight: 500
}

a {
    text-decoration-color: var(--accent-blue);
    text-underline-offset: 0.1lh;
    text-decoration-thickness: 0.125ch;

    &:hover {
        text-decoration-color: var(--accent-pink);
        text-underline-offset: 0.125lh;
        text-decoration-thickness: 0.15ch;
    }
}

ul:not([class]) {
    padding-inline-start: 1.15em;
    list-style-type: square
}

ul[class] {
    list-style: none;
    padding-inline-start: 0;
}

:where(dl, ul, ol):not([class]) :where(li + li) {
    margin-block-start: 0.125lh;
}

:where(p, li) {
    text-wrap: pretty;
}

dl {
    margin-block-start: 0.25lh;
}

dt {
    font-weight: 600;
}

dd {
    margin-inline-start: 0;

    p {
        margin-block-start: 0;
    }
}

figure {
    margin-inline-start: 0;
    margin-inline-end: 0
}

img {
    max-inline-size: 100%;
    block-size: auto;
    object-fit: cover;
}

button {
    appearance: none;
    background-color: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: currentColor;
    text-align: initial
}

svg {
    fill: currentColor
}

hr {
    border: 0;
    border-block-start: 1px solid hsl(from var(--base-dark) H S L / 10%);
    margin-block-end: 1em
}

table {
    border-spacing: 0;
    table-layout: fixed;
    inline-size: 100%;
}

:where(th, td) {
    padding: 0.375lh 1ch;

    &:first-child {
        padding-inline-start: 0;
    }    
    &:last-child {
        padding-inline-end: 0;
    }
}

:where(thead) :where(th, td) {
    font-size: 0.75em;
}

:where(tbody) :where(th, td) {
    border-block-start: 1px solid hsl(from var(--base-dark) H S L / 20%);
}


details {
    display: grid;
    padding-inline-start: 2rem;

    &:first-of-type {
        margin-block-start: 0.5lh;
    }

    &[open] summary {
        margin-block-end: 0.125lh;

        &:before {
            rotate: -180deg;
        }
    }
}
  
summary {
    appearance: none;
    font-weight: 700;
    cursor: pointer;
    margin-inline-start: -2.375rem;
    display: inline-flex;
    gap: 0.5ch;

    &:hover {
        color: var(--accent-blue);
    }

    &::marker,
    &::-webkit-details-marker {
        display: none;
        content: "";
    }

    &:before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='rgb(11 22 34)' stroke-linecap='round' stroke-width='3' d='m6.5 10 5.493 5.493a.01.01 0 0 0 .014 0L17.5 10'/%3E%3C/svg%3E");
        background-position: center;
        background-repeat: no-repeat;
        content: "";
        display: inline-block;
        flex-shrink: 0;
        place-items: center;
        place-self: baseline;
        translate: 0 0.875ch;
        transition: rotate 150ms;
        inline-size: 2rem;
        block-size: 1rem;
    }
}

[hidden] { display: none }

.grid-layout {
    display: grid;
    grid-auto-flow: row dense;
    align-content: start;
    grid-template-columns: 
        [full-start] var(--edge-pos) minmax(0, 1fr) 
        [container-start] var(--edge-pos) 
        [prose-start] minmax(0, calc(var(--container) / 2)) minmax(0, calc(var(--container) / 2)) 
        [prose-end] var(--edge-pos) 
        [container-end] minmax(0, 1fr) var(--edge-pos) [full-end];

    & > * {
        grid-column: container;
        z-index: 10;
    }
}


.header {
    padding-block-start: 1.5em;
    margin-block-end: 1em;
    grid-row: 1;
    display:grid;
    grid-template-columns: auto auto;
    align-items: center;
}

.logo {
    display: inline-block;
    margin-inline-start: -0.375em;
    transition: margin-inline-start linear 100ms;
    flex-shrink: 0;

    @media (width > 560px) {
        margin-inline-start: -2.125em;
    }
    svg {
        fill: var(--white);
        inline-size: clamp(10rem, 9.0909rem + 4.5455vw, 12rem);
        block-size: 100%;
    }
}


.menu-toggle {
    background-color: var(--accent-yellow);
    border-radius: 99ch;
    grid-column: nav;
    align-self: center;
    justify-self: end;
    translate: 0.25em -0.25em;
    padding: 1ex 1.25em .8ex;
    line-height: 1.3;
    font-weight: 500;
    font-size: 0.875em;
    letter-spacing: 2%;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--base-dark);
}

.menu {
    overflow: clip;
    grid-column: span 4;
    -webkit-font-smoothing: antialiased;
    margin-block: 1lh;
    block-size: auto;
    transition: block-size 200ms ease-in-out;

    @starting-style { block-size: 0 }

    ul {
        list-style: none;
        margin-block: 0;
        padding-inline-start: 0;
        
        @media (width > 400px) {
            columns: 2;
            gap: 4ch;
        }
     }
     li {
         position: relative;
         break-inside: avoid;
         margin-block-start: 0;
    }
    li + li {
        @media (width <= 400px){
            border-block-start: 1px solid color-mix(in srgb, var(--accent-blue) 30%, transparent);
        }
    }
    li:nth-child(3n - 1),li:nth-child(3n - 2) {
        @media (width > 400px){
            border-block-end: 1px solid color-mix(in srgb, var(--accent-blue) 30%, transparent);
        }
    }
    a {
        display: block;
        color: currentColor;
        text-decoration: none;
        padding-block: 0.5em 0.625em;
        text-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
        
        &:hover {
            text-decoration-line: underline;
            text-decoration-color: var(--accent-blue);
            text-decoration-thickness: 0.15ch;
        }     
        &:after {
            content: "";
            position: absolute;
            inset: 0;
        }
    }
}

[aria-pressed=false] + .menu {
    display: none;
}




.main {
    grid-column: full;
}

.main--page {
    scroll-timeline: --mainPage;
    background-color: var(--base-light);
    overflow: clip;
    border-radius: 1em;
    box-shadow: 0 10px 40px 10px hsl(from var(--base-dark) H S L / 20%);

    @media (width > 800px) {
        border-radius: 0.5em;
        grid-column: container;
    }

    & > * {
        grid-column: prose;
    
        :where(h1,h2,h3,h4) {
            color: var(--base-dark);
        }
        :not(h1, h2, h3, h4) {
            color: var(--base-dark-faded);
        }
    }
}


.breadcrumbs {
    padding-block: .25lh .5lh;

    a {
        font-weight: 500;
    }
}

.prose {
    padding: clamp(1.5rem, 6.25vw, 5rem) var(--edge-pos) clamp(3rem, 10vw, 8rem);
}

.aside {
    position: relative;
    z-index: 1;
    margin-block-end: clamp(2.5rem, 1.2273rem + 6.3636vi, 6rem);
}

.placeholder {
    border-radius: 1em;
    border: .25em dotted hsl(from var(--accent-blue) H S calc(L + 30) / 0.5);
    display: grid;
    place-items: center;
    margin-block: 2lh;

    p {
        font-size: 500%;
        font-weight: 1000;
        color: alpha(from var(--accent-blue) / .25)
    }
}


.panellist {
    margin-block-start: 1.125lh;
    clear: both;
}

.panel {
    position: relative;
    padding-block: 0.375lh;
    line-height: 1.5;
    border-block-start: 1px solid hsl(from var(--base-dark) H S L / 20%);
    display: grid;
    
    &:last-of-type {
        border-block-end: 1px solid hsl(from var(--base-dark) H S L / 20%);
    }
    &:has(.emoji) {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
    &:has(a:hover) {
        border-image:linear-gradient(var(--white)) fill 0/0/0 100vw;
        z-index: 1;
    }
    &:has(a:hover) + & {
        border-block-start-color: #0000;
    }
    a {
        font-size: 1.125em;
        font-weight: 600;
        text-decoration-line: underline;
        text-underline-offset: 0.125em;
        text-decoration-color: var(--accent-blue);

        &:hover {
            text-decoration-color: var(--accent-pink);
        }
        &:after {
            content: "";
            position: absolute;
            inset: 0;
        }
    }
    & > p {
        margin-block: 0;
        font-size: 0.875em;
    }
}




/* FOOTER */

.footer {
    -webkit-font-smoothing: antialiased;
    border-block-start: 1px solid hsl(from var(--white) H S L / 10%);
    padding: 1em clamp(1rem, -1.261rem + 9.275vi, 5rem);
    font-size: 0.75em;
    display: flex;
    flex-wrap: wrap;
    column-gap: 4em;
    justify-content: space-between;
    align-items: flex-start;
    color: var(--white);

    @media (width > 480px) {
        padding-inline: 0;
    }
    div {
        margin-inline-start: auto;
        line-height: 1.375;
    }
    p {
        margin: 0;
        text-align: end;
    
        @media (width > 1200px) {
            text-align: right;
        }
    }
    a {
        color: var(--white);
    }
    & > a {
        @media (width > 800px) {
            margin-inline-start: -4ex;
        }
    }
}    



/* HERO */

.hero {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    inline-size: 100%;
    overflow: hidden;
    opacity: .5;
    pointer-events: none;

    @media (width > 1200px) {
        position: fixed;
    }
}

.hero img {
    inline-size: 100%;
    max-block-size: 100%;
    pointer-events: none;
    mask-image: linear-gradient(to top, rgb(0 0 0 / 0) 25%, rgb(0 0 0 / 0.7));
}
.hero--home img {
    filter: blur(0.125em);
}


.scroll-overflow {
    grid-column: full;
    margin-block: 1lh 1.5lh;

    @media (width < 1200px) {
        overflow: clip;
    }
}
.scroll-container {
    display: flex;

    @media (width < 1200px) {
        overflow-x: scroll;
        margin-block-end: -1lh;
        padding-block: 1lh 1.25lh;
    }
}
.edge-spacer {
    padding-inline: calc(var(--edge-pos) / 2);
    flex:0;
}

.post-list {
    display: grid;
    gap: 1.5rem;
    margin-block:0.5lh 1lh;
    max-inline-size: 80rem;
    inline-size: stretch;

    @media (width > 1200px) {
        grid-template-columns: repeat(3, minmax(18rem, 1fr));
        margin-inline: -2rem;
    }
}

.post {
    position: relative;
    border-radius: .5em;
    background: var(--base-light);
    padding: 2rem;
    color: var(--base-dark);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    container-type: inline-size;
    rotate:1deg;

    @media (width > 1200px) {
        aspect-ratio: 4/3;
        grid-template-columns: minmax(12ch, 1fr) auto;

    }
    &:has(a:hover){
        background-color: var(--white);
    }
    &:nth-child(2n+1) {
        rotate: -1deg;
    }

    a {
        color: currentColor;
        font-size: 1.25em;
        line-height: 1.35;
        font-weight: 400;
        block-size: stretch;
        margin-inline-end: 2ch;

        &:after {
            content:"";
            position: absolute;
            inset: 0;
            z-index: 1;
        }
    }
}

.emoji {
    background: var(--white);
    justify-self: start;
    align-self: start;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding:0.125em 0.375em;
    border-radius: 99ch;
    float: right;
    font-size: 1.125em;
}

.tags {
    padding-block-start: .125lh;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    grid-column: 1/-1;
    font-size: 0.75em;
    opacity: .7;
}

.kicker {
    display: block;
    color: var(--base-dark);
    font-weight: 600;
    margin-block-end: .25lh;
    inline-size: fit-content;
    text-indent: -0.25ch;

    &:has(a) {
        margin-inline-start:-2ch;
    }
}

.kicker a {
    text-decoration-line: underline;
    text-decoration-color: var(--accent-blue);

    &:hover {
        color: var(--accent-blue);
    }
}

.polaroid {
    position: relative;
    aspect-ratio: 8/9;
    background-color: var(--white);
    border-radius: 0.125rem;
    box-shadow: 0 12px 24px -16px rgb(0 0 0 / 0.25);
    padding: 0.75rem;
    margin-block: 2cap;
    z-index: 10;
    max-inline-size: 22ch;
    rotate: 1.5deg;

    @media (width > 640px) {
        margin: 0 -2ch 1lh 3ch;
        float: right;
    }
}

.polaroid img {
    aspect-ratio: 1 / 1;
    inline-size: 100%;
}



.event-data {
    border-top: 1px solid hsl(from var(--base-dark) H S L / 10%);
    margin-block: 4ex;
}

.event-data div {
    border-bottom: 1px solid hsl(from var(--base-dark) H S L / 10%);
    padding-block: 0.5em;
    display: grid;
    grid-template-columns: 2fr 3fr;

    @media (width > 640px) {
        padding-block: 0.75em;
    }
}    


.teaser {
    background-color: var(--white);
    box-shadow: 0 1px 2px hsl(from var(--base-dark) H S L / 10%);
    margin: 2em 0;
    border-radius: .25em;
    padding: 1em;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    align-content: start;
    column-gap: 2em;
    position: relative;

    @media (width > 1200px) {
        padding-inline: 1.5em;
        margin-inline: -1.5em;
    }
}

.teaser a {
    color: currentColor;
    text-decoration: underline;
    text-decoration-color: var(--accent-blue);
}

.teaser a:hover {
    color: var(--accent-pink);
    text-decoration: none;
}

:where(.teaser) a:after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
}

.teaser :where(h2, p) {
    grid-column: 1
}

:where(.teaser) h2 {
    margin-block-start: 0;
    font-size: 1.125em;
}

:where(.teaser) p {
    font-size: 0.875em;
    margin: 0
}
:where(.teaser) img {
    align-self: stretch;
    grid-row: 1 / span 2;
    grid-column: 2;
    object-fit: cover;
    inline-size: min(8em, 16em);
}


.join {
    margin-inline: 1em;
    padding-block: 6em;
    grid-column: container;
 
    a {
        background-color: var(--accent-yellow);
        padding-block: .4em .5em;
        border-radius: 2em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--base-dark);
        font-size: clamp(2rem, -0.1818rem + 10.9091vi, 8rem);
        font-weight: 600;
        white-space: nowrap;
        transform: translateZ(0);
        display: block;
        text-align: center;
        transition: background-color 150ms ease;
 
        &:hover {
            background-color: var(--base-light);
        }
    }
}


.events {
    grid-column: prose;
    list-style: none;
    padding-inline-start: 0;
    margin-block-start: .5lh;
    font-family: 'Roboto Condensed', sans-serif;
}

.event-listing {
    border-block-start: 1px solid hsl(from var(--base-dark) H S L / 20%);    
    position: relative;
    grid-column: prose;
    display: grid;
    column-gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
}

.event-listing a {
    font-weight: 500;
    align-self: end;
    color: currentColor;
    margin-block: 1.5ex 0;
}

.event-listing a:after {
    content: "";
    position: absolute;
    inset: -1px;
}

.event-listing:has(a:hover) {
    background-color: var(--white);
    border-image:linear-gradient(var(--white)) fill 0/0/0 100vw;
    z-index: 1;
}

.event-listing:has(a:hover) + .event-listing {
    border-color: #0000;
}

.event-listing :where(time, p) {
    pointer-events: none;
}

.event-listing p {
    font-size: 0.875em;
    opacity: 0.8;
    font-variant-numeric: lining-nums;
    margin-block-start: 0;
}



.cal-day {
    grid-row: span 2;
    display: grid;
    align-items: center;
    justify-content: stretch;
    text-align: center;
    inline-size: 2em;
    overflow: clip;
    border-radius: 0.125em;
    translate:0 1.6ex;
}

.cal-day :nth-child(1) {
    background-color: var(--accent-blue);
    padding-block-start: 0.15em;
    text-transform: uppercase;
    font-size: 0.625em;
    font-weight: 600;
    color: var(--white);
    line-height: 1.7;
}

.cal-day :nth-child(2) {
    background-color: var(--white);
    text-transform: uppercase;
    font-size: 1.125em;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -6%;
    padding-block: 0.125em;
}

.event-listing:has(a:hover) .cal-day :nth-child(1) {
    background-color: var(--accent-pink);
}
.event-listing:has(a:hover) .cal-day :nth-child(2) {
    background-color: var(--base-light);
}


.schedule {}

.schedule dl > div {
    padding-block: .25lh;
    @media (width > 560px) {
        display: grid;
        align-items: baseline;
        grid-template-columns: 10.5ch 1fr;
    }
}

.schedule dt {
    border-image:linear-gradient(alpha(from var(--accent-yellow) / .75)) fill 0/0/0 0.15em;
    margin-block-end: 0.5lh;
    inline-size: fit-content;
    font-size: smaller;
    line-height: 1.3;
    grid-column: 1;
    font-weight: 400;
    translate: 0 -0.15ex;
}

.schedule dd {
    grid-column: 2;
    text-wrap: pretty;
    padding: 0 0.5ch 0.5lh;
    margin-inline: -0.25em;
    border-radius: 0.25em;
    column-gap: .75ch;
    line-height: 1.3;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
}

.schedule dd b {
    font-weight: 500;
    letter-spacing: -1%;
}

.schedule dd *:nth-child(2) {
    background: conic-gradient(at 1px 1px,#0000 75%,#0000007C 0)0 1.75ex/3px repeat-x;
    text-align: end;
    color:#0000;
}
.schedule dd p {
    grid-column: 1 / -1;
    margin-block-start: .25lh;
}

.schedule dd > span:last-of-type {
    inline-size: 8ch;
    letter-spacing: -1%;
}





.sponsors {
    grid-column: full;
    text-align: center;
    color: var(--white);

    a {
        flex-grow: 2;
        display: inline-block;
    }
    img {
        aspect-ratio: 3 / 2;
        object-fit: contain;
        inline-size: auto;
        block-size: clamp(10rem, 3.3333rem + 33.3333vi, 30rem);
        max-block-size: 10rem;
    }
}

.sponsor-line {
    background: url(images/sponsor-wall.webp) repeat-x;
    background-position: center;
    background-blend-mode: multiply;
    min-block-size: clamp(5rem, 2.6667rem + 11.6667vi, 12rem);
    background-size: clamp(16rem, 11.3333rem + 23.3333vi, 30rem);
    opacity: 0.25;
}

.spacer-edge {
    inline-size: var(--edge-pos);
}

.sr-only {
    border: 0 !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	width: 1px !important;
	white-space: nowrap !important;
    position: absolute;
}

/* osvb.sindres.no: toppen kommer fra Dressen og står over rutenettet */
.med-dressen .grid-layout {
    padding-block-start: 2rem;
}
