/**
 * File: assets/css/foundation/base.css
 * Purpose: Provides the minimal production-safe document and fallback-loop foundation for the stable theme foundation.
 * Scope: Theme foundation only; header, footer, blog, page, and plugin component styling is forbidden here.
 * Related PHP: header.php, footer.php, index.php, src/Core/Assets.php
 * Related JS: None
 * Package: HyperDAF Pro
 */

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

html {
    font-family: var(--hdf-typography-family-sans);
    line-height: var(--hdf-typography-line-height-base);
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--hdf-color-text-primary);
    background: var(--hdf-color-surface);
    font-family: var(--hdf-typography-family-sans);
    font-size: var(--hdf-typography-size-md);
    font-weight: var(--hdf-typography-weight-regular);
    line-height: var(--hdf-typography-line-height-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--hdf-color-primary-strong);
    text-decoration-thickness: var(--hdf-border-width-default);
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--hdf-color-primary-hover);
}

.hdf-site {
    min-height: 100vh;
}

.hdf-site-main {
    width: min(calc(100% - (2 * var(--hdf-spacing-5))), var(--hdf-layout-wide));
    margin-inline: auto;
    padding-block: var(--hdf-spacing-10);
}

.hdf-content-list {
    display: grid;
    gap: var(--hdf-spacing-6);
}

.hdf-entry,
.hdf-empty-state {
    padding: var(--hdf-spacing-6);
    border: var(--hdf-border-width-default) solid var(--hdf-color-border);
    border-radius: var(--hdf-radius-lg);
    background: var(--hdf-color-surface);
    box-shadow: var(--hdf-shadow-xs);
}

.hdf-entry__title {
    margin-block: 0 var(--hdf-spacing-3);
    font-size: clamp(var(--hdf-typography-size-xl), 3vw, var(--hdf-typography-size-2xl));
    line-height: var(--hdf-typography-line-height-tight);
}

.hdf-entry__title a {
    color: inherit;
    text-decoration: none;
}

.hdf-entry__title a:hover {
    text-decoration: underline;
}

.hdf-entry__content > :first-child,
.hdf-empty-state > :first-child {
    margin-top: 0;
}

.hdf-entry__content > :last-child,
.hdf-empty-state > :last-child {
    margin-bottom: 0;
}

.navigation.pagination {
    margin-top: var(--hdf-spacing-8);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hdf-spacing-2);
}

.page-numbers {
    display: inline-flex;
    min-width: 2.5rem;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: var(--hdf-spacing-2) var(--hdf-spacing-3);
    border: var(--hdf-border-width-default) solid var(--hdf-color-border);
    border-radius: var(--hdf-radius-md);
    background: var(--hdf-color-surface);
    color: var(--hdf-color-text-primary);
    text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
    border-color: var(--hdf-color-primary-strong);
    background: var(--hdf-color-primary-strong);
    color: var(--hdf-color-on-primary-strong);
}

@media (max-width: 47.99rem) {
    .hdf-site-main {
        width: min(calc(100% - (2 * var(--hdf-spacing-4))), var(--hdf-layout-wide));
        padding-block: var(--hdf-spacing-7);
    }

    .hdf-entry,
    .hdf-empty-state {
        padding: var(--hdf-spacing-5);
    }
}
