/*
  cohlo.app's public page (cohlo-56ui). Static, self-contained: every colour,
  size and font comes from resources/css/app.css (the theme built from
  docs/design/tokens.json), light and dark by the visitor's system scheme. No
  external requests, scripts, cookies or forms.
*/

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

@font-face {
    font-family: 'Bricolage Grotesque Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('fonts/bricolage-grotesque-latin-opsz-normal.woff2')
        format('woff2-variations');
}

/* Light: the app's cream page (theme.css :root). */
:root {
    color-scheme: light dark;
    --brand: #d97757;
    --brand-strong: #a0452b;
    --background: #f3f0e7;
    --foreground: #1a1a18;
    --muted-foreground: #5c5950;
    --border: #e3ded1;
    --border-strong: #d0c9ba;
    --ring: var(--brand-strong);
    --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
    --font-display:
        'Bricolage Grotesque Variable', 'Inter Variable', sans-serif;
    --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n' color-interpolation-filters='sRGB'><feTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0.667 0.667 0.667 0 -0.5  0.667 0.667 0.667 0 -0.5  0.667 0.667 0.667 0 -0.5  0 0 0 0 1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    --grain-opacity: 0.06;
    font-optical-sizing: auto;
}

/* Dark: warm charcoal (theme.css .dark). */
@media (prefers-color-scheme: dark) {
    :root {
        --brand-strong: #d97757;
        --background: #161615;
        --foreground: #efeee9;
        --muted-foreground: #9e9c94;
        --border: #2c2c2a;
        --border-strong: #3a3a37;
        --ring: #d97757;
    }
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

/* No font-smoothing override, as in the app. Inter's single-storey a (cv11). */
body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-feature-settings: 'cv11';
    font-size: 15px;
    line-height: 1.5;
}

/* The paper grain: the one allowed texture, a static noise at 6%, never in the way. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: var(--grain-opacity);
    background-image: var(--grain);
}

@media print, (forced-colors: active) {
    body::after {
        display: none;
    }
}

.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: 64px 24px;
}

/* The wordmark, as <Logo /> (components/cohlo/logo.tsx and app.css). */
.logo {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
    font-size: 64px;
}

.logo-o {
    position: relative;
    display: inline-block;
    width: 0.5245em;
    height: 0.553em;
    vertical-align: -0.0138em;
}

.logo-o > * {
    position: absolute;
    top: 0;
    left: 0.0245em;
    width: 0.5155em;
    height: 0.553em;
}

.logo-o > .logo-dot {
    top: 0.009em;
    left: 0.0148em;
    width: 0.535em;
    height: 0.535em;
    border-radius: 9999px;
    background: var(--brand);
}

h1 {
    margin: 0;
}

/* type-headline */
.headline {
    margin: 40px 0 0;
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.035em;
}

/* type-lead */
.lead {
    margin: 20px 0 0;
    max-width: 34rem;
    font-size: 18px;
    line-height: 1.55;
}

/* type-intro, muted */
.note {
    margin: 16px 0 0;
    max-width: 34rem;
    color: var(--muted-foreground);
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: var(--foreground);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 4px;
    border-radius: 2px;
    transition: text-decoration-color 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover {
    text-decoration-color: var(--foreground);
}

a:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

/* type-small, muted */
.footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 13px;
    line-height: 19px;
}

.footer p {
    margin: 0;
}

/* Every number tabular. */
.tabular {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
    .page {
        padding: 48px 20px;
    }

    .logo {
        font-size: 52px;
    }

    .headline {
        margin-top: 32px;
        font-size: 32px;
    }

    .lead {
        font-size: 17px;
    }

    .footer {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    a {
        transition: none;
    }
}
