html, body {
    width: 100%;
    overflow-x: hidden;
}

* { margin: 0; padding: 0; font-family: var(--font-primary); box-sizing: border-box; }
a, button { text-decoration: none; cursor: pointer; }
main { display: flex; flex-direction: column; flex: 1; }
section { display: flex; min-height: 90dvh; align-items: center; justify-content: center; }
article { margin: 3em 0; gap: 2em; }
section>article {
    display: flex;
    justify-content: center;
}

section>article.max {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

button, .button, a.button {
    border: none;
    margin: 1em 0;
    font-weight: var(--font-weight-600);
    border-radius: 50px;
    width: fit-content;
    padding: clamp(5px, 2vh, 20px) clamp(20px, 4vw, 40px);
    text-align: center;
    background-color: var(--clr-green-darker);
    font-size: var(--font-size-button);
    transition: background-color 650ms ease, color 650ms ease;
    color: var(--clr-olive-darker);

    &:hover {
        background-color: var(--clr-lavender-darker); color: white !important;
        text-decoration: none !important;
    }
    &:focus-visible {
        outline: 2px solid var(--clr-lavender-darker);
    }
}

.center-arrow { display: flex; align-items: center; }
.link-arrow { height: 1em; width: 1em; margin-left: 0.5em; }

h1, h2, h3, h4, h5, h6, p, a, ul {
    margin: 0;
    padding: 0;
}

h1, h2 { font-size: var(--font-size-title-page); }
h3, h4 { font-size: var(--font-size-subtitle); }
h5 { font-size: calc(var(--font-size-paragraph) - 1px); }
p, a, li { font-size: var(--font-size-paragraph); }
h1, h2, h5, h4 { font-weight: 500; line-height: 100%; }
h3 { font-weight: 400; line-height: 120%; }
.header-0 { font-size: var(--font-size-main-title); }
.header-1 { font-size: var(--font-size-title-page); }
.header-2 { font-size: var(--font-size-small-title); }

ul { list-style: none; }

a, button, p, li, h3, h5, strong { font-family: var(--font-secondary); }
span { font-family: inherit; }

.right { text-align: right; }
.left { text-align: left; }
.center { text-align: center; }

.thin { font-weight: var(--font-weight-300); }
.regular { font-weight: var(--font-weight-400); }
.bold { font-weight: var(--font-weight-500); }
.bolder { font-weight: var(--font-weight-600); }
.boldest { font-weight: var(--font-weight-700); }

.white-bg { background-color: var(--clr-white); }
.whitest-bg { background-color: var(--clr-whitest); }
.dark-olive-bg { background-color: #071914; }
.dark-green-bg { background-color: var(--clr-green-darker); }
.light-green-bg { background-color: var(--clr-green-lighter); }
.light-lavender-bg { background-color: var(--clr-lavender-lightest); }
.medium-lavender-bg { background-color: var(--clr-lavender-lighter); }
.dark-lavender-bg { background-color: var(--clr-lavender-darker); }
.light-blue-bg { background-color: var(--clr-blue-light); }
.dark-blue-bg { background-color: var(--clr-blue-dark); }

.white-text { color: var(--clr-white); }
.grey-text { color: var(--clr-grey); }
.light-blue-text { color: var(--clr-blue-light); }
.dark-olive-text { color: var(--clr-olive-darker); }
.dark-green-text { color: var(--clr-green-darker); }
.light-green-text { color: var(--clr-green-lighter); }
.lightest-green-text { color: var(--clr-green-lighter); }
.dark-lavender-text { color: var(--clr-lavender-darker); }
.light-lavender-text { color: var(--clr-lavender-lighter); }
.lightest-lavender-text { color: var(--clr-lavender-lightest); }

@media (max-width: 1200px) {
    .scroll-up-link, .scroll-down-link {
        display: none;
    }
    .header-0 { font-size: var(--font-size-title-page); }
    footer {
        text-align: center;
        align-items: center;
        justify-content: center;
    }
}

.hide { display: none; }

.cta { min-height: 80dvh; }
.cta article { flex-direction: column; align-items: center; justify-content: center; margin: 3em 7.8vw; }

.text-section {
    display: flex;
    flex-direction: column;
    text-align: left;
    max-width: clamp(300px, 50%, 750px);
    gap: 2em;
}

.animated { opacity: 0; transform: translateY(100px); transition: opacity 1s ease, transform 0.5s ease; }
.animated.animate { opacity: 1; transform: translateY(0); }

button.medium-lavender-bg:hover { background-color: var(--clr-green-darker); color: var(--clr-olive-darker); }
a:not(.top-nav a):hover { text-decoration: underline var(--clr-white); }
a:not(.top-nav a):focus-visible {
    text-decoration: underline var(--clr-white);
    outline: 2px solid var(--clr-lavender-darker);
}

.scroll-down-link { position: absolute; bottom: 5%; right: 5%; }
.scroll-up-link { position: relative; bottom: 20%; }

.column { display: flex; flex-direction: column; }
.title-max-width { max-width: 80%; }

.maxwidth--text_desktop {
    max-width: 700px;
}

textarea:focus, input:focus {
    outline: none;
}

/* Utility classes */
.mono { font-family: var(--font-mono); }

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--glass-glow);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 30px rgba(45, 212, 140, 0.25);
}

.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    color: var(--clr-green-lighter);
}

.code-block .keyword { color: var(--clr-lavender-lighter); }
.code-block .string { color: var(--clr-terminal-green); }
.code-block .comment { color: var(--clr-grey); }
.code-block .func { color: var(--clr-blue-light); }

.grid-bg {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 30px 30px;
}
