/* Self-hosted Inter 4 (rsms.me/inter). No third-party requests anywhere. */
@font-face {
    font-family: "InterVariable";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/static/fonts/InterVariable.woff2") format("woff2");
}

@font-face {
    font-family: "InterVariable";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("/static/fonts/InterVariable-Italic.woff2") format("woff2");
}

/* Near-black and near-white instead of pure, all neutrals tinted the same warm
   hue (HSB 30deg) at 5% saturation or less:
   https://anthonyhobday.com/sideprojects/saferules/ */
:root {
    --text: #1f1e1d;            /* HSB 30 5 12; 15.5:1 on --background */
    --background: #faf6f2;      /* HSB 30 3 98 */
    --text-muted: #73706d;      /* HSB 30 5 45; 4.6:1, one step lighter drops below 4.5:1 */

    --font: "InterVariable", "Inter", system-ui, sans-serif;
    /* About 70 characters per line. 1ch is Inter's "0" (0.63em), about 1.33
       times its average character (0.48em in running English), so 70
       characters are 53ch, not 70ch. */
    --measure: 53ch;
    --page: 64rem;
    --gutter: clamp(1.5rem, 5vw, 3rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--background);
    color: var(--text);
    font-family: var(--font);
    font-size: 100%;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0 auto;
    max-width: var(--page);
    padding: 0 var(--gutter);
    overflow-x: hidden;
}

h1,
p {
    margin: 0;
}

/* Hero */

.hero {
    --hero-top: clamp(3rem, 10vw, 7rem);
    --wordmark-size: clamp(3.5rem, 15vw, 10rem);

    position: relative;
    padding: var(--hero-top) 0 clamp(3rem, 8vw, 5rem);
}

.wordmark {
    position: relative;
    font-size: var(--wordmark-size);
    font-weight: 850;
    line-height: 0.88;
    letter-spacing: -0.045em;
}

/* A separate line under "Salad", small enough that the three big lines keep
   their shape. */
.wordmark-studios {
    display: block;
    margin-top: 0.6em;
    font-size: 0.2em;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

/* The logo's top sits on the headline's cap height, not its line box. With
   Inter's metrics (ascender 0.969em, descender 0.241em, cap height 0.727em)
   and line-height 0.88, the tops of the capitals land 0.076em below the top
   of the h1. Change the headline's line-height and this offset changes too. */
.logo {
    position: absolute;
    top: calc(var(--hero-top) + var(--wordmark-size) * 0.076);
    right: min(6vw, 6rem);
    width: clamp(6rem, 26vw, 17rem);
    height: auto;
}

.intro {
    position: relative;
    max-width: var(--measure);
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
    font-size: clamp(1.125rem, 2.2vw, 1.375rem);
    line-height: 1.45;
}
