@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: bold;
    src: url('./fonts/inter-v20-latin-700.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/poppins-v24-latin-700.woff2') format('woff2');
}

:root {
    --terminli: rgb(238,143,102);
    --terminli2: rgb(243,180,153);
    --grayed: #fafafa;
    --text: #202020;
    --muted: #857F72;
    --success: #51CA58;
    --info:  #38BEC9;
    --danger: #F86A6A;
    --warning: #F8E3A3;
    --light: white;
    --dark: #007b91;
    --primary: #A081D9;
    --border: #f2f2f2;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    background: var(--grayed);
    margin: 0;
    padding: 0;

    max-width: 100vw;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    word-break: break-word;
}
h3, h4, h5, h6, .cards li h2 {
    font-family: 'Inter', sans-serif;
    font-weight: bold;
}

h1 {
    color: var(--terminli);
    line-height: 2.4rem;
}
h2 {
    line-height: 1.7rem;
}

a {
    color: var(--terminli);
}

b {
    color: var(--info);
}

p {
    margin: 0;
    padding-bottom: 1rem;
}

ul {
    margin: 0;
    padding-left: 1rem;
}

@keyframes fade-out {
    0% { top: -8rem; opacity: 1 }
    5% { top: 6rem; opacity: 1 }
    90% { top: 6rem; opacity: 1; }
    100% { top: 6rem; opacity: 0; }
}

output {
    display: block;
    position: fixed;

    left: 50%;
    transform: translateX(-50%);

    background: var(--info);
    color: white;
    padding: 1.5rem;
    border-radius: .5rem;
    border: 2px solid var(--light);
    animation: fade-out 8s ease forwards;
    pointer-events: none;
}

fieldset {
    padding: 0.5rem 0;
    border: none;
    display: grid;
    align-items: center;
}

@media (min-width: 700px) {
    fieldset {
        grid-template-columns: 8rem 1fr;
        gap: 1rem;
    }
}

input, textarea {
    padding: .25rem .5rem;
    font-family: inherit;
    font-size: inherit;
    border-radius: .5rem;
    border: 1px solid var(--border);
    max-width: 24rem;
}
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 .5rem .25rem rgba(238, 143, 102, 0.3);
    border: 1px solid var(--primary);
}

button {
    padding: .25rem .5rem;
    font-family: inherit;
    font-size: inherit;
    border-radius: .25rem;
    cursor: pointer;
    border: none;
    background-color: var(--primary);
    color: var(--light);
    transition: background-color 0.25s ease;
}
form > button {
    margin-top: .5rem;
}
button:hover {
    background-color: var(--dark);
}

@media (min-width: 700px) {
    form > button {
        margin-left: 9rem;
    }
}

header, main, footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}

