/*
 * Golden Axe — tema HTMLy para blogs de livros e games
 * Fontes: Cinzel e Pixelify Sans (SIL OFL, ver fonts/OFL.txt)
 */

@font-face {
    font-family: "Cinzel";
    src: url("../fonts/Cinzel-Variable.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
}
@font-face {
    font-family: "Pixelify Sans";
    src: url("../fonts/PixelifySans-Variable.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --abyss: #07040f;
    --night: #0d0820;
    --panel: #1b1450;
    --panel-deep: #130d38;
    --gold-hi: #fff0a8;
    --gold: #f4c542;
    --gold-lo: #b3701a;
    --bronze: #5b3512;
    --ember: #f7a02a;
    --blood: #c0322a;
    --parchment: #f1e6c8;
    --mute: #bcaee0;

    --font-display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
    --font-body: "Pixelify Sans", "Courier New", ui-monospace, monospace;

    --frame: 0 0 0 3px var(--abyss), 0 0 0 6px var(--gold-lo), 0 0 0 9px var(--abyss);
}

/*-------------------------
    Base
--------------------------*/

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
    background: var(--night);
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.6;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "clig" 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }

:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

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

.hide { display: none; }
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.skip-link {
    position: absolute; left: .5rem; top: -4rem; z-index: 100;
    background: var(--gold); color: var(--abyss); padding: .5rem 1rem;
    font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: .5rem; }

/*-------------------------
    Tela de título
--------------------------*/

.title-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem 3.5rem;
    min-height: 200px;
    background-color: #0b0720;
    background-image:
        url("../images/mountains.svg"),
        url("../images/sky.svg");
    background-repeat: repeat-x, no-repeat;
    background-position: 0 100%, center bottom;
    background-size: 640px 80px, cover;
    image-rendering: pixelated;
    border-bottom: 6px solid var(--abyss);
}

.title-screen.is-home {
    min-height: 400px;
    padding-top: 3rem;
    padding-bottom: 7rem;
    background-image:
        url("../images/castle.svg"),
        url("../images/mountains.svg"),
        url("../images/sky.svg");
    background-repeat: no-repeat, repeat-x, no-repeat;
    background-position: right 9% bottom 0, 0 100%, center bottom;
    background-size: clamp(170px, 24vw, 330px) auto, 640px 80px, cover;
}

/* Logo dourado biselado: o momento memorável do tema */
.logo { margin: 0; line-height: 1; }

.logo a {
    position: relative;
    display: inline-block;
    padding: .1em .15em;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.1rem, 7.5vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: .02em;
    text-decoration: none;
    color: transparent; /* o texto real fica invisível; o visual vem dos dois pseudo-elementos */
}

.logo a::before,
.logo a::after {
    content: attr(data-text);
    position: absolute;
    inset: .1em .15em auto .15em;
    pointer-events: none;
}

/* camada de baixo: contorno escuro e degraus de sombra */
.logo a::before {
    color: var(--abyss);
    -webkit-text-stroke: .16em var(--abyss);
    filter: drop-shadow(0 .07em 0 var(--bronze)) drop-shadow(0 .13em 0 var(--abyss));
}

/* camada de cima: ouro com a linha de horizonte dos logos de fliperama + brilho */
.logo a::after {
    color: transparent;
    background-image:
        linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%),
        linear-gradient(to bottom, #fff7c4 0%, #f4c542 42%, #b3701a 52%, #f4c542 53%, #e39a25 100%);
    background-size: 260% 100%, 100% 100%;
    background-position: 160% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 1.2s steps(12) .5s 1 both;
}

.is-inner .logo a { font-size: clamp(1.6rem, 5vw, 2.6rem); }

@keyframes shine {
    to { background-position: -70% 0, 0 0; }
}

.tagline {
    margin-top: 1.25rem;
    max-width: 38rem;
    font-size: 1.2rem;
    color: var(--parchment);
    text-shadow: 2px 2px 0 var(--abyss), -1px -1px 0 var(--abyss), 2px -1px 0 var(--abyss), -1px 2px 0 var(--abyss);
}

/*-------------------------
    Barra de menu
--------------------------*/

.menu-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    padding: .5rem 1.5rem;
    background: var(--abyss);
    border-bottom: 4px solid var(--gold-lo);
    box-shadow: inset 0 -4px 0 var(--bronze);
}

