/*
 * styles/globals.css
 *
 * Created by Lukas Pistrol on 17.05.23.
 */

@import "//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/github.min.css" (prefers-color-scheme: light);

@import "//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/github-dark-dimmed.min.css" (prefers-color-scheme: dark);

:root {
    --iconShadow: inset 0px -0.25px 0.5px rgba(0, 0, 0, 0.08), inset 0px 0.25px 0.5px rgba(255, 255, 255, 0.16), 0px 1.5px 2px rgba(0, 0, 0, 0.08), 0px 4px 6px rgba(0, 0, 0, 0.12);
    --shadow: 0px 0px 5px rgba(0, 0, 0, 0.08);
    --cardShadow: 0px 2px 5px rgba(0, 0, 0, 0.08);

    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;

    --headerTitleSize: 18px;
    --bodySize: 22px;
    --h2Size: 48px;
    --h3Size: 36px;
    --calloutSize: 16px;

    --thin: 100;
    --extraLight: 200;
    --light: 300;
    --normal: 400;
    --medium: 500;
    --semiBold: 600;
    --bold: 700;
    --extraBold: 800;
    --heavy: 900;

    --headerHeight: 64px;
}

@media (prefers-color-scheme: light) {
    :root {
        --accentColor: #007aff;
        --accentColorDark: #0a84ff;

        --primaryColor: #111;
        --primaryColorDark: #EFEFEF;
        --secondaryColor: #666;
        --secondaryColorDark: #E9E9EF;
        --tertiaryColor: #999;
        --primaryAlternateColor: #fff;

        --primaryBackground: #fafafa;
        --primaryBackgroundDark: #1C1C1E;
        --secondaryBackground: #fff;
        --mutedBackground: #f6f8fa;
        --tertiaryBackground: rgba(175,184,193,0.2);

        --borderColorDefault: #d0d7de;
        --border: 1px solid var(--borderColorDefault);
    }

    .hljs {
        background-color: var(--tertiaryBackground)
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --accentColor: #0a84ff;
        --accentColorDark: #0a84ff;

        --primaryColor: #EFEFEF;
        --primaryColorDark: #EFEFEF;
        --secondaryColor: #E9E9EF;
        --secondaryColorDark: #E9E9EF;
        --tertiaryColor: #999;
        --primaryAlternateColor: #fff;

        --primaryBackground: #111;
        --primaryBackgroundDark: #1C1C1E;
        --secondaryBackground: #1C1C1E;
        --mutedBackground: #161b22;
        --tertiaryBackground: rgba(110,118,129,0.4);

        --borderColorDefault: #30363d;
        --border: 1px solid var(--borderColorDefault);
    }
}

/**************************
 0.0 BASIC SETUP *********
 **************************/

html, body {
    width: 100%;
    height: 100%;
    font-family: "SF Pro", -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    box-sizing: border-box;
}

a {
    color: inherit;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: "SF Pro Mono", ui-monospace, monospace;
}

body {
    background: var(--primaryBackground);
    padding-top: var(--headerHeight);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a.link.button {
    background: var(--accentColor);
    color: var(--primaryAlternateColor) !important;
    font-size: var(--calloutSize) !important;
    padding: 8px 16px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
    font-weight: var(--medium);
}

a.link.button.large {
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius-md);
    font-size: var(--headerTitleSize) !important;
}

.content-wrapper {
    min-height: calc(100vh - var(--headerHeight) * 2);
}

/**************************
 1.0 HEADER **************
 **************************/

