/*
  The API welcome page in the SwiftUI app's design language (dynamic-pace-swiftui docs/DESIGN.md):
  soft monochrome on an open neutral canvas, light and dark as equal citizens, SF Pro Rounded for UI,
  Newsreader for the greeting and wordmark, one opaque near-black (near-white in dark) primary action,
  the mark only in its cornflower tile. Colours are the app's DPPalette roles.
*/
@font-face {
    font-family: "Newsreader";
    src: url("fonts/Newsreader-Variable-Latin.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --canvas: #FAF9F6;
    --control-fill: #F0EFEB;
    --ink: #1F1E1D;
    --ink-secondary: #5B5A55;
    --ink-muted: #6E6D67;
    --divider: rgb(31 30 29 / 0.08);
    --primary-action: #1C1C1B;
    --on-primary-action: #FFFFFF;
    --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
    --quick: 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #151515;
        --control-fill: #2E2E2D;
        --ink: #F9F9F7;
        --ink-secondary: #C3C2B7;
        --ink-muted: #9A988F;
        --divider: rgb(255 255 255 / 0.10);
        --primary-action: #F9F9F7;
        --on-primary-action: #20201F;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--rounded);
    font-size: 17px;
    line-height: 1.45;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}

/* DPLayout.readableWidth 680 plus the 20 pt screen margins. */
main {
    max-width: 720px;
    min-height: 100svh;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.mark-tile { width: 36px; height: 36px; flex: none; }
.wordmark { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }

/* DPType.label on a controlFill capsule: the quiet chip. */
.label {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-secondary);
    background: var(--control-fill);
    border-radius: 999px;
    padding: 6px 14px;
}

section { margin: auto 0; padding: 96px 0; }

/* DPType.greeting: the serif, regular, at a web hero size. */
h1 {
    font-family: var(--serif);
    font-size: clamp(36px, 7vw, 56px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0 0 20px;
}

.description { color: var(--ink-secondary); margin: 0 0 32px; max-width: 34em; }

/* .buttonStyle(.primary): one opaque capsule, 52 pt, DPType.bodyEmphasized. */
.primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--primary-action);
    color: var(--on-primary-action);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--quick), opacity var(--quick);
}
.primary:hover { opacity: 0.92; }
.primary:active { transform: scale(0.97); opacity: 0.86; }
.primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* DPType.caption with the number in DPType.smallNumber. */
.version { color: var(--ink-muted); font-size: 13px; margin: 20px 0 0; }
.number { color: var(--ink-secondary); font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

footer {
    border-top: 1px solid var(--divider);
    padding-top: 16px;
    color: var(--ink-muted);
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    .primary { transition: opacity 250ms ease-in-out; }
    .primary:active { transform: none; }
}

@media (max-width: 480px) {
    section { padding: 64px 0; }
    .primary { width: 100%; justify-content: center; }
}
