/*
Theme Name: intim-uhf2
Theme URI: https://ukrainianhumanitarianf.org.ua/
Author: Studio
Author URI: https://ukrainianhumanitarianf.org.ua/
Description: A clean, warm editorial blog about relationships, intimacy and healthy boundaries. Humanist serif headings, calm dusty-rose accent, generous whitespace.
Version: 1.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: intim-uhf2
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --uhf2-bg: #faf7f2;
    --uhf2-surface: #ffffff;
    --uhf2-surface-soft: #f3ede4;
    --uhf2-ink: #2a2420;
    --uhf2-ink-soft: #5f574f;
    --uhf2-muted: #938a80;
    --uhf2-hairline: #e7ded2;
    --uhf2-rose: #a15b6a;
    --uhf2-rose-deep: #834754;
    --uhf2-rose-tint: #f4e8ea;
    --uhf2-sage: #6f7d63;
    --uhf2-sage-tint: #eef1e9;

    --uhf2-serif: "Newsreader", Georgia, "Times New Roman", serif;
    --uhf2-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --uhf2-maxw: 1100px;
    --uhf2-radius: 14px;
    --uhf2-radius-sm: 10px;
    --uhf2-shadow: 0 1px 2px rgba(42, 36, 32, 0.04), 0 8px 24px rgba(42, 36, 32, 0.06);
    --uhf2-shadow-hover: 0 2px 4px rgba(42, 36, 32, 0.06), 0 14px 34px rgba(42, 36, 32, 0.10);
    --uhf2-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body.uhf2-body {
    margin: 0;
    background: var(--uhf2-bg);
    color: var(--uhf2-ink);
    font-family: var(--uhf2-sans);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--uhf2-rose-deep);
    text-decoration: none;
    transition: color 0.2s var(--uhf2-ease);
}

a:hover,
a:focus-visible {
    color: var(--uhf2-rose);
}

h1, h2, h3, h4 {
    font-family: var(--uhf2-serif);
    font-weight: 500;
    color: var(--uhf2-ink);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1.1em;
}

:focus-visible {
    outline: 2px solid var(--uhf2-rose);
    outline-offset: 3px;
    border-radius: 3px;
}

.uhf2-container {
    width: 100%;
    max-width: var(--uhf2-maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.uhf2-narrow {
    max-width: 720px;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 10px 18px;
    background: var(--uhf2-ink);
    color: #fff;
    border-radius: var(--uhf2-radius-sm);
    z-index: 999;
}

/* ==========================================================================
   Header
   ========================================================================== */
.uhf2-header {
    background: var(--uhf2-bg);
    border-bottom: 1px solid var(--uhf2-hairline);
}

.uhf2-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 20px;
    padding-bottom: 20px;
}

.uhf2-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--uhf2-ink);
}

.uhf2-brand:hover,
.uhf2-brand:focus-visible {
    color: var(--uhf2-ink);
}

.uhf2-mark {
    width: 40px;
    height: 40px;
    flex: none;
    display: block;
}

.uhf2-brand .custom-logo {
    width: 40px;
    height: 40px;
}

.uhf2-brand-name {
    font-family: var(--uhf2-serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

.uhf2-nav {
    display: flex;
}

.uhf2-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

.uhf2-nav-list li {
    margin: 0;
}

.uhf2-nav-list a {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--uhf2-ink-soft);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s var(--uhf2-ease), color 0.2s var(--uhf2-ease);
}

.uhf2-nav-list a:hover,
.uhf2-nav-list a:focus-visible {
    background: var(--uhf2-rose-tint);
    color: var(--uhf2-rose-deep);
}

.uhf2-nav-list .current-cat > a,
.uhf2-nav-list .current-menu-item > a {
    background: var(--uhf2-rose-tint);
    color: var(--uhf2-rose-deep);
}

/* ==========================================================================
   Main
   ========================================================================== */
.uhf2-main {
    display: block;
}

/* Hero */
.uhf2-hero {
    padding: 72px 0 40px;
}

.uhf2-hero-title {
    font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem);
    font-weight: 600;
    margin: 0 0 18px;
    max-width: 16ch;
}

.uhf2-hero-lead {
    font-family: var(--uhf2-serif);
    font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
    font-style: italic;
    line-height: 1.5;
    color: var(--uhf2-ink-soft);
    max-width: 44ch;
    margin: 0;
}