.menu ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.menu li { position: relative; }

.menu a {
    position: relative;
    display: block;
    padding: .45rem .9rem .45rem 1.6rem;
    font-weight: 700;
    color: var(--parchment);
    text-decoration: none;
}

/* cursor de seleção, como na tela de escolha de personagem */
.menu a::before {
    content: "";
    position: absolute;
    left: .5rem; top: 50%;
    margin-top: -6px;
    border: 6px solid transparent;
    border-left: 9px solid var(--gold);
    border-right: 0;
    opacity: 0;
}
.menu a:hover, .menu a:focus-visible, .menu .active > a { color: var(--gold-hi); }
.menu .active > a::before { opacity: 1; }
.menu a:hover::before, .menu a:focus-visible::before { opacity: 1; animation: blink .8s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }

.menu .subnav {
    display: none;
    position: absolute; left: 0; top: 100%; z-index: 20;
    min-width: 12rem;
    flex-direction: column;
    background: var(--panel-deep);
    border: 3px solid var(--gold-lo);
    box-shadow: 4px 4px 0 var(--abyss);
}
.menu li:hover > .subnav, .menu li:focus-within > .subnav { display: flex; }

.menu-bar .search { margin-left: auto; }
.menu-bar .social { display: flex; align-items: center; }
.social-logo { display: flex; gap: .25rem; }
.social-logo a { color: var(--gold); padding: .25rem; }
.social-logo a:hover { color: var(--gold-hi); }

/* busca */
#search-form { display: flex; }
.search-input {
    width: 11rem; max-width: 100%;
    padding: .4rem .6rem;
    font: inherit; font-size: 1rem;
    color: var(--parchment);
    background: var(--panel-deep);
    border: 3px solid var(--gold-lo);
    border-right: 0;
    border-radius: 0;
}
.search-input:focus { outline-offset: 0; border-color: var(--gold); }
.search-button {
    padding: .4rem .8rem;
    font: inherit; font-size: 1rem; font-weight: 700;
    color: var(--abyss);
    background: var(--gold);
    border: 3px solid var(--gold-lo);
    border-radius: 0;
    cursor: pointer;
}
.search-button:hover { background: var(--gold-hi); }
.search-button::-moz-focus-inner { border: 0; padding: 0; }

/*-------------------------
    Estrutura
--------------------------*/

.wrap {
    flex: 1;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
}

/* sem widgets ativos: coluna única, centralizada */
.wrap.no-sidebar { grid-template-columns: minmax(0, 780px); justify-content: center; }

/* moldura dupla: painéis de diálogo do jogo */
.panel {
    position: relative;
    margin: 0 9px 2.25rem;
    padding: 1.5rem 1.75rem 1.75rem;
    background: var(--panel);
    border: 3px solid var(--gold);
    box-shadow: var(--frame), 12px 12px 0 9px var(--abyss);
}
.panel.is-single { padding: 2rem 2.25rem 2.25rem; }

.breadcrumb {
    margin: 0 9px 1.5rem;
    font-size: .95rem;
    color: var(--mute);
}
.breadcrumb a { color: var(--mute); }
.breadcrumb a:hover { color: var(--gold-hi); }

/*-------------------------
    Títulos e metadados
--------------------------*/

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.2;
    color: var(--gold-hi);
}

.title-index, .title-post, .category-title {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    text-shadow: 0 3px 0 var(--bronze), 0 5px 0 var(--abyss);
}
.title-index a, .title-post a { color: inherit; text-decoration: none; }
.title-index a:hover { color: var(--ember); }

/* barra de vida: o único detalhe de HUD, só nos títulos de leitura */
.title-post::after {
    content: "";
    display: block;
    height: 10px;
    margin-top: 1rem;
    background: repeating-linear-gradient(90deg, var(--blood) 0 12px, var(--abyss) 12px 14px);
    border: 2px solid var(--abyss);
    box-shadow: 0 0 0 2px var(--gold-lo);
}

.date {
    margin-top: .6rem;
    font-size: .95rem;
    color: var(--mute);
}
.date a { color: var(--mute); }
.date a:hover { color: var(--gold-hi); }

.featured-image, .featured-video, .featured-audio, .featured-quote { margin-top: 1.25rem; }
.featured-image img, .teaser-body img, .post-body img {
    display: block;
    border: 3px solid var(--abyss);
    box-shadow: 0 0 0 3px var(--gold-lo);
}
.featured-video iframe, .featured-audio iframe { width: 100%; border: 3px solid var(--abyss); }

