/*
 * Think About Things
 * Simple, responsive stylesheet
 */


/* Base
   ========================================================================== */

:root {
    --color-background: #f6f4ef;
    --color-text: #242424;
    --color-muted: #686862;
    --color-accent: #476052;

    --content-width: 52rem;
    --page-padding: clamp(1.5rem, 5vw, 5rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;

    display: flex;
    flex-direction: column;

    background: var(--color-background);
    color: var(--color-text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 1rem;
    line-height: 1.6;

    text-rendering: optimizeLegibility;
}

/* Layout
   ========================================================================== */

header,
main,
footer {
    width: min(100%, calc(var(--content-width) + (2 * var(--page-padding))));
    margin-inline: auto;
    padding-inline: var(--page-padding);
}

header {
    padding-top: clamp(2rem, 6vh, 5rem);
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding-top: 4rem;
    padding-bottom: 4rem;
}

footer {
    flex-shrink: 0;
    padding-top: 2rem;
    padding-bottom: clamp(2rem, 5vh, 4rem);
}



/* Header
   ========================================================================== */

header p {
    margin: 0;

    color: var(--color-text);

    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* Main content
   ========================================================================== */

section {
    max-width: 46rem;
}

section + section {
    margin-top: clamp(3rem, 7vh, 5rem);
}

h1 {
    max-width: 44rem;
    margin: 0;

    font-size: clamp(2.25rem, 6vw, 4.75rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

h1 + p {
    max-width: 38rem;
    margin: 2rem 0 0;

    color: var(--color-muted);

    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.65;
}


/* Contact
   ========================================================================== */

h2 {
    margin: 0 0 0.5rem;

    color: var(--color-muted);

    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

address {
    font-style: normal;
}

address a {
    color: var(--color-text);

    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 500;

    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.25em;
}

address a:hover {
    color: var(--color-accent);
}

address a:focus-visible {
    outline: 0.15rem solid var(--color-accent);
    outline-offset: 0.3rem;
}


/* Footer
   ========================================================================== */

footer p {
    margin: 0;

    color: var(--color-muted);

    font-size: 0.8rem;
}


/* Small screens
   ========================================================================== */

@media (max-width: 40rem) {
    main {
        justify-content: flex-start;
        padding-top: 5rem;
    }

    h1 {
        font-size: clamp(2.25rem, 11vw, 3.5rem);
    }
}


/* Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}