/* Sections */
.uhf2-section {
    padding: 30px 0;
}

.uhf2-section + .uhf2-section {
    padding-top: 8px;
}

.uhf2-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--uhf2-hairline);
}

.uhf2-section-title {
    font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem);
    font-weight: 600;
}

.uhf2-section-title a {
    color: var(--uhf2-ink);
    background-image: linear-gradient(var(--uhf2-rose), var(--uhf2-rose));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: background-size 0.3s var(--uhf2-ease), color 0.2s var(--uhf2-ease);
    padding-bottom: 2px;
}

.uhf2-section-title a:hover,
.uhf2-section-title a:focus-visible {
    color: var(--uhf2-rose-deep);
    background-size: 100% 2px;
}

.uhf2-section-more {
    flex: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--uhf2-sage);
    white-space: nowrap;
}

.uhf2-section-more:hover,
.uhf2-section-more:focus-visible {
    color: var(--uhf2-ink);
}

/* Card grid */
.uhf2-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.uhf2-grid-archive {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.uhf2-card {
    display: flex;
    flex-direction: column;
    background: var(--uhf2-surface);
    border: 1px solid var(--uhf2-hairline);
    border-radius: var(--uhf2-radius);
    overflow: hidden;
    box-shadow: var(--uhf2-shadow);
    transition: transform 0.35s var(--uhf2-ease), box-shadow 0.35s var(--uhf2-ease), border-color 0.2s var(--uhf2-ease);
}

.uhf2-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--uhf2-shadow-hover);
    border-color: #ddd2c3;
}

.uhf2-card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--uhf2-surface-soft);
}

.uhf2-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--uhf2-ease);
}

.uhf2-card:hover .uhf2-card-thumb img {
    transform: scale(1.04);
}

.uhf2-card-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.uhf2-card-date {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--uhf2-muted);
    margin: 0;
}

.uhf2-card-title {
    font-size: 1.18rem;
    line-height: 1.3;
    font-weight: 500;
    margin: 0;
}

.uhf2-card-title a {
    color: var(--uhf2-ink);
}

.uhf2-card-title a:hover,
.uhf2-card-title a:focus-visible {
    color: var(--uhf2-rose-deep);
}

.uhf2-card-dek {
    font-size: 15px;
    line-height: 1.55;
    color: var(--uhf2-ink-soft);
    margin: 2px 0 0;
}

.uhf2-empty {
    color: var(--uhf2-ink-soft);
    font-style: italic;
    padding: 30px 0;
}

/* ==========================================================================
   Archive head
   ========================================================================== */
.uhf2-archive-head {
    padding: 64px 0 30px;
    border-bottom: 1px solid var(--uhf2-hairline);
    margin-bottom: 12px;
}

.uhf2-archive-title {
    font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem);
    font-weight: 600;
    margin: 0;
}

.uhf2-archive-desc {
    margin-top: 16px;
    max-width: 56ch;
    color: var(--uhf2-ink-soft);
    font-size: 1.05rem;
}

.uhf2-archive-desc p {
    margin: 0 0 0.6em;
}

/* Pagination */
.uhf2-pagination {
    margin-top: 46px;
    padding-top: 26px;
    border-top: 1px solid var(--uhf2-hairline);
}

.uhf2-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.uhf2-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--uhf2-hairline);
    background: var(--uhf2-surface);
    color: var(--uhf2-ink-soft);
    font-size: 15px;
    font-weight: 500;
}

.uhf2-pagination .page-numbers:hover,
.uhf2-pagination a.page-numbers:focus-visible {
    border-color: var(--uhf2-rose);
    color: var(--uhf2-rose-deep);
}

.uhf2-pagination .page-numbers.current {
    background: var(--uhf2-rose);
    border-color: var(--uhf2-rose);
    color: #fff;
}

.uhf2-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* ==========================================================================
   Article (single / page)
   ========================================================================== */
.uhf2-article {
    padding: 56px 0 20px;
}

.uhf2-eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.uhf2-eyebrow a {
    color: var(--uhf2-sage);
}

.uhf2-eyebrow a:hover,
.uhf2-eyebrow a:focus-visible {
    color: var(--uhf2-ink);
}

.uhf2-entry-title {
    font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 20px;
}

.uhf2-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 34px;
    font-size: 15px;
    color: var(--uhf2-muted);
}

