/* Shared styles for move38labs.com. Pages opt in with:
   <link rel="preload" href="/shared/fonts/inter-latin.woff2" as="font" type="font/woff2" crossorigin>
   <link rel="stylesheet" href="/shared/style.css"> */

/* Inter (SIL Open Font License), self-hosted, variable weight */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/shared/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/shared/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --text: #111111;
    --muted: #5c5c5c;
    --bg: #ffffff;
    --link: #1f5fa8;
    --rule: #e3e3e3;
    --surface: #f5f5f5;
    --measure: 44rem;
    color-scheme: light;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
    body {
        font-size: 18px;
    }
}

/* Layout: one readable column */
.site-header,
main,
.site-footer {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-header {
    padding-top: 2rem;
}

main {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.site-footer {
    padding-bottom: 3rem;
    color: var(--muted);
    font-size: 0.875em;
}

.site-footer::before {
    content: '';
    display: block;
    border-top: 1px solid var(--rule);
    margin-bottom: 1rem;
}

.site-name {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.4em;
    letter-spacing: -0.035em;
    margin: 1.5rem 0 1.5rem;
}

h2 {
    font-size: 1.5em;
    margin: 3rem 0 1rem;
}

h3 {
    font-size: 1.2em;
    margin: 2.25rem 0 0.75rem;
}

p, ul, ol, blockquote, pre, table, figure {
    margin: 0 0 1.25rem;
}

ul, ol {
    padding-left: 1.4rem;
}

li + li {
    margin-top: 0.4em;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

strong, b {
    font-weight: 700;
}

.meta {
    color: var(--muted);
    font-size: 0.875em;
    margin-top: -0.75rem;
}

blockquote {
    margin-left: 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--rule);
    color: var(--muted);
}

hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 2.5rem 0;
}

/* Code */
code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
}

code {
    background: var(--surface);
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

pre {
    background: var(--surface);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* Media */
img, video, svg, canvas, iframe {
    max-width: 100%;
    height: auto;
}

figure {
    margin: 2rem 0;
}

figure img {
    display: block;
}

figcaption {
    color: var(--muted);
    font-size: 0.875em;
    margin-top: 0.5rem;
}

/* Tables scroll sideways on narrow screens instead of breaking the page */
.table-wrap {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
    font-variant-numeric: tabular-nums;
}

th, td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

th {
    font-weight: 700;
}

/* Home page */
.home {
    padding-top: 4rem;
}

.home-header h1 {
    font-size: 3em;
    margin: 0 0 0.75rem;
}

/* mono tagline, as on move38.org */
.tagline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
    color: var(--muted);
    margin: 0 0 3rem;
}

.intro {
    font-size: 1.1em;
    margin-bottom: 4rem;
}

.home h2 {
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.experiments {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--rule);
}

.experiments li {
    margin: 0;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--rule);
}

.experiments a {
    font-weight: 700;
    font-size: 1.15em;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--text);
    text-decoration: none;
}

.experiments a::after {
    content: ' →';
    color: var(--link);
}

.experiments a:hover {
    color: var(--link);
}

.experiments p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

@media (max-width: 480px) {
    .home {
        padding-top: 2.5rem;
    }

    .home-header h1 {
        font-size: 2.4em;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header,
    .site-footer {
        display: none;
    }
}
