/* =========================================================================
   Olimpia Wiki — tema estático
   Layout inspirado na wiki do PokeAlliance, paleta e tipografia do Olimpia.
   ========================================================================= */

:root {
	--bg:          #0c0806;
	--bg-2:        #100a07;
	--surface:     #16100b;
	--surface-2:   #1e1610;
	--surface-3:   #281d14;
	--gold:        #d4af37;
	--gold-dark:   #b8860b;
	--gold-soft:   rgba(212, 175, 55, .18);
	--accent:      #e8663c;
	--accent-soft: rgba(232, 102, 60, .16);
	--wine:        #8b0000;
	--text:        #f0ece8;
	--text-strong: #ffffff;
	--muted:       #9a8d82;
	--dim:         #6b6058;
	--border:      rgba(212, 175, 55, .16);
	--border-2:    rgba(212, 175, 55, .34);
	--radius:      14px;
	--sidebar-w:   276px;
	--shadow:      0 10px 40px rgba(0, 0, 0, .55);
	--font-title:  'Cinzel', 'Times New Roman', Georgia, serif;
	--font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- sidebar */

.ow-sidebar {
	position: fixed;
	top: 0; left: 0; bottom: 0;
	width: var(--sidebar-w);
	background: linear-gradient(180deg, #120c08 0%, #0a0705 100%);
	border-right: 1px solid var(--border-2);
	display: flex;
	flex-direction: column;
	z-index: 60;
}

.ow-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 22px 18px 18px;
	border-bottom: 1px solid var(--border);
}
.ow-brand img { width: 132px; filter: drop-shadow(0 4px 14px rgba(212, 175, 55, .35)); }

.ow-nav { flex: 1; overflow-y: auto; padding: 12px 10px 24px; }
.ow-nav::-webkit-scrollbar { width: 8px; }
.ow-nav::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }

.ow-group { margin-bottom: 4px; }

.ow-group-head {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	background: none;
	border: 0;
	border-radius: 10px;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
	text-align: left;
}
.ow-group-head:hover { background: var(--surface-2); color: var(--gold); }
.ow-group-head .ow-chev {
	margin-left: auto;
	font-size: 10px;
	color: var(--dim);
	transition: transform .2s ease;
}
.ow-group.is-open .ow-group-head .ow-chev { transform: rotate(90deg); color: var(--gold); }
.ow-group-icon { font-size: 15px; line-height: 1; }

.ow-group-links { display: none; padding: 2px 0 8px 14px; }
.ow-group.is-open .ow-group-links { display: block; }

.ow-link {
	display: block;
	padding: 7px 12px;
	margin: 1px 0;
	border-left: 2px solid transparent;
	border-radius: 0 8px 8px 0;
	color: var(--muted);
	font-size: 13.5px;
}
.ow-link:hover { background: var(--surface-2); color: var(--text); border-left-color: var(--gold-dark); }
.ow-link.is-active {
	background: linear-gradient(90deg, var(--accent-soft), transparent);
	border-left-color: var(--accent);
	color: var(--text-strong);
	font-weight: 600;
}

/* ------------------------------------------------------------ lang switch */

.ow-lang { display: flex; gap: 6px; }
.ow-lang a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 11px;
	border: 1px solid var(--border);
	border-radius: 9px;
	background: var(--surface);
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1;
}
.ow-lang a:hover { border-color: var(--border-2); color: var(--text); background: var(--surface-2); }
.ow-lang a.is-active {
	background: linear-gradient(135deg, var(--gold-dark), var(--gold));
	border-color: var(--gold);
	color: #201503;
	box-shadow: 0 2px 10px rgba(212, 175, 55, .25);
}
.ow-flag { width: 18px; height: 13px; border-radius: 2px; display: block; }
.ow-lang a:not(.is-active) .ow-flag { filter: grayscale(.55); opacity: .85; }

/* ----------------------------------------------------------------- topbar */

.ow-topbar {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 28px;
	background: rgba(12, 8, 6, .93);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.ow-burger {
	display: none;
	align-items: center;
	gap: 9px;
	padding: 9px 14px;
	background: var(--surface-2);
	border: 1px solid var(--border-2);
	border-radius: 10px;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.ow-burger span {
	display: block;
	width: 16px; height: 2px;
	background: var(--gold);
	box-shadow: 0 5px 0 var(--gold), 0 -5px 0 var(--gold);
}
.ow-topbar-logo-link { display: none; }
.ow-topbar-logo { height: 30px; width: auto; }
.ow-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ow-topbar-right .ow-discord { color: var(--muted); font-size: 17px; line-height: 1; }
.ow-topbar-right .ow-discord:hover { color: var(--accent); }

.ow-scrim {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .6);
	z-index: 55;
}
body.ow-nav-open .ow-scrim { display: block; }

/* ------------------------------------------------------------------- main */

.ow-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; overflow-x: hidden; }
.ow-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 28px 60px; flex: 1; }

