/* The studio's pages: home, labs and privacy. One typeface, the reader's own
   system face, and two colours that follow their light or dark setting. */

:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --text: #0b0b0c;
    --muted: #6e6e73;
    --line: rgba(0, 0, 0, 0.1);
    --pad: clamp(24px, 5vw, 64px);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0b0c;
        --text: #f5f5f7;
        --muted: #8e8e93;
        --line: rgba(255, 255, 255, 0.14);
    }
}

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: max(var(--pad), env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right))
        max(var(--pad), env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
    background: var(--bg);
    color: var(--text);
    font-family:
        system-ui,
        -apple-system,
        'Segoe UI',
        Roboto,
        'Helvetica Neue',
        sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
p,
ul {
    margin: 0;
}
ul {
    padding: 0;
    list-style: none;
}
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
a:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
    border-radius: 2px;
}
::selection {
    background: var(--text);
    color: var(--bg);
}

/* the name, top left on every page */
.mark {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* home: Mix, and nothing beside it */
.home {
    display: grid;
    align-content: center;
    padding-block: clamp(48px, 10vh, 112px);
}

.product h2 {
    /* the M's own side bearing would set it right of the lines below it */
    margin-left: -0.045em;
    font-size: clamp(6rem, 17vw, 12.5rem);
    font-weight: 600;
    line-height: 0.8;
    letter-spacing: -0.055em;
}
.product .what {
    margin-top: clamp(22px, 3vw, 36px);
    font-size: clamp(1.375rem, 2.5vw, 2rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.022em;
}
.product .line {
    margin-top: 0.625rem;
    max-width: 44ch;
    font-size: 1.0625rem;
    color: var(--muted);
    text-wrap: balance;
}
.product .go {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    margin-top: 1.75rem;
    font-size: 1.0625rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    transition: text-decoration-color 0.15s ease;
}
.product .go:hover {
    text-decoration-color: currentColor;
}
.product .go svg {
    width: 0.8em;
    height: 0.8em;
}

/* labs: one row a project */
.labs {
    margin-top: 2.5rem;
    border-bottom: 1px solid var(--line);
}
.labs a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.9375rem;
}
.labs a span:first-child {
    font-weight: 500;
}
.labs a span:last-child {
    color: var(--muted);
    text-align: right;
    transition: color 0.15s ease;
}
.labs a:hover span:last-child {
    color: var(--text);
}

/* the last line of every page: who on the left, where to go on the right, one row at any width */
.foot {
    display: flex;
    /* only a screen narrower than any current phone wraps it, and then the links go on top */
    flex-wrap: wrap-reverse;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    color: var(--muted);
}
.foot p,
.foot nav {
    display: flex;
    gap: 1.5rem;
}
.foot span {
    white-space: nowrap;
}
.foot a {
    /* a finger needs more than a line of small type to land on */
    margin-block: -0.75rem;
    padding-block: 0.75rem;
}
.foot a:hover {
    color: var(--text);
}
.foot .short {
    display: none;
}
/* as the screen narrows the row gives up words, never its shape: first the place, then the address */
@media (max-width: 46rem) {
    .foot .place {
        display: none;
    }
}
@media (max-width: 34rem) {
    .foot nav {
        gap: 1rem;
    }
    .foot .full {
        display: none;
    }
    .foot .short {
        display: inline;
    }
}
/* the smallest phones: the same row, a size down, so it still clears its own gap */
@media (max-width: 24rem) {
    .foot {
        font-size: 0.75rem;
    }
}

/* privacy and labs: one column, set to be read */
.page {
    max-width: 36rem;
    padding-block: clamp(56px, 10vh, 112px);
}
.page h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.035em;
}
.page .note {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--muted);
}
.page h2 {
    margin-top: 2.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.page h2 + p {
    margin-top: 0.375rem;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--muted);
    text-wrap: pretty;
}
.page p a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.15s ease;
}
.page p a:hover {
    text-decoration-color: currentColor;
}

@media (prefers-reduced-motion: reduce) {
    a,
    .labs a span:last-child {
        transition: none;
    }
}
