/* The public site: `service/src/site/index.tsx`. */

/* Served from here, not a font service some visitors block. Instrument Sans
   is variable in weight; Shippori Mincho B1 is cut to the five letters of
   the wordmark. Both are under the OFL, beside them in `fonts/`. */

@font-face {
    font-family: "Instrument Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(fonts/instrument-sans-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: "Instrument Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(fonts/instrument-sans-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;
}

@font-face {
    font-family: "Shippori Mincho B1";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(fonts/shippori-mincho-b1-bold-wordmark.woff2) format("woff2");
    unicode-range: U+42, U+67, U+69, U+6B, U+6F;
}

:root {
    color-scheme: light dark;
    --page: #e9ece8;
    --ink: #1f2427;
    --muted: #59636a;
    --rule: #c3c9c4;
    --yes: #2b8a43;
    --band-muted: #5a4527;
    --accent: #3546a1;
    --accent-ink: #ffffff;
    --gutter: clamp(16px, 4vw, 48px);
    --measure: 1120px;
    --window: #1b1b1b;
    --seam: 4px;
    --display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif;
    --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #1d2022;
        --ink: #e5e8e3;
        --muted: #a2abaf;
        --rule: #3a4144;
        --yes: #5fc47c;
        --band-muted: #f0e2c6;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font: 17px/1.55 var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

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

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* The band the notice and the hero stand on, with its own muted shade. */

.band {
    --muted: var(--band-muted);
    padding-bottom: clamp(48px, 8vh, 96px);
}

/* The hero: the name set large, the line under it, the download. */

main > section,
.hero {
    max-width: calc(var(--measure) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.hero {
    padding-top: clamp(32px, 7vh, 88px);
}

h1 {
    margin: 0;
    font: 700 clamp(5rem, 15vw, 11.5rem) / 1.08 var(--display);
    letter-spacing: -0.02em;
}

.tagline {
    margin: 1.1rem 0 0;
    font-size: clamp(1.3rem, 2.6vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
}

.download {
    margin-top: 2.2rem;
}

.button {
    display: inline-block;
    padding: 0.95rem 1.7rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
}

.button:hover {
    filter: brightness(1.15);
}

.version,
.others,
.download-none,
.download-choose {
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.others a,
.download-list a {
    margin-right: 0.9em;
    text-underline-offset: 3px;
}

.download-choose {
    color: var(--ink);
    font-weight: 600;
    font-size: 1.05rem;
}

.download-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0;
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
}

.download-none {
    font-size: 1.05rem;
}

/* The pictures of the app, as one window cut into panels of different
   sizes. The seams between them are the window's own dark borders between
   areas. */

.app {
    padding-top: clamp(48px, 8vh, 88px);
    padding-bottom: clamp(56px, 9vh, 104px);
}

.mosaic {
    display: flex;
    flex-direction: column;
    gap: var(--seam);
    max-width: var(--measure);
    margin: 0 auto;
    padding: var(--seam);
    border-radius: 10px;
    background: var(--window);
    box-shadow:
        0 1px 2px rgb(0 0 0 / 0.25),
        0 24px 60px -20px rgb(0 0 0 / 0.6);
}

.mosaic-row {
    display: flex;
    align-items: flex-start;
    gap: var(--seam);
}

.mosaic img {
    flex-basis: 0;
    min-width: 0;
    border-radius: 4px;
}

@media (max-width: 700px) {
    .mosaic-row {
        flex-direction: column;
    }

    .mosaic img {
        width: 100%;
    }
}

/* The feature table: a name at the left, its check or word at the right. */

.features {
    padding-bottom: clamp(56px, 9vh, 104px);
}

.features table {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border-collapse: collapse;
}

.features tr + tr {
    border-top: 1px solid var(--rule);
}

.features th {
    padding: 0.7rem 1rem 0.7rem 0;
    font-weight: 500;
    text-align: left;
}

.features td {
    width: 4rem;
    padding: 0.7rem 0;
    text-align: right;
    vertical-align: middle;
}

.features .check {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    fill: none;
    stroke: var(--yes);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.features .soon {
    color: var(--muted);
    font-size: 0.9rem;
}
