style.css 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. /* --------------------------------
  2. Primary style
  3. -------------------------------- */
  4. *, *::after, *::before {
  5. box-sizing: border-box;
  6. }
  7. html {
  8. font-size: 62.5%;
  9. }
  10. body {
  11. font-size: 1.6rem;
  12. font-family: "PT Sans", sans-serif;
  13. color: #242322;
  14. background-color: #ffffff;
  15. }
  16. a {
  17. color: #a5c4bc;
  18. text-decoration: none;
  19. }
  20. /* --------------------------------
  21. Patterns - reusable parts of our design
  22. -------------------------------- */
  23. .cd-btn {
  24. display: inline-block;
  25. padding: 1.6em 2.4em;
  26. font-size: 1.4rem;
  27. letter-spacing: .15em;
  28. color: #ffffff;
  29. font-weight: 700;
  30. text-transform: uppercase;
  31. background-color: #a5c4bc;
  32. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  33. -webkit-font-smoothing: antialiased;
  34. -moz-osx-font-smoothing: grayscale;
  35. -webkit-transition: box-shadow 0.3s;
  36. -moz-transition: box-shadow 0.3s;
  37. transition: box-shadow 0.3s;
  38. }
  39. .no-touch .cd-btn:hover {
  40. box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  41. }
  42. /* --------------------------------
  43. Typography
  44. -------------------------------- */
  45. h1 {
  46. font-size: 2.6rem;
  47. line-height: 1;
  48. margin-bottom: 1em;
  49. font-family: "IM Fell Double Pica", serif;
  50. font-style: italic;
  51. }
  52. @media only screen and (min-width: 768px) {
  53. h1 {
  54. font-size: 5rem;
  55. }
  56. }
  57. /* --------------------------------
  58. Main Content
  59. -------------------------------- */
  60. .cd-main-content {
  61. position: relative;
  62. z-index: 1;
  63. width: 100%;
  64. height: 100vh;
  65. /* vertically align its content */
  66. display: table;
  67. background-color: #e4dcca;
  68. }
  69. .cd-main-content .center {
  70. /* vertically align inside parent element */
  71. display: table-cell;
  72. vertical-align: middle;
  73. text-align: center;
  74. }
  75. /* --------------------------------
  76. Modal window
  77. -------------------------------- */
  78. .cd-modal {
  79. position: fixed;
  80. top: 0;
  81. left: 0;
  82. z-index: 3;
  83. height: 100%;
  84. width: 100%;
  85. overflow: hidden;
  86. background: #402f44 url(../img/modal-bg.jpg) no-repeat center center;
  87. background-size: cover;
  88. opacity: 0;
  89. visibility: hidden;
  90. -webkit-transition: opacity 0.3s 0s, visibility 0s 0.3s;
  91. -moz-transition: opacity 0.3s 0s, visibility 0s 0.3s;
  92. transition: opacity 0.3s 0s, visibility 0s 0.3s;
  93. }
  94. .cd-modal .modal-content {
  95. height: 100%;
  96. overflow-y: auto;
  97. padding: 3em 5%;
  98. color: #e4dcca;
  99. -webkit-font-smoothing: antialiased;
  100. -moz-osx-font-smoothing: grayscale;
  101. }
  102. .cd-modal h1 {
  103. text-align: center;
  104. }
  105. .cd-modal h1::after {
  106. /* ink/brush separation */
  107. content: '';
  108. display: block;
  109. width: 130px;
  110. height: 18px;
  111. background: url(../img/ink-separation.svg) no-repeat center center;
  112. margin: .2em auto 0;
  113. }
  114. .cd-modal p {
  115. line-height: 1.6;
  116. margin: 2em auto;
  117. max-width: 800px;
  118. }
  119. .cd-modal .modal-close {
  120. /* 'X' icon */
  121. position: absolute;
  122. z-index: 1;
  123. top: 20px;
  124. right: 5%;
  125. height: 45px;
  126. width: 45px;
  127. border-radius: 50%;
  128. background: rgba(0, 0, 0, 0.3) url(../img/cd-icon-close.svg) no-repeat center center;
  129. /* image replacement */
  130. overflow: hidden;
  131. text-indent: 100%;
  132. white-space: nowrap;
  133. visibility: hidden;
  134. opacity: 0;
  135. -webkit-transform: scale(0);
  136. -moz-transform: scale(0);
  137. -ms-transform: scale(0);
  138. -o-transform: scale(0);
  139. transform: scale(0);
  140. -webkit-transition: -webkit-transform 0.3s 0s, visibility 0s 0.3s, opacity 0.3s 0s;
  141. -moz-transition: -moz-transform 0.3s 0s, visibility 0s 0.3s, opacity 0.3s 0s;
  142. transition: transform 0.3s 0s, visibility 0s 0.3s, opacity 0.3s 0s;
  143. }
  144. .no-touch .cd-modal .modal-close:hover {
  145. background-color: rgba(0, 0, 0, 0.5);
  146. }
  147. .cd-modal.visible {
  148. opacity: 1;
  149. visibility: visible;
  150. -webkit-transition: opacity 0.7s, visibility 0s;
  151. -moz-transition: opacity 0.7s, visibility 0s;
  152. transition: opacity 0.7s, visibility 0s;
  153. }
  154. .cd-modal.visible .modal-content {
  155. /* this fixes the buggy scrolling on webkit browsers - mobile devices only - when overflow property is applied */
  156. -webkit-overflow-scrolling: touch;
  157. }
  158. .cd-modal.visible .modal-close {
  159. visibility: visible;
  160. opacity: 1;
  161. -webkit-transition: -webkit-transform 0.3s 0s, visibility 0s 0s, opacity 0.3s 0s;
  162. -moz-transition: -moz-transform 0.3s 0s, visibility 0s 0s, opacity 0.3s 0s;
  163. transition: transform 0.3s 0s, visibility 0s 0s, opacity 0.3s 0s;
  164. -webkit-transform: scale(1);
  165. -moz-transform: scale(1);
  166. -ms-transform: scale(1);
  167. -o-transform: scale(1);
  168. transform: scale(1);
  169. }
  170. @media only screen and (min-width: 1100px) {
  171. .cd-modal .modal-content {
  172. padding: 6em 5%;
  173. }
  174. .cd-modal .modal-close {
  175. height: 60px;
  176. width: 60px;
  177. }
  178. .cd-modal p {
  179. font-size: 2rem;
  180. }
  181. }
  182. /* --------------------------------
  183. Transition Layer
  184. -------------------------------- */
  185. .cd-transition-layer {
  186. position: fixed;
  187. top: 0;
  188. left: 0;
  189. z-index: 2;
  190. height: 100%;
  191. width: 100%;
  192. opacity: 0;
  193. visibility: hidden;
  194. overflow: hidden;
  195. }
  196. .cd-transition-layer .bg-layer {
  197. position: absolute;
  198. left: 50%;
  199. top: 50%;
  200. -webkit-transform: translateY(-50%) translateX(-2%);
  201. -moz-transform: translateY(-50%) translateX(-2%);
  202. -ms-transform: translateY(-50%) translateX(-2%);
  203. -o-transform: translateY(-50%) translateX(-2%);
  204. transform: translateY(-50%) translateX(-2%);
  205. /* its dimentions will be overwritten using jQuery to proportionally fit the viewport */
  206. height: 100%;
  207. /* our sprite is composed of 25 frames */
  208. width: 2500%;
  209. background: url(../img/ink.png) no-repeat 0 0;
  210. background-size: 100% 100%;
  211. }
  212. .cd-transition-layer.visible {
  213. opacity: 1;
  214. visibility: visible;
  215. }
  216. .cd-transition-layer.opening .bg-layer {
  217. -webkit-animation: cd-sequence 0.8s steps(24);
  218. -moz-animation: cd-sequence 0.8s steps(24);
  219. animation: cd-sequence 0.8s steps(24);
  220. -webkit-animation-fill-mode: forwards;
  221. -moz-animation-fill-mode: forwards;
  222. animation-fill-mode: forwards;
  223. }
  224. .cd-transition-layer.closing .bg-layer {
  225. -webkit-animation: cd-sequence-reverse 0.8s steps(24);
  226. -moz-animation: cd-sequence-reverse 0.8s steps(24);
  227. animation: cd-sequence-reverse 0.8s steps(24);
  228. -webkit-animation-fill-mode: forwards;
  229. -moz-animation-fill-mode: forwards;
  230. animation-fill-mode: forwards;
  231. }
  232. .no-cssanimations .cd-transition-layer {
  233. display: none;
  234. }
  235. @-webkit-keyframes cd-sequence {
  236. 0% {
  237. /* translateX(-2%) is used to horizontally center the first frame inside the viewport */
  238. -webkit-transform: translateY(-50%) translateX(-2%);
  239. }
  240. 100% {
  241. /* translateX(-98%) (2% + 96) is used to horizontally center the last frame inside the viewport */
  242. -webkit-transform: translateY(-50%) translateX(-98%);
  243. }
  244. }
  245. @-moz-keyframes cd-sequence {
  246. 0% {
  247. /* translateX(-2%) is used to horizontally center the first frame inside the viewport */
  248. -moz-transform: translateY(-50%) translateX(-2%);
  249. }
  250. 100% {
  251. /* translateX(-98%) (2% + 96) is used to horizontally center the last frame inside the viewport */
  252. -moz-transform: translateY(-50%) translateX(-98%);
  253. }
  254. }
  255. @keyframes cd-sequence {
  256. 0% {
  257. /* translateX(-2%) is used to horizontally center the first frame inside the viewport */
  258. -webkit-transform: translateY(-50%) translateX(-2%);
  259. -moz-transform: translateY(-50%) translateX(-2%);
  260. -ms-transform: translateY(-50%) translateX(-2%);
  261. -o-transform: translateY(-50%) translateX(-2%);
  262. transform: translateY(-50%) translateX(-2%);
  263. }
  264. 100% {
  265. /* translateX(-98%) (2% + 96) is used to horizontally center the last frame inside the viewport */
  266. -webkit-transform: translateY(-50%) translateX(-98%);
  267. -moz-transform: translateY(-50%) translateX(-98%);
  268. -ms-transform: translateY(-50%) translateX(-98%);
  269. -o-transform: translateY(-50%) translateX(-98%);
  270. transform: translateY(-50%) translateX(-98%);
  271. }
  272. }
  273. @-webkit-keyframes cd-sequence-reverse {
  274. 0% {
  275. -webkit-transform: translateY(-50%) translateX(-98%);
  276. }
  277. 100% {
  278. -webkit-transform: translateY(-50%) translateX(-2%);
  279. }
  280. }
  281. @-moz-keyframes cd-sequence-reverse {
  282. 0% {
  283. -moz-transform: translateY(-50%) translateX(-98%);
  284. }
  285. 100% {
  286. -moz-transform: translateY(-50%) translateX(-2%);
  287. }
  288. }
  289. @keyframes cd-sequence-reverse {
  290. 0% {
  291. -webkit-transform: translateY(-50%) translateX(-98%);
  292. -moz-transform: translateY(-50%) translateX(-98%);
  293. -ms-transform: translateY(-50%) translateX(-98%);
  294. -o-transform: translateY(-50%) translateX(-98%);
  295. transform: translateY(-50%) translateX(-98%);
  296. }
  297. 100% {
  298. -webkit-transform: translateY(-50%) translateX(-2%);
  299. -moz-transform: translateY(-50%) translateX(-2%);
  300. -ms-transform: translateY(-50%) translateX(-2%);
  301. -o-transform: translateY(-50%) translateX(-2%);
  302. transform: translateY(-50%) translateX(-2%);
  303. }
  304. }