/* GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 100%;
    font: inherit;
}

html {
    font-size: 16px;
    line-height: 1.2;
}

body {
    font-family: 'Scope';
    font-variation-settings: 'wght' 60, 'wdth' 500;
    background: #fff;
    /* background: #F2FFFF; */
    /* background: #f6f6f6; */
    /* background: red; */
    /* background: #fff; */
    padding: 4px 8px;
    accent-color: black;
}

::selection {
    /* background: red; */
    color: red;
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-gap: 16px;
}

.grid-9 {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-gap: 16px;
}

a {
    color: #000;
}

/* a[href^="http://"]:not(.btn):after,
a[href^="https://"]:not(.btn):after{
    content: " ↗";
} */

a:hover {
    /* text-decoration: none; */
    color: red;
}

a.arrow {
}

a.arrow:after {
    content: "↗";
    text-decoration: none;
    display: inline-block;
    margin-left: .5ch;
    position: relative;
    top: 1px;
    font-variation-settings: 'wght' 60, 'wdth' 600;
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: .05rem;
}

.col-3 {
    grid-column: span 3;
    margin-bottom: 1.2rem;
}

.col-6 {
    grid-column: span 6;
}

.col-9 {
    grid-column: span 9;
}

h2 {
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

h3 {
    text-transform: uppercase;
    letter-spacing: .05rem;
    margin-bottom: .6em;
}

h4 {
    margin-bottom: .6em;
}

h4::before {
    content: '• ';
    transform: scale(2);
    margin-right: 1ch;
    position: relative;
    top: -3px;
    display: inline-block;
    /* -webkit-text-stroke: .6px #000;
    color: transparent; */
}

p {
    /* margin-bottom: 1.1em; */
}

p+h3, p+h4, ol+h3, ol+h4 {
    margin-top: 1.2em;
}

p+p {
    text-indent: 2em;
}

p.p2 {
    text-indent: 0em;
    margin-top: .6em;
}

ol {
    counter-reset: list;
    list-style: none;
}

ol li {
    counter-increment: list;
    position: relative;
    margin-bottom: .6em;
}

ol li:before {
    content: '0' counter(list);
    margin-right: .6rem;
    position: absolute;
    right: 100%;
    font-feature-settings: 'tnum';
}

ul {
    list-style-type: none;
}

.checkmark {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; */
    /* font-variation-settings: "wght" 100; */
    font-variation-settings: 'wght' 80, 'wdth' 400;
}

.main {
    margin-bottom: 2.4rem;
}

.main ul {
    margin-bottom: 1.2em;
}

.btn, button.btn {
    border: solid 1px #000;
    text-decoration: none;
    padding: .1em .3em .2em .3em;
    /* font-feature-settings: 'tnum'; */
    text-transform: uppercase;
    letter-spacing: .05rem;
    background: transparent;
    cursor: pointer;
}

.btn:hover {
    border: solid 1px red;
    color: red;
}

label {
    user-select: none;
}






/* NAV */

.nav {
    text-transform: uppercase;
    letter-spacing: .05rem;
}

.nav > ul {
    /* position: fixed; */
    position: sticky;
    z-index: 100;
    top: 4px;
}

.nav ul > ul {
    text-indent: 2em;
}

.nav a {
    text-decoration: none;
}

.nav-current {
    color: red;
}

code {
    color: #666;
    background: #eee;
}



/* PROMO */
.promo {
    grid-column: 1 / span 12;
    background: red;
    background: #ddd;
    margin: -4px -8px;
    min-height: 32px;
    /* line-height: 28px; */
    padding: 4px 8px;
    position: static;
    pointer-events: auto;
    z-index: 99999;
}

.promo strong {
    font-weight: bold;
    font-variation-settings: 'wght' 80, 'wdth' 500;
}

/* .promo::selection, .promo strong::selection {
    color: #fff;
} */




/* INDEX */
.index {
}

.index-font {
    /* background: #000;
    color: #fff; */
    display: block;
    text-decoration: none;
    /* font-size: 15vw; */
    /* font-size: 22vw; */
    /* font-size: 20vw; */
    text-align: center;
    height: 33vh;
    position: fixed;
    /* line-height: 40vh; */
    line-height: 28vh;
    width: 100%;
    left: 0;
    /* outline: solid 1px blue; */
    /* overflow: hidden; */
    min-height: 0;
    /* max-height: 33.33vh; */
}

.index-font--scope {
    top: 0;
    font-family: 'Scope';
    font-variation-settings: 'wght' 60, 'wdth' 400;
    /* line-height: 50vh; */
    z-index: 2;
    font-size: 24vw;
}

.index-font--fictional {
    /* bottom: 33vh; */
    /* line-height: 25vh; */
    z-index: 1;
    top: 36vh;
    font-size: 18vw;
    /* background: #eee; */
}

.index-font--indicatemono {
    font-size: 12vw;
    bottom: 2vh;
    z-index: 3;
}

.index-font--scope span {
    animation: scopeindexani 5s infinite cubic-bezier(0.19, 1, 0.22, 1);
}

.index-font--scope span:nth-of-type(1) {
    animation-delay: 0s;
}

.index-font--scope span:nth-of-type(2) {
    animation-delay: 1s;
}

.index-font--scope span:nth-of-type(3) {
    animation-delay: 2s;
}

.index-font--scope span:nth-of-type(4) {
    animation-delay: 3s;
}

.index-font--scope span:nth-of-type(5) {
    animation-delay: 4s;
}

@keyframes scopeindexani {
    0%, 40%, 100% {
        font-variation-settings: 'wght' 60, 'wdth' 400;
    }

    20% {
        font-variation-settings: 'wght' 60, 'wdth' 600;
    }
}

.index-font--fictional span {
    animation: fictionalindexani 3s infinite linear;
}

.index-font--fictional span:nth-of-type(1) {
    animation-delay: 0s;
}

.index-font--fictional span:nth-of-type(2) {
    animation-delay: .33s;
}

.index-font--fictional span:nth-of-type(3) {
    animation-delay: .66s;
}

.index-font--fictional span:nth-of-type(4) {
    animation-delay: 1s;
}

.index-font--fictional span:nth-of-type(5) {
    animation-delay: 1.33s;
}

.index-font--fictional span:nth-of-type(6) {
    animation-delay: 1.66s;
}

.index-font--fictional span:nth-of-type(7) {
    animation-delay: 2s;
}

.index-font--fictional span:nth-of-type(8) {
    animation-delay: 2.33s;
}

.index-font--fictional span:nth-of-type(9) {
    animation-delay: 2.66s;
}

@keyframes fictionalindexani {
    0%, 40%, 100% {
        font-variation-settings: 'wght' 60;
    }

    20% {
        font-variation-settings: 'wght' 140;
    }
}

.index-font--indicatemono {
}

.index-font--indicatemono > span {
    animation: indicateindexani 2.5s steps(13) alternate infinite;
    /* outline: solid 1px red; */
    overflow-x: hidden;
    display: inline-block;
    margin: auto;
    white-space: nowrap;
    position: relative;
    height: 100%;
}

@keyframes indicateindexani {
    0% {
        width: 0;
    }

    50% {
        width: 13ch;
    }
}



/* FONT DETAIL */
.font-header {
    font-size: 6vw;
    font-size: min(6vw, 120px);

    height: 160px;
    line-height: 140px;
}

/* .font-style {
    padding: 8px 0;
}

.font-style:not(:first-of-type) {
    border-top: solid 1px #ccc;
} */

.font-style:after {
}

.font-styles {
    margin-top: 3.6rem;
}

.font-style, .font-variable-preview {
    margin-bottom: 1.2rem;
    position: relative;
}

.font-style-input, .font-variable-preview-input {
    font-size: 6vw;
    line-height: 8vw;
    width: 100%;
    white-space: nowrap;
    border: none;
}

.font-style-input:hover:not(:focus), .font-variable-preview-input:hover:not(:focus) {
}

.font-style-input::placeholder {
}

.font-style-input:not(:focus), .font-variable-preview-input:not(:focus) {
    cursor: pointer;
}

.font-style:after, .font-variable-preview:after {
    content: '';
    display: block;
    width: 40px;
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to right, rgba(250,250,250,0), rgba(250,250,250,1));
}

