/* Iron Crown RP - dark oak, parchment, gold leaf, sealing-wax red. Fonts are self-hosted (scripts/copy-fonts.ts). */

@font-face { font-family: 'Cormorant SC'; font-weight: 600; font-display: swap; src: url(/static/fonts/cormorant-sc-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant SC'; font-weight: 600; font-display: swap; src: url(/static/fonts/cormorant-sc-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant SC'; font-weight: 700; font-display: swap; src: url(/static/fonts/cormorant-sc-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant SC'; font-weight: 700; font-display: swap; src: url(/static/fonts/cormorant-sc-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya'; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya'; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya'; font-weight: 400; font-style: italic; font-display: swap; src: url(/static/fonts/alegreya-cyrillic-400-italic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya'; font-weight: 400; font-style: italic; font-display: swap; src: url(/static/fonts/alegreya-latin-400-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya'; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya'; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--oak-0: #120d09;
	--oak-1: #1b140e;
	--oak-2: #261c14;
	--oak-3: #3a2a1c;
	--parchment: #ece0c4;
	--parchment-2: #dfcfa8;
	--parchment-edge: #b59c6b;
	--ink: #2a1f14;
	--ink-soft: #5e4d38;
	--light: #e9dcc0;
	--light-soft: #b6a585;
	--gold: #c9a35b;
	--gold-bright: #e6c67e;
	--gold-dark: #8c6c32;
	--wax: #8b2a1c;
	--wax-bright: #a93a29;
	--discord: #5865f2;
	--radius: 4px;
	--shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
	--head: 'Cormorant SC', 'Times New Roman', serif;
	--body: 'Alegreya', Georgia, 'Times New Roman', serif;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--body);
	font-size: 18px;
	line-height: 1.6;
	color: var(--light);
	background:
		radial-gradient(ellipse at 50% -10%, rgba(201, 163, 91, 0.12), transparent 55%),
		radial-gradient(ellipse at 50% 120%, rgba(139, 42, 28, 0.12), transparent 50%),
		linear-gradient(180deg, var(--oak-1), var(--oak-0));
	background-attachment: fixed;
}
a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: 0.02em; line-height: 1.15; }
.muted { color: var(--light-soft); }
.small { font-size: 0.85em; }

/* ---- top bar ---- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: linear-gradient(180deg, #2b1f15, #1c150f);
	border-bottom: 1px solid var(--gold-dark);
	box-shadow: 0 1px 0 rgba(230, 198, 126, 0.15), 0 6px 18px rgba(0, 0, 0, 0.5);
}
.topbar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 24px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--head);
	font-size: 1.45rem;
	font-weight: 700;
	color: var(--gold-bright);
	white-space: nowrap;
}
.brand:hover { text-decoration: none; color: #f3d898; }
.crown { color: var(--gold); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6)); }
.nav { display: flex; gap: 4px; }
.nav a {
	font-family: var(--head);
	font-size: 1.12rem;
	font-weight: 600;
	color: var(--light);
	padding: 6px 12px;
	border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--gold-bright); text-decoration: none; }
.nav a.active { color: var(--gold-bright); border-bottom-color: var(--gold); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; border: 1px solid var(--gold-dark); border-radius: var(--radius); overflow: hidden; }
.lang-switch a { font-family: var(--head); font-weight: 700; font-size: 0.95rem; padding: 3px 9px; color: var(--light-soft); }
.lang-switch a.active { background: var(--gold-dark); color: #1b140e; }
.lang-switch a:hover { text-decoration: none; color: var(--gold-bright); }
.lang-switch a.active:hover { color: #1b140e; }

/* dropdowns: <details> */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	min-width: 210px;
	display: flex;
	flex-direction: column;
	padding: 6px;
	background: var(--oak-2);
	border: 1px solid var(--gold-dark);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.menu-panel a, .menu-panel button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 8px 12px;
	color: var(--light);
	font: inherit;
	font-size: 1rem;
	background: none;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--oak-3); color: var(--gold-bright); text-decoration: none; }
.menu-panel form { margin: 0; border-top: 1px solid rgba(201, 163, 91, 0.25); margin-top: 4px; padding-top: 4px; }
.profile-menu > summary {
	padding: 3px 10px 3px 3px;
	border: 1px solid var(--gold-dark);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.25);
}
.profile-menu > summary:hover { border-color: var(--gold); }
.avatar { border-radius: 50%; border: 1px solid var(--gold-dark); display: block; }
.avatar-lg { width: 96px; height: 96px; border: 2px solid var(--gold); }
.profile-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.nav-mobile { display: none; }
.nav-mobile > summary { font-size: 1.4rem; color: var(--gold-bright); padding: 0 6px; }

