/* Matches the look of pendrgn.com (Ghost / Casper theme).
   Tokens lifted from the live site's screen.css. */

:root {
    --color-darkgrey: #15171a;
    --color-midgrey: #738a94;
    --color-lightgrey: #f1f1f1;
    --color-secondary-text: #979797;
    --color-border: #e1e1e1;
    --color-wash: #e5eff5;
    --accent-color: #166e84;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
        "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
        "Helvetica Neue", sans-serif;
    --font-serif: Georgia, Times, serif;
    --font-mono: Menlo, Courier, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 1.7rem;
    line-height: 1.6em;
    color: var(--color-darkgrey);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Header — the Casper masthead */

.site-head {
    padding: 0 4vw;
    background: #fff;
    border-bottom: 1px solid var(--color-lightgrey);
}

.site-head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    height: 64px;
    margin: 0 auto;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-darkgrey);
    text-decoration: none;
    white-space: nowrap;
}

/* Small crest in the header, sized to the 64px bar */

.site-logo img {
    height: 42px;
    width: auto;
}

.site-nav {
    display: flex;
    gap: 24px;
}

.site-nav a {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-darkgrey);
    text-decoration: none;
    opacity: 0.8;
}

.site-nav a:hover {
    opacity: 1;
}

/* Main content column — Casper's 720px reading measure */

.site-main {
    flex-grow: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 8vmin 4vw 12vmin;
}

/* The crest (crest.svg, sword in the stone, 436x486) — set width only so it keeps its ratio */

.page-logo {
    display: block;
    width: 110px;
    height: auto;
    margin-bottom: 24px;
}

/* Home: the logo sits larger, centered above the list */

.home-header {
    text-align: center;
}

.home-header .page-logo {
    width: 180px;
    margin: 0 auto 28px;
}

/* Small app icon shown inline before the app's name in headings */

.name-icon {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    margin-right: 0.3em;
    vertical-align: -0.12em;
}

/* The "(aka ...)" tail on the app name */

.aka {
    font-size: 0.55em;
    font-weight: 400;
    color: var(--color-midgrey);
    white-space: nowrap;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 4.4rem;
    font-weight: 700;
    line-height: 1.05em;
    letter-spacing: -0.01em;
}

.page-excerpt {
    margin-top: 20px;
    font-size: 2rem;
    line-height: 1.4em;
    color: var(--color-midgrey);
}

.page-content {
    margin-top: 40px;
}

.page-content h2 {
    margin: 5.6rem 0 1.6rem;
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.25em;
}

.page-content h3 {
    margin: 3.2rem 0 0.8rem;
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.3em;
}

.page-content p,
.page-content ul {
    margin-bottom: 1.8rem;
}

.page-content ul {
    padding-left: 2.4rem;
}

.page-content a {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent-color) 40%, transparent);
    text-underline-offset: 2px;
}

.page-content a:hover {
    text-decoration-color: var(--accent-color);
}

.page-content hr {
    margin: 5.6rem 0;
    border: 0;
    border-top: 1px solid var(--color-lightgrey);
}

.muted {
    color: var(--color-secondary-text);
    font-size: 1.5rem;
}

/* App cards on listing pages — echoes Casper's post-card */

.app-card {
    display: block;
    margin-top: 32px;
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.app-card:hover {
    border-color: var(--color-midgrey);
}

.app-card h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.15em;
}

.app-card p {
    margin: 10px 0 0;
    color: var(--color-midgrey);
}

.page-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--color-lightgrey);
}

.page-links a {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
}

.page-links a:hover {
    text-decoration: underline;
}

/* Footer — Casper's dark band */

.site-footer {
    padding: 20px 4vw;
    background: var(--color-darkgrey);
    color: #fff;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 1.3rem;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .page-title {
        font-size: 3.4rem;
    }
}
