/* Blog post pages: the post header (design-refs/bloghead.png).
   "← BLOG" above the title; under the title a thin line, then author · date · reading time on the left
   and "Copy link" on the right. Every post uses this; see blog/README.md. */

/* Below 1024px the reading column uses the page gutter (16px on phones, 20px on tablets), so the text
   lines up with the logo on the left and the menu button on the right. From 1024px the column is placed
   by the rules below. */
:root {
    --post-gutter: var(--gutter);
}

@media (min-width: 1024px) {
    :root {
        --post-gutter: 4rem;
    }
}

/* Desktop: the column lines up with the header. It starts where the first nav link (Services) starts and
   ends where the Log in button ends. The left edge is the header's own spacing; the right edge is set
   exactly by static/blog-post.js (--post-end), with a close estimate until it runs. The title, line,
   author row and cover use the full width; the article text is the old 800px block, centered under the cover. */
@media (min-width: 1024px) {
    :root {
        --post-start: calc(var(--gutter) + var(--logo-width) + var(--header-gap) + var(--nav-offset));
        --post-end: calc(var(--gutter) + 9.25rem); /* Get Started's width plus the 12px gap */
    }

    .page-shell .post-column {
        max-width: none;
        margin-left: var(--post-start);
        margin-right: var(--post-end);
        padding-left: 0;
        padding-right: 0;
        width: auto;
    }

    .post-column .article-content {
        max-width: 50rem;
        margin-left: auto;
        margin-right: auto; /* the 800px text block sits centered under the cover */
    }
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem; /* 44px tap target */
    margin-bottom: 1rem;
    color: #737373;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .post-back:hover {
        color: #0a0a0a;
    }
}

.post-back:focus-visible {
    outline: 2px solid #0a0a0a;
    outline-offset: 3px;
}


/* Header rhythm: one value sets the space from the title down to the author row and from the author row
   down to the cover, so the two always match. Both meta items sit in 44px rows (the Copy link tap height)
   with their text centered, so the visible gaps are equal: title → line → row text, and row text → cover.
   On phones Copy link wraps under the author row; the same space then sits under Copy link. */
:root {
    --post-head-gap: 2rem;
}

.post-column .article-title {
    margin-bottom: var(--post-head-gap);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 1.5rem;
    margin: 0 0 calc(var(--post-head-gap) - 2px); /* evens out the 1px line above the row and the title's own line spacing, so the visible gaps match to the pixel */
    padding-top: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    color: #737373;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 0.75rem; /* 12px: CLAUDE.md §13 keeps reading-time labels at 12px or more */
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.post-meta__info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.625rem;
    min-height: 2.75rem; /* same 44px row as Copy link, so both texts sit at the same height */
    margin: 0;
    color: #575757; /* date and reading time */
}

/* "By [author]" is black */
.post-meta__by {
    color: #000000;
}

.post-meta__copy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem; /* 44px tap target */
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.post-meta__copy svg {
    flex-shrink: 0;
}

/* Darkens on hover, only on devices with a mouse */
@media (hover: hover) and (pointer: fine) {
    .post-meta__copy:hover {
        color: #0a0a0a;
    }
}

.post-meta__copy:focus-visible {
    outline: 2px solid #0a0a0a;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .post-back,
    .post-meta__copy {
        transition: none;
    }
}

/* ---------- Post cover ----------
   The gradient panel above the article, with the Altigrid symbol. Its look comes from the shared
   static/post-covers.css (class "cover cover--<look>", the same look as the post's "cover" in posts.json). */
.post-cover {
    width: 100%;
    aspect-ratio: 16 / 9; /* phones; 16:10 on tablets, 2:1 from 1024px */
    margin-bottom: 3.5rem; /* space before the article starts: 56px on phones, 72px from 768px */
    border-radius: 0.125rem;
}

@media (min-width: 768px) {
    .post-cover {
        aspect-ratio: 16 / 10;
        margin-bottom: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .post-cover {
        aspect-ratio: 2 / 1;
    }
}