/* ---- buttons ---- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 9px 20px;
	font-family: var(--head);
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: var(--gold-bright);
	background: linear-gradient(180deg, #3b2b1d, #251a12);
	border: 1px solid var(--gold-dark);
	border-radius: var(--radius);
	box-shadow: inset 0 1px 0 rgba(230, 198, 126, 0.15), 0 2px 6px rgba(0, 0, 0, 0.4);
	cursor: pointer;
	white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--gold); color: #f6dda2; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { color: #f7e9cc; background: linear-gradient(180deg, var(--wax-bright), var(--wax)); border-color: #c4553f; }
.btn-primary:hover { color: #fff; border-color: #e07a62; }
.btn-discord { color: #fff; background: var(--discord); border-color: #7b86f5; font-family: var(--body); font-weight: 700; font-size: 0.95rem; padding: 6px 14px; }
.btn-discord:hover { color: #fff; background: #4752c4; }

/* ---- layout ---- */
.main { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; padding: 32px 16px 56px; }
.main-wide { max-width: 1200px; padding-top: 0; }

.section-title { text-align: center; margin: 8px 0 28px; }
.section-title h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0; color: var(--gold-bright); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); }
.section-title p { margin: 6px 0 0; color: var(--light-soft); font-style: italic; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); margin: 10px auto 0; max-width: 360px; }
.ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dark), transparent); }
.block-title { font-size: 1.6rem; color: var(--gold-bright); margin: 0 0 14px; border-bottom: 1px solid rgba(201, 163, 91, 0.3); padding-bottom: 6px; }

/* parchment card */
.card {
	position: relative;
	color: var(--ink);
	background:
		radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
		radial-gradient(ellipse at 100% 100%, rgba(120, 85, 40, 0.18), transparent 55%),
		linear-gradient(180deg, var(--parchment), var(--parchment-2));
	border: 1px solid var(--parchment-edge);
	border-radius: var(--radius);
	box-shadow: inset 0 0 40px rgba(120, 85, 40, 0.25), var(--shadow);
	padding: 22px 26px;
	margin-bottom: 20px;
}
.card::after {
	content: '';
	position: absolute;
	inset: 5px;
	border: 1px solid rgba(140, 108, 50, 0.35);
	border-radius: 2px;
	pointer-events: none;
}
.card a { color: var(--wax); }
.card h1, .card h2, .card h3 { color: #3b2716; }
.card .muted { color: var(--ink-soft); }
.empty { color: var(--light-soft); font-style: italic; text-align: center; padding: 12px 0; }
.card .empty { color: var(--ink-soft); }
.note { background: rgba(139, 42, 28, 0.1); border-left: 3px solid var(--wax); padding: 6px 12px; font-style: italic; font-size: 0.95rem; }
.badge {
	display: inline-block;
	margin-left: 8px;
	padding: 0 8px;
	font-family: var(--head);
	font-weight: 700;
	font-size: 0.85rem;
	color: #f7e9cc;
	background: var(--wax);
	border-radius: 2px;
	vertical-align: middle;
}
.badge-muted { background: #7d6a4f; }

/* ---- hero ---- */
.hero {
	margin: 0 -16px 36px;
	padding: 72px 16px 64px;
	text-align: center;
	background:
		radial-gradient(ellipse at 50% 40%, rgba(201, 163, 91, 0.18), transparent 60%),
		linear-gradient(180deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.35));
	border-bottom: 1px solid rgba(201, 163, 91, 0.25);
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero .crown { color: var(--gold); }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); margin: 10px 0 4px; color: var(--gold-bright); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.7), 0 0 40px rgba(201, 163, 91, 0.25); }
.hero-tagline { font-size: 1.25rem; font-style: italic; color: var(--light-soft); margin: 0 0 18px; }
.hero-text { font-size: 1.1rem; color: var(--light); }
.hero-text .prose a { color: var(--gold-bright); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }

.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; }
.more-link { display: inline-block; margin-top: 4px; font-family: var(--head); font-weight: 700; font-size: 1.1rem; }

/* ---- posts ---- */
.post-card { display: flex; gap: 18px; padding: 0; overflow: hidden; }
.post-cover { flex: 0 0 34%; display: block; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { padding: 18px 22px; flex: 1; min-width: 0; }
.post-card h2 { margin: 2px 0 8px; font-size: 1.55rem; }
.post-card p { margin: 0 0 8px; }
.post-meta { font-size: 0.9rem; color: var(--ink-soft); font-style: italic; }
.post-meta .badge { margin-left: 0; margin-right: 8px; font-style: normal; }
.post-meta time + .badge { margin-left: 8px; }
.read-more { font-family: var(--head); font-weight: 700; }
.changelog-mini ul { list-style: none; margin: 0; padding: 0; }
.changelog-mini li { padding: 8px 0; border-bottom: 1px dashed rgba(140, 108, 50, 0.4); display: flex; flex-direction: column; }
.changelog-mini li:last-child { border-bottom: 0; }
.changelog-mini li span { font-size: 0.85rem; color: var(--ink-soft); }
.changelog-entry h2 { margin: 4px 0 10px; font-size: 1.6rem; }
.article h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 6px 0 14px; }
.article-cover { width: 100%; border-radius: 2px; margin-bottom: 16px; border: 1px solid var(--parchment-edge); }
.back { font-family: var(--head); font-weight: 700; }

