
/**************************************************** RESET ****************************************************/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
    box-sizing: border-box;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

button {
    appearance: none;
    font-weight: inherit;
    font-family: inherit;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: "";
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/**************************************************** FONTS ****************************************************/

@font-face {
    font-family: "Rapid";
    src: url("../fonts/RapidSTTrial-BlackWide.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "William Regular";
    src: url("../fonts/WilliamSubheadxsTRIAL-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "William Italic";
    src: url("../fonts/WilliamSubheadxsTRIAL-RegularItalic.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/**************************************************** VARIABLE ****************************************************/

:root {
    --padding-s: 8px; 
    --padding-m: calc(var(--padding-s) * 2);

    --animationspeed: 600ms;

    --black: #000000;
    --white: #ffffff;

    --color-text: var(--black);

    --fontfamily-rapid: "Rapid", Arial, sans-serif;
    --fontfamily-williamregular: "William Regular", Times, serif;
    --fontfamily-williamitalic: "William Italic", Times, serif;

    --fontsize-s: 12px;
    --fontsize-m: 1vw;
    --fontsize-l: calc(var(--fontsize-m) * 2.4);
    --lineheight-s: 16px;
    --lineheight-m: calc(var(--fontsize-m) * 1.2);
    --lineheight-l: calc(var(--lineheight-m) * 2.4);

}

:root[data-hover] {
    --color-text: var(--white);
}

/**************************************************** BASIC ****************************************************/

* {
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -webkit-box-shadow: none;
    box-shadow: none;
    font-style: normal;
    touch-action: manipulation;
    font-size: inherit;
    line-height: inherit;
    font-weight:normal;
    font-antialiasing: grayscale;

    margin-block-start: calc((1cap - 1lh) / 2.5);
    margin-block-end: calc((1cap - 1lh) / 2.5);

    @supports (text-box-trim: trim-both) {
        margin-block: 0;
        text-box-edge: cap alphabetic;
        text-box-trim: trim-both;
    }
}

body {
    font-family: var(--fontfamily-williamregular);
    font-size: var(--fontsize-m);
    line-height: var(--lineheight-m);
    color: var(--color-text);
}

/**************************************************** LINK ****************************************************/

a {
    color:inherit;
    text-decoration:underline;
}

a:hover {
    color:inherit;
    text-decoration:none;
    transform: translateZ(0);
}

.underline-no {
    text-decoration: none;
}

.underline-no:hover {
    font-family: var(--fontfamily-williamitalic);
    text-decoration: none;
}

/**************************************************** TYPE ****************************************************/

.fontsize-s, .fontsize-s * {
    font-size: var(--fontsize-s);
}

.fontsize-m, .fontsize-m * {
    font-size: var(--fontsize-m);
}

.fontsize-l, .fontsize-l * {
    font-size: var(--fontsize-l);
}

.lineheight-s, .lineheight-s * {
    line-height: var(--lineheight-s);
}

.lineheight-m, .lineheight-m * {
    line-height: var(--lineheight-m);
}

.lineheight-l, .lineheight-l * {
    line-height: var(--lineheight-l);
}

.case-upper,
.case-upper * {
    text-transform: uppercase;
}

.text > * + * {
    margin-block-start: calc(2 * var(--padding-s));
}

strong, b, h1, h1 a {
    font-family: var(--fontfamily-rapid) !important;
    text-transform: uppercase !important;
}

em, i {
    font-family: var(--fontfamily-williamitalic);
}

/**************************************************** PADDING ****************************************************/

.padding-s {
    padding:var(--padding-s);
}

.padding-m {
    padding:var(--padding-m);
}

.gap-s {
    gap:var(--padding-s);
}

.gap-m {
    gap:var(--padding-m);
}

/**************************************************** GRID ****************************************************/

.grid {
    display: flex;
    flex-flow: row wrap;
    flex-grow: 0;
    flex-shrink: 0;
    width: 100%;
    align-items: start;
    align-content: start;
}

.w-1-12 {
    width: calc(100% / 12 * 1);
}

.w-2-12 {
    width: calc(100% / 12 * 2);
}

.w-3-12 {
    width: calc(100% / 12 * 3);
}

.w-4-12 {
    width: calc(100% / 12 * 4);
}

.w-5-12 {
    width: calc(100% / 12 * 5);
}

.w-6-12 {
    width: calc(100% / 12 * 6);
}

.w-7-12 {
    width: calc(100% / 12 * 7);
}

.w-8-12 {
    width: calc(100% / 12 * 8);
}

.w-9-12 {
    width: calc(100% / 12 * 9);
}

.w-10-12 {
    width: calc(100% / 12 * 10);
}

.w-11-12 {
    width: calc(100% / 12 * 11);
}

.w-12-12 {
    width: calc(100% / 12 * 12);
}

.w-auto {
    width: auto;
    max-width:100%;
}

/**************************************************** POSITION ****************************************************/

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.position-fixed {
    position: fixed;
}

.position-sticky {
    position: sticky;
    top:0px;
    z-index: 50;
}

/**************************************************** MEDIA ****************************************************/

img,
video,
figure {
    width: 100%;
    display: block;
}

/**************************************************** RATIO ****************************************************/

.ratio-16-9 {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.ratio-3-4 {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.ratio-1-1 {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ratio-3-2 {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/**************************************************** ALIGN ****************************************************/

.align-center {
    justify-content: center;
}

.align-left {
    justify-content: flex-start;
}

.align-right {
    justify-content: flex-end;
}

.align-justify {
    justify-content: space-between;
}

/**************************************************** TEXT ALIGN ****************************************************/

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/**************************************************** Z-INDEX ****************************************************/

.z-index-1 {
    z-index: 1;
}

/**************************************************** SECTION ****************************************************/

html {
    scroll-behavior: smooth;
    /* scroll-snap-type: y proximity;
    scroll-padding-top: 0px; */
}

section {
    min-height: 100svh;
    width: 100%;
    /* scroll-snap-align: start;
    padding-top: var(--header-h); */
}

section .text {
    position: sticky;
    top: var(--header-h);
}

section.grid:has(> footer) {
    align-content: space-between;
}

/**************************************************** WORK ****************************************************/

iframe {
    aspect-ratio: 16 / 9;
}

/**************************************************** LOGO ****************************************************/

.logo {
    --logo-h: calc(6.5 * var(--lineheight-m));
    --logo-intro: 3s;
    bottom: 0px;
    right: 0px;
}

.logo svg {
    display: block;
    height: var(--logo-h);
    width: calc(var(--logo-h) * 83.36 / 61.19);
    aspect-ratio: 83.36 / 61.19;
}

/* Einmalig beim Seitenaufbau: eine durchgehende Linie zeichnet die Kontur in
   einem Zug und bleibt danach dauerhaft stehen.

   Die Kontur ist mit pathLength auf 1000 normiert. Das Muster "1000 1000"
   (1000 Linie, 1000 Lücke) zeigt bei dashoffset 0 die volle Linie und bei
   dashoffset 1000 nichts – dazwischen wächst sie vom Anfang des Pfades her. */

@keyframes logo-intro {
    from { stroke-dashoffset: 1000; }
    to   { stroke-dashoffset: 0; }
}

.logo .mark {
    fill: none;
    stroke: #000;
    stroke-width: 2.41px;
    stroke-miterlimit: 10;

    stroke-dasharray: 1000 1000;
    stroke-dashoffset: 0;

    animation-name: logo-intro;
    animation-duration: var(--logo-intro);
    /* Setzt ruhig an, läuft lange gleichmässig und kommt weich zum Stehen. */
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-iteration-count: 1;
    animation-fill-mode: both;
}

@media (prefers-reduced-motion: reduce) {
    .logo .mark {
        animation: none;
    }
}

/**************************************************** NAVIGATION ****************************************************/

header .is-active {
    font-family: var(--fontfamily-williamitalic);
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
}

.label-close {
    display: none;
}


/**************************************************** MOBILE ****************************************************/

@media (max-width: 768px) {
    :root {
        --fontsize-m: 3.6vw;
    }

    .w-1-12, .w-2-12, .w-3-12, .w-4-12, .w-5-12, .w-6-12, .w-7-12, .w-8-12, .w-9-12, .w-10-12, .w-11-12, .w-12-12 {
        width: calc(100% / 12 * 12);
    }

    header[data-menu] .menu-toggle {
        display: block;
    }

    header[data-menu] nav {
        display: none;
    }

    header[data-menu].is-open {
        height: 100svh;
        background: var(--white);
    }

    header[data-menu].is-open nav {
        display: flex;
        flex-flow: column;
        justify-content: center;
        width: 100%;
        height: calc(100svh - var(--header-h));
    }

    header[data-menu].is-open .label-menu {
        display: none;
    }

    header[data-menu].is-open .label-close {
        display: block;
    }

    html.is-menu-open,
    html.is-menu-open body {
        overflow: hidden;
    }

    nav * {
        font-size: var(--fontsize-l);
        line-height: var(--lineheight-l);
    }
}