.uhf2-byline-author {
    font-weight: 600;
    color: var(--uhf2-ink-soft);
}

.uhf2-byline-sep {
    color: var(--uhf2-hairline);
}

.uhf2-featured {
    margin: 0 0 34px;
    border-radius: var(--uhf2-radius);
    overflow: hidden;
    box-shadow: var(--uhf2-shadow);
}

.uhf2-featured img {
    width: 100%;
}

/* Content prose */
.uhf2-content {
    font-size: 1.12rem;
    line-height: 1.78;
    color: var(--uhf2-ink);
}

.uhf2-content > * {
    margin-top: 0;
    margin-bottom: 1.25em;
}

.uhf2-content h2 {
    font-size: 1.7rem;
    font-weight: 600;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}

.uhf2-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.uhf2-content a {
    text-decoration: underline;
    text-decoration-color: var(--uhf2-rose-tint);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.uhf2-content a:hover,
.uhf2-content a:focus-visible {
    text-decoration-color: var(--uhf2-rose);
}

.uhf2-content img {
    border-radius: var(--uhf2-radius-sm);
    margin-left: auto;
    margin-right: auto;
}

.uhf2-content ul,
.uhf2-content ol {
    padding-left: 1.4em;
}

.uhf2-content li {
    margin-bottom: 0.5em;
}

.uhf2-content blockquote {
    margin: 1.6em 0;
    padding: 6px 0 6px 24px;
    border-left: 3px solid var(--uhf2-rose);
    font-family: var(--uhf2-serif);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--uhf2-ink-soft);
}

.uhf2-content blockquote p:last-child {
    margin-bottom: 0;
}

.uhf2-content figure {
    margin: 1.6em 0;
}

.uhf2-content figcaption {
    margin-top: 8px;
    font-size: 14px;
    color: var(--uhf2-muted);
    text-align: center;
}

.uhf2-content code {
    background: var(--uhf2-surface-soft);
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.9em;
}

/* Related */
.uhf2-related {
    margin-top: 20px;
    padding: 44px 0 10px;
    border-top: 1px solid var(--uhf2-hairline);
}

.widget-title {
    font-family: var(--uhf2-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--uhf2-ink);
    margin: 0 0 22px;
}

.uhf2-related .uhf2-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.uhf2-footer {
    margin-top: 70px;
    background: var(--uhf2-surface-soft);
    border-top: 1px solid var(--uhf2-hairline);
    padding: 54px 0 40px;
}

.uhf2-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--uhf2-hairline);
}

.uhf2-foot-lockup {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
}

.uhf2-mark-foot {
    width: 34px;
    height: 34px;
}

.uhf2-foot-name {
    font-family: var(--uhf2-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--uhf2-ink);
}

.uhf2-foot-blurb {
    max-width: 46ch;
    color: var(--uhf2-ink-soft);
    font-size: 15.5px;
    line-height: 1.65;
    margin: 0;
}

.uhf2-foot-cats .widget-title {
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.uhf2-foot-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.uhf2-foot-cat-list a {
    color: var(--uhf2-ink-soft);
    font-size: 15px;
}

.uhf2-foot-cat-list a:hover,
.uhf2-foot-cat-list a:focus-visible {
    color: var(--uhf2-rose-deep);
}

.uhf2-foot-partners a {
    overflow-wrap: anywhere;
}

.uhf2-copy {
    margin: 26px 0 0;
    font-size: 14px;
    color: var(--uhf2-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
    .uhf2-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .uhf2-grid-archive,
    .uhf2-related .uhf2-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    body.uhf2-body {
        font-size: 16px;
    }
    .uhf2-header-inner {
        gap: 14px;
    }
    .uhf2-hero {
        padding: 48px 0 28px;
    }
    .uhf2-grid,
    .uhf2-grid-archive,
    .uhf2-related .uhf2-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .uhf2-footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

@media (max-width: 520px) {
    .uhf2-container {
        padding: 0 18px;
    }
    .uhf2-grid,
    .uhf2-grid-archive,
    .uhf2-related .uhf2-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .uhf2-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .uhf2-nav-list {
        gap: 2px;
    }
    .uhf2-nav-list a {
        padding: 6px 10px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .uhf2-card:hover {
        transform: none;
    }
    .uhf2-card:hover .uhf2-card-thumb img {
        transform: none;
    }
}
