@import url(fontawesome-all.min.css);
@import url("https://fonts.googleapis.com/css?family=Roboto:400,700");

:root {
    --primary: #1cb495;
    --primary-hover: #1fcaa7;
    --primary-active: #199e83;
    --bg: #000;
    --text: rgba(255, 255, 255, 0.75);
    --text-light: rgba(255, 255, 255, 0.5);
    --text-white: #fff;
    --border: rgba(255, 255, 255, 0.35);
    --border-light: rgba(255, 255, 255, 0.25);
    --overlay: rgba(255, 255, 255, 0.125);
    --radius: 6px;
    --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

body {
    -webkit-text-size-adjust: none;
}

mark {
    background: transparent;
    color: inherit;
}

input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

input, select, textarea {
    appearance: none;
}

/* 全局布局 */
html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

@media screen and (max-height: 640px) {
    html, body {
        height: auto;
        min-height: 100%;
    }
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--bg);
    padding: 6em 4em 4em;
    color: var(--text);
    font-family: var(--font);
    font-size: 16pt;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.65em;
}

body.is-preload *,
body.is-preload *::before,
body.is-preload *::after {
    animation: none !important;
    transition: none !important;
}

body > * {
    position: relative;
    z-index: 2;
}

/* 响应式基础 */
@media screen and (max-width: 1680px) {
    body {
        padding: 6em 3.5em 3.5em;
        font-size: 12pt;
    }
}

@media screen and (max-width: 1280px) {
    body {
        font-size: 11pt;
    }
}

@media screen and (max-width: 980px) {
    body {
        font-size: 12pt;
    }
    header br {
        display: none;
    }
}

@media screen and (max-width: 736px) {
    body {
        padding: 5em 2em 2em;
        font-size: 12pt;
    }
}

@media screen and (max-width: 480px) {
    html, body {
        min-width: 320px;
    }
    body {
        padding: 5em 1.25em 1.25em;
        font-size: 12pt;
    }
    header br {
        display: none;
    }
}

/* 背景轮播 */
#bg {
    transition: opacity 2s ease-in-out;
    height: 100%;
    left: 0;
    opacity: 0.25;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1;
    will-change: opacity;
}

#bg div {
    transition: opacity 3s ease, visibility 3s;
    background-size: cover;
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    visibility: hidden;
    width: 150%;
    will-change: transform, opacity;
}

#bg div.visible {
    animation: bg 45s linear infinite;
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

#bg div.visible.top {
    z-index: 2;
}

@media screen and (max-width: 1280px) {
    #bg div.visible {
        animation-duration: 29.25s;
    }
}

@media screen and (max-width: 736px) {
    #bg div.visible {
        animation-duration: 18s;
    }
}

#bg div:only-child {
    animation-direction: alternate !important;
}

body.is-preload #bg {
    opacity: 0;
}

@keyframes bg {
    0% { transform: translateX(0); }
    100% { transform: translateX(-25%); }
}

/* 文字排版 */
a {
    transition: border-bottom-color 0.2s ease, color 0.2s ease;
    border-bottom: dotted 1px var(--border-light);
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    border-bottom-color: transparent;
    color: var(--primary) !important;
}

strong, b {
    color: var(--text-white);
    font-weight: 700;
}

em, i {
    font-style: italic;
}

p {
    margin: 0 0 2em;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-white);
    font-weight: 700;
    line-height: 1em;
    margin: 0 0 1em;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: inherit;
    text-decoration: none;
}

h1 { font-size: 2.5em; line-height: 1.25em; }
h2 { font-size: 1.75em; line-height: 1.5em; }
h3 { font-size: 1.35em; line-height: 1.5em; }
h4 { font-size: 1.1em; line-height: 1.5em; }
h5 { font-size: 0.9em; line-height: 1.5em; }
h6 { font-size: 0.7em; line-height: 1.5em; }

sub {
    font-size: 0.8em;
    position: relative;
    top: 0.5em;
}

sup {
    font-size: 0.8em;
    position: relative;
    top: -0.5em;
}

