@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Source+Sans+Pro:wght@300;400;600&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --parchment: #F8F4EC;
    --parchment-dark: #E8DFC8;
    --brown-deep: #2C1810;
    --brown-mid: #4A3728;
    --brown-light: #7A5C44;
    --gold: #8B6914;
    --gold-light: #C4A35A;
    --border: #D4C4A0;
    --white: #FDFAF5;
    --shadow: 0 4px 20px rgba(44,24,16,0.12);
    --shadow-hover: 0 8px 32px rgba(44,24,16,0.2);
    --radius: 4px;
    --tr: 0.3s ease;
    --font-h: 'Playfair Display', serif;
    --font-b: 'Crimson Text', serif;
    --font-ui: 'Source Sans Pro', sans-serif;
    --font-acc: 'Libre Baskerville', serif;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-b);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--brown-deep);
    background: var(--parchment);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--brown-deep); }

#page-loader {
    position: fixed;
    inset: 0;
    background: var(--brown-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.loader-logo {
    font-family: var(--font-h);
    font-size: 1.4rem;
    color: var(--gold-light);
    letter-spacing: 0.08em;
}

.loader-bar {
    width: 180px;
    height: 2px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0;
    background: var(--gold-light);
    animation: lbar 1.4s ease forwards;
}

@keyframes lbar { to { width: 100%; } }

.site-header {
    background: var(--brown-deep);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    font-family: var(--font-h);
    font-size: 1.35rem;
    color: var(--parchment);
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo:hover { color: var(--gold-light); }

.logo-mark {
    width: 38px;
    height: 38px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.nav-desktop { display: flex; align-items: center; gap: 4px; }

.nav-desktop a {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(248,244,236,0.75);
    padding: 8px 12px;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all var(--tr);
}

.nav-desktop a:hover,
.nav-desktop a.active { color: var(--gold-light); background: rgba(255,255,255,0.06); }

.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--parchment);
    border-radius: 2px;
    transition: all var(--tr);
}

.burger-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
    display: none;
    background: var(--brown-mid);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu.open { display: block; }

.mobile-menu a {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: rgba(248,244,236,0.8);
    padding: 13px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color var(--tr), background var(--tr);
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--gold-light); background: rgba(255,255,255,0.04); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.hero {
    background: var(--brown-deep);
    padding: 88px 0;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('https://upload.wikimedia.org/wikipedia/commons/4/4f/Genealogy_tree_of_the_noble_Polish_family_of_the_Krasinskis.jpg') center/cover;
    opacity: 0.1;
}

.hero-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-block;
    background: var(--gold);
    color: var(--white);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 5px 14px;
    border-radius: 2px;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-family: var(--font-h);
    font-size: clamp(1.9rem, 3.2vw, 3rem);
    color: var(--parchment);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-text p {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: rgba(248,244,236,0.7);
    line-height: 1.7;
    max-width: 480px;
}

.hero-img-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
    aspect-ratio: 4/3;
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section { padding: 80px 0; }
.section-alt { background: var(--parchment-dark); }

.sec-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: 10px;
}

.sec-title {
    font-family: var(--font-h);
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    color: var(--brown-deep);
    line-height: 1.2;
    margin-bottom: 48px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--tr), box-shadow var(--tr);
    display: flex;
    flex-direction: column;
}

.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.card-img { aspect-ratio: 16/9; overflow: hidden; }

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .card-img img { transform: scale(1.06); }

.card-body { padding: 26px; flex: 1; display: flex; flex-direction: column; }

.card-cat {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: 8px;
}

.card-body h3 {
    font-family: var(--font-h);
    font-size: 1.18rem;
    color: var(--brown-deep);
    line-height: 1.3;
    margin-bottom: 10px;
}

.card-body p {
    font-family: var(--font-b);
    font-size: 0.98rem;
    color: var(--brown-light);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 18px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--brown-light);
}