.font-style-input:focus, .font-variable-preview-input:focus {
    /* background: #f6f6f6; */
    outline: none;
}

.font-style label, .font-variable-preview label {
    text-transform: uppercase;
    letter-spacing: .05rem;;
}

label+.btn {
    margin-left: 1em;
}

.font-variable-css-btn:after {
    content: 'Show CSS';
}

.font-variable-css-btn--active:after {
    content: 'Hide CSS';
}

.font-variable-css-popup {
    display: none;
}

.font-variable-css-popup--visible {
    display: block;
}

.font-characterset {
    margin-top: 4.8rem;
}

.font-characterset-view {
    font-size: 12vw;
    /* outline: solid 1px red; */
    position: fixed;
    /* top: 50%; */
    /* left: 50%; */
    left: 0;
    bottom: 0;
    /* transform: translate(-50%, -50%); */
    /* transform: translateY(-50%); */
    width: 100%;
    height: 20vw;
    line-height: 20vw;
    text-align: center;
    pointer-events: none;
    user-select: none;
    display: none;
}

.font-characterset-view--visible {
    display: grid;
}


ul.font-characterset-list {
    /* text-align: justify; */
    display: grid;
    grid-template-columns: repeat(24,minmax(0, 1fr));
    margin-top: 1.2rem;
    user-select: none;
}

