/*
Theme Name: Odtajniamy Historię
Theme URI: https://odtajniamyhistorie.pl
Author: OdtajniamyHistorie.pl
Description: Motyw strony OdtajniamyHistorie.pl — ciemny terminal i jasne teczki z archiwum. Teczki gier (Akta), komunikaty, partnerzy, pole na kody z gry.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: odtajniamy
License: GPL-2.0-or-later
*/

:root {
	--oh-ground: #10182A;
	--oh-ground-deep: #0C1322;
	--oh-panel: #172238;
	--oh-line: #2C3A57;
	--oh-line-soft: #4A5878;
	--oh-text: #D6DCE6;
	--oh-text-soft: #A9B3C6;
	--oh-text-dim: #8E9BB3;
	--oh-bright: #F2EEE3;
	--oh-amber: #E8B04B;
	--oh-amber-light: #F5CF85;
	--oh-green: #7FC48A;
	--oh-error: #F09A8C;
	--oh-paper: #ECE4CF;
	--oh-paper-line: #B9AE92;
	--oh-folder: #D8C79E;
	--oh-folder-open: #F0D995;
	--oh-ink: #1B2233;
	--oh-ink-soft: #5A6274;
	--oh-stamp: #B8322A;
	--oh-font: 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--oh-ground);
	color: var(--oh-text);
	font-family: var(--oh-font);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--oh-amber); }
a:hover { color: var(--oh-amber-light); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--oh-amber);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100;
	width: auto; height: auto; clip: auto;
	background: var(--oh-amber); color: var(--oh-ground);
	padding: 10px 16px; font-weight: 700;
}

.oh-wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.oh-wrap--narrow { max-width: 1040px; }

h1, h2, h3, h4 { font-family: var(--oh-font); line-height: 1.2; }

/* ---------- Header ---------- */
.oh-header { border-bottom: 1px solid var(--oh-line); }
.oh-header__inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px; padding-top: 18px; padding-bottom: 18px;
}
.oh-brand {
	display: flex; align-items: center; gap: 12px;
	text-decoration: none; color: var(--oh-text);
	font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
}
.oh-brand:hover { color: var(--oh-bright); }
.oh-brand img { width: 40px; height: 40px; }

.oh-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.oh-nav a {
	display: inline-block; padding: 10px 0;
	color: var(--oh-text); text-decoration: none; font-size: 14px;
}
.oh-nav a:hover, .oh-nav .current-menu-item > a { color: var(--oh-amber); }
.oh-nav li:last-child a { color: var(--oh-amber); }

/* ---------- Hero ---------- */
.oh-hero {
	border-bottom: 1px solid var(--oh-line);
	background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 3px);
}
.oh-hero__inner {
	display: flex; flex-wrap: wrap; align-items: center; gap: 56px;
	padding-top: 72px; padding-bottom: 88px;
}
.oh-hero__text { flex: 999 1 560px; min-width: 0; }
.oh-hero__seal { flex: 1 1 320px; display: flex; justify-content: center; }
.oh-hero__seal img { width: 100%; max-width: 400px; }

.oh-boot { font-size: 14px; line-height: 1.9; color: var(--oh-text-dim); margin: 0 0 36px; }
.oh-boot__line { opacity: 0; animation: ohShow .01s steps(1) forwards; }
.oh-boot__line:nth-child(1) { animation-delay: .2s; }
.oh-boot__line:nth-child(2) { animation-delay: .8s; }
.oh-boot__line:nth-child(3) { animation-delay: 1.4s; }
.oh-boot__line:nth-child(4) { animation-delay: 2.0s; }
.oh-boot__line:nth-child(5) { animation-delay: 2.4s; }
.oh-boot__line:last-child { color: var(--oh-amber); }
.oh-hero__main { opacity: 0; animation: ohShow .01s steps(1) 2.4s forwards; }

.oh-hero h1 {
	margin: 0 0 24px; font-size: clamp(36px, 6vw, 56px); font-weight: 700;
	color: var(--oh-bright); letter-spacing: -0.01em;
}
.oh-cursor {
	display: inline-block; width: 0.6em; height: 1.1em; margin-left: 8px;
	background: var(--oh-amber); vertical-align: text-bottom;
	animation: ohBlink 1s steps(1) infinite;
}
.oh-hero__lead { margin: 0 0 36px; font-size: 18px; max-width: 60ch; color: #C9D0DC; }

@keyframes ohShow { to { opacity: 1; } }
@keyframes ohBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.oh-boot__line, .oh-hero__main { opacity: 1; animation: none; }
	.oh-cursor { animation: none; }
}