.read-more {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.read-more::after { content: ' \2192'; }
.read-more:hover { color: var(--brown-deep); }

.split-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.split-wrap.rev { direction: rtl; }
.split-wrap.rev > * { direction: ltr; }

.split-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4/3;
}

.split-img img { width: 100%; height: 100%; object-fit: cover; }

.split-text h2 {
    font-family: var(--font-h);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    color: var(--brown-deep);
    line-height: 1.25;
    margin-bottom: 14px;
}

.split-text p {
    font-family: var(--font-b);
    font-size: 1.05rem;
    color: var(--brown-light);
    line-height: 1.72;
    margin-bottom: 14px;
}

.link-arrow {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

.link-arrow:hover { color: var(--brown-deep); }

.breadcrumb {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--brown-light);
    padding: 14px 0;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--brown-light); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--border); }

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 56px;
    padding: 52px 0 80px;
}

.article-hero {
    width: 100%;
    aspect-ratio: 21/8;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 36px;
    box-shadow: var(--shadow);
}

.article-meta {
    display: flex;
    gap: 18px;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--brown-light);
    margin-bottom: 36px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.article-main h1 {
    font-family: var(--font-h);
    font-size: clamp(1.75rem, 2.8vw, 2.5rem);
    color: var(--brown-deep);
    line-height: 1.18;
    margin-bottom: 20px;
}

.article-main h2 {
    font-family: var(--font-h);
    font-size: 1.45rem;
    color: var(--brown-deep);
    margin: 44px 0 14px;
    line-height: 1.28;
}

.article-main h3 {
    font-family: var(--font-acc);
    font-size: 1.1rem;
    color: var(--brown-mid);
    margin: 30px 0 10px;
    font-weight: 700;
}

.article-main p {
    font-family: var(--font-b);
    font-size: 1.08rem;
    line-height: 1.76;
    color: var(--brown-deep);
    margin-bottom: 18px;
}

.article-main ul,.article-main ol { margin: 0 0 18px 22px; }

.article-main li {
    font-family: var(--font-b);
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 7px;
    color: var(--brown-deep);
}

.article-main a { color: var(--gold); border-bottom: 1px solid rgba(139,105,20,0.4); }
.article-main a:hover { color: var(--brown-deep); border-color: var(--brown-deep); }

.article-pull {
    background: var(--parchment-dark);
    border-left: 4px solid var(--gold);
    padding: 18px 22px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 28px 0;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--brown-mid);
}

.article-pull p { margin-bottom: 0; }

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.sidebar-widget h4 {
    font-family: var(--font-h);
    font-size: 0.95rem;
    color: var(--brown-deep);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}

.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }

.sidebar-widget li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-ui);
    font-size: 0.86rem;
}

.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget li a { color: var(--brown-mid); }
.sidebar-widget li a:hover { color: var(--gold); }

.sidebar-ext a {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.84rem;
    color: var(--brown-mid);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-ext a:last-child { border-bottom: none; }
.sidebar-ext a:hover { color: var(--gold); }

.page-hero {
    background: var(--brown-deep);
    padding: 64px 0;
}

.page-hero h1 {
    font-family: var(--font-h);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--parchment);
    margin-bottom: 10px;
}

.page-hero p {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: rgba(248,244,236,0.65);
    max-width: 560px;
}

.content-wrap {
    padding: 60px 0 80px;
    max-width: 820px;
}

.content-wrap h2 {
    font-family: var(--font-h);
    font-size: 1.45rem;
    color: var(--brown-deep);
    margin: 40px 0 14px;
}

.content-wrap h3 {
    font-family: var(--font-acc);
    font-size: 1.05rem;
    color: var(--brown-mid);
    margin: 28px 0 10px;
}

.content-wrap p {
    font-family: var(--font-b);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 14px;
    color: var(--brown-deep);
}

.content-wrap ul,.content-wrap ol { margin: 0 0 14px 22px; }