/* ------------------------------------------------------------------- hero */

.ow-hero {
	position: relative;
	margin: -10px -28px 30px;
	padding: 54px 28px 42px;
	text-align: center;
	overflow: hidden;
	border-bottom: 1px solid var(--border);
}
.ow-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('/img/site/background.avif') center 30% / cover no-repeat;
	opacity: .35;
	filter: saturate(.8);
}
.ow-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 40%, rgba(12, 8, 6, .35) 0%, rgba(12, 8, 6, .92) 72%, var(--bg) 100%);
}
.ow-hero > * { position: relative; z-index: 1; }
.ow-hero-logo { width: 210px; margin: 0 auto 14px; display: block; filter: drop-shadow(0 8px 26px rgba(0, 0, 0, .7)); }
.ow-hero h1 {
	font-family: var(--font-title);
	font-weight: 700;
	font-size: clamp(30px, 5vw, 46px);
	letter-spacing: .02em;
	margin: 0 0 10px;
	color: var(--text-strong);
	text-shadow: 0 3px 18px rgba(0, 0, 0, .8);
}
.ow-hero h1 em { color: var(--gold); font-style: normal; }
.ow-hero p { margin: 0 auto 26px; max-width: 620px; color: #cfc4ba; font-size: 15.5px; }

/* ----------------------------------------------------------------- search */

.ow-search { max-width: 620px; margin: 0 auto; position: relative; }
.ow-search-row { display: flex; gap: 10px; }
.ow-search input {
	flex: 1;
	padding: 14px 18px;
	background: rgba(22, 16, 11, .92);
	border: 1px solid var(--border-2);
	border-radius: 12px;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 14.5px;
	outline: none;
}
.ow-search input::placeholder { color: var(--dim); }
.ow-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ow-search button {
	padding: 0 24px;
	background: linear-gradient(135deg, var(--gold-dark), var(--gold));
	border: 0;
	border-radius: 12px;
	color: #201503;
	font-family: var(--font-body);
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
}
.ow-search button:hover { filter: brightness(1.1); }

.ow-results {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0; right: 0;
	max-height: 380px;
	overflow-y: auto;
	background: var(--surface);
	border: 1px solid var(--border-2);
	border-radius: 12px;
	box-shadow: var(--shadow);
	text-align: left;
	z-index: 20;
}
.ow-results.is-open { display: block; }
.ow-results a { display: block; padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.ow-results a:last-child { border-bottom: 0; }
.ow-results a:hover, .ow-results a.is-cursor { background: var(--surface-2); }
.ow-results .ow-r-title { font-weight: 600; }
.ow-results .ow-r-cat { font-size: 11.5px; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.ow-results .ow-r-desc { font-size: 12.5px; color: var(--muted); }
.ow-results .ow-r-empty { padding: 16px; color: var(--muted); font-size: 13.5px; }

/* ------------------------------------------------------------------ stats */

.ow-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	max-width: 620px;
	margin: 26px auto 0;
}
.ow-stat {
	background: rgba(22, 16, 11, .8);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 16px 10px;
}
.ow-stat b {
	display: block;
	font-family: var(--font-title);
	font-weight: 700;
	font-size: 30px;
	line-height: 1.1;
	color: var(--gold);
}
.ow-stat span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------- home cards */

.ow-section { margin-top: 42px; }
.ow-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.ow-section-head h2 {
	font-family: var(--font-title);
	font-weight: 700;
	font-size: 24px;
	letter-spacing: .02em;
	margin: 0;
	color: var(--text-strong);
}
.ow-section-head .ow-section-icon { font-size: 20px; }
.ow-section-head .ow-count {
	margin-left: auto;
	font-size: 12px;
	color: var(--muted);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 2px 10px;
}
.ow-section > p.ow-section-desc { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.ow-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 12px; }
.ow-card {
	display: block;
	padding: 15px 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	color: var(--text);
	transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.ow-card:hover {
	border-color: var(--border-2);
	background: var(--surface-2);
	transform: translateY(-2px);
	color: var(--text);
}
.ow-card b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.ow-card:hover b { color: var(--gold); }
.ow-card span { display: block; font-size: 12.8px; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------------------- article */

.ow-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 26px 0 18px;
	padding: 9px 16px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	font-size: 13px;
	font-weight: 600;
}
.ow-back:hover { border-color: var(--border-2); color: var(--gold); }

.ow-article {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 34px 34px 40px;
	box-shadow: var(--shadow);
}
.ow-article > h1 {
	font-family: var(--font-title);
	font-weight: 700;
	font-size: clamp(27px, 4vw, 38px);
	letter-spacing: .02em;
	margin: 0 0 16px;
	padding-bottom: 16px;
	color: var(--text-strong);
	border-bottom: 2px solid var(--gold-dark);
}

/* índice */
.ow-toc {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 18px 20px 20px;
	margin-bottom: 28px;
}
.ow-toc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.ow-toc-head .ow-toc-kicker {
	font-size: 10.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gold);
	font-weight: 700;
}
.ow-toc-head strong { font-size: 15px; color: var(--text-strong); }
.ow-toc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 9px; }
.ow-toc-item {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 11px 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	font-size: 13.5px;
	line-height: 1.4;
}
.ow-toc-item:hover { border-color: var(--accent); color: var(--text-strong); background: var(--surface-3); }
.ow-toc-num { color: var(--gold); font-weight: 800; font-size: 12px; padding-top: 1px; }

/* corpo do artigo */
.ow-body { font-size: 15px; }
.ow-body h1, .ow-body h2, .ow-body h3, .ow-body h4, .ow-body h5 {
	font-family: var(--font-title);
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--gold);
	margin: 32px 0 12px;
	scroll-margin-top: 90px;
}
.ow-body h1 { font-size: 27px; }
.ow-body h2 { font-size: 23px; }
.ow-body h3 { font-size: 20px; }
.ow-body h4 { font-size: 17px; }
.ow-body h5 { font-size: 15.5px; color: var(--text); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.ow-body p { margin: 0 0 14px; }
.ow-body ul, .ow-body ol { margin: 0 0 16px; padding-left: 22px; }
.ow-body li { margin-bottom: 6px; }
.ow-body blockquote {
	margin: 18px 0;
	padding: 14px 18px;
	background: var(--accent-soft);
	border-left: 3px solid var(--accent);
	border-radius: 0 10px 10px 0;
}
.ow-body blockquote p:last-child { margin-bottom: 0; }
.ow-body code {
	background: var(--surface-3);
	border-radius: 5px;
	padding: 1px 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .9em;
	color: var(--gold);
}
.ow-body hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.ow-body table { border-collapse: collapse; width: 100%; }
.ow-table-scroll { overflow-x: auto; margin: 18px 0; }
.ow-body img { border-radius: 8px; }

.ow-anchor {
	margin-left: 10px;
	font-size: .6em;
	color: var(--dim);
	opacity: 0;
	transition: opacity .15s ease;
}
.ow-body h1:hover .ow-anchor, .ow-body h2:hover .ow-anchor,
.ow-body h3:hover .ow-anchor, .ow-body h4:hover .ow-anchor { opacity: 1; }

/* ----------------------------------------------------------------- footer */

.ow-footer {
	border-top: 1px solid var(--border);
	padding: 26px 28px 40px;
	text-align: center;
	color: var(--muted);
	font-size: 13px;
}
.ow-footer strong { color: var(--gold); font-weight: 600; }
.ow-footer .ow-foot-links { margin-top: 10px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------- responsivo */

@media (max-width: 1023px) {
	.ow-topbar { padding: 10px 14px; }
	.ow-burger { display: inline-flex; }
	.ow-topbar-logo-link { display: block; }
	.ow-sidebar { transform: translateX(-100%); transition: transform .22s ease; }
	body.ow-nav-open .ow-sidebar { transform: none; }
	.ow-main { margin-left: 0; }
	.ow-wrap { padding: 0 16px 48px; }
	.ow-hero { margin: 0 -16px 24px; padding: 34px 16px 30px; }
	.ow-article { padding: 22px 18px 28px; border-radius: 12px; }
	.ow-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.ow-stat b { font-size: 24px; }
	.ow-search-row { flex-direction: column; }
	.ow-search button { padding: 13px; }
}

@media (max-width: 520px) {
	.ow-cards, .ow-toc-grid { grid-template-columns: 1fr; }
}

/* imprime */
@media print {
	.ow-sidebar, .ow-topbar, .ow-back, .ow-toc, .ow-footer { display: none !important; }
	.ow-main { margin: 0; }
	body { background: #fff; color: #000; }
}
