style.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. @import url("https://fonts.googleapis.com/css?family=Nunito+Sans");
  2. :root {
  3. --blue: #0e0620;
  4. --white: #fff;
  5. --green: #2ccf6d;
  6. }
  7. html,
  8. body {
  9. height: 100%;
  10. }
  11. body {
  12. display: -webkit-box;
  13. display: flex;
  14. -webkit-box-align: center;
  15. align-items: center;
  16. -webkit-box-pack: center;
  17. justify-content: center;
  18. font-family: "Nunito Sans";
  19. color: var(--blue);
  20. font-size: 1em;
  21. }
  22. button {
  23. font-family: "Nunito Sans";
  24. }
  25. ul {
  26. list-style-type: none;
  27. -webkit-padding-start: 35px;
  28. padding-inline-start: 35px;
  29. }
  30. svg {
  31. width: 100%;
  32. visibility: hidden;
  33. }
  34. h1 {
  35. font-size: 7.5em;
  36. margin: 15px 0px;
  37. font-weight: bold;
  38. }
  39. h2 {
  40. font-weight: bold;
  41. }
  42. .hamburger-menu {
  43. position: absolute;
  44. top: 0;
  45. left: 0;
  46. padding: 35px;
  47. z-index: 2;
  48. }
  49. .hamburger-menu button {
  50. position: relative;
  51. width: 30px;
  52. height: 22px;
  53. border: none;
  54. background: none;
  55. padding: 0;
  56. cursor: pointer;
  57. }
  58. .hamburger-menu button span {
  59. position: absolute;
  60. height: 3px;
  61. background: #000;
  62. width: 100%;
  63. left: 0px;
  64. top: 0px;
  65. -webkit-transition: 0.1s ease-in;
  66. transition: 0.1s ease-in;
  67. }
  68. .hamburger-menu button span:nth-child(2) {
  69. top: 9px;
  70. }
  71. .hamburger-menu button span:nth-child(3) {
  72. top: 18px;
  73. }
  74. .hamburger-menu [data-state="open"] span:first-child {
  75. -webkit-transform: rotate(45deg);
  76. transform: rotate(45deg);
  77. top: 10px;
  78. }
  79. .hamburger-menu [data-state="open"] span:nth-child(2) {
  80. width: 0%;
  81. opacity: 0;
  82. }
  83. .hamburger-menu [data-state="open"] span:nth-child(3) {
  84. -webkit-transform: rotate(-45deg);
  85. transform: rotate(-45deg);
  86. top: 10px;
  87. }
  88. nav {
  89. position: absolute;
  90. height: 100%;
  91. top: 0;
  92. left: 0;
  93. background: var(--green);
  94. color: var(--blue);
  95. width: 300px;
  96. z-index: 1;
  97. padding-top: 80px;
  98. -webkit-transform: translateX(-100%);
  99. transform: translateX(-100%);
  100. -webkit-transition: 0.24s cubic-bezier(0.52, 0.01, 0.8, 1);
  101. transition: 0.24s cubic-bezier(0.52, 0.01, 0.8, 1);
  102. }
  103. nav li {
  104. -webkit-transform: translateX(-5px);
  105. transform: translateX(-5px);
  106. -webkit-transition: 0.16s cubic-bezier(0.44, 0.09, 0.46, 0.84);
  107. transition: 0.16s cubic-bezier(0.44, 0.09, 0.46, 0.84);
  108. opacity: 0;
  109. }
  110. nav a {
  111. display: block;
  112. font-size: 1.75em;
  113. font-weight: bold;
  114. text-decoration: none;
  115. color: inherit;
  116. -webkit-transition: 0.24s ease-in-out;
  117. transition: 0.24s ease-in-out;
  118. }
  119. nav a:hover {
  120. text-decoration: none;
  121. color: var(--white);
  122. }
  123. nav[data-state="open"] {
  124. -webkit-transform: translateX(0%);
  125. transform: translateX(0%);
  126. }
  127. nav[data-state="open"] ul li:nth-child(1) {
  128. -webkit-transition-delay: 0.16s;
  129. transition-delay: 0.16s;
  130. -webkit-transform: translateX(0px);
  131. transform: translateX(0px);
  132. opacity: 1;
  133. }
  134. nav[data-state="open"] ul li:nth-child(2) {
  135. -webkit-transition-delay: 0.32s;
  136. transition-delay: 0.32s;
  137. -webkit-transform: translateX(0px);
  138. transform: translateX(0px);
  139. opacity: 1;
  140. }
  141. nav[data-state="open"] ul li:nth-child(3) {
  142. -webkit-transition-delay: 0.48s;
  143. transition-delay: 0.48s;
  144. -webkit-transform: translateX(0px);
  145. transform: translateX(0px);
  146. opacity: 1;
  147. }
  148. nav[data-state="open"] ul li:nth-child(4) {
  149. -webkit-transition-delay: 0.64s;
  150. transition-delay: 0.64s;
  151. -webkit-transform: translateX(0px);
  152. transform: translateX(0px);
  153. opacity: 1;
  154. }
  155. .btn {
  156. z-index: 1;
  157. overflow: hidden;
  158. background: transparent;
  159. position: relative;
  160. padding: 8px 50px;
  161. border-radius: 30px;
  162. cursor: pointer;
  163. font-size: 1em;
  164. letter-spacing: 2px;
  165. -webkit-transition: 0.2s ease;
  166. transition: 0.2s ease;
  167. font-weight: bold;
  168. margin: 5px 0px;
  169. }
  170. .btn.green {
  171. border: 4px solid var(--green);
  172. color: var(--blue);
  173. }
  174. .btn.green:before {
  175. content: "";
  176. position: absolute;
  177. left: 0;
  178. top: 0;
  179. width: 0%;
  180. height: 100%;
  181. background: var(--green);
  182. z-index: -1;
  183. -webkit-transition: 0.2s ease;
  184. transition: 0.2s ease;
  185. }
  186. .btn.green:hover {
  187. color: var(--white);
  188. background: var(--green);
  189. -webkit-transition: 0.2s ease;
  190. transition: 0.2s ease;
  191. }
  192. .btn.green:hover:before {
  193. width: 100%;
  194. }
  195. @media screen and (max-width: 768px) {
  196. body {
  197. display: block;
  198. }
  199. .container {
  200. margin-top: 70px;
  201. margin-bottom: 70px;
  202. }
  203. }