.content-wrap li {
    font-family: var(--font-b);
    font-size: 1.05rem;
    line-height: 1.68;
    margin-bottom: 6px;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.about-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 26px;
    box-shadow: var(--shadow);
    text-align: center;
}

.about-card-ico {
    width: 52px;
    height: 52px;
    background: var(--gold);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-h);
    font-size: 1.4rem;
    color: var(--white);
    font-weight: 700;
}

.about-card h3 {
    font-family: var(--font-h);
    font-size: 1.1rem;
    color: var(--brown-deep);
    margin-bottom: 10px;
}

.about-card p {
    font-family: var(--font-b);
    font-size: 0.97rem;
    color: var(--brown-light);
    line-height: 1.62;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    padding: 56px 0 80px;
}

.contact-grid h2 {
    font-family: var(--font-h);
    font-size: 1.4rem;
    color: var(--brown-deep);
    margin-bottom: 26px;
}

.form-field { margin-bottom: 18px; }

.form-field label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brown-mid);
    margin-bottom: 5px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-family: var(--font-b);
    font-size: 1rem;
    color: var(--brown-deep);
    outline: none;
    transition: border-color var(--tr);
}

.form-field input:focus,
.form-field textarea:focus { border-color: var(--gold); }

.form-field textarea { resize: vertical; min-height: 110px; }

.btn-send {
    background: var(--gold);
    color: var(--white);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 13px 30px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--tr);
}

.btn-send:hover { background: var(--brown-deep); }

.ci-item { margin-bottom: 18px; }

.ci-item strong {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: 3px;
}

.ci-item p,.ci-item a {
    font-family: var(--font-b);
    font-size: 1rem;
    color: var(--brown-light);
    line-height: 1.5;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1A0E08;
    color: rgba(248,244,236,0.8);
    padding: 18px 28px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

#cookie-banner.show { transform: translateY(0); }

#cookie-banner p {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    line-height: 1.5;
    flex: 1;
}

#cookie-banner a { color: var(--gold-light); }

.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }

.btn-ck {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--tr);
}

.btn-ck-ok { background: var(--gold); color: var(--white); }
.btn-ck-ok:hover { background: var(--gold-light); }
.btn-ck-no { background: transparent; color: rgba(248,244,236,0.7); border: 1px solid rgba(255,255,255,0.2); }
.btn-ck-no:hover { background: rgba(255,255,255,0.08); }

.site-footer {
    background: #1A0E08;
    color: #9A7A5A;
    padding: 56px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.footer-brand .f-logo {
    font-family: var(--font-h);
    font-size: 1.25rem;
    color: var(--parchment);
    font-weight: 700;
    display: block;
    margin-bottom: 12px;
}

.footer-brand p {
    font-family: var(--font-ui);
    font-size: 0.86rem;
    line-height: 1.6;
    max-width: 280px;
}

.footer-col h4 {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--parchment-dark);
    margin-bottom: 14px;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 7px; }

.footer-col a {
    font-family: var(--font-ui);
    font-size: 0.86rem;
    color: #9A7A5A;
    transition: color var(--tr);
}

.footer-col a:hover { color: var(--gold-light); }

.footer-bottom {
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: #5A4030;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom a { color: #5A4030; }
.footer-bottom a:hover { color: var(--gold-light); }

.disclaimer-bar {
    background: #120A04;
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 14px 0;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: #5A4030;
    text-align: center;
}

@media (max-width: 1024px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { display: none; }
}

@media (max-width: 768px) {
    .nav-desktop { display: none; }
    .burger-btn { display: flex; }
    .hero-inner { grid-template-columns: 1fr; gap: 0; }
    .hero-img-wrap { display: none; }
    .articles-grid { grid-template-columns: 1fr; }
    .split-wrap { grid-template-columns: 1fr; gap: 36px; }
    .split-wrap.rev { direction: ltr; }
    .about-cards { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr; }
    #cookie-banner { flex-direction: column; align-items: flex-start; }
    .footer-bottom { justify-content: center; }
}
