Files

213 lines
4.5 KiB
SCSS

@use "variables" as *;
:root {
--beige: #{$beige};
--yellow: #{$yellow};
--orange: #{$orange};
--red: #{$red};
--pink: #{$pink};
--purple: #{$purple};
--ink: #{$ink};
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
scroll-padding-top: 88px;
}
body {
counter-reset: section;
min-height: 100vh;
color: $ink;
background: $beige;
font-family: "Manrope", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 18px;
line-height: 1.6;
font-weight: 500;
overflow-x: hidden;
overflow-x: clip;
// film grain
&::after {
content: "";
position: fixed;
inset: -50%;
z-index: 9999;
pointer-events: none;
opacity: 0.07;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
animation: grain 0.8s steps(4) infinite;
}
}
@keyframes grain {
0% { transform: translate(0, 0); }
25% { transform: translate(-3%, 2%); }
50% { transform: translate(2%, -3%); }
75% { transform: translate(-2%, -1%); }
100% { transform: translate(1%, 3%); }
}
img,
video,
iframe {
display: block;
max-width: 100%;
}
a {
color: inherit;
}
strong, b { font-weight: 700; }
em, i { font-style: italic; }
::selection {
background: $yellow;
color: $ink;
}
:focus-visible {
outline: 3px solid $orange;
outline-offset: 3px;
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
// shared section title: "01 Gewerke"
.section-title {
display: flex;
align-items: flex-start;
gap: 16px;
font-size: clamp(36px, 6vw, 76px);
line-height: 1;
font-weight: 800;
letter-spacing: -0.03em;
counter-increment: section;
&__nr {
flex: none;
margin-top: 0.35em;
padding: 4px 10px;
border: 2px solid currentColor;
border-radius: 999px;
font-size: 14px;
line-height: 1;
font-weight: 700;
letter-spacing: 0.1em;
font-variant-numeric: tabular-nums;
&::before {
content: counter(section, decimal-leading-zero);
}
}
&--light {
color: $beige;
}
}
// buttons
.button {
display: inline-flex;
align-items: center;
gap: 12px;
padding: 16px 28px 16px 18px;
border: 3px solid $ink;
border-radius: 999px;
font-size: 18px;
font-weight: 700;
text-decoration: none;
cursor: pointer;
box-shadow: 4px 4px 0 $ink;
transition: transform 0.25s $ease, box-shadow 0.25s $ease;
&:hover {
transform: translate(-2px, -2px) rotate(-1.5deg);
box-shadow: 7px 7px 0 $ink;
}
&:active {
transform: translate(3px, 3px);
box-shadow: 0 0 0 $ink;
}
&--yellow {
background: $yellow;
color: $ink;
}
&--outline {
background: transparent;
padding: 12px 22px;
font-size: 16px;
}
&__play {
position: relative;
width: 32px;
height: 32px;
flex: none;
border-radius: 50%;
background: $ink;
transition: transform 0.4s $ease;
&::after {
content: "";
position: absolute;
top: 50%;
left: 55%;
transform: translate(-50%, -50%);
border-style: solid;
border-width: 6px 0 6px 10px;
border-color: transparent transparent transparent $yellow;
}
}
&:hover &__play {
transform: rotate(360deg) scale(1.1);
}
}
// scroll reveal (only hidden once JS is running)
.js [data-component~="reveal"] {
opacity: 0;
transform: translateY(40px) rotate(1deg);
transition: opacity 0.8s $ease-out, transform 0.9s $ease-out;
&.is-visible {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
.js [data-component~="reveal"] {
opacity: 1;
transform: none;
}
}