/*-------------------------
    Texto
--------------------------*/

.teaser-body, .post-body, .category-content, .bio { margin-top: 1.25rem; max-width: 66ch; }
.is-single .post-body { margin-top: 1.5rem; }

.teaser-body p, .post-body p, .category-content p, .bio p { margin-bottom: 1.1rem; }

.post-body h2, .post-body h3, .post-body h4,
.teaser-body h2, .teaser-body h3, .teaser-body h4 { margin: 2rem 0 .75rem; }
.post-body h2, .teaser-body h2 { font-size: 1.6rem; }
.post-body h3, .teaser-body h3 { font-size: 1.3rem; }
.post-body h4, .teaser-body h4 { font-size: 1.1rem; color: var(--gold); }

.post-body ul, .post-body ol, .teaser-body ul, .teaser-body ol { margin: 0 0 1.1rem 1.5rem; }
.post-body :first-child, .teaser-body :first-child { margin-top: 0; }
.post-body li, .teaser-body li { margin-bottom: .3rem; }
.post-body ul li::marker, .teaser-body ul li::marker { color: var(--gold); }

.post-body blockquote, .teaser-body blockquote, .featured-quote blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--panel-deep);
    border: 3px solid var(--abyss);
    border-left: 8px solid var(--blood);
    color: var(--parchment);
}
.post-body blockquote p:last-child, .teaser-body blockquote p:last-child { margin-bottom: 0; }

.post-body hr, .teaser-body hr {
    margin: 2rem 0;
    border: 0;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--gold-lo) 0 8px, transparent 8px 12px);
}

code, pre, kbd { font-family: ui-monospace, "Courier New", monospace; font-size: .95em; }
code { padding: .1em .35em; background: var(--abyss); color: var(--gold-hi); }
pre {
    margin: 1.25rem 0;
    padding: 1rem;
    overflow-x: auto;
    background: var(--abyss);
    border: 3px solid var(--gold-lo);
    line-height: 1.5;
}
pre code { padding: 0; background: none; }

table { width: 100%; margin: 1.25rem 0; border-collapse: collapse; display: block; overflow-x: auto; }
th, td { padding: .5rem .75rem; text-align: left; border: 2px solid var(--gold-lo); }
th { font-family: var(--font-display); background: var(--panel-deep); color: var(--gold-hi); }

/*-------------------------
    Tags, relacionados, autor
--------------------------*/

.tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1.75rem;
    font-size: .95rem;
    color: var(--mute);
}
.tags strong { font-weight: 400; }
.tags a {
    padding: .1rem .6rem;
    color: var(--parchment);
    text-decoration: none;
    background: var(--panel-deep);
    border: 2px solid var(--gold-lo);
}
.tags a:hover { color: var(--abyss); background: var(--gold); border-color: var(--gold); }

.share-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 4px dashed var(--gold-lo);
}
.author-info { flex: 1 1 18rem; font-size: 1rem; }
.author-info h4 { font-size: 1.05rem; margin-bottom: .35rem; }
.author-info h4 strong { font-weight: 900; }
.share { display: flex; gap: .5rem; align-items: flex-start; }
.share a {
    padding: .35rem .8rem;
    font-size: .95rem;
    color: var(--parchment);
    text-decoration: none;
    border: 2px solid var(--gold-lo);
}
.share a:hover { color: var(--abyss); background: var(--gold); border-color: var(--gold); }

.related { margin-top: 2rem; }
.related h4, .comments h4 { margin-bottom: .6rem; }
.related ul { list-style: none; }
.related li { padding: .3rem 0 .3rem 1.4rem; position: relative; }
.related li::before {
    content: "";
    position: absolute; left: 0; top: .85rem;
    border: 5px solid transparent; border-left: 8px solid var(--gold); border-right: 0;
}

.comments { margin-top: 2rem; }

/*-------------------------
    Navegação: botões de arcade
--------------------------*/

.pager, .postnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.pager { margin: 0 9px 2rem; }
.postnav { margin-top: 2rem; padding-top: 1.5rem; border-top: 4px dashed var(--gold-lo); }