/* ---------- Buttons ---------- */
.oh-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.oh-btn {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
	font-family: var(--oh-font); font-size: 15px; text-decoration: none; cursor: pointer;
	border: 1px solid var(--oh-amber);
}
.oh-btn--solid { background: var(--oh-amber); color: var(--oh-ground); font-weight: 700; }
.oh-btn--solid:hover { background: var(--oh-amber-light); color: var(--oh-ground); }
.oh-btn--ghost { background: transparent; color: var(--oh-amber); }
.oh-btn--ghost:hover { color: var(--oh-amber-light); border-color: var(--oh-amber-light); }

/* ---------- Sections ---------- */
.oh-section { padding: 96px 0; }
.oh-section--tight { padding: 24px 0 96px; }
.oh-section__title { margin: 0 0 12px; font-size: 34px; color: var(--oh-bright); }
.oh-section__lead { margin: 0 0 40px; color: var(--oh-text-soft); max-width: 62ch; }

/* ---------- Paper document ---------- */
.oh-paper {
	position: relative;
	background: var(--oh-paper); color: var(--oh-ink);
	padding: 56px 48px;
	box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
@media (max-width: 640px) { .oh-paper { padding: 40px 22px; } }
.oh-paper a { color: #7A4B00; }
.oh-paper a:hover { color: var(--oh-stamp); }
.oh-paper h1, .oh-paper h2 { margin: 0 0 28px; font-size: 34px; color: var(--oh-ink); }
.oh-paper h3 { font-size: 22px; margin: 36px 0 12px; }
.oh-paper p, .oh-paper li { max-width: 68ch; }
.oh-paper hr { border: 0; border-top: 1px solid var(--oh-paper-line); margin: 32px 0; }
.oh-paper__meta { margin: 0 0 8px; font-size: 13px; color: var(--oh-ink-soft); }
.oh-stamp {
	position: absolute; top: 36px; right: 40px;
	border: 3px solid var(--oh-stamp); color: var(--oh-stamp);
	padding: 6px 14px; font-weight: 700; font-size: 18px; letter-spacing: 0.12em;
	transform: rotate(-8deg); opacity: 0.85; pointer-events: none;
}
@media (max-width: 640px) { .oh-stamp { position: static; display: inline-block; margin-bottom: 20px; transform: rotate(-4deg); } }

/* WordPress content inside paper */
.oh-paper .wp-block-file {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
	border-bottom: 1px solid var(--oh-paper-line); padding: 12px 0; margin: 0;
}
.oh-paper .wp-block-file .wp-block-file__button {
	background: var(--oh-ink); color: var(--oh-paper); border-radius: 0;
	font-family: var(--oh-font); font-size: 14px; padding: 8px 16px; text-decoration: none;
}
.oh-paper table { border-collapse: collapse; width: 100%; }
.oh-paper th, .oh-paper td { border-bottom: 1px solid var(--oh-paper-line); padding: 10px 8px; text-align: left; }
.oh-paper .wp-block-table { overflow-x: auto; }
.oh-paper blockquote { margin: 24px 0; padding: 0 0 0 20px; border-left: 3px solid var(--oh-stamp); }

/* ---------- Akta (folders) ---------- */
.oh-akta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.oh-folder {
	position: relative; display: block; margin-top: 14px;
	min-height: 170px; padding: 28px 24px 22px;
	background: var(--oh-folder); color: var(--oh-ink); text-decoration: none;
	border-radius: 0 6px 6px 6px;
	box-shadow: 0 10px 24px rgba(0,0,0,0.35);
	transition: background-color .15s ease;
}
.oh-folder::before {
	content: ""; position: absolute; top: -14px; left: 0; width: 120px; height: 16px;
	background: inherit; border-radius: 4px 4px 0 0;
}
.oh-folder:hover, .oh-folder:focus-visible { background: var(--oh-folder-open); color: var(--oh-ink); }
.oh-folder__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.oh-folder__no { font-size: 13px; color: #5A4E2E; margin-bottom: 10px; }
.oh-folder__title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.oh-redacted { display: block; height: 18px; background: var(--oh-ink); margin-bottom: 8px; }
.oh-redacted--long { width: 150px; }
.oh-redacted--short { width: 96px; }
.oh-folder__bottom { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.oh-tag { border: 2px solid var(--oh-stamp); color: var(--oh-stamp); padding: 2px 8px; font-weight: 700; letter-spacing: 0.08em; }
.oh-tag--open { border-color: #2E6B3A; color: #2E6B3A; }
.oh-folder--locked {
	background: transparent; border: 1px dashed var(--oh-line-soft); box-shadow: none; color: var(--oh-text-dim);
	display: flex; flex-direction: column; justify-content: center; gap: 10px; border-radius: 0;
}
.oh-folder--locked::before { display: none; }
.oh-folder--locked strong { color: #C9D0DC; font-weight: 400; font-size: 15px; }
.oh-symbol { flex: 0 0 auto; }

/* ---------- Komunikaty ---------- */
.oh-news { border-top: 1px solid var(--oh-line); }
.oh-news__item { display: flex; flex-wrap: wrap; gap: 8px 40px; padding: 24px 0; border-bottom: 1px solid var(--oh-line); }
.oh-news__date { flex: 0 0 140px; font-size: 14px; color: var(--oh-amber); }
.oh-news__body { flex: 999 1 400px; min-width: 0; }
.oh-news__body h3 { margin: 0 0 8px; font-size: 18px; }
.oh-news__body h3 a { color: var(--oh-bright); text-decoration: none; }
.oh-news__body h3 a:hover { color: var(--oh-amber); }
.oh-news__body p { margin: 0; font-size: 15px; color: var(--oh-text-soft); }
.oh-more { margin-top: 24px; font-size: 14px; }

/* ---------- Teczki A–D ---------- */
.oh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.oh-card {
	display: block; text-decoration: none;
	background: var(--oh-paper); color: var(--oh-ink); padding: 28px 24px; min-height: 160px;
}
.oh-card:hover { background: #F4EEDC; color: var(--oh-ink); }
.oh-card__label { font-size: 13px; color: var(--oh-ink-soft); margin-bottom: 14px; }
.oh-card__title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.oh-card__text { font-size: 14px; line-height: 1.6; }

/* ---------- Partnerzy ---------- */
.oh-partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.oh-partner {
	min-height: 110px; padding: 16px;
	display: flex; align-items: center; justify-content: center; text-align: center;
	background: var(--oh-paper); color: var(--oh-ink); text-decoration: none; font-size: 14px;
}
.oh-partner img { max-height: 80px; width: auto; object-fit: contain; }
.oh-partner--empty { background: transparent; border: 1px dashed var(--oh-line-soft); color: var(--oh-text-dim); font-size: 13px; }

/* ---------- Footer ---------- */
.oh-footer { border-top: 1px solid var(--oh-line); background: var(--oh-ground-deep); }
.oh-footer__inner { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; padding-top: 64px; padding-bottom: 40px; }
.oh-footer__brand { flex: 1 1 320px; }
.oh-footer__brand .oh-brand img { width: 56px; height: 56px; }
.oh-footer__address { margin-top: 20px; font-size: 14px; line-height: 1.9; color: var(--oh-text-soft); white-space: pre-line; }
.oh-code { flex: 1 1 360px; max-width: 460px; }
.oh-code label { display: block; font-size: 16px; color: var(--oh-bright); font-weight: 700; margin-bottom: 8px; }
.oh-code p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--oh-text-soft); }
.oh-code__row { display: flex; flex-wrap: wrap; gap: 12px; }
.oh-code input {
	flex: 1 1 200px; min-height: 48px; padding: 0 16px;
	background: var(--oh-ground); border: 1px solid var(--oh-line-soft); color: var(--oh-bright);
	font-family: var(--oh-font); font-size: 16px; letter-spacing: 0.1em;
}
.oh-code button { border: 0; }
.oh-code__msg { min-height: 28px; margin-top: 14px; font-size: 14px; color: var(--oh-error); }
.oh-footer__bottom { border-top: 1px solid #1E2A42; padding-top: 20px; padding-bottom: 32px; font-size: 13px; }
.oh-footer__bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.oh-footer__bottom a { color: var(--oh-text-soft); }

/* ---------- Single akta ---------- */
.oh-dossier__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.oh-dossier__status { font-size: 14px; color: var(--oh-ink-soft); }

/* ---------- Terminal panel (404, info) ---------- */
.oh-terminal { border: 1px solid var(--oh-amber); background: var(--oh-panel); padding: 32px; }
.oh-terminal__prompt { font-size: 13px; color: var(--oh-amber); margin-bottom: 10px; }

/* ---------- Pagination ---------- */
.oh-pagination { margin-top: 32px; display: flex; gap: 16px; font-size: 14px; }

/* Block editor alignment helpers */
.alignwide, .alignfull { max-width: 100%; }
.wp-block-image figcaption { font-size: 13px; color: var(--oh-ink-soft); }
