/* =========================================================================
   Henkst Theme — base.css
   Minimal resets + global styles that theme.json can't handle
   ========================================================================= */

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

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

/* ── Body ───────────────────────────────────────────────────────────────── */
body {
    -webkit-font-smoothing:  antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering:          optimizeLegibility;
}

/* ── Prose ──────────────────────────────────────────────────────────────── */
p { margin-block: 0 1em; }
p:last-child { margin-bottom: 0; }

/* ── Content width ──────────────────────────────────────────────────────── */
.wp-site-blocks {
    --wp--style--root--padding-left:  clamp( 20px, 5vw, 48px );
    --wp--style--root--padding-right: clamp( 20px, 5vw, 48px );
}

/* ── Page title ─────────────────────────────────────────────────────────── */
.wp-block-post-title,
.entry-title {
    margin-bottom: 0.5em;
}

/* ── Featured image ─────────────────────────────────────────────────────── */
.wp-block-post-featured-image img {
    width:      100%;
    height:     auto;
    object-fit: cover;
}

/* ── Separator ──────────────────────────────────────────────────────────── */
.wp-block-separator {
    border:    none;
    border-top: 1px solid var(--wp--preset--color--muted);
    opacity:   0.3;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.wp-block-button__link {
    border-radius: 3px !important;
    font-size:     0.85rem !important;
    font-weight:   600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    padding:       10px 24px !important;
}

/* ── Code ───────────────────────────────────────────────────────────────── */
code, pre {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size:   0.9em;
}

pre {
    background:    rgba(0,0,0,0.04);
    padding:       1.5em;
    border-radius: 4px;
    overflow-x:    auto;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th, td {
    padding:     8px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    text-align:  left;
}
th { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Accessibility ──────────────────────────────────────────────────────── */
:focus-visible {
    outline:        2px solid var(--wp--preset--color--accent);
    outline-offset: 3px;
    border-radius:  2px;
}

.screen-reader-text {
    position:   absolute;
    width:      1px;
    height:     1px;
    padding:    0;
    overflow:   hidden;
    clip:       rect(0,0,0,0);
    white-space: nowrap;
    border:     0;
}

/* ── Skip link ──────────────────────────────────────────────────────────── */
.skip-link {
    position:   absolute;
    top:        -100%;
    left:       16px;
    background: var(--wp--preset--color--accent);
    color:      #fff;
    padding:    8px 16px;
    z-index:    9999;
    border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

/* ── Sticky footer — push to bottom of viewport ────────────────────────── */
.wp-site-blocks {
    display:        flex;
    flex-direction: column;
    min-height:     100vh;
}

/* Content row grows to fill space, pushing footer down */
.wp-site-blocks > *:not(:first-child):not(:last-child) {
    flex: 1 0 auto;
}


/* Hide WordPress credit line */
p:has( a[href*="wordpress.org"] ) {
    display: none !important;
}

.error404 .not-found-content {
    padding:    4rem 0;
    text-align: center;
}

.error404 .not-found-content h1 {
    font-size:  8rem;
    line-height: 1;
    opacity:    0.08;
    margin:     0;
}

/* ── Single project: clear fixed nav bar ───────────────────────────────── */
/* The project nav bar sits above the footer (~130px tall).
   Add matching padding to the content so nothing gets hidden. */
.single-project .wp-block-post-content,
.single-project main {
    padding-bottom: 140px;
}