blockquote {
    border-left: solid 8px var(--border);
    font-style: italic;
    margin: 0 0 2em;
    padding: 0.5em 0 0.5em 2em;
}

code {
    background: var(--overlay);
    border-radius: var(--radius);
    border: solid 2px var(--border);
    font-family: "Courier New", monospace;
    font-size: 0.9em;
    margin: 0 0.25em;
    padding: 0.25em 0.65em;
}

pre {
    font-family: "Courier New", monospace;
    font-size: 0.9em;
    margin: 0 0 2em;
    overflow-x: auto;
}

pre code {
    display: block;
    line-height: 1.75em;
    padding: 1em 1.5em;
}

hr {
    border: 0;
    border-bottom: solid 2px var(--border);
    margin: 2em 0;
}

hr.major {
    margin: 3em 0;
}

/* 头部 */
header p {
    color: var(--text-light);
    position: relative;
    margin: 0 0 1.5em;
}

header h2 + p {
    font-size: 1.25em;
    margin-top: -1em;
    line-height: 1.5em;
}

#header h1 {
    font-size: 3.25em;
    margin: 0 0 0.55em;
}

#header p {
    font-size: 1.35em;
    line-height: 1.65em;
}

#header a {
    color: inherit;
}

.contact-info p {
    margin: 0.5em 0;
    font-size: 1em;
}

@media screen and (max-width: 736px) {
    #header h1 {
        font-size: 2em;
    }
    #header p {
        font-size: 1em;
    }
}

@media screen and (max-width: 480px) {
    #header {
        margin: 0 0 1em;
    }
}

/* 图标 */
.icon {
    text-decoration: none;
    border-bottom: none;
    position: relative;
}

.icon::before {
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    text-transform: none !important;
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
}

.icon > .label {
    display: none;
}

.icon.solid::before {
    font-weight: 900;
}

.icon.brands::before {
    font-family: 'Font Awesome 5 Brands';
}

/* 列表 */
ol {
    list-style: decimal;
    margin: 0 0 2em;
    padding-left: 1.25em;
}

ol li {
    padding-left: 0.25em;
}

ul {
    list-style: disc;
    margin: 0 0 2em;
    padding-left: 1em;
}

ul li {
    padding-left: 0.5em;
}

ul.icons {
    cursor: default;
    list-style: none;
    padding-left: 0;
}

ul.icons li {
    display: inline-block;
    padding: 0 1em 0 0;
}

ul.icons li:last-child {
    padding-right: 0;
}

ul.icons li .icon::before {
    font-size: 1.25em;
}

ul.icons li a {
    color: inherit;
}

/* 表单 */
form {
    margin: 0 0 2em;
}

form .message {
    text-decoration: none;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    transform: scale(1.05);
    height: 2.75em;
    line-height: 2.75em;
    opacity: 0;
}

form .message::before {
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    text-transform: none !important;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 0.5em;
}

form .message.visible {
    transform: scale(1);
    opacity: 1;
}

form .message.success {
    color: var(--primary);
}

form .message.success::before {
    content: '\f00c';
}

form .message.failure {
    color: #ff2361;
}

form .message.failure::before {
    content: '\f119';
}

label {
    color: var(--text-white);
    display: block;
    font-size: 0.9em;
    font-weight: 700;
    margin: 0 0 1em;
}

@keyframes focus {
    0% { transform: scale(1); }
    50% { transform: scale(1.025); }
    100% { transform: scale(1); }
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    transform: scale(1);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background-color: transparent;
    border-radius: var(--radius);
    border: solid 2px var(--border);
    color: inherit;
    display: block;
    outline: 0;
    padding: 0 1em;
    text-decoration: none;
    width: 100%;
}

input[type="text"]:invalid,
input[type="password"]:invalid,
input[type="email"]:invalid,
select:invalid,
textarea:invalid {
    box-shadow: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    animation: focus 0.1s;
    background-color: var(--overlay);
    border-color: var(--primary);
}