@media (min-width: 700px) {
    .wrapper {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@keyframes shadow-on-scroll {
    from {
        box-shadow: rgba(0, 0, 0, 0) 1px 8px 15px -12px;
    }
    to {
        box-shadow: rgba(0, 0, 0, 0.32) 1px 8px 15px -12px;
    }
}

header {
    position: fixed;
    top: 0;
    z-index: 1;
    background: var(--light);
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--terminli);

    animation: shadow-on-scroll ease forwards;
    animation-duration: 300ms;
    animation-fill-mode: both;
    animation-timeline: scroll(root);
    animation-range: 0 5vh;
}

@media (min-width: 700px) {
    header {
        border-bottom: 0;
    }
}

header .wrapper {
    padding-top: 2rem;
    display: grid;
    grid-template-areas:
        "logo claim"
        "nav nav";
    grid-template-columns: 11rem auto;
    align-items: center;
    padding-bottom: 2rem;
    height: 140px;
}

@media (min-width: 960px) {
    header .wrapper {
        grid-template-areas:
        "logo nav"
        "claim nav";
        grid-template-columns: 14rem auto;
        align-items: center;
    }
}
header .wrapper > a {
    grid-area: logo;
}

header .wrapper .logo {
    height: 3rem;
}
header .wrapper small {
    grid-area: claim;
    font-size: .9rem;
    color: var(--muted);
    padding-top: .35rem;
}
header .wrapper nav {
    grid-area: nav;
    display: flex;
    flex-direction: row;
    justify-content: start;
    gap: 1rem;
    font-size: 1rem;
    padding-top: 1rem;
}
@media (min-width: 960px) {
    header .wrapper nav {
        justify-content: end;
        padding-top: 0;
    }
}
header .wrapper nav a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text);
    display: inline-block;
    position: relative;
}
header .wrapper nav a::after {
    content: '';
    position: absolute;
    bottom: -.25rem;
    left: 0;
    height: 2px;
    width: 1rem;
    background-color: var(--text);
    transition: width 0.25s ease;
}
header .wrapper nav a:hover::after {
    width: 100%;
}
header .wrapper nav a.external {
    color: var(--terminli);
}
header .wrapper nav a.external::after {
    background-color: var(--terminli);
}
header .wrapper nav a:hover {
    color: var(--primary);
}
header .wrapper nav a:hover::after {
    background-color: var(--primary);
}
header .wrapper nav a.external {
    color: var(--terminli);
}
header .wrapper nav a.external::after {
    background-color: var(--terminli);
}
header .wrapper nav a.additional {
    display: none;
}
@media (min-width: 700px) {
    header .wrapper nav a.additional {
        display: inline-block;
    }
}

main {
    margin-top: calc(140px + 2rem);
}

main .wrapper section:not(:first-child) {
    padding-top: 2rem;
}

main .wrapper section:not(:last-child) {
    border-bottom: 1px solid var(--muted);
    padding-bottom: 1rem;
}

main .wrapper form, main .wrapper section.single {
    border-bottom: 1px solid var(--muted);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

ul.cards {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
ul.cards.narrow {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
@media (min-width: 740px) {
    ul.cards.narrow {
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    }
}
article.card {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

ul.cards > li, article.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: .25rem;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    box-shadow: rgba(0, 0, 0, 0.16) 1px 8px 15px -12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cards > li:hover, article.card:hover {
    transform: scale(1.03);
    box-shadow: rgba(0, 0, 0, 0.32) 1px 8px 15px -12px;
}

ul.cards li h3, article.cards h3, ul.cards li h2, article.cards h2 {
    color: var(--terminli);
    font-size: 1.2rem;
}
ul.cards li a {
    text-decoration: none;
    color: unset;
}

h4 + small {
    color: var(--dark);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

footer .wrapper {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

footer p {
    margin: 0;
    padding: 0 0 1rem;
    text-align: center;
}
footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
}
footer ul li a {
    text-decoration: none;
    color: var(--muted);
}
footer ul li a:hover {
    text-decoration: underline;
}

@media (min-width: 1000px) {
    .wrapper {
        width: 960px;
    }
}

@keyframes screenshot-flatten {
    from {
        transform: perspective(800px) rotateX(25deg) rotateZ(-15deg) scale(0.85);
        max-width: 120%;
        margin-top: clamp(-8rem, 6rem - 25vw, 0rem);
        margin-bottom: calc((clamp(-8rem, 10rem - 25vw, 0rem) * -1) + 3rem);
    }
    to {
        transform: perspective(800px) rotateX(0deg) rotateZ(0deg) scale(1);
        max-width: 100%;
        margin-top: 2rem;
        margin-bottom: 4rem;
    }
}

#terminli .screenshot {
    border-radius: 3%;
    border: 1px solid var(--border);
    box-shadow: -18px 24px 32px rgba(0,0,0,0.18);

    animation: screenshot-flatten ease forwards;
    animation-duration: 1ms;
    animation-fill-mode: both;
    animation-timeline: scroll(root);
    animation-range: 0 25vh;
}

.contract small {
    display: block;
    padding-bottom: 2rem;
}
.contract ul {
    padding-bottom: 1rem;
}
.contract section:last-of-type {
    border-bottom: 1px solid var(--muted);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}