header {
    background: var(--secondaryBackground);
    width: 100%;
    height: var(--headerHeight);
    border-bottom: var(--border);
    padding: 0 24px;
    position: fixed;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

footer {
    width: 100%;
    height: var(--headerHeight);
    padding: 0 24px;
    z-index: 999;
    justify-content: space-between;
    display: block;
    text-align: center;
    border-bottom: none;
    border-top: var(--border);
    background: var(--secondaryBackground);
    box-shadow: var(--shadow);
}

header .brand {
    display: inline-flex;
}

header .logo {
    width: 40px;
    margin: 12px;
    box-shadow: var(--iconShadow);
    border-radius: 10px;
}

header p {
    line-height: var(--headerHeight);
    font-size: var(--headerTitleSize);
    color: var(--primaryColor);
    font-weight: var(--semiBold);
}

header .link, footer .link {
    color: var(--tertiaryColor);
    font-size: var(--calloutSize);
    line-height: var(--headerHeight);
    margin: 0 12px;
}

header .link.active {
    font-weight: var(--medium);
    color: var(--primaryColor);
}

/**************************
 2.0 HERO ****************
 **************************/

.text {
    margin: 0 auto;
}

.text h2 {
    font-size: var(--h2Size);
    line-height: 56px;
    font-weight: var(--bold);
    margin-bottom: 24px;
    color: var(--primaryColor);
}

.text h3 {
    font-size: var(--h3Size);
    line-height: 42px;
    font-weight: var(--bold);
    margin-bottom: 24px;
    color: var(--primaryColor);
}

.text p {
    font-size: var(--bodySize);
    line-height: 1.45455;
    font-weight: var(--normal);
    letter-spacing: .016em;
    color: var(--secondaryColor);
    margin-bottom: 24px;
}

.text li {
    font-size: var(--bodySize);
    line-height: 1.45455;
    font-weight: var(--normal);
    letter-spacing: .016em;
    color: var(--secondaryColor);
    list-style-position: inside;
}

.hero {
    padding: 128px 0;
    text-align: center;
    width: 640px;
    margin: 0 auto;
}

.hero.main {
    padding: 128px 0;
}

.hero .logo {
    width: 100px;
    margin-bottom: 24px;
    box-shadow: var(--iconShadow);
    border-radius: 25px;
}

.hero .logo.noClip {
    width: 100px;
    margin-bottom: 24px;
    box-shadow: none;
    border-radius: 0;
}

.hero h2 {
    font-size: var(--h2Size);
    line-height: 56px;
    font-weight: var(--bold);
    margin-bottom: 24px;
    color: var(--primaryColor);
}

.hero h3 {
    font-size: var(--h3Size);
    line-height: 42px;
    font-weight: var(--bold);
    margin-bottom: 24px;
    color: var(--primaryColor);
}

.hero p {
    font-size: var(--bodySize);
    line-height: 1.45455;
    font-weight: var(--normal);
    letter-spacing: .016em;
    color: var(--secondaryColor);
    margin-bottom: 24px;
}

.clear {
    clear: both;
}

.hero a.link.button {
    line-height: 24px;
    display: inline-block;
    margin: 0 auto;
}

.hero .iphone {
    margin-left: 112px;
}

span.announcement {
    font-size: 12px;
    line-height: 1.333;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--accentColor);
    border: 1px solid var(--accentColor);
    border-radius: var(--border-radius-md);
    padding: 3px 11px;
    margin: 0 auto;
    margin-bottom: 1.2em;
    width: fit-content;
    display: block;
}

span.announcement.header {
    height: fit-content;
    align-self:center;
    margin-bottom: 0;
    margin-left: 1em;
}

/**************************
 3.0 SECTION *************
 **************************/

.section {
    width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section.right {
    flex-direction: row-reverse;
}

.section .text {
    width: 360px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(100px);
}

.section .text h3 {
    font-size: 42px;
    line-height: 56px;
    font-weight: var(--bold);
    margin-bottom: 16px;
    color: var(--accentColor);
}

.section .text p {
    font-size: var(--bodySize);
    line-height: 1.45455;
    font-weight: var(--normal);
    letter-spacing: .016em;
    color: var(--secondaryColor);
}

.imageWrapper {
    width: 348px;
    height: 692px;
    position: relative;
    opacity: 0;
    transform:translateY(100px) scale(0.9);
}

.imageWrapper .image {
    width: 522px;
    height: 858px;
    background-size: cover;
    position: relative;
    position: absolute;
    left: -20px;
    top: -22px;
}

/* 3.1 Block **********/

.block {
    background: none;
    padding: 64px 0;
}

.block .hero {
    padding: 64px;
    width: 800px
}

.block.inverted {
    background: var(--primaryBackgroundDark);
}

.block.inverted .section .text h3 {
    color: var(--accentColorDark);
}

.block.inverted .section .text p {
    color: var(--secondaryColorDark);
}

.block.inverted .hero h2 {
    color: var(--primaryColorDark)
}

.block.inverted .hero h3 {
    color: var(--primaryColorDark)
}

.block.inverted .hero p {
    color: var(--secondaryColorDark);
}

.block.inverted .hero a.link.button {
    background: var(--accentColorDark);
}

.block.card.inverted {
    background: none;
}

.block.card .hero {
    background: var(--secondaryBackground);
    padding: 64px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--cardShadow);
}

.block.card.inverted .hero {
    background: var(--primaryBackgroundDark);
}

/**************************
 4.0 PAGE / MARKDOWN *****
 **************************/

.pageText {
    width: 800px;
    margin: 0 auto;
    padding: 1em 0em;
    font-size: 1.2rem;
}

.pageText .post-hero {
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: var(--border);
}

.pageText .post-hero * {
    margin-top: 0.5em;
}

.pageText .post-hero span {
    color: var(--secondaryColor);
    margin: 1em;
}

.pageText .post-hero img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--cardShadow)
}

.pageText h1,
.pageText h2,
.pageText h3,
.pageText h4,
.pageText h5,
.pageText h6,
.pageText p,
.pageText ol,
.pageText ul,
.pageText table,
.pageText pre,
.pageText hr {
    color: var(--primaryColor);
}

