/*
Theme Name: PSWI
Description: Motyw w barwach WPiA UW. Strona Studiów Podyplomowych Prawa Własności Intelektualnej WPiA UW. Aktualności na stronie głównej i materiały chronione hasłem (wtyczka pswi-core).
Version: 1.0.0
Author: WPiA UW
Text Domain: pswi
*/

:root {
	--navy: #051127;
	--navy-dark: #030a18;
	--navy-soft: #334b7e;
	--gold: #cfa354;
	--gold-dark: #be8800;
	--accent: #cfa354;
	--accent-dark: #334b7e;
	--accent-soft: #f6efe0;
	--ink: #051127;
	--text: #26292e;
	--muted: #4f5661;
	--bg: #fcfaf6;
	--surface: #fff;
	--line: #e7e2d8;
	--radius: 6px;
	--shadow: 0 1px 2px rgba(5,17,39,.05), 0 8px 24px -10px rgba(5,17,39,.14);
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--wrap: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font-family: var(--sans); font-size: 1.0625rem; line-height: 1.7;
	min-height: 100vh; display: flex; flex-direction: column;
}
.site-main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 0 0 1.25rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: #fff; padding: .7rem 1rem; z-index: 100; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { left: .5rem; }

/* Nagłówek */
.site-header { background: var(--navy); border-bottom: 2px solid var(--gold); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 12px rgba(12,26,51,.25); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 1rem; line-height: 1.2; }
.brand__logo { height: 46px; width: auto; display: block; }
.brand__text { display: flex; flex-direction: column; padding-left: 1rem; border-left: 1px solid rgba(207,163,84,.55); }
.brand:hover { color: #fff; }
.brand__top { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.brand__name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; padding: .45rem .8rem; border-radius: 8px; font: inherit; font-size: .95rem; cursor: pointer; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a { display: block; color: #e8edf7; text-decoration: none; padding: .5rem .9rem; border-radius: 8px; font-weight: 600; font-size: .98rem; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { background: rgba(255,255,255,.14); color: #fff; }
.site-nav .nav-lock > a::before { content: "\1F512\00a0"; font-size: .85em; }

/* Hero */
.hero { background: linear-gradient(135deg, #0a1d42 0%, var(--navy) 70%); color: #fff; padding: 4rem 0 4.5rem; }
.hero h1 { color: #fff; max-width: 22ch; margin-bottom: 1rem; }
.hero p { max-width: 60ch; color: #d6deee; font-size: 1.15rem; margin: 0 0 1.75rem; }
.hero__eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: .75rem; }
.btn {
	display: inline-block; background: var(--gold); color: var(--navy); border: 0; text-decoration: none;
	padding: .8rem 1.5rem; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { background: #dcb36a; color: var(--navy); }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--small { padding: .45rem 1rem; font-size: .92rem; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Sekcje */
.section { padding: 3.5rem 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.prose { max-width: 70ch; }
.prose--full { max-width: none; }
.prose img { border-radius: var(--radius); }
.prose a { font-weight: 600; }

/* Aktualności */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card__date { font-size: .85rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; margin-bottom: .4rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--navy-soft); }
.card p { margin: .4rem 0 1rem; flex: 1; }
.card__more { font-weight: 700; text-decoration: none; }
.card__more::after { content: " \2192"; }
.empty { padding: 2rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* Wpis / strona */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2.5rem 0 1.75rem; }
.page-head h1 { margin: 0; }
.page-head .meta { color: var(--muted); font-size: .95rem; margin-top: .5rem; }
.entry { padding: 2.5rem 0 4rem; }
.entry .prose > *:first-child { margin-top: 0; }
.entry-nav { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-block; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--navy); color: var(--gold); border-color: var(--navy); }

/* Materiały */
.lock-box { max-width: 460px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.lock-box h2 { margin-bottom: .5rem; }
.lock-box p { margin-top: 0; color: var(--muted); }
.lock-form label { display: block; font-weight: 700; margin-bottom: .4rem; color: var(--ink); }
.lock-form input[type="password"] { width: 100%; padding: .8rem 1rem; font: inherit; border: 1px solid #6f819f; border-radius: 10px; margin-bottom: 1rem; }
.lock-form__error { background: #fdecea; color: #8a1f17; border: 1px solid #f3b9b3; padding: .7rem 1rem; border-radius: 10px; margin: 0 0 1rem; }
.lock-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.filters a { display: inline-block; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--text); }
.filters a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.materials { display: grid; gap: 1.25rem; }
.material { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.material__meta { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: .3rem; }
.material__tag { display: inline-block; background: var(--accent-soft); color: var(--navy); border-radius: 999px; padding: .05rem .65rem; margin-right: .5rem; }
.material h3 a { color: var(--ink); text-decoration: none; }
.material h3 a:hover { color: var(--accent-dark); }
.files { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.files a { display: flex; align-items: center; gap: .75rem; padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--bg); }
.files a:hover { border-color: var(--gold-dark); background: var(--accent-soft); }
.files__type { flex: none; min-width: 3.2rem; text-align: center; background: var(--navy); color: var(--gold); font-size: .72rem; letter-spacing: .06em; padding: .2rem .4rem; border-radius: 6px; }
.files__size { margin-left: auto; color: var(--muted); font-weight: 400; font-size: .88rem; white-space: nowrap; }
.logout-form { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }

/* Stopka */
.site-footer { background: var(--navy-dark); color: #b9c4dc; padding: 2.5rem 0; font-size: .95rem; margin-top: auto; }
.site-footer a { color: #e8edf7; }
.site-footer { border-top: 2px solid var(--gold); }
.site-footer__logo { height: 54px; width: auto; display: block; margin-bottom: .75rem; }
.contact-cols { display: grid; grid-template-columns: repeat(2, auto); gap: 0 3.5rem; }
.contact-list { margin: 0; line-height: 1.8; }
.contact-list dt:first-child { margin-top: 0; }
.contact-list dt { color: var(--gold); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; margin-top: .6rem; }
.contact-list dd { margin: 0; color: #dfe5f1; }
.site-footer__in { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem 3rem; flex-wrap: wrap; }
.site-footer strong { color: #fff; }

@media (max-width: 760px) {
	.contact-cols { grid-template-columns: 1fr; }
	.brand__logo { height: 38px; }
	.brand__text { display: none; }
	.nav-toggle { display: inline-block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); padding: .5rem 1.25rem 1rem; border-top: 1px solid rgba(255,255,255,.12); }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; }
	.site-header__in { position: relative; }
	.hero { padding: 3rem 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