.pagination-arrow {
    position: relative;
    display: inline-block;
    padding: .55rem 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--abyss);
    text-decoration: none;
    background: var(--gold);
    border: 3px solid var(--abyss);
    box-shadow: 0 5px 0 var(--bronze), 0 5px 0 3px var(--abyss);
    transition: none;
}
.pagination-arrow:hover { color: var(--abyss); background: var(--gold-hi); }
.pagination-arrow:active { transform: translateY(5px); box-shadow: 0 0 0 var(--bronze), 0 0 0 3px var(--abyss); }

.pagination-arrow.newer { padding-left: 2rem; }
.pagination-arrow.older { padding-right: 2rem; margin-left: auto; }
.pagination-arrow.newer::before, .pagination-arrow.older::after {
    content: "";
    position: absolute; top: 50%; margin-top: -6px;
    border: 6px solid transparent;
}
.pagination-arrow.newer::before { left: .7rem; border-right: 8px solid var(--abyss); border-left: 0; }
.pagination-arrow.older::after { right: .7rem; border-left: 8px solid var(--abyss); border-right: 0; }

.page-number { font-family: var(--font-display); font-weight: 900; color: var(--gold-hi); }

.post-index { margin: 2.5rem 9px 1rem; font-size: 1.4rem; }
.post-list { list-style: none; margin: 0 9px; }
.post-list .item { padding: .75rem 0; border-bottom: 2px dashed var(--gold-lo); }
.post-list .meta { display: block; font-size: .9rem; color: var(--mute); }

/*-------------------------
    Barra lateral
--------------------------*/

.sidebar { display: flex; flex-direction: column; gap: 1.75rem; }

.widget {
    padding: 1rem 1.1rem 1.1rem;
    background: var(--panel-deep);
    border: 3px solid var(--gold-lo);
    box-shadow: 5px 5px 0 var(--abyss);
    font-size: 1rem;
}
.widget h3 { margin-bottom: .6rem; font-size: 1.15rem; color: var(--gold); }
.widget ul { list-style: none; }
.widget li { position: relative; padding: .2rem 0 .2rem 1.1rem; }
.widget li::before {
    content: "";
    position: absolute; left: 0; top: .65rem;
    border: 4px solid transparent; border-left: 6px solid var(--gold-lo); border-right: 0;
}
.widget li:hover::before { border-left-color: var(--gold); }
.widget li ul { margin-top: .2rem; }
.widget a { color: var(--parchment); text-decoration: none; }
.widget a:hover { color: var(--gold-hi); text-decoration: underline; }

.tag-cloud a { display: inline-block; margin: 0 .5rem .25rem 0; }
.tagcloud ul li { display: inline-block; padding: 0; margin: 0 .6rem .25rem 0; }
.tagcloud ul li::before { display: none; }

.archivegroup li.expanded > ul { display: block; }
.archivegroup li.collapsed > ul { display: none; }

/*-------------------------
    Rodapé
--------------------------*/

.site-footer {
    padding: 1.5rem;
    text-align: center;
    font-size: .95rem;
    color: var(--mute);
    background: var(--abyss);
    border-top: 4px solid var(--gold-lo);
    box-shadow: inset 0 4px 0 var(--bronze);
}
.site-footer a { color: var(--mute); }
.site-footer a:hover { color: var(--gold-hi); }

/*-------------------------
    Telas menores
--------------------------*/

@media (max-width: 880px) {
    .wrap { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .sidebar { margin: 0 9px; }
}

@media (max-width: 640px) {
    body { font-size: 1.05rem; }
    .title-screen.is-home { min-height: 320px; padding-bottom: 5.5rem; }
    .title-screen.is-home { background-position: center bottom, 0 100%, center bottom; background-size: 150px auto, 480px 60px, cover; }
    .title-screen { background-size: 480px 60px, cover; }
    .menu-bar { padding: .5rem 1rem; }
    .menu-bar .search { margin-left: 0; width: 100%; }
    .search-input { flex: 1; width: auto; }
    .panel, .panel.is-single { padding: 1.25rem 1.1rem 1.4rem; margin-bottom: 2rem; }
    .pagination-arrow.older { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .logo a::after { animation: none; }
    .menu a:hover::before, .menu a:focus-visible::before { animation: none; }
}

/* o HTMLy define tamanhos inline na nuvem de tags; aqui todas ficam legíveis */
.tagcloud a, .tag-cloud a { font-size: .95rem !important; }