.markdown-body {
    font-family: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    font-weight: 400;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6,
.markdown-body p,
.markdown-body ol,
.markdown-body ul,
.markdown-body table,
.markdown-body pre,
.markdown-body hr,
.markdown-body blockquote {
    margin-top: .8em;
    color: var(--primaryColor);
}

.markdown-body h1,
.markdown-body h2 {
    border-bottom: var(--border);
}

.markdown-body h1 {
    font-size: 2em
}

.markdown-body h2 {
    font-size: 1.5em
}

.markdown-body h3 {
    font-size: 1.25em
}

.markdown-body h4 {
    font-size: 1em
}

.markdown-body h5 {
    font-size: 0.875em
}

.markdown-body h6 {
    font-size: 0.85em;
    color: var(--secondaryColor)
}

.markdown-body ol,
.markdown-body ul {
    margin-left: 2em
}

.markdown-body ol ol,
.markdown-body ol ul,
.markdown-body ul ol,
.markdown-body ul ul {
    margin-top: 0;
    margin-bottom: 0
}

.markdown-body ul:has(input) {
    list-style: none;
    margin-left: 0.8em;
}

.markdown-body ul li input {
    margin-right: 0.5em;
}

.markdown-body cite,
.markdown-body dfn,
.markdown-body em,
.markdown-body i {
    font-style: italic
}

.markdown-body pre {
    overflow: auto;
    -webkit-overflow-scrolling: auto;
    white-space: pre;
    word-wrap: normal;
    position: relative;
}

.markdown-body code {
    font-family: SF Mono, SFMono-Regular, ui-monospace, Menlo, monospace;
    font-weight: var(--semiBold) !important;
    letter-spacing: 0;
    font-size: 0.9em;
    border-radius: var(--border-radius-lg);
}

.markdown-body code.hljs {
    padding: 1.6em;
}

.markdown-body *:not(pre)>code {
    border-radius: var(--border-radius-sm);
    padding: 0.2em 0.3em;
    background-color: var(--tertiaryBackground);
}

.markdown-body table {
    border-collapse: collapse
}

.markdown-body table,
.markdown-body th,
.markdown-body td {
    border: var(--border);
    padding: 0.6em;
}

.markdown-body tr:nth-child(even) {
    background-color: var(--mutedBackground);
}

.markdown-body del {
    text-decoration: line-through;
}

.markdown-body a {
    color: var(--accentColor)
}

.markdown-body blockquote {
    border: var(--accentColor) solid 2px;
    border-radius: var(--border-radius-lg);
    padding: 1em;
    background-color: var(--secondaryBackground);
   /* border-left: var(--border);*/
/*    border-width: 4px;*/
/*    padding: 0.8em;*/
/*    background-color: rgba(255, 149, 0, 0.1); */
}

.markdown-body blockquote>*:first-child {
    margin-top: 0;
}

.markdown-body img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.markdown-body hr {
    border: var(--border);
    border-width: 2px
}

/**************************
 5.0 RESPONSIVE **********
 **************************/

@media screen and (max-width: 960px) {
    header,footer {
        padding: 0px 8px;
    }

    .hero, .section, .block .hero {
        width: 480px;
    }

    .pageText {
        width: 480px;
    }

    .hero {
        padding: 88px 0;
    }

    .hero.main {
        padding: 128px 0;
    }

    .section {
        flex-direction: column;
    }

    .section.right {
        flex-direction: column;
    }

    .section .text {
        order: 2;
        width: 100%;
    }

    .section .text h3 {
        font-size: 32px;
        line-height: 40px;
        text-align: center;
    }

    .section .text p {
        font-size: 18px;
        line-height: 24px;
        text-align: center;
    }

    .section .imageWrapper {
        order: 1;
        margin-bottom: 64px;
    }
}

@media screen and (max-width: 540px) {
    header,footer {
        padding: 0px 8px;
    }

    header .logo {
        margin: 12px 12px 12px 6px;
    }

    header .links,
    header .announcement {
        display: none
    }

    header .link, footer .link {
        margin: 0 6px;
    }

    a.link.button {
        font-size: 14px;
    }

    .hero, .section, .block .hero {
        width: 100%;
        padding: 48px;
    }

    .pageText {
        width: 90vw;
    }

    .hero.main {
        padding: 128px 48px;
    }

    .block.card .hero {
        width: 90vw;
        padding: 32px;
    }

    .hero h2 {
        font-size: 32px;
        line-height: 40px;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 18px;
        line-height: 24px;
    }

    .section .text h3 {
        margin-bottom: 8px;
    }

    .imageWrapper {
        width: 250px;
        height: 498px;
    }

    .section .imageWrapper .image {
        width: 337px;
        height: 617px;
        top: -13px;
        left: -15px;
    }

    .hero, .section {
        padding: 48px 24px;
    }
}

/**************************
 6.0 ANIMATION ***********
 **************************/

@media (prefers-reduced-motion: no-preference) {
    .section .text, .section .imageWrapper {
        transition: opacity ease, transform ease;
    }

    .section .text {
        transition-delay: 0.8s;
        transition-duration: 1s;
    }

    .section .imageWrapper {
        transition-delay: 0.3s;
        transition-duration: 1.5s;
    }
}

.blockTransition .text, .blockTransition .imageWrapper {
    opacity: 1;
    transform: none;
}