/* markdown */
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3 { margin: 1.4em 0 0.5em; }
.prose h2 { font-size: 1.6rem; border-bottom: 1px solid rgba(140, 108, 50, 0.35); padding-bottom: 4px; }
.prose h3 { font-size: 1.3rem; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--gold-dark); font-style: italic; color: var(--ink-soft); }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85em; background: rgba(90, 60, 25, 0.12); padding: 1px 5px; border-radius: 2px; }
.prose pre { background: #2a1f14; color: var(--light); padding: 12px 14px; overflow-x: auto; border-radius: var(--radius); }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose th, .prose td { border: 1px solid rgba(140, 108, 50, 0.45); padding: 6px 10px; text-align: left; }
.prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dark), transparent); margin: 2em 0; }
.prose img { border-radius: 2px; }
.prose ol, .prose ul { padding-left: 1.4em; }

/* ---- shop ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.product { display: flex; flex-direction: column; margin: 0; }
.product img { border-radius: 2px; margin-bottom: 12px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.product h2 { margin: 0 0 8px; font-size: 1.5rem; }
.product .prose { flex: 1; font-size: 0.98rem; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; position: relative; z-index: 1; }
.price { font-family: var(--head); font-weight: 700; font-size: 1.5rem; color: var(--wax); }

/* ---- about ---- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.link-card { display: flex; align-items: center; gap: 10px; padding: 14px 18px; margin: 0; font-family: var(--head); font-size: 1.2rem; font-weight: 700; }
.link-card:hover { text-decoration: none; filter: brightness(1.05); }
.link-discord svg { color: var(--discord); }

/* ---- profile ---- */
.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-head .label, .profile-facts dt { font-family: var(--head); font-weight: 700; color: var(--ink-soft); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-head .value { font-family: var(--head); font-size: 1.8rem; font-weight: 700; color: #3b2716; }
.profile-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; align-items: baseline; }
.profile-facts dd { margin: 0; font-size: 1.15rem; }
.character-name { font-family: var(--head); font-size: 1.6rem !important; font-weight: 700; color: #3b2716; }
.nickname { color: var(--wax); }
.card-title { margin: 0 0 12px; font-size: 1.4rem; }
.holdings { list-style: none; margin: 0; padding: 0; }
.holdings li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed rgba(140, 108, 50, 0.4); }
.holdings li:last-child { border-bottom: 0; }
.holding-kind { color: var(--ink-soft); }

/* ---- errors ---- */
.error-card { text-align: center; padding: 40px 24px; }
.error-code { font-family: var(--head); font-size: 5rem; font-weight: 700; color: var(--wax); line-height: 1; }

/* ---- footer ---- */
.footer { border-top: 1px solid rgba(201, 163, 91, 0.25); background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.45)); padding: 8px 16px 32px; }
.footer .ornament { margin-bottom: 16px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer-nav, .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-family: var(--head); font-weight: 600; font-size: 1.05rem; }
.footer-nav a { color: var(--light); }
.disclaimer, .copyright { margin: 0; font-size: 0.85rem; color: var(--light-soft); max-width: 700px; }

/* ---- small screens ---- */
@media (max-width: 900px) {
	.nav-desktop { display: none; }
	.nav-mobile { display: block; }
	.home-grid { grid-template-columns: 1fr; }
	.profile-name { display: none; }
	.profile-menu > summary { padding: 3px; }
}
@media (max-width: 600px) {
	body { font-size: 17px; }
	.topbar-inner { gap: 10px; }
	.brand span { font-size: 1.15rem; }
	.btn-discord span { display: none; }
	.card { padding: 18px 16px; }
	.post-card { flex-direction: column; }
	.post-cover { flex-basis: auto; aspect-ratio: 16 / 9; }
	.profile-facts dl { grid-template-columns: 1fr; gap: 2px; }
	.profile-facts dd { margin-bottom: 10px; }
	.hero { padding: 48px 16px 40px; }
}

/* ---- crest and contacts ---- */
.logo { display: block; flex: none; height: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7)); }
.brand .logo { margin: -4px 0; }
.hero .logo { margin: 0 auto 6px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 28px rgba(201, 163, 91, 0.18)); }
.footer-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin-bottom: 8px; }
.contact {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border: 1px solid rgba(201, 163, 91, 0.45);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	color: var(--gold-bright);
	font-family: var(--head);
	font-weight: 600;
	font-size: 1.05rem;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.contact:hover { text-decoration: none; color: #f3d898; border-color: var(--gold); background: rgba(201, 163, 91, 0.12); }
.contact svg { flex: none; }
.link-card svg { flex: none; color: var(--gold-dark); }
@media (max-width: 600px) {
	.brand .logo { width: 33px; height: 38px; }
	.contact { padding: 8px 12px; }
}
