// _______ _ // |__ __| | | // | | _ _ _ __ ___ __ _ _ __ __ _ _ __ | |__ _ _ // | || | | || '_ \ / _ \ / _` || '__|/ _` || '_ \ | '_ \ | | | | // | || |_| || |_) || (_) || (_| || | | (_| || |_) || | | || |_| | // |_| \__, || .__/ \___/ \__, ||_| \__,_|| .__/ |_| |_| \__, | // __/ || | __/ | | | __/ | // |___/ |_| |___/ |_| |___/ @import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,700&display=swap"); :root { --body-copy: "Lora", Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; --headlines: "Raleway", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Helvetica Neue", Helvetica, Arial, sans-serif; } // Fluid Scaling type mixin @function strip-unit($value) { @return $value / ($value * 0 + 1); } @mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) { $u1: unit($min-vw); $u2: unit($max-vw); $u3: unit($min-font-size); $u4: unit($max-font-size); @if $u1==$u2 and $u1==$u3 and $u1==$u4 { & { font-size: $min-font-size; @media screen and (min-width: $min-vw) { font-size: calc( #{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}) ); } @media screen and (min-width: $max-vw) { font-size: $max-font-size; } } } } // Configure type sizes $min_width: 320px; $max_width: 1200px; $min_font: 15px; $max_font: 19px; $mob: 1.2; // Mobile scaling factor $desk: 1.25; // Desktop scaling factor html { @include fluid-type($min_width, $max_width, $min_font, $max_font); color: var(--body); &:not(h1, h2, h3, h4, h5) { font-family: var(--body-copy); } } /* Headlines */ h1, h2, h3, h4, h5 { font-family: var(--body-copy); &:not(.link) a { text-decoration: none; } } h1 { font-size: $mob * $mob * $mob * $mob * 1em; line-height: 1.4em; text-decoration: none; letter-spacing: -0.5px; font-weight: 700; margin-bottom: 2 * $unit + px; transition: all 0.1s ease-out; text-shadow: 10px 10px 0px var(--highlight-soft); transform-origin: center; transform: scale3d(1, 1.1, 1) rotateZ(1deg) skewX(-5deg); letter-spacing: 4px; @include fluid-type( $min_width, $max_width, $mob * $mob * $mob * $mob * $min_font, $desk * $desk * $desk * $desk * $min_font ); &:hover { transition: 0.1s ease-in; transform: scale3d(1, 1.1, 1) rotateZ(2deg) skewX(-5deg); text-shadow: 10px 10px 0px var(--highlight); letter-spacing: 6px; } } h2 { font-size: $mob * $mob * $mob * 1em; line-height: 1.3em; text-decoration: none; letter-spacing: -0.4px; font-weight: 600; margin-bottom: $unit + px; @include fluid-type( $min_width, $max_width, $mob * $mob * $mob * 0.9 * $min_font, $desk * $desk * $desk * 0.9 * $min_font ); } h3 { font-size: $mob * $mob * 1em; line-height: 1.4em; text-decoration: none; letter-spacing: 0px; font-weight: 400; font-style: italic; font-family: var(--body-copy); @include fluid-type( $min_width, $max_width, $mob * $mob * 0.8 * $min_font, $desk * $desk * 0.8 * $min_font ); } /* Body Elements */ p { font-size: 1rem; line-height: 1.5; &:not(:last-child) { margin-bottom: $unit + px; } } code { display: block; padding: 8px 16px; background: rgba(0, 0, 0, 0.05); font-family: Fira Code, monospace; font-style: normal; font-weight: 300; font-size: 13; line-height: 20px; } /* Links */ a[href], a[href]:visited { color: var(--primary); text-underline-offset: 2px; line-height: 1.5; transition: all 0.2s; &:hover { transition: all 0.2s; background-color: var(--highlight-soft); } } .text-link { opacity: 0.99; } /* Typography Helpers */ .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-lowercase { text-transform: lowercase; }