ul.font-characterset-list li {
    /* outline: solid 1px rgba(0,0,0,.3); */
    /* font-size: 2rem; */
    font-size: 2vw;
    line-height: 1.4;
    text-align: center;
    /* outline: solid 1px red; */
    cursor: pointer;
}

ul.font-characterset-list li span {
    pointer-events: none;
    display: block;
}

ul.font-characterset-list li:hover {
    color: red;
}

ul.font-characterset-list li:hover span {
    /* transform: scale(4); */
    /* outline: solid .33px #000; */
    /* background: #fff; */
    /* color: red;
    color: blue; */

    /* position: absolute;
    left: 2ch; */
}

.font-characterset h3 {
    display: inline-block;
}

.font-characterset-select {
    display: inline-block;
    font-size: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-radius: 0;
    /* text-decoration: underline; */
    border-bottom: solid 1px #000;
    width: auto;
    padding-right: 2ch;
    cursor: pointer;
}

.font-characterset-select:focus {
    outline: none;
    /* color: red; */
    border-color: red;
}

.font-characterset h3:after {
    content: '↓';
    display: inline-block;
    position: relative;
    left: -1.5ch;
    font-variation-settings: 'wght' 60, 'wdth' 600;
    pointer-events: none;
}

.lig {
    /* background: lightcoral; */
    font-feature-settings: 'liga';
    font-feature-settings: 'dlig';
}

.tf {
    /* background: lightblue; */
    font-feature-settings: 'tnum';
}

.ss01 {
    font-feature-settings: 'ss01';
}

.font-trial-checkbox {
    float: left;
}

.font-trial-accept-label {
    display: block;
    margin-left: 1.6em;
    max-width: calc(100% - 1.5em);
}

.font-trial-accept-label:after {
    display: block;
    clear: both;
}

.font-variable {
    margin-top: 4.8rem;
    position: relative;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
    background: #000;
    height: 1px;
}

input[type=range]::-moz-range-track {
    background: #000;
    height: 1px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #000;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    cursor: ew-resize;
    position: relative;
    margin-top: -10px;
}

input[type=range]::-moz-range-thumb {
    appearance: none;
    background: #000;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    cursor: ew-resize;
    position: relative;
    margin-top: -10px;
    border: none;
}

input[type=range]:focus::-webkit-slider-thumb {
    background: red;
}

input[type=range]:focus::-moz-range-thumb {
    background: red;
}

.font-variable-sliders input:nth-of-type(2), .font-variable-sliders label:nth-of-type(2) {
    margin-top: -1.2rem;
}




/* STUDENTS */
/* (and form stuff in general, also trial font checkboxes and stuff) */

.students-form textarea, .students-form input[type="text"] {
    width: 100%;
    padding: .3rem;
    appearance: none;
    border: solid 1px #000;
    border-radius: none;
}

.students-form textarea::selection, .students-form input[type="text"]::selection {
    color: #fff;
    background: #000;
}

.students-form input[type="text"] {
    margin-bottom: .6rem;
}

.students-form label {
    margin-bottom: .3rem;
    display: inline-block;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    border-radius: none;
    border: solid 1px #000 ;
    width: 1.2em;
    height: 1.2em;
    margin-bottom: -.2em;
    margin-right: .5ch;
}

