/* Resets */ // @import url('https://fonts.googleapis.com/css?family=Lato:300,400,700,900&display=swap'); // font-family: 'Lato', sans-serif; $global-background: rgb(250, 250, 250); @font-face { font-family: "Lato"; font-style: normal; font-display: swap; font-weight: 300; src: local("Lato Light"), local("Lato-Light"), url("../fonts/Lato-Light.ttf") format("truetype"); } @font-face { font-family: "Lato"; font-style: normal; font-display: swap; font-weight: 400; src: local("Lato Regular"), local("Lato-Regular"), url("../fonts/Lato-Regular.ttf") format("truetype"); } @font-face { font-family: "Lato"; font-style: normal; font-display: swap; font-weight: 700; src: local("Lato Bold"), local("Lato-Bold"), url("../fonts/Lato-Bold.ttf") format("truetype"); } *, *::before, *::after { margin: 0; padding: 0; box-sizing: inherit; } html { // Set's the rem to 10px in most browsers (16px) font-size: 62.5%; } body { font-family: Arial, Helvetica, sans-serif; font-size: 1.6rem; color: #777; padding: 3rem; line-height: 1.7; box-sizing: border-box; } .content-wrapper { background: $global-background; } .header { position: relative; height: 95vh; background-image: linear-gradient( rgba(56, 218, 116, 0.7), rgba(38, 189, 93, 0.7) ), url("../img/train.jpg"); background-position: center; clip-path: polygon(0 0, 100% 0, 100% 85vh, 0 100%); } .header-logo { position: absolute; top: 4rem; left: 4rem; } .logo { height: 3.5rem; } .hero-text-box { position: absolute; top: 40%; left: 50%; // Here we are translating this element so that it's dirct center // is in the absolution position described above. No margin auto! transform: translate(-50%, -50%); text-align: center; } .hero-primary { text-transform: uppercase; color: #ffffff; //used to prevent gitter in the animation backface-visibility: hidden; margin-bottom: 6rem; } .hero-title-main { display: block; top: 25%; font-weight: 400; font-size: 6rem; letter-spacing: 3.5rem; animation: moveInLeft 0.8s ease-out; } .hero-title-sub { display: block; position: relative; top: 25%; font-weight: 700; font-size: 2rem; letter-spacing: 1.75rem; animation: moveInRight 0.8s ease-out; } .dark-hero-title { color: #777; } .pitch { height: 150vh; } .banana-slug-back { position: absolute; top: -200px; left: 4rem; height: 40rem; width: 40rem; background-image: linear-gradient($global-background, $global-background); border-radius: 100%; } .banana-slug { // position: absolute; // top: -200px; // left: 40px; height: 40rem; width: 40rem; border-radius: 100%; border: 0.3rem solid $global-background; animation: moveInBottom 1s ease-out; animation-fill-mode: backwards; } .cards { position: relative; height: 90vh; background-image: url("../img/bg-cube-pattern.png"), linear-gradient(rgba(45, 114, 243, 0.8), rgba(45, 114, 243, 0.8)); } @keyframes moveInLeft { 0% { opacity: 0; transform: translate(-5rem); } 80% { transform: translate(1rem); } 100% { opacity: 1; transform: translate(0); } } @keyframes moveInRight { 0% { opacity: 0; transform: translate(5rem); } 80% { transform: translate(-1rem); } 100% { opacity: 1; transform: translate(0); } } @keyframes moveInBottom { 0% { opacity: 0; transform: translate(0, 5rem); } 100% { opacity: 1; transform: translate(0); } } // the :link and :visited which are psuedo classes .btn:link, .btn:visited { text-transform: uppercase; text-decoration: none; padding: 1.5rem 4rem; // Anchor tags are inline elements so we need to change the display property to have it behave line a block. // Since it is an inline element it is treated as if it was text. So to place it in the center of the box, // all we have to do is set the parent container's text-align: center; This does not change the h1 content, // Since it's elements are display: block; display: inline-block; border-radius: 10rem; //The transition properties has to be on the initial state, and the transform operations in the other psuedo // Selectors will follow this transition declaration. transition: all 0.2s; position: relative; } .btn-white { background-color: #ffffff; color: #777; } .btn:hover { transform: translateY(-3px); // x-offset, y-offset, blur, color box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2); } //When we click an element it is called the "active state". // This is how the material library does snazzy animations when you click a button. .btn:active { // This translation is in relation to the initial state, not the hover state. transform: translateY(-1px); box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2); } //This psudeo selector is like a virtual element after the element it is selecting. // In this case we are adding an element that will look exactly like the element we //have, but we are putting it behind the element. When we hover out this psuedo //elment hides back behind the button. .btn::after { //Always need a content and display property for after elements. content: ""; display: inline-block; // This works because the ::after psudeo element is treated like a child of the // item it is selecting. So 100% the width of the button. height: 100%; width: 100%; border-radius: 10rem; // To place it behind the button we can use absolute positioning position: absolute; top: 0; left: 0; // Places this element behind the button. z-index: -1; //tranition here because it is the initial state for the .btn:hover::after selector transition: all 0.4s; } .btn-white::after { background-color: #ffffff; } //When we hover the button we want some certain styles for the ::after element. .btn:hover::after { transform: scaleX(1.4) scaleY(1.6); //fading out opacity: 0; } .btn-animated { animation: moveInBottom 0.8s ease-out; // This property automatically applies the animate styles before the animation starts. animation-fill-mode: backwards; }