select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='rgba(255, 255, 255, 0.35)' /%3E%3C/svg%3E");
    background-size: 1.25rem;
    background-repeat: no-repeat;
    background-position: calc(100% - 1rem) center;
    height: 2.75em;
    padding-right: 2.75em;
    text-overflow: ellipsis;
}

select option {
    color: var(--text-white);
    background: var(--bg);
}

select:focus::-ms-value {
    background-color: transparent;
}

select::-ms-expand {
    display: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    height: 2.75em;
}

textarea {
    padding: 0.75em 1em;
}

/* 复选框/单选框 */
input[type="checkbox"],
input[type="radio"] {
    display: block;
    float: left;
    margin-right: -2em;
    opacity: 0;
    width: 1em;
    z-index: -1;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    display: inline-block;
    font-size: 1em;
    font-weight: 400;
    padding-left: 2.4em;
    padding-right: 0.75em;
    position: relative;
}

input[type="checkbox"] + label::before,
input[type="radio"] + label::before {
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    text-transform: none !important;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    background: var(--overlay);
    border-radius: var(--radius);
    border: solid 2px var(--border);
    content: '';
    display: inline-block;
    font-size: 0.8em;
    height: 1.65em;
    left: 0;
    line-height: 1.65em;
    position: absolute;
    text-align: center;
    top: 0;
    width: 1.65em;
}

input[type="checkbox"]:checked + label::before,
input[type="radio"]:checked + label::before {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
    content: '\f00c';
}

input[type="checkbox"]:focus + label::before,
input[type="radio"]:focus + label::before {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

input[type="radio"] + label::before {
    border-radius: 100%;
}

/* 占位符 */
::placeholder {
    color: var(--text-light) !important;
    opacity: 1;
}

/* 按钮 */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out;
    background-color: var(--primary);
    border-radius: var(--radius);
    border: 0;
    color: var(--text-white) !important;
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    height: 2.75em;
    line-height: 2.75em;
    padding: 0 1.125em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
    background-color: var(--primary-hover);
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
    background-color: var(--primary-active);
}

input[type="submit"].disabled,
input[type="submit"]:disabled,
input[type="reset"].disabled,
input[type="reset"]:disabled,
input[type="button"].disabled,
input[type="button"]:disabled,
button.disabled,
button:disabled,
.button.disabled,
.button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* 订阅表单 */
#signup-form {
    display: flex;
    position: relative;
}

#signup-form input[type="text"],
#signup-form input[type="password"],
#signup-form input[type="email"] {
    width: 18em;
}

#signup-form > * {
    margin: 0 0 0 1em;
}

#signup-form > :first-child {
    margin: 0;
}

@media screen and (max-width: 480px) {
    #signup-form {
        flex-direction: column;
    }
    #signup-form input[type="text"],
    #signup-form input[type="password"],
    #signup-form input[type="email"] {
        width: 100%;
    }
    #signup-form > * {
        margin: 1.25em 0 0;
    }
    #signup-form .message {
        bottom: -1.5em;
        font-size: 0.9em;
        height: 1em;
        left: 0;
        line-height: inherit;
        margin-top: 0;
        position: absolute;
    }
}

/* 页脚 */
#footer {
    transition: opacity 0.5s ease-in-out;
    bottom: 4em;
    color: var(--text-light);
    left: 4em;
    opacity: 0.5;
    position: absolute;
}

#footer .copyright {
    font-size: 0.8em;
}

#footer .copyright a {
    color: inherit;
}

#footer:hover {
    opacity: 1;
}

#footer > :last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 1680px) {
    #footer {
        bottom: 3.5em;
        left: 3.5em;
    }
}

@media screen and (max-width: 736px) {
    #footer {
        bottom: 2em;
        left: 2em;
    }
}

@media screen and (max-width: 360px) {
    #footer {
        bottom: 1.25em;
        left: 1.25em;
    }
}

@media screen and (max-height: 640px) {
    #footer {
        bottom: auto;
        left: auto;
        margin: 1em 0 0;
        position: relative;
    }
}