input[type=checkbox]:checked {
    /* border: solid 1px red; */
    position: relative;
}

input[type=checkbox]:checked:after {
    /* content: '×'; */
    content: '✓';
    /* top: -.8rem;
    left: -.1rem; */
    position: absolute;
    font-size: 1rem;
    /* font-size: 1.6rem; */
    font-variation-settings: 'wght' 60, 'wdth' 600;
    text-align: center;
    line-height: 1rem;
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
}

button.btn:disabled, button.btn:disabled:hover, a.btn--disabled, a.btn--disabled:hover {
    color: #000;
    border: solid 1px #000;
    opacity: .5;
    cursor: not-allowed;
    position: relative;
    user-select: none;
}

.students-firstname {
    display: none !important;
}

.students-form-unit {
    display: block;
}

.students-form-unit--inline {
    display: inline-block;
    margin-right: 2ch;
}

.students-form-fillout {
    display: none;
    opacity: .5;
    margin-left: 1ch;
}

.students-form .btn:disabled:hover + .students-form-fillout, .students-form .btn:disabled:focus + .students-form-fillout {
    display: inline-block;
}



/* GUMROAD */

.gumframe {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    z-index: 200;
    display: none;

    /* gumframe redesign idea, not sure yet */
    /* max-width: 700px;
    border-left: solid 1px #000;
    right: 0;
    left: initial; */
}

.gumclose {
    appearance: none;
    position: fixed;
    right: 8px;
    top: 8px;
    width: 40px;
    height: 40px;
    line-height: 0;
    display: none;
    z-index: 300;
    cursor: pointer;
    border-radius: 0;
    border: none;
    font-size: 35px;

    background: #fff;
    color: #000;
    padding: 10px 10px 14px 10px;

    background: #000;
    color: #fff;
}

.body--loading, .body--loading * {
    cursor: wait;
}

.body--gumroad .gumframe, .body--gumroad .gumclose {
    display: block;
}

.body--gumroad {
    overflow: hidden;
}

/* gallery */

.gallery {
    display: block;
}

.gallery-item {
    width: calc(50% - 4px);
    display: block;
    margin-bottom: 24px;
}

.gallery-item-img {
    width: 100%;
    height: auto;
}

.gallery-item-meta {
    margin-top: 8px;
}


@media (max-width: 900px) {
    .mobilehidden {
        display: none;
    }

    html {
        font-size: 18px;
    }

    .promo {
        margin-bottom: 8px;
    }

    .nav {
    }

    .nav > ul {
        position: static;
        padding-bottom: 1.4em;
        margin-bottom: 1.4em;
        border-bottom: solid 1px #000;
    }

    .grid-12, .grid-9 {
        display: block;
    }

    .col-12, .col-9, .col-6, .col-3 {
        display: block;
        width: 100%;
    }

    ul.font-characterset-list {
        grid-template-columns: repeat(16, minmax(0, 1fr));
    }

    ul.font-characterset-list li {
        font-size: 5vw;
    }

    .font-header {
        margin-top: 0;
        margin-bottom: 32px;
        font-size: 9vw;
    }

    .font-style-input, .font-variable-preview-input {
        font-size: 9vw;
        line-height: 11vw;
    }

    .font-style label, .font-variable-preview label {
        display: block;
        margin-top: .6em;
        margin-bottom: .6em;
    }

    .font-style label + .btn, .font-variable-preview label + .btn {
        /* display: block; */
        margin-left: 0;
    }

    .font-characterset-view {
        display: none;
    }

    ul.font-characterset-list li:hover {
        color: initial;
        cursor: initial;
    }

    .students-form-unit {
        display: block;
        margin-bottom: .6rem;
    }

    .students-accept-label {
        width: calc(100% - 2rem);
        float: right;
    }

    .students-accept-label:after {
        display: block;
        content: '';
        clear: both;
    }

    .students-form-unit .btn {
        margin-top: .6rem;
    }

    .index-font {
        position: static;
        height: 1.2em;
        line-height: 1em;
        /* outline: solid 1px green; */
    }

    .font-variable-sliders input:nth-of-type(2), .font-variable-sliders label:nth-of-type(2) {
        margin-top: initial;
    }

    ol {
        /* padding-left: 32px; */
        padding-left: 1.8em;
    }

    .gallery-item {
        width: 100